diff --git a/app/[locale]/academics/awards/page.tsx b/app/[locale]/academics/awards/page.tsx index 8dae3387..c3f54e62 100644 --- a/app/[locale]/academics/awards/page.tsx +++ b/app/[locale]/academics/awards/page.tsx @@ -1,9 +1,107 @@ -import { WorkInProgressStatus } from '~/components/status'; +import { ReactNode } from 'react'; -export default function Programmes({ +import Heading from '~/components/heading'; +import ImageHeader from '~/components/image-header'; +import { getTranslations } from '~/i18n/translations'; +import { cn } from '~/lib/utils'; + +export default async function Programmes({ params: { locale }, }: { params: { locale: string }; }) { - return ; + const text = (await getTranslations(locale)).Awards; + + return ( + <> + +
+ {text.awards.map((award, i) => ( + + {award.criterion && ( + <> +
+ {award.criterion[0]}: +
+
+ {award.criterion[1]} +
+ {award.criterion.length > 2 && ( +
    + {award.criterion.slice(2).map((item, index) => ( +
  • {item}
  • + ))} +
+ )} + + )} +
+ ))} +
+ + ); +} + +interface AwardCardProps { + title: string; + about: string; + description?: string; + children?: ReactNode; + index: number; + text: { + about: string; + description: string; + criterion: string; + }; +} + +function AwardsCard({ + title, + about, + children, + description, + index, + text, +}: AwardCardProps) { + return ( + <> + +
+

{text.about}

+

{about}

+ {children && ( + <> +

{text.criterion}

+
{children}
+ + )} + {description && ( + <> +

{text.criterion}

+

{description}

+ + )} +
+ + ); } diff --git a/app/[locale]/academics/convocation/[year]/page.tsx b/app/[locale]/academics/convocation/[year]/page.tsx new file mode 100644 index 00000000..093e137a --- /dev/null +++ b/app/[locale]/academics/convocation/[year]/page.tsx @@ -0,0 +1,63 @@ +import Image from 'next/image'; +import Link from 'next/link'; + +import Heading from '~/components/heading'; +import ImageHeader from '~/components/image-header'; +import { getTranslations } from '~/i18n/translations'; +import { cn } from '~/lib/utils'; + +import { getConvocationData } from '../utils'; + +export default async function Page({ + params: { locale, year }, +}: { + params: { locale: string; year: string }; +}) { + const text = (await getTranslations(locale)).Convocation; + + const data = getConvocationData(year); + + return ( + <> + + + +
+
    + {data.notifications.map((note, i) => ( +
  • + + {note.title} + +
  • + ))} +
+
+ + ); +} diff --git a/app/[locale]/academics/convocation/page.tsx b/app/[locale]/academics/convocation/page.tsx index efef7cb3..afdc4887 100644 --- a/app/[locale]/academics/convocation/page.tsx +++ b/app/[locale]/academics/convocation/page.tsx @@ -1,9 +1,57 @@ -import { WorkInProgressStatus } from '~/components/status'; +import Link from 'next/link'; -export default function Convocation({ +import { cn } from '~/lib/utils'; +import Heading from '~/components/heading'; + +export default async function Convocation({ params: { locale }, }: { params: { locale: string }; }) { - return ; + return ( +
+ +
    + {['19th', '18th', '17th', '16th'].map((convocation, i) => ( +
  • + +
    + {convocation} +
    +
    + Convocation +
    + +
  • + ))} +
+
+ ); } diff --git a/app/[locale]/academics/convocation/utils.ts b/app/[locale]/academics/convocation/utils.ts new file mode 100644 index 00000000..1d2c2a31 --- /dev/null +++ b/app/[locale]/academics/convocation/utils.ts @@ -0,0 +1,556 @@ +interface Notification { + title: string; + href: string; +} + +interface YearData { + notifications: Notification[]; +} + +interface ConvocationData { + years: Record; +} + +const notification19 = [ + { + title: 'Toppers and Award winners', + href: 'https://nitkkr.ac.in/wp-content/uploads/2023/11/Topper-and-Award-Winner-Tentative-List-19th-Convocation.pdf', + }, + { + title: 'Final candidates list IIITs', + href: 'https://nitkkr.ac.in/wp-content/uploads/2024/02/FINAL-LIST-OF-DEGREE-RECIPIENTS-IN-19TH-CONVOCATION-AS-ON-01-02-2024-IIITS.pdf', + }, + { + title: 'Final candidates list NIT KKR', + href: 'https://nitkkr.ac.in/wp-content/uploads/2024/02/FINAL-LIST-OF-DEGREE-RECIPIENTS-IN-19TH-CONVOCATION-AS-ON-01-02-2024-NITKKR.pdf', + }, + { + title: 'Tentative list for doctoral (phase- 5 & 6).', + href: 'https://nitkkr.ac.in/wp-content/uploads/2024/01/Responses-1.pdf', + }, + { + title: 'Tentative list for doctoral (phase- 6).', + href: 'https://nitkkr.ac.in/wp-content/uploads/2024/01/SUPPLEMENTARY-TENTATIVE-LIST-OF-DEGREE-RECIPENTS-OF-PG-PROGRAMS-FOR-19TH-CONVOCATION-PASSED-IN-2022-23-Phase-VI.pdf', + }, + { + title: 'Update on 19th Convocation: Reg.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2023/12/Reg.-19th-Convocation.pdf', + }, + { + title: 'Tentative list for PG (phase- 5)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2023/12/SUPPLEMENTARY-TENTATIVE-LIST-OF-DEGREE-RECIPIENTS-OF-PG-PROGRAMMES-FOR-19th-CONVOCATION-PHASE-V.pdf', + }, + { + title: 'Tentative list Doctoral (phase- 4)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2023/12/Phase-IV-PhD.pdf', + }, + { + title: 'Tentative list PG (phase- 2)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2023/11/SUPPLEMENTARY-TENTATIVE-LIST-OF-DEGREE-RECIPIENTS-OF-PG-PROGRAMMES-FOR-19th-CONVOCATION-PHASE-II-1.pdf', + }, + { + title: 'Tentative list Doctoral (phase- 2)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2023/11/ListofDegreeRecipientsfor19thConvocation-Supplimentary-Phase-I-21-11-23.pdf', + }, + { + title: 'Combined tentative list', + href: 'https://nitkkr.ac.in/wp-content/uploads/2023/11/TentativeListofDegreeRecipientsfor19thConvocationUpdated-09-11-2023.pdf', + }, + { + title: '19th Convocation Data Collection Form', + href: 'https://nitkkr.ac.in/wp-content/uploads/2023/11/TentativeListofDegreeRecipientsfor19thConvocationUpdated-09-11-2023.pdf', + }, +]; + +const notification18 = [ + { + title: 'Souvenir 18th Convocation-2022', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/12/SOUVENIR-18thConvo-2022.pdf', + }, + { + title: 'News letter 18th Convocation-2022', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/NEWS-LETTER-18thConvo-2022.pdf', + }, + { + title: + 'Student Invitation Card and Convocation Lunch Pass for 18th Convocation ( Diamond Jubilee) – 2022 [ The student will be issued hard copy of the Lunch Pass at the time of Physical Registration on 28-11-2022]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/18ConvoIvitation-Invitation-Student.pdf', + }, + { + title: + 'Notice for Classes off on 28.11.2022 (Except B.Tech. 1st Sem) and 29.11.2022 (All Students)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/Notice-for-Classes-off-on-28.11.2022-Except-B.Tech_.-1st-Sem-and-29.11.2022-All-Students.pdf', + }, + { + title: 'Rehearsal of 18th Convocation', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/Rehearsal-of-18th-Convocation.pdf', + }, + { + title: 'Convocation Protocol for 18th (Diamond Jubilee)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/Convocation-Protocol.pdf', + }, + { + title: 'Real time webcasting of the 18th Convocation Proceedings to', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/NIT-Kurukshetra-is-making-arrangements-for-real-time-webcasting-of-the-18-th-Convocation-Proceedings-to.pdf', + }, + { + title: 'Notification and Advt. for 18th Convocation rehearsal etc.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/Notification-and-Advt.-for-18th-Diamond-Jubilee-Convocation.pdf', + }, + { + title: '18th convocation accommodation link', + href: 'https://forms.gle/2S7pR2jmd8EqVGqs9', + }, + { + title: '18th convocation Transportation Schedule', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/convocation-Transporatation-Schedule2-1.pdf', + }, + { + title: + 'Final List of Degree Recipients of NIT Kurukshetra and IIIT Sonepat on 18th Convocation ( Diamond Jubilee Year) 2022 to be held on 29-11-2022', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/19-11-2022-Final-List-of-Degree-Recipients-of-NIT-Kurukshetra-and-IIIT-Sonepat-on-18th-Convocation-Diamond-Jubilee-Year-2022-to-be-held-on-29-11-2022.pdf', + }, + { + title: + 'Important Notice for Degree Recipients who wish to receive their Degree by Speed Post after 18th Convocation', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/11/Important-Notice-for-Degree-Recipients-who-wish-to-receive-their-Degree-by-Speed-Post-after-18th-Convocation.pdf', + }, + { + title: 'Convocation-apparel-for-All-Senators-and-Dignitaries', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/10/Convocation-apparel-for-All-Senators-and-Dignitaries.pdf', + }, + { + title: 'Dress code for 18th (Diamond Jubilee Convocation)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/10/Dress-code-for-18th-Diamond-Jubilee-Convocation-21102022.pdf', + }, + { + title: + 'Final List of Degree Recipients FOR AWARD OF DEGREES IN 18TH CONVOCATON ( AS ON 29.09.2022)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/10/FINAL-LIST-OF-DEGREE-RECIPIENTS-FOR-AWARD-OF-DEGREES-IN-18TH-CONVOCATON-LIKELY-TO-BE-SCHEDULED-IN-THE-MONTHS-OF-OCTOBER-2022-AS-ON-27.09.2022-27092022-1_compressed.pdf', + }, + { + title: + 'Notice & Tentative List of Gold Medalist and Topper Students of 18th Convocation', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/10/Notice-Tentative-List-of-Gold-Medalist-and-Topper-Students-of-18th-Convocation-27092022_compressed.pdf', + }, + { + title: + 'FINAL LIST OF DEGREE RECIPIENTS FOR 18TH CONOVOCATION SCHEDULED IN OCTOBER 2022 AS ON 22.09.2022 AFTER REMOVAL OF Discrepancies', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/10/23.09.2022-FINAL-LIST-OF-DEGREE-RECIPIENTS-FOR-18TH-CONOVOCATION-SCHEDULED-IN-OCTOBER-2022-AS-ON-22.09.2022-AFTER-REMOVAL-OF-Discrepancies-23092022_compressed.pdf', + }, + { + title: + '18th (Diamond Jubilee) Convocation News in Dainik Bhaskar Kurukshetra Edition', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/09/IMG-20220913-WA0009.jpg', + }, + { + title: + 'List of the Candidates who have not submitted Google Form upto 05:00 pm on 15.09.2022 ( They are required to fill the form by 05:00 pm upto 19.09-2022 so that they can receive degrees digitally )(updated )', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/09/Notfilled-GoogleFormason-15-09-22-15092022.pdf', + }, + { + title: '18th (Diamond Jubilee) Convocation Data Collection Form', + href: 'https://docs.google.com/forms/d/e/1FAIpQLSdjNWomIr4eeIXs37hivTb1Am9onB3M5gr-uesPEANqw2aO2A/viewform', + }, + { + title: 'B.Tech (All Programs)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/09/UG-Convo-2022-09092022.pdf', + }, + { + title: 'PG Programs (M.Tech (All Programs, MCA & MBA)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/09/PG-DEGREE-RECIPIENTS-LIST-FOR-18TH-DIAMOND-JUBILEE-CONVOCATION-09092022.pdf', + }, + { + title: 'Ph.D', + href: 'https://nitkkr.ac.in/wp-content/uploads/2022/09/Ph.D-Convo-2022-09092022.pdf', + }, + { + title: '10-09-2022 18th (Diamond Jubilee) Convocation Data Collection Form', + href: 'https://forms.gle/oS14vXJHkeQkBLp36', + }, +]; + +const notification17 = [ + { + title: + 'Final List of Degree Recipient 17th Convocation after correction MCA Programme as on 11.02.2020', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Final-List-of-Degree-Recipient-17th-Convocation-MCA-Programme-as-on-11.02.2020.pdf', + }, + { + title: + 'Final List of Degree Recipients 17th Convocation after Correction MBA Programme as on 11.02.2020', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Final-List-of-Degree-Recipients-after-Correction-MBA-Programme-as-on-11.02.2020.pdf', + }, + { + title: + 'Final List of Degree Recipients 17th Convocation after Correction Ph.D. Programmes as on 11.02.2020', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Final-List-of-Degree-Recipients-after-Correction-Ph.D.-Programmes-as-on11.02.2020.pdf', + }, + { + title: 'Revised Latest PhD List for Convocation on 20.02.2020', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Latest-PhD-List-for-Convocation-on-20.02.2020-07022020.pdf', + }, + { + title: 'Transportation Schedule for 17th convocation 2020', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Transportation-Schdule-for-17th-convocation-2020.pdf', + }, + { + title: + 'Revised Final List of Academic Prizes Recipients [ for 17th Convocation [After Removal of Discrepencies and Using Tie Breaking Rule]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Final_List_of_AcademicPrizes_Recipients_for_17thConvocation-After-Removal-of-Discrepencies-and-Using-Tie_Breaking-Rule-07022020.pdf', + }, + { + title: + 'Revised Supplimentary List of Degree Recipient of Phase 2 (PhD Programmes) [Last date of correction is 10.02.2020]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Revised_SupplimentaryListofDegreeRecipientofPhase_2-PhD-Programmes-Last-date-of-correction-is-10.02.2020-07022020.pdf', + }, + { + title: + 'Final List of Final List of Academic Prizes Recipients [ for_17thConvocation [After Removal of Discrepencies and Using Tie_Breaking Rule]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Final_List_of_FinalListofAcademicPrizes_Recipients_for_17thConvocation-After-Removal-of-Discrepencies-and-Using-Tie_Breaking-Rule-0602.pdf', + }, + { + title: + 'Final List of Medal and Trophy Recipients for 17thConvocation [After Removal of Discrepencies and Using Tie_Breaking Rule]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Final_List_of_Medal-and-Trophy_Recipients_for_17thConvocation-After-Removal-of-Discrepencies-and-Using-Tie_Breaking-Rule-0602.pdf', + }, + { + title: + 'Supplementary List of Degree Recipient of Phase-3 (M.Tech Programmes) [Last date of correction is 10.02.2020]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Supplementary-List-of-Degree-Recipient-of-Phase-3-M.Tech-Programmes-Last-date-of-correction-is-10.02.2020-06022020.pdf', + }, + { + title: + 'Supplimentary List of Degree Recipient of Phase-2 (PhD Programmes) [Last date of correction is 10.02.2020]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/SupplimentaryListofDegreeRecipientofPhase-2-PhD-Programmes-Last-date-of-correction-is-10.02.2020-05022020.pdf', + }, + { + title: + 'Supplimentary List of Degree Recipient of Phase-2 (M.Tech Programmes) [Last date of correction is 10.02.2020]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/SupplimentaryListofDegreeRecipientofPhase-2-M.Tech-Programmes-Last-date-of-correction-is-10.02.2020-05022020.pdf', + }, + { + title: + 'Supplimentary List of Degree Recipient of Phase-2 (B.Tech Programmes) [Last date of correction is 10.02.2020]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/SupplimentaryListofDegreeRecipientofPhase-2-B.Tech-Programmes-Last-date-of-correction-is-10.02.2020-02052020.pdf', + }, + { + title: + 'Final List of Degree Recipients after Correction (Phase-1) B.TechProgrammes', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/FinalListofDegreeRecipientsafterCorrectionPhase-1B.TechProgrammes05.02.2020.pdf', + }, + { + title: + 'Revised Final List of Degree Recipients after Correction (Phase-1) M.Tech. Programmes', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Final-List-of-Degree-Recipients-after-Correction-Phase-1-M.Tech_.-Programmes-05.02.2020-06022020.pdf', + }, + { + title: 'Final List of Degree Recipients after Correction (Phase-1) MBA', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/FinalListofDegreeRecipientsafterCorrectionPhase-1MBA05.02.2020.pdf', + }, + { + title: 'Final List of Degree Recipients after Correction (Phase-1) MCA', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/FinalListofDegreeRecipientsafterCorrectionPhase-1MCA05.02.2020.pdf', + }, + { + title: 'Supplimentary list of PhD title', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/supplimentary-list-of-PhD-title-03022020.pdf', + }, + { + title: + 'Notice for UG & PG Gold Medalist and Toppers Students of 17th Convocation', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Notice-for-UG-PG-Gold-Medalist-and-Toppers-Students-of-17th-Convocation-30012020.pdf', + }, + { + title: 'Notice for Degree Receipents students', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Notice-for-Degree-Receipents-students.pdf', + }, +]; + +const notification16 = [ + { + title: 'B.Tech', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/UG_B.Tech_..pdf', + }, + { + title: 'M.Tech, M.B.A and M.C.A', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/PG_M.Tech_._MBA_and_MCA.pdf', + }, + { + title: 'Ph.D', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Ph.D.pdf', + }, + { + title: 'List of students eligible for Medals / Awards and Academic Prizes', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Medal_Awards_and_Academic_Prizes_list_13th_Conovcation_-2016.pdf', + }, + { + title: 'Advertisement 03/2016', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Advertiemt_03.2016.pdf', + }, + { + title: 'Important instructions for degree recipients students', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Important_instructions_for_degree_recipients_students.pdf', + }, + { + title: 'Supplementary List 1 ( B.Tech. / M.Tech. / Ph.D. )', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Supplementary_list_1_UG_PG_PhD-1.pdf', + }, + { + title: 'B.Tech Civil Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Civil_Engg..pdf', + }, + { + title: 'B.Tech Computer Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Computer_Engg..pdf', + }, + { + title: 'B.Tech Information Technology', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Information_Technology.pdf', + }, + { + title: 'B.Tech Electronics & Comm. Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Electronics__Comm._Engg..pdf', + }, + { + title: 'B.Tech Electrical Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Electrical_Engg..pdf', + }, + { + title: 'B.Tech Mechanical Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Mechanical_Engg..pdf', + }, + { + title: 'B.Tech Industrial Engineering & Management', + href: 'http://nitkkr.ac.in/docs/IEM.pdf', + }, + { + title: 'M.Tech Civil Engg. (Environmental)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Civil_Engg._Environmental.pdf', + }, + { + title: 'M.Tech Civil Engg. (Soil Machines & Foundation)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Civil_Engg._Soil_Machines__Foundation.pdf', + }, + { + title: 'M.Tech Civil Eng. (Structural )', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Civil_Eng._Structural_.pdf', + }, + { + title: 'M.Tech Civil Engg. (Transportation)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Civil_Engg._Transportation.pdf', + }, + { + title: 'M.Tech Civil Engg. (Water Resources)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Civil_Engg._Water_Resources.pdf', + }, + { + title: 'M.Tech Computer Engg.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Computer_Engg.-1.pdf', + }, + { + title: 'M.Tech Control System', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Control_System.pdf', + }, + { + title: 'M.Tech Electronics & Comm. Engg.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Electronics__Comm._Engg..pdf', + }, + { + title: 'M.Tech Mechanical Engg. (Industrial & Production)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Mechanical_Engg._Industrial__Production.pdf', + }, + { + title: 'M.Tech Mechanical Engg. (Machine Design)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Mechanical_Engg._Machine_Design.pdf', + }, + { + title: 'M.Tech Mechanical Engg. (Thermal)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Mechanical_Engg._Thermal.pdf', + }, + { + title: 'M.Tech Physics (Instrumentation)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Physics_Instrumentation.pdf', + }, + { + title: 'M.Tech Physics (Nanotechnology)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Physics_Nanotechnology.pdf', + }, + { + title: 'M.Tech Power Electronics & Drives', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Power_Electronics__Drives.pdf', + }, + { + title: 'M.Tech Power System', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Power_System.pdf', + }, + { + title: 'M.Tech School of Renewable Energy System', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/School_of_Renewable_Energy_System.pdf', + }, + { + title: 'M.Tech School of Biomedical Engg.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/School_of_Biomedical_Engg..pdf', + }, + { + title: 'M.Tech School of Material Science & Nanotechnology', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/School_of_Material_Science__Nanotechnology.pdf', + }, + { + title: 'Master of Business Administration', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/MBA.pdf', + }, + { + title: 'Master of Computer Application', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/MCA.pdf', + }, + { + title: 'Doctor of Philosophy ( Ph.D.)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Ph.D..pdf', + }, +]; + +const notification12 = [ + { + title: + '12TH CONVOCATION WILL BE HELD ON 26-03-15, DR. APJ ABDUL KALAM WILL BE THE CHIEF GUEST OF THE CONVOCATION', + href: '#', + }, + { + title: + 'Degree Awarded News including D.Sc. to Prof. Sanjay Govind Dhande and Prof. Pritam Singh', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/convo_news_2.pdf', + }, + { + title: + 'Cheif Guest Address by Bharat Ratna Dr. APJ Abdul Kalam News)- Media Coverage', + href: 'http://nitkkr.ac.in/docs/convo_news_2.PDF', + }, + { + title: + 'Thanks to Every One for their direct/in-direct support in the successful completion of 12th Convocation of the Institute. You may drop your suggestions at academic@nitkkr.ac.in for improvement in next year 26-03-15 : Live Webcast of the 12th Convocation from 3 PM onwards ( Now the link is no longer available )', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Teaching_remain_Suspended_on_26th_March_In_Lieu_of_Convocation-2015.pdf', + }, + { + title: + '24-03-15 : Teaching remain Suspended on 26th March, In Lieu of Convocation-2015.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Teaching_remain_Suspended_on_26th_March_In_Lieu_of_Convocation-2015.pdf', + }, + { + title: '24-03-15 : Rehearsal of 12th Convocation-2015 for All Senators.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Senators_Rehearsal_of_12th_Convocation.pdf', + }, + { title: 'Rehearsal of 12th Convocation-2015', href: '#' }, + { + title: 'Final Minute-To-Minute Programme:- 12th Convocation-2015.', + href: '#', + }, + { + title: + 'Route Map for 12th Convocation of National Institute of Technology, Kurukshetra.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Route_Map.pdf', + }, + { title: 'Invitation', href: '#' }, + { title: 'Schedule', href: '#' }, + { + title: 'Imp. Instructions', + href: 'http://nitkkr.ac.in/docs/Imp._Instructions.PDF', + }, + { + title: + 'Transportation Facility available from Kurukshetra Rly Station and Pipli for Degree Recepient', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/transport_convo15-1.pdf', + }, + { + title: 'Advt. of Convocation-2015 in Newspaper.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Advst._of_Convocation_2015_in_Newspaper.pdf', + }, + { + title: 'Important Notice for Registration for Convocation-2015.', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Notice_for_ID_card_on_Convocation_Registration.pdf', + }, + { + title: 'Online Registration', + href: 'https://docs.google.com/a/nitkkr.ac.in/forms/d/1cc1d88U-FUmeFa1GvCi0q9Jh-aMfLbzrXYEw7gSP7kI/viewform', + }, + { + title: 'Schedule for Convocation-2015', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Convocation_Update_2015-2.docx', + }, + { + title: + '12th Convocation Notification ( Students must check their name and their father name in hindi and english and report the discrepency to Academic Section by 09-03-14)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Notification_regarding_12th_Convocation.pdf', + }, + { + title: 'Annexure-B(Academic Awards and Medal Revised List )', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Topper_students_list_12th_Convocation.pdf', + }, + { + title: + 'Annexure-A [ List is updated for the requests received till 5 pm, 02-03-15 on 03-03-15 at 2:30 pm. Final corrections are uploaded in the list on 20-03-15 at 2:00 PM.] Plz Verify', + href: '#', + }, + { + title: + 'Supplementary List-1 ( B.Tech. M.Tech. & Ph.D.)[ Please verify the name in Hindi and English]', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/suplementary-1.pdf', + }, + { + title: 'B.Tech. Civil Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/1_civil_a_9.03.15.pdf', + }, + { + title: 'B.Tech. Computer Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/2_computer_a_9.03.15.pdf', + }, + { + title: 'B.Tech. Information Technology', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/7_IT_9.03.15.pdf', + }, + { + title: 'B.Tech. Electronics & Comm. Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/4_Electronics_9.03.15.pdf', + }, + { + title: 'B.Tech. Electrical Engineering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/3_Electrical_9.03.15.pdf', + }, + { + title: 'B.Tech.Mechanical Engieering', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/5_Mechanical_a_9.03.15.pdf', + }, + { + title: 'B.Tech. Industrial Engineering & Management', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/6_IEM_9.03.15.pdf', + }, + { + title: 'M.Tech. Civil Engg. (Transportation Engg.)', + href: 'https://nitkkr.ac.in/wp-content/uploads/2021/12/Civil_Transport_9.3.15.pdf', + }, +]; + +// This is an array of object coz, someone amy want to add some othere data to it, in future. +const data: ConvocationData = { + years: { + '19th': { + notifications: notification19, + }, + '18th': { + notifications: notification18, + }, + '17th': { + notifications: notification17, + }, + '16th': { + notifications: notification16, + }, + '12th': { + notifications: notification12, + }, + }, +}; + +export function getConvocationData(year: string) { + return data.years[year]; +} diff --git a/app/[locale]/academics/curricula/[code]/page.tsx b/app/[locale]/academics/curricula/[code]/page.tsx index f2095a8a..adcbd51e 100644 --- a/app/[locale]/academics/curricula/[code]/page.tsx +++ b/app/[locale]/academics/curricula/[code]/page.tsx @@ -1,14 +1,194 @@ -import { WorkInProgressStatus } from '~/components/status'; +import Image from 'next/image'; +import Link from 'next/link'; +import { notFound } from 'next/navigation'; +import { MdEmail, MdPhone } from 'react-icons/md'; + +import Heading from '~/components/heading'; +import ImageHeader from '~/components/image-header'; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from '~/components/ui'; +import { getTranslations } from '~/i18n/translations'; import { courses, db } from '~/server/db'; export async function generateStaticParams() { return await db.select({ code: courses.code }).from(courses); } -export default function Curriculum({ - params: { locale }, +export default async function Curriculum({ + params: { locale, code }, }: { params: { locale: string; code: string }; }) { - return ; + const text = (await getTranslations(locale)).Curriculum; + const course = await db.query.courses.findFirst({ + where: (course, { eq }) => eq(course.code, code), + with: { + coordinator: { + with: { + person: { + columns: { + name: true, + telephone: true, + email: true, + }, + }, + }, + }, + }, + }); + if (!course) notFound(); + + return ( + <> + + +
+
+
+
+ {text.prerequisites.title}: + {course.prerequisites.length > 0 ? ( + course.prerequisites.map((prerequisite, index) => ( + +

{prerequisite}

+ + )) + ) : ( +

{text.prerequisites.none}

+ )} +
+ +
+ {text.nature}: {course.nature} +
+ +
{text.objectives}:
+ {course.objectives.map((objective, index) => ( +
  • {objective}
  • + ))} + +
    + {text.similarCourses}: + {course.similarCourses.map((course, index) => ( + +

    {course}

    + + ))} +
    +
    + + +
    + +
    + +
    + + {course.content.map((section, index) => ( + + {section.title} + +
      + {section.topics.map((topic, subIndex) => ( +
    1. +

      {topic}

      +
    2. + ))} +
    +
    +
    + ))} +
    +
    +
    + +
    + +
      + {course.outcomes.map((outcome, index) => ( +
    1. +
      {outcome}
      +
    2. + ))} +
    +
    + +
    + + +
    +
      + {course.essentialReading.map((book, index) => ( +
    1. +

      + {book} +

      +
    2. + ))} +
    +
    +
    +
    + + ); } diff --git a/app/[locale]/academics/curricula/page.tsx b/app/[locale]/academics/curricula/page.tsx index 6fc2805c..24ac3182 100644 --- a/app/[locale]/academics/curricula/page.tsx +++ b/app/[locale]/academics/curricula/page.tsx @@ -88,6 +88,8 @@ const Courses = async ({ page }: { page: number }) => { offset: (page - 1) * 10, }); + console.log(courses); + return courses.map(({ code, coursesToMajors, title }) => coursesToMajors.map( ({ lectureCredits, practicalCredits, tutorialCredits, major }, index) => ( diff --git a/app/[locale]/academics/departments/[name]/page.tsx b/app/[locale]/academics/departments/[name]/page.tsx index 6a309602..e5831c99 100644 --- a/app/[locale]/academics/departments/[name]/page.tsx +++ b/app/[locale]/academics/departments/[name]/page.tsx @@ -1,20 +1,30 @@ import Image from 'next/image'; import Link from 'next/link'; import { notFound } from 'next/navigation'; -import { FaTrophy } from 'react-icons/fa6'; +import { FaPhone, FaTrophy } from 'react-icons/fa6'; import { HiMiniBeaker } from 'react-icons/hi2'; -import { MdBadge } from 'react-icons/md'; +import { MdBadge, MdEmail } from 'react-icons/md'; import { Button } from '~/components/buttons'; import { GalleryCarousel } from '~/components/carousels'; import Heading from '~/components/heading'; import ImageHeader from '~/components/image-header'; -import MessageCard from '~/components/message-card'; import { getTranslations } from '~/i18n/translations'; import { cn } from '~/lib/utils'; import { db, departments } from '~/server/db'; import { countChildren } from '~/server/s3'; +const hodProfile = { + name: 'Jitender Kumar Chhabra', + designation: 'Professor & Head of Department', + email: 'jk.chhabra@nitkkr.ac.in', + phone: '+91-1744-233-488', + message: [ + 'Welcome to the Department of Computer Engineering at NIT Kurukshetra. Our department has been at the forefront of computer science education and research since its inception, consistently producing industry-ready professionals and innovative researchers.', + 'We are committed to excellence in teaching, research, and innovation. Our state-of-the-art laboratories, experienced faculty, and strong industry connections provide students with the perfect environment for learning and growth.', + ], +}; + export async function generateStaticParams() { return await db.select({ name: departments.urlName }).from(departments); } @@ -131,35 +141,51 @@ export default async function Department({ /> - {departmentHead && ( - <> - + +
    + {hodProfile.name} -
    - -
    - - )} +
    +
    +
    +

    + {hodProfile.name} +

    +

    {hodProfile.designation}

    +
    +
    + {hodProfile.message.map((paragraph, index) => ( +

    {paragraph}

    + ))} +
    +
    +
    + + + {hodProfile.email} + + + + {hodProfile.phone} + +
    +
    +
    + ; }) { - return ; + const text = (await getTranslations(locale)).Academics; + const currentCategory = + (searchParams.notificationCategory as string | undefined) ?? 'academics'; + + return ( + <> + + +
    +

    {text.aboutDetail}

    +
    + {/*
      + {[ + 'All Departments', + 'Computer Application', + 'Chemistry', + 'Civil Engineering', + 'Electrical Engineering', + 'Electrical and Communication Engineering', + 'School of Renewable Energy and Efficiency', + 'Mathematics', + 'Mechanical Engineering', + 'Physics', + 'School of VLSI Design and Embedded Systems', + ].map((category, i) => ( + +
    • + {category} +
    • + + ))} +
    */} +
    + +
      + } key={currentCategory}> + + +
    +
    + +
    + +
    +
    +
    +
    +
    +
      + {[ + { title: text.departments, value: '32' }, + { title: text.courses, value: '820 +' }, + { title: text.regularFacultyMembers, value: '892' }, + { title: text.postGraduatePrograms, value: '22' }, + { title: text.underGraduatePrograms, value: '60 +' }, + ].map((stats, i) => ( +
    • 2 ? 'w-full md:w-1/3' : 'w-full md:w-1/3' + }`} + > +

      + {stats.value} +

      +
      + {stats.title.toUpperCase()} +
      +
    • + ))} +
    +
    + +
    + +
    +

    + {text.departments.toUpperCase()}→ +

    + +

    + {text.departmentsDetails} +

    +
    +
    + +
    +

    {text.programmesDetails}

    + +
    +
    + +
    +

    + {text.coursesDetails} +

    + +
    +

    + {text.courses.toUpperCase()}→ +

    + +
    + +
    + + ); } + +const NotificationsList = async ({ + category, + locale, +}: { + category: (typeof notificationsSchema.category.enumValues)[number]; + locale: string; +}) => { + const notifications = ( + await db.query.notifications.findMany({ + where: (notification, { eq }) => eq(notification.category, category), + }) + ).map((notification) => ({ + ...notification, + createdAt: notification.createdAt.toLocaleString(locale, { + dateStyle: 'long', + numberingSystem: locale === 'hi' ? 'deva' : 'roman', + }), + })); + + return Array.from(groupBy(notifications, 'createdAt')).map( + ([createdAt, notifications], index) => ( +
  • +
    {createdAt as string}
    +
      + {notifications.map(({ id, title }, index) => ( +
    • + + +

      {title}

      + +
    • + ))} +
    +
    +
  • + ) + ); +}; diff --git a/app/[locale]/academics/programmes/page.tsx b/app/[locale]/academics/programmes/page.tsx index 8dae3387..2e6afd5a 100644 --- a/app/[locale]/academics/programmes/page.tsx +++ b/app/[locale]/academics/programmes/page.tsx @@ -1,9 +1,244 @@ -import { WorkInProgressStatus } from '~/components/status'; +import { Fragment } from 'react'; -export default function Programmes({ +import Heading from '~/components/heading'; +import ImageHeader from '~/components/image-header'; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from '~/components/ui'; +import { getTranslations } from '~/i18n/translations'; + +export default async function Programmes({ params: { locale }, }: { params: { locale: string }; }) { - return ; + const text = (await getTranslations(locale)).Programmes; + + const btech = [ + { name: 'Civil Engineering', seats: 140 }, + { name: 'Computer Engineering', seats: 210 }, + { name: 'Information Technology', seats: 140 }, + { name: 'Electrical Engineering', seats: 140 }, + { name: 'Electronics & Communication Engineering', seats: 140 }, + { name: 'Mechanical Engineering', seats: 140 }, + { name: 'Production & Industrial Engineering', seats: 60 }, + { name: 'Artificial Intelligence & Machine Learning', seats: 60 }, + { name: 'Industrial Internet of Things', seats: 60 }, + { name: 'Mathematics & Computing', seats: 57 }, + ]; + const mtech = [ + { + name: 'Civil Engineering', + specializations: [ + 'Environmental Engg.', + 'Geotechnical Engg.', + 'Structural Engg.', + 'Transportation Engg.', + 'Water Resources Engg.', + ], + }, + { + name: 'Computer Engineering', + specializations: ['Computer Engg.', 'Cyber Security'], + }, + { + name: 'Electrical Engineering', + specializations: [ + 'Control Systems', + 'Power System', + 'Power Electronics & Drives', + ], + }, + { + name: 'Electronics & Communication Engineering', + specializations: ['Communication Systems'], + }, + { + name: 'Mechanical Engineering', + specializations: [ + 'Machine Design', + 'Production & Industrial Engg.', + 'Thermal Engg.', + ], + }, + { + name: 'Physics', + specializations: ['Nanomaterials and Nanotechnology'], + }, + { + name: 'School of VLSI Design & Embedded System', + specializations: ['Embedded System Design', 'VLSI Design'], + }, + { + name: 'School of Renewable Energy & Efficiency', + specializations: ['Renewable Energy Systems'], + }, + ]; + + const seatsMtech = [ + { + department: 'Civil Engg.', + specialization: [ + { name: 'Environmental Engg. (EV)', seats: '26+5*' }, + { name: 'Geotechnical Engineering (GE)', seats: '23+5*' }, + { name: 'Structural Engg. (SU)', seats: '24+5*' }, + { name: 'Transportation Engg. (TE)', seats: '23+5*' }, + { name: 'Water Resources Engg. (WR)', seats: '21+5*' }, + ], + }, + { + department: 'Computer Engg.', + specialization: [ + { name: 'Computer Engg. (XE)', seats: '31+5*' }, + { name: 'Cyber Security (BR)', seats: '25+5*' }, + ], + }, + { + department: 'Electrical Engg.', + specialization: [ + { name: 'Control Systems (CP)', seats: '25+5*' }, + { name: 'Power Electronics & Drives (PD)', seats: '25+5*' }, + { name: 'Power System (TJ)', seats: '25+5*' }, + ], + }, + { + department: 'Electronics & Communication Engg.', + specialization: [{ name: 'Communication Systems (CY)', seats: '30+5*' }], + }, + { + department: 'Mechanical Engg.', + specialization: [ + { name: 'Machine Design (MD)', seats: '25+5*' }, + { name: 'Production & Industrial Engg. (IP)', seats: '25+5*' }, + { name: 'Thermal Engineering (TI)', seats: '30+5*' }, + ], + }, + { + department: 'Physics', + specialization: [ + { name: 'Nanomaterials and Nanotechnology (C9)', seats: '25+5*' }, + ], + }, + { + department: 'School of VLSI Design & Embedded System', + specialization: [ + { name: 'Embedded System Design (VF)', seats: '25+5*' }, + { name: 'VLSI Design (VN)', seats: '40+5*' }, + ], + }, + { + department: 'School of Renewable Energy & Efficiency', + specialization: [{ name: 'Renewable Energy Systems', seats: '25+5*' }], + }, + ]; + + return ( + <> + + +
    + +

    + {text.courseOfStudy} {text.btechAbout} +

    +
    + + + + {text.discipline} + {text.noOfSeats} + + + + {btech.map((programme, i) => ( + + {programme.name} + {programme.seats} + + ))} + +
    +
    + +
    + +

    + {text.courseOfStudy} {text.mtechAbout} +

    +
    +

    + {text.secialization.toUpperCase()} +

    + + + + {text.discipline} + {text.secialization} + + + + {mtech.map((programme, i) => ( + + {programme.name} + +
      + {programme.specializations.map((val, idx) => ( +
    • {val}
    • + ))} +
    +
    +
    + ))} +
    +
    +
    + +
    + + + + + {text.departmentAndSchools} + {text.secialization} + {text.noOfSeats} + + + + {seatsMtech.map((programme, i) => ( + + {programme.specialization.map((spec, index) => ( + + {index === 0 && ( + + {programme.department} + + )} + {spec.name} + {spec.seats} + + ))} + + ))} + +
    +
    + + ); } diff --git a/app/[locale]/academics/scholarships/page.tsx b/app/[locale]/academics/scholarships/page.tsx index a4026d02..67953afa 100644 --- a/app/[locale]/academics/scholarships/page.tsx +++ b/app/[locale]/academics/scholarships/page.tsx @@ -1,9 +1,218 @@ -import { WorkInProgressStatus } from '~/components/status'; +import Link from 'next/link'; +import { type ReactNode } from 'react'; -export default function Scholarships({ +import { buttonVariants } from '~/components/buttons'; +import Heading from '~/components/heading'; +import ImageHeader from '~/components/image-header'; +import { getTranslations } from '~/i18n/translations'; +import { cn } from '~/lib/utils'; + +export default async function Scholarships({ params: { locale }, }: { params: { locale: string }; }) { - return ; + const text = (await getTranslations(locale)).Scholarships; + + return ( + <> + +
    + + +
      + {text.NSP?.objectives?.map((objective, i) => ( +
    • + {objective} +
    • + ))} +
    +
    + + + + +

    {text.HCS.objectives[0]}

    +
    + + +

    {text.RSSO.objectives[0]}

    +
    + + + + + + +
    + +

    + {text.note.description} +

    +
    +
    + + ); +} + +interface ScholarshipProps { + about: string; + description?: string; + children?: ReactNode; + portalHref?: string; + color?: string; + locale: string; + id: string; +} + +async function ScholarshipDisplay(props: ScholarshipProps) { + const text = (await getTranslations(props.locale)).Scholarships; + return ( +
    +
    +

    {text.about}

    +

    {props.about}

    + {!props.description && props.portalHref && ( + + {text.visitPortal} → + + )} +
    + {props.description &&
    } + {props.description && ( +
    +
    +

    {text.objectives}

    + {props.children} +
    +
    +

    {text.description}

    +
    +

    {props.description}

    + {props.portalHref && ( + + {text.visitPortal} → + + )} +
    +
    +
    + )} +
    + ); } diff --git a/app/[locale]/faculty-and-staff/[employee_id]/[faculty_section]/page.tsx b/app/[locale]/faculty-and-staff/[employee_id]/[faculty_section]/page.tsx new file mode 100644 index 00000000..bbc08032 --- /dev/null +++ b/app/[locale]/faculty-and-staff/[employee_id]/[faculty_section]/page.tsx @@ -0,0 +1,459 @@ +import { notFound } from 'next/navigation'; +import { Fragment } from 'react'; +import { MdOutlineEdit } from 'react-icons/md'; + +import { ScrollArea } from '~/components/ui'; +import { getTranslations, type Translations } from '~/i18n/translations'; +import { groupBy } from '~/lib/utils'; + +type FacultySectionProps = + | { + params: { + locale: string; + faculty_section: keyof Translations['FacultyAndStaff']['tabs']; + employee_id: string; + }; + asProfile?: never; + } + | { + params?: never; + asProfile: { + id: number; + locale: string; + faculty_section: keyof Translations['FacultyAndStaff']['tabs']; + }; + }; + +export default async function FacultySection({ + params, + asProfile, +}: FacultySectionProps) { + const { locale, faculty_section } = params ?? asProfile; + const title = (await getTranslations(locale)).FacultyAndStaff.tabs[ + faculty_section + ]; + + const jkchabbraProfile = { + qualifications: [ + { + name: 'B.Tech (CSE)', + value: '2nd Topper', + caption: 'National Institute of Technology, Kurukshetra', + year: '', + }, + { + name: 'M.Tech (CSE)', + value: 'Gold Medalist', + caption: 'National Institute of Technology, Kurukshetra', + year: '', + }, + { + name: 'Ph.D. (S/w Engg)', + value: '', + caption: 'National Institute of Technology, Kurukshetra', + year: '', + }, + ], + publications: [ + { + name: 'Programming with C (4th Edition)', + value: 'McGraw Hill', + caption: 'Byron Gottfried, USA & Jitender Kumar Chhabra', + year: '', + tag: 'Book', + }, + { + name: 'Conceptual Programming Tips for Interviews and Competitive Exams', + value: 'McGraw Hill', + caption: 'Jitender Kumar Chhabra', + year: '', + tag: 'Book', + }, + ], + experience: [ + { + name: 'Teaching & Research Experience', + value: '30 years', + caption: 'Professor, Computer Engineering, NIT Kurukshetra', + year: '1995 - Present', + }, + ], + projects: [ + { + name: 'Novel Approach for Secure Storage on External Media', + value: 'DRDO, Govt of India', + caption: + 'Design and development of a non-cryptographic secure storage and lossless retrieval system', + year: 'Completed', + }, + ], + educationCurrent: [ + { + name: 'Online Lecture Series on Data Structures & Algorithms', + value: 'YouTube', + caption: 'Channel: @JitenderKrChhabraProfCseNITKKR', + year: 'Ongoing', + }, + ], + scholars: [ + { + name: 'Ph.D. Supervision', + value: '6 Completed, 1 Ongoing', + caption: 'Ph.D. scholars under guidance at NIT Kurukshetra', + year: '', + }, + ], + awards: [ + { + name: 'Best Teacher Award', + value: 'NIT Kurukshetra', + caption: 'Awarded for excellence in teaching and research', + year: '', + }, + ], + }; + + const vikramsinghProfile = { + qualifications: [ + { + name: 'B.Tech (CSE)', + value: 'Computer Science & Engineering', + caption: 'UIT, RGPV (Bhopal)', + year: '', + }, + { + name: 'M.Tech (CSE)', + value: 'Computer Science & Engineering', + caption: 'JNU, New Delhi', + year: '', + }, + { + name: 'Ph.D. (Software Engineering)', + value: 'Software Engineering', + caption: 'NIT Kurukshetra', + year: '', + }, + ], + publications: [ + // Journals + { + name: 'Improving Hamming-Distance Computation for Adaptive Similarity Search Approach', + value: 'Chandradeep Kumar, Vikram Singh', + caption: 'Int. J. of Intelligent Information Technologies (IJIIT)', + year: 'Dec 2021', + tag: 'Journal', + }, + { + name: 'Progressive Intent Model for Similarity Search', + value: 'Vikram Singh', + caption: 'IEEE Transactions on Information Theory', + year: '2020', + tag: 'Journal', + }, + { + name: 'AQtpUIR: Adaptive query term proximity based user Information Retrieval', + value: 'Tirthankar Barik, Vikram Singh', + caption: 'Journal of Information and Optimization Sciences', + year: '2020', + tag: 'Journal', + }, + { + name: 'Progressive Intent Modeling for Exploratory Search', + value: 'Vikram Singh', + caption: 'ACM Transactions on Information Systems (TOIS), 38(4)', + year: '2020', + tag: 'Journal', + }, + { + name: 'Correlating “Pre-search” and “In-search” Context to Predict Search Intent for Exploratory Search', + value: 'Vikram Singh', + caption: 'Journal of Business Intelligence & Data Mining, 18(04)', + year: '2020', + tag: 'Journal', + }, + + // Conferences / Workshops + { + name: 'Empirical Analysis of Multi-label Classification on GitterCom using BERT', + value: + 'Bathini Sai Akash, Lov Kumar, Vikram Singh, Anoop Kumar Patel, Aneesh Krishna', + caption: '30th ICONIP 2023 (Accepted)', + year: '2023', + tag: 'Conference', + }, + { + name: 'An Empirical Framework for Software Aging-Related Bug Prediction using Weighted Extreme Learning Machine', + value: + 'Lov Kumar, Vikram Singh, Lalita Bhanu Murthy, Sanjay Misra, Aneesh Krishna', + caption: '18th FedCSIS 2023 (Accepted)', + year: '2023', + tag: 'Conference', + }, + { + name: 'A Progressive Query Materialization for Interactive Data Exploration', + value: 'Vikram Singh', + caption: 'SoDAM’2016 co‑located at VLDB’2016, pp. 1–10', + year: '2016', + tag: 'Conference', + }, + { + name: 'Best-Effort Query Answering in Dataspaces on Unstructured Data', + value: 'Vishal Sheokhand, Vikram Singh', + caption: 'ACM COMAD 2016, pp. 155–159', + year: '2016', + tag: 'Conference', + }, + { + name: 'Improving Result Diversity Using Query Term Proximity in Exploratory Search', + value: 'Vikram Singh, Mayank Dave', + caption: 'BDA 2019, pp. 67–87', + year: '2019', + tag: 'Conference', + }, + { + name: 'Query Morphing: A Proximity-Based Approach for Data Exploration and Query Reformulation', + value: 'Jay Patel, Vikram Singh', + caption: 'MIKE’2017, pp. 261–273', + year: '2017', + tag: 'Conference', + }, + { + name: 'Extracting Emotion Quotient of Information Virality over Twitter Data', + value: 'Pawan K., Reuben A., Vikram Singh', + caption: 'ICDCIT 2022, Springer Nature', + year: 'Jan 2022', + tag: 'Conference', + }, + ], + experience: [ + { + name: 'Industry Experience', + value: '3 years', + caption: + 'Worked in software development and engineering roles in the industry.', + year: '2009 - 2012', + }, + { + name: 'Academic Experience', + value: '10+ years', + caption: + 'Professor at NIT Kurukshetra’s Computer Engineering Department. Expertise in Database Systems, Data Mining, and Human-Computer Interaction.', + year: '2012 - Present', + }, + ], + projects: [], + educationCurrent: [], + scholars: [ + { + name: 'Ph.D. Supervision', + value: + '1 ongoing: Mohd. Ilyas – Intent Modeling for Information Search and Recommendation', + caption: 'Ph.D. scholar under guidance at NIT Kurukshetra', + year: '2022-23', + }, + { + name: 'M.Tech Dissertations Supervised', + value: '19 completed', + caption: 'Postgraduate dissertations at NIT Kurukshetra', + year: '', + }, + ], + awards: [ + { + name: 'Best Paper Award', + value: 'Evaluating Models for Better Life Expectancy Prediction', + caption: 'ICCIDA, Hyderabad, India', + year: '2022', + }, + { + name: 'Best Student Paper', + value: + 'Query Morphing: A Proximity-Based Approach for Data Exploration and Query Reformulation', + caption: 'MIKE’2017, IDBRT, Hyderabad, India', + year: '2017', + }, + { + name: 'Innovative Design for Computing', + value: + 'Multi-objective Parametric Query Optimization for Distributed Database Systems', + caption: 'SocProS’2015, IIT Roorkee (Saharanpur Campus)', + year: '2015', + }, + { + name: 'Best Student Paper', + value: 'Best-effort Query Answering in DataSpaces on Unstructured Data', + caption: 'ICCCA’2016, India', + year: '2016', + }, + { + name: 'Best Paper Award', + value: + 'Generating Optimal Query Plans for Distributed Query Processing using Teacher-Learner Based Optimization', + caption: 'ICDMW at IMCIP’2015, Bangalore, India', + year: '2015', + }, + { + name: 'Best Student Paper', + value: + 'Efficient Algorithm for Web Search Query Reformulation Using Genetic Algorithm', + caption: 'ICCIDM’2015, RIT Berhampur, India', + year: '2015', + }, + ], + }; + + const defaultProfileTabs = { + qualifications: [ + { + name: 'Ph.D.', + value: 'Nanostructured Biomaterials', + caption: 'Indian institute of Technology Madras', + year: '2010', + }, + ], + publications: [ + { + name: 'Sustainable finishes in textiles, Conference Proceedings', + value: + 'International E-Conference on Sustainable Growth in Textiles (SGT-2021), Uttar Pradesh Textile Technology Institute, Kanpur', + caption: 'RK Chhabra, Aakanksha Singh and J N Chakraborty', + year: 'August 2023', + tag: 'Conference', + }, + { + name: 'Sustainable finishes in textiles, Conference Proceedings', + value: + 'International E-Conference on Sustainable Growth in Textiles (SGT-2021), Uttar Pradesh Textile Technology Institute, Kanpur', + caption: 'RK Chhabra, Aakanksha Singh and J N Chakraborty', + year: 'August 2023', + tag: 'Conference', + }, + { + name: 'Sustainable finishes in textiles, Conference Proceedings', + value: + 'International E-Conference on Sustainable Growth in Textiles (SGT-2021), Uttar Pradesh Textile Technology Institute, Kanpur', + caption: 'RK Chhabra, Aakanksha Singh and J N Chakraborty', + year: 'August 2023', + tag: 'Journal', + }, + { + name: 'Sustainable finishes in textiles, Conference Proceedings', + value: + 'International E-Conference on Sustainable Growth in Textiles (SGT-2021), Uttar Pradesh Textile Technology Institute, Kanpur', + caption: 'RK Chhabra, Aakanksha Singh and J N Chakraborty', + year: 'August 2023', + tag: 'Journal', + }, + { + name: 'Sustainable finishes in textiles, Conference Proceedings', + value: + 'International E-Conference on Sustainable Growth in Textiles (SGT-2021), Uttar Pradesh Textile Technology Institute, Kanpur', + caption: 'RK Chhabra, Aakanksha Singh and J N Chakraborty', + year: 'August 2023', + tag: 'Book/Chapter', + }, + { + name: 'Sustainable finishes in textiles, Conference Proceedings', + value: + 'International E-Conference on Sustainable Growth in Textiles (SGT-2021), Uttar Pradesh Textile Technology Institute, Kanpur', + caption: 'RK Chhabra, Aakanksha Singh and J N Chakraborty', + year: 'August 2023', + tag: 'Book/Chapter', + }, + ], + experience: [ + { + name: 'Teaching Experience', + value: 'Biomechanics Biotransport', + caption: 'Indian institute of Technology Madras', + year: 'Feb. 2024 - Feb. 2024', + }, + ], + projects: [ + { + name: 'Development of biodegradable bioplastic films from mango seed starch.', + value: 'Nanostructured Biomaterials', + caption: 'Indian institute of Technology Madras', + year: '2010', + }, + ], + educationCurrent: [ + { + name: 'Short Term Course On Fluidized Bed Technology For Waste Management : Design, Modeling and Simulation', + value: 'Chemical Engineering Short Term Course', + caption: 'Coordinator', + year: 'Feb, 2024 - Feb, 2024', + }, + ], + scholars: [ + { + name: 'MULTIFUNCTIONAL FINISHING OF COTTON USING β-CYCLODEXTRIN ASSISTED ESSENTIAL OILS.', + value: 'Ph. D Scholar', + caption: 'Deepika Jha', + year: 'Enrolled: July 2023, Continuing', + }, + ], + awards: [ + { + name: 'MRS-S Funding Support award.', + value: 'Department Of Biotechnology', + caption: + 'International Conference on Materials for Advanced Technologies, Singapore', + year: '2017', + }, + ], + }; + const profileTabs = + params?.employee_id === '114' + ? jkchabbraProfile + : params?.employee_id === '1083' + ? vikramsinghProfile + : defaultProfileTabs; + + if (!profileTabs[faculty_section]) { + return notFound(); + } + + const hasTag = + profileTabs[faculty_section][0] !== undefined && + 'tag' in profileTabs[faculty_section][0]; + + const dataToDisplay = hasTag + ? // @ts-expect-error - Ignore type checking for 'tag' key + groupBy(profileTabs[faculty_section], 'tag') + : new Map([['key', profileTabs[faculty_section]]]); + + return ( + <> +

    {title}

    + + {Array.from(dataToDisplay.entries()).map(([key, items]) => ( + + {hasTag &&
    {key}
    } +
      + {items.map((item, index) => ( +
    • + +
      {item.name}
      + {0 ? ( + + ) : null} +
      +

      {item.value}

      +

      {item.caption}

      +

      {item.year}

      +
    • + ))} +
    +
    + ))} +
    + + ); +} diff --git a/app/[locale]/faculty-and-staff/[employee_id]/layout.tsx b/app/[locale]/faculty-and-staff/[employee_id]/layout.tsx new file mode 100644 index 00000000..5145b317 --- /dev/null +++ b/app/[locale]/faculty-and-staff/[employee_id]/layout.tsx @@ -0,0 +1,28 @@ +import { union } from 'drizzle-orm/pg-core'; +import { type ReactNode } from 'react'; + +import { db, faculty, staff } from '~/server/db'; + +import { FacultyOrStaffComponent } from '../utils'; + +export async function generateStaticParams() { + const facultyIds = db + .select({ employee_id: faculty.employeeId }) + .from(faculty); + const staffIds = db.select({ employee_id: staff.employeeId }).from(staff); + return await union(facultyIds, staffIds); +} + +export default async function FacultyOrStaffLayout({ + children, + params: { locale, employee_id }, +}: { + children?: ReactNode; + params: { locale: string; employee_id: string }; +}) { + return ( + + {children} + + ); +} diff --git a/app/[locale]/faculty-and-staff/[employee_id]/page.tsx b/app/[locale]/faculty-and-staff/[employee_id]/page.tsx index 6d41226e..b9f25cb1 100644 --- a/app/[locale]/faculty-and-staff/[employee_id]/page.tsx +++ b/app/[locale]/faculty-and-staff/[employee_id]/page.tsx @@ -1,20 +1,17 @@ -import { union } from 'drizzle-orm/pg-core'; +import FacultySection from './[faculty_section]/page'; -import { WorkInProgressStatus } from '~/components/status'; -import { db, faculty, staff } from '~/server/db'; - -export async function generateStaticParams() { - const facultyIds = db - .select({ employee_id: faculty.employeeId }) - .from(faculty); - const staffIds = db.select({ employee_id: staff.employeeId }).from(staff); - return await union(facultyIds, staffIds); -} - -export default function FacultyOrStaff({ - params: { locale, employee_id: employeeId }, +export default function FacultyAndStaff({ + params: { locale, employee_id }, }: { params: { locale: string; employee_id: string }; }) { - return ; + return ( + + ); } diff --git a/app/[locale]/faculty-and-staff/page.tsx b/app/[locale]/faculty-and-staff/page.tsx index 421ad593..bd645dfd 100644 --- a/app/[locale]/faculty-and-staff/page.tsx +++ b/app/[locale]/faculty-and-staff/page.tsx @@ -179,7 +179,7 @@ const FacultyList = async ({ alt={faculty.person.name} className="size-32 rounded lg:size-36 xl:size-40 2xl:size-44" height={0} - src={`persons/${faculty.id}/image.png`} + src={`fallback/user-image.jpg`} width={0} />
    diff --git a/app/[locale]/faculty-and-staff/utils.tsx b/app/[locale]/faculty-and-staff/utils.tsx new file mode 100644 index 00000000..d3117ade --- /dev/null +++ b/app/[locale]/faculty-and-staff/utils.tsx @@ -0,0 +1,222 @@ +import Image from 'next/image'; +import Link from 'next/link'; +import { type ReactNode } from 'react'; +import { MdCall, MdLocationOn, MdMail } from 'react-icons/md'; + +import { PathnameAwareSuspense, Tabs } from '~/app/profile/client-utils'; +import { getTranslations } from '~/i18n/translations'; +import { db } from '~/server/db'; + +export async function FacultyOrStaffComponent({ + children, + employeeId, + id, + locale, +}: { locale: string; children?: ReactNode } & ( + | { id: number; employeeId?: never } + | { id?: never; employeeId: string } +)) { + const text = (await getTranslations(locale)).FacultyAndStaff; + + const tabs = [ + { + label: text.tabs.qualifications, + href: 'qualifications', + }, + { + label: text.tabs.experience, + href: 'experience', + }, + { + label: text.tabs.projects, + href: 'projects', + }, + { + label: text.tabs.educationCurrent, + href: 'educationCurrent', + }, + { + label: text.tabs.publications, + href: 'publications', + }, + { + label: text.tabs.scholars, + href: 'scholars', + }, + { + label: text.tabs.awards, + href: 'awards', + }, + ]; + const faculty = await db.query.faculty.findFirst({ + where: (faculty, { eq }) => + !employeeId ? eq(faculty.id, id!) : eq(faculty.employeeId, employeeId), + columns: { + id: true, + officeAddress: true, + designation: true, + googleScholarId: true, + orcidId: true, + researchGateId: true, + scopusId: true, + publications: true, + patents: true, + books: true, + }, + with: { + person: { + columns: { + name: true, + email: true, + telephone: true, + countryCode: true, + alternateTelephone: true, + alternateCountryCode: true, + }, + }, + }, + }); + + if (!faculty) { + return
    Faculty not found
    ; + } + + return ( + <> +
    +
    +

    + {faculty.person.name} +

    +
    {faculty.designation}
    + 0 +
      +
    • +

      + + {faculty.person.email} +

      +
    • +
    • +

      + + {`+${faculty.person.countryCode} ${faculty.person.telephone} (off-Direct no) `} + {faculty.person.alternateTelephone && + `+${faculty.person.alternateCountryCode} ${faculty.person.alternateTelephone} (Mob)`} +

      +
    • +
    • +

      + + {faculty.officeAddress === '' + ? 'Not Available' + : faculty.officeAddress} +

      +
    • +
    +
    +
    + 0 +
    +
    +
      + {['PUBLICATIONS', 'PATENTS', 'BOOKS'].map((item) => ( +
    • +

      + { + faculty[ + item.toLowerCase() as 'publications' | 'patents' | 'books' + ].length + } +

      +

      + {item} +

      +
    • + ))} +
    +
    +
    +
    + {Object.entries({ + 'Google Scholar': 'googleScholarId', + Orcid: 'orcidId', + 'Research Gate': 'researchGateId', + Scopus: 'scopusId', + }).map(([key, value]) => { + if (value in faculty) { + return ( + + {key} +
    {key}
    + + ); + } + })} +
    + +
    + +
      + +
    +
    + + {children} + +
    +
    + + ); +} diff --git a/app/[locale]/footer.tsx b/app/[locale]/footer.tsx index 4d8785bd..31a6bb69 100644 --- a/app/[locale]/footer.tsx +++ b/app/[locale]/footer.tsx @@ -7,15 +7,58 @@ import { FaLinkedinIn, } from 'react-icons/fa'; import { FaXTwitter } from 'react-icons/fa6'; -import { MdFax, MdMail, MdPhone } from 'react-icons/md'; +import { MdMail, MdPhone } from 'react-icons/md'; -import CopyToClipboard from '~/components/copy-to-clipboard'; import { getTranslations } from '~/i18n/translations'; import { cn } from '~/lib/utils'; export default async function Footer({ locale }: { locale: string }) { const text = (await getTranslations(locale)).Footer; + const quickLinks = [ + { name: 'Campus Infrastructure', href: '/institute/campus-infra' }, + { name: 'Hostels', href: '/institute/hostels' }, + { name: 'Administration', href: '/institute/administration' }, + { name: 'Estate Section', href: '/institute/sections/estate' }, + { name: 'Accounts Section', href: '/institute/sections/accounts' }, + { + name: 'Library Resources', + href: '/institute/sections/library/collection-and-resources', + }, + { name: 'Medical Facilities', href: '/institute/health-centre' }, + ]; + + const academicLinks = [ + { name: 'Academic Notifications', href: '/academics/notifications' }, + { name: 'Scholarships', href: '/academics/scholarships' }, + { name: 'Awards', href: '/academics/awards' }, + { name: 'Curricula', href: '/academics/curricula' }, + { + name: 'Department Achievements', + href: '/academics/departments/computer-engineering/achievements', + }, + { + name: 'Laboratory Facilities', + href: '/academics/departments/computer-engineering/labs', + }, + { name: 'Research Publications', href: '/research/publications' }, + ]; + + const resourceLinks = [ + { name: 'Faculty & Staff', href: '/faculty-and-staff' }, + { name: 'Training & Placement', href: '/training-and-placement' }, + { name: 'Student Activities', href: '/student-activities' }, + { + name: 'Library Committee', + href: '/institute/sections/library/library-committee', + }, + { + name: 'Membership Privileges', + href: '/institute/sections/library/membership-and-privileges', + }, + { name: 'Research Scholars', href: '/faculty-and-staff?tab=scholars' }, + ]; + return (