Updated curr filters#578
Open
Devansh032 wants to merge 83 commits into
Open
Conversation
Co-authored-by: Aryawart-kathpal <aryawart.kathpal2909@gmail.com>
Co-authored-by: Aryawart-kathpal <aryawart.kathpal2909@gmail.com>
This pull request introduces several improvements and refactors across multiple pages, focusing on dynamic data fetching from the database, UI consistency, and code style cleanups. The most significant changes are the migration of static research data to dynamic database queries, UI/UX refinements for the SC/ST cell page, and minor formatting and code cleanup in other components. **Dynamic Data Fetching and Table Updates:** * Migrated static data for Memorandum of Understanding (MoU) and Sponsored Research Projects in `app/[locale]/research/page.tsx` to fetch directly from the database, including transforming and formatting the data for table display. This includes updating the table headers and rows to show new fields such as sanctioned file/order number, date, and project status. ([app/[locale]/research/page.tsxR24-R38](diffhunk://#diff-7e2ef4caf94dbc72306307e50144de2644725209044410ff5dc769152068eb67R24-R38), [app/[locale]/research/page.tsxR98-R132](diffhunk://#diff-7e2ef4caf94dbc72306307e50144de2644725209044410ff5dc769152068eb67R98-R132), [app/[locale]/research/page.tsxL210-R148](diffhunk://#diff-7e2ef4caf94dbc72306307e50144de2644725209044410ff5dc769152068eb67L210-R148), [app/[locale]/research/page.tsxL473-R411](diffhunk://#diff-7e2ef4caf94dbc72306307e50144de2644725209044410ff5dc769152068eb67L473-R411), [app/[locale]/research/page.tsxR449-R453](diffhunk://#diff-7e2ef4caf94dbc72306307e50144de2644725209044410ff5dc769152068eb67R449-R453), [app/[locale]/research/page.tsxR740-R742](diffhunk://#diff-7e2ef4caf94dbc72306307e50144de2644725209044410ff5dc769152068eb67R740-R742), [app/[locale]/research/page.tsxR761-R763](diffhunk://#diff-7e2ef4caf94dbc72306307e50144de2644725209044410ff5dc769152068eb67R761-R763)) **UI/UX and Styling Improvements:** * Refined layout, className ordering, and responsive styles for the SC/ST cell page (`app/[locale]/institute/cells/scst/page.tsx`), including adjustments to faculty info display, section spacing, and list styling for better readability and consistency. ([app/[locale]/institute/cells/scst/page.tsxL18-R18](diffhunk://#diff-19c9706882ffe3c5011d10c9fc1e574aa3f0c8095b33184bddde8ec8abf2ba6cL18-R18), [app/[locale]/institute/cells/scst/page.tsxL33-R40](diffhunk://#diff-19c9706882ffe3c5011d10c9fc1e574aa3f0c8095b33184bddde8ec8abf2ba6cL33-R40), [app/[locale]/institute/cells/scst/page.tsxL58-R65](diffhunk://#diff-19c9706882ffe3c5011d10c9fc1e574aa3f0c8095b33184bddde8ec8abf2ba6cL58-R65), [app/[locale]/institute/cells/scst/page.tsxL86-R139](diffhunk://#diff-19c9706882ffe3c5011d10c9fc1e574aa3f0c8095b33184bddde8ec8abf2ba6cL86-R139), [app/[locale]/institute/cells/scst/page.tsxL159-R163](diffhunk://#diff-19c9706882ffe3c5011d10c9fc1e574aa3f0c8095b33184bddde8ec8abf2ba6cL159-R163), [app/[locale]/institute/cells/scst/page.tsxL179-L190](diffhunk://#diff-19c9706882ffe3c5011d10c9fc1e574aa3f0c8095b33184bddde8ec8abf2ba6cL179-L190)) * Minor UI adjustments in the gallery component for improved code readability and style formatting. [[1]](diffhunk://#diff-7a11d6e30b52d89cba0ae61febfb2a8dc1c64a312509fdbeffa3119de9061aa7L188-R191) [[2]](diffhunk://#diff-7a11d6e30b52d89cba0ae61febfb2a8dc1c64a312509fdbeffa3119de9061aa7L204-R211) **Code Style and Formatting Cleanups:** * Added or corrected trailing commas and semicolons for consistency in various files. ([app/[locale]/academics/curricula/page.tsxL123-R123](diffhunk://#diff-f28e90cdfc2124ecddf73b3a9d4522b6270d42112fa9b8a81c67656ed7722c86L123-R123), [app/[locale]/header.tsxL88-R88](diffhunk://#diff-05aeabaff5d1ec0d925bc6519f8dcf6cdc4f94efcf74117ecca3fbbd77eb7777L88-R88)) * Removed unnecessary blank lines and improved code formatting for clarity. ([app/[locale]/student-activities/clubs/[display_name]/event-section.tsxL96](diffhunk://#diff-fe0a45bba40a113ff0cfe178c0a454d4980293098763ae248037759f44e58de0L96)) These changes collectively enhance maintainability, data accuracy, and user experience across the affected pages. --------- Co-authored-by: soumil221 <soumiljain221@gmail.com>
A constant Faculty updates to Staged --------- Co-authored-by: Navneet Kaur <navneet78141@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: ArnavSharma005 <145358467+ArnavSharma005@users.noreply.github.com> Co-authored-by: heydoyouknowme0 <akrb2204@gmail.com>
This pull request introduces a comprehensive faculty photo upload and display system, enabling users to upload profile photos for faculty and staff, and ensuring robust display of these images throughout the application. The changes include a new `FacultyPhotoUpload` component for uploading images, a `FacultyImage` component that intelligently loads images with fallback logic, and integration of these components across profile editing and listing pages. Additionally, minor UI and formatting improvements are included. **Faculty and Staff Photo Upload and Display** * Added a new `FacultyPhotoUpload` component that allows users to upload faculty/staff profile photos, including file type and size validation, image preview, S3 upload logic, and user feedback via toasts. ([app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxR1-R231](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72R1-R231)) * Introduced a `FacultyImage` component that attempts to load the faculty/staff image from S3 in multiple formats with graceful fallback to a default image, and replaced direct `<Image>` usage with this component in all relevant places: faculty list, staff list, and faculty profile. ([app/[locale]/faculty-and-staff/faculty-image.tsxR1-R73](diffhunk://#diff-f3054df127f38ef9044a3b238e2c892fffc15bbda73792eaedfe36286ea35c2fR1-R73), [app/[locale]/faculty-and-staff/page.tsxL407-L412](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6L407-L412), [app/[locale]/faculty-and-staff/page.tsxL581-L586](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6L581-L586), [app/[locale]/faculty-and-staff/utils.tsxL241-R248](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL241-R248)) * Integrated the photo upload section into the faculty profile edit modal, including fetching and passing the necessary props (`facultyId`, `employeeId`, `name`) to the upload component. ([app/[locale]/@modals/(.)profile/edit/page.tsxR25](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R25), [app/[locale]/@modals/(.)profile/edit/page.tsxR55-R56](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R55-R56), [app/[locale]/@modals/(.)profile/edit/page.tsxR67](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R67), [app/[locale]/@modals/(.)profile/edit/page.tsxR79-R81](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R79-R81), [app/[locale]/@modals/(.)profile/edit/page.tsxL98-R117](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805L98-R117)) **Faculty/Staff List and Profile Improvements** * Updated faculty and staff listing pages to use the new `FacultyImage` for consistent image handling, and improved external link handling for profile links to ensure proper URL formatting. ([app/[locale]/faculty-and-staff/page.tsxL407-L412](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6L407-L412), [app/[locale]/faculty-and-staff/page.tsxL471-R479](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6L471-R479), [app/[locale]/faculty-and-staff/page.tsxL581-L586](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6L581-L586)) * Updated the faculty/staff profile utility to use `FacultyImage` for image rendering. ([app/[locale]/faculty-and-staff/utils.tsxR49](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR49), [app/[locale]/faculty-and-staff/utils.tsxL241-R248](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL241-R248)) **UI and Code Formatting Enhancements** * Improved section headers and layout in the profile edit modal for clarity. ([app/[locale]/@modals/(.)profile/edit/page.tsxL98-R117](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805L98-R117)) * Minor code formatting and readability improvements in client components and curricula page. ([app/[locale]/academics/curricula/page.tsxL70-R73](diffhunk://#diff-f28e90cdfc2124ecddf73b3a9d4522b6270d42112fa9b8a81c67656ed7722c86L70-R73), [app/[locale]/academics/curricula/page.tsxL126-R129](diffhunk://#diff-f28e90cdfc2124ecddf73b3a9d4522b6270d42112fa9b8a81c67656ed7722c86L126-R129), [app/[locale]/faculty-and-staff/client-components.tsxL55](diffhunk://#diff-f3d956fa19c730d337793ff6235013b3be6594251230f0777f7bcc95cfb03726L55), [app/[locale]/faculty-and-staff/client-components.tsxL76-R85](diffhunk://#diff-f3d956fa19c730d337793ff6235013b3be6594251230f0777f7bcc95cfb03726L76-R85), [app/[locale]/faculty-and-staff/client-components.tsxL115-R118](diffhunk://#diff-f3d956fa19c730d337793ff6235013b3be6594251230f0777f7bcc95cfb03726L115-R118), [app/[locale]/faculty-and-staff/client-components.tsxL126-R131](diffhunk://#diff-f3d956fa19c730d337793ff6235013b3be6594251230f0777f7bcc95cfb03726L126-R131), [app/[locale]/faculty-and-staff/client-components.tsxL291-R298](diffhunk://#diff-f3d956fa19c730d337793ff6235013b3be6594251230f0777f7bcc95cfb03726L291-R298), [app/[locale]/faculty-and-staff/client-components.tsxL340-R347](diffhunk://#diff-f3d956fa19c730d337793ff6235013b3be6594251230f0777f7bcc95cfb03726L340-R347), [app/[locale]/faculty-and-staff/client-components.tsxL368](diffhunk://#diff-f3d956fa19c730d337793ff6235013b3be6594251230f0777f7bcc95cfb03726L368), [app/[locale]/faculty-and-staff/client-components.tsxL406-R411](diffhunk://#diff-f3d956fa19c730d337793ff6235013b3be6594251230f0777f7bcc95cfb03726L406-R411))
replaced all tables with generic table component
This pull request refactors the notifications display logic across several pages by introducing a new reusable `NotificationsPanel` component. The main goal is to centralize and streamline how notifications are fetched, filtered, and rendered, reducing code duplication and improving maintainability. The panel supports flexible filtering and customization, and is now used in place of previous ad-hoc implementations in the Academics and Notifications pages. **Notifications UI Refactor and Componentization** * Introduced a new `NotificationsPanel` component that encapsulates all logic for fetching, filtering (by category, club, date), and displaying notifications, with support for loading states and customization options. This component replaces previous inline implementations and is now the single source for notifications UI. * Updated the Academics (`app/[locale]/academics/page.tsx`) and Notifications (`app/[locale]/notifications.tsx`) pages to use the new `NotificationsPanel`, removing their local notification list logic and related imports, and simplifying their main render logic. ([app/[locale]/academics/page.tsxL5-L29](diffhunk://#diff-bb42d3e07d6a4b2f5a35dc4e6210318de482ab7f0c0a2bf19580b1cedf742a82L5-L29), [app/[locale]/academics/page.tsxL48-R41](diffhunk://#diff-bb42d3e07d6a4b2f5a35dc4e6210318de482ab7f0c0a2bf19580b1cedf742a82L48-R41), [app/[locale]/academics/page.tsxL80-R78](diffhunk://#diff-bb42d3e07d6a4b2f5a35dc4e6210318de482ab7f0c0a2bf19580b1cedf742a82L80-R78), [app/[locale]/academics/page.tsxL298-L339](diffhunk://#diff-bb42d3e07d6a4b2f5a35dc4e6210318de482ab7f0c0a2bf19580b1cedf742a82L298-L339), [app/[locale]/notifications.tsxL2-L12](diffhunk://#diff-fc4ab4f58418a1ce1ca032d258b139c979709ec0e41edf5494c8c0b99a31b6ecL2-L12), [app/[locale]/notifications.tsxL72-L148](diffhunk://#diff-fc4ab4f58418a1ce1ca032d258b139c979709ec0e41edf5494c8c0b99a31b6ecL72-L148)) **Code Cleanup and Consistency** * Removed now-unused components and helper functions (`NotificationsList` and related database queries/grouping logic) from both the Academics and Notifications pages, as this functionality is now handled by the new panel. ([app/[locale]/academics/page.tsxL298-L339](diffhunk://#diff-bb42d3e07d6a4b2f5a35dc4e6210318de482ab7f0c0a2bf19580b1cedf742a82L298-L339), [app/[locale]/notifications.tsxL72-L148](diffhunk://#diff-fc4ab4f58418a1ce1ca032d258b139c979709ec0e41edf5494c8c0b99a31b6ecL72-L148)) * Updated imports in dependent files (such as the Hostels page) to use the new default export for `NotificationsList`, ensuring consistency with the refactor. ([app/[locale]/institute/hostels/page.tsxL16-R16](diffhunk://#diff-11a346a0b3b637deeabb5eb45cbb54a281cb3a311e358726adc923b9057c9c80L16-R16))
Co-authored-by: Swastik Bhowmick <swastik200419@gmail.com>
TABLES for : BOG ,Senate ,SCSA, Other officers, Financial and working committee, Building and construction commitee
This pull request updates the sorting logic and meeting data handling across several committee pages to ensure meetings are sorted by the correct date or meeting number fields. It also improves the `GenericTable` component to handle numeric sorting properly. The main changes are grouped below: **Committee Pages: Sorting Field Updates** * Updated the `sortByDateField` prop in multiple committee pages (`board-of-governors`, `building-and-work-committee`, `scsa`, `senate`) to use the `date` field instead of `created_at` for more accurate meeting sorting. (`app/[locale]/institute/administration/(committees)/board-of-governors/page.tsx` [app/[locale]/institute/administration/(committees)/board-of-governors/page.tsxL120-R131](diffhunk://#diff-c3c09c0b78573302e9114f7b5c8b3dd7b6595ad633647910670f7f0c0f69ff06L120-R131), `building-and-work-committee/page.tsx` [app/[locale]/institute/administration/(committees)/building-and-work-committee/page.tsxL118-R118](diffhunk://#diff-5103d70f013e00bb7173d6fc6151208540d89110a2c32feea4da0de2ca291880L118-R118), `scsa/page.tsx` [app/[locale]/institute/administration/(committees)/scsa/page.tsxL101-R101](diffhunk://#diff-48b94a66fa30b997acc051bf15874af155437d3aeac97a450bef0323d512c06cL101-R101), `senate/page.tsx` [app/[locale]/institute/administration/(committees)/senate/page.tsxL111-R111](diffhunk://#diff-8e004bb516d101f7280c73ab50955ab9c59f0a4f01063a82da819a8cd3d1666cL111-R111)) * For the `financial-committee` page, added a `meetingNumber` field to each meeting and updated sorting to use this numeric field for correct ordering. (`financial-committee/page.tsx` [app/[locale]/institute/administration/(committees)/financial-committee/page.tsxR90](diffhunk://#diff-b66c6cc2b15973120500a43f5cca35a648d7cb402671229bd74f46db9a10b307R90), [app/[locale]/institute/administration/(committees)/financial-committee/page.tsxL117-R118](diffhunk://#diff-b66c6cc2b15973120500a43f5cca35a648d7cb402671229bd74f46db9a10b307L117-R118)) **GenericTable Component: Sorting Enhancement** * Enhanced the `GenericTable` component to properly handle numeric sorting when the sort field is a number, ensuring correct order for fields like `meetingNumber`. (`components/ui/generic-table.tsx` [components/ui/generic-table.tsxR95-R99](diffhunk://#diff-1133b034223eb2492ab7f0ff0089616e410fd52886fa9704e4e613fcd55a804fR95-R99)) **Minor UI Improvements** * Removed unnecessary `id` attributes and adjusted the placement of the `agenda` section heading for improved accessibility and structure. (`board-of-governors/page.tsx` [app/[locale]/institute/administration/(committees)/board-of-governors/page.tsxL105-R105](diffhunk://#diff-c3c09c0b78573302e9114f7b5c8b3dd7b6595ad633647910670f7f0c0f69ff06L105-R105), [app/[locale]/institute/administration/(committees)/board-of-governors/page.tsxL120-R131](diffhunk://#diff-c3c09c0b78573302e9114f7b5c8b3dd7b6595ad633647910670f7f0c0f69ff06L120-R131)) --------- Co-authored-by: Aryawart-kathpal <aryawart.kathpal2909@gmail.com>
adding scoe -page --------- Co-authored-by: Aryawart-kathpal <aryawart.kathpal2909@gmail.com> Co-authored-by: ArnavSharma005 <arnavoct.20@gmail.com>
### What was changed - Reduced excessive vertical spacing in the Events section - Tightened spacing between filters and "View All" on mobile
This pull request introduces a new suite of animated UI components using Framer Motion for enhanced user experience and visual appeal across several sections of the application. It replaces static layouts for the header, footer, events grid, page content, and button groups with animated versions, and centralizes animation variants for consistency and reuse. **Major introduction of animated components:** * Added new animated components for header (`animate-header.tsx`), footer (`animate-footer.tsx`), events grid (`animate-events-grid.tsx`), page content (`animate-page-content.tsx`), section wrappers (`animate-section.tsx`), and button groups (`animate-button-group.tsx`). These components use Framer Motion for scroll and hover effects, staggered entrances, and interactive animations. ([app/[locale]/(animations)/animate-header.tsxR1-R48](diffhunk://#diff-1a86ad4d600dec3d9c8f1ad7315a70e2091590b42bc5815e98187555bd38d8eaR1-R48), [app/[locale]/(animations)/animate-footer.tsxR1-R212](diffhunk://#diff-9d03213baa3ffa7524fc544cdaf0f14294dfc0c13c5f6c019d9806127519f0b7R1-R212), [app/[locale]/(animations)/animate-events-grid.tsxR1-R101](diffhunk://#diff-29b5f1de21f3b78582704e76fe491202134537fe1136fc5869f17e936f61b89dR1-R101), [app/[locale]/(animations)/animate-page-content.tsxR1-R118](diffhunk://#diff-0f7d2b5a510dfc56d22049f8bd0241eb380d9af3f324322e89f3ad37c871078cR1-R118), [app/[locale]/(animations)/animate-section.tsxR1-R38](diffhunk://#diff-bbac5636cc02739d7821ca40cf2228bd98ab97ae4c17ea60c682646dc9da0befR1-R38), [app/[locale]/(animations)/animate-button-group.tsxR1-R144](diffhunk://#diff-08236e3f9e6f12ba4d1b37c1e14b47ab72cbe16220ebac30901c5326f9063a32R1-R144)) **Centralized animation configuration:** * Introduced `animation-variants.ts` to define reusable animation variants and viewport settings for scroll-triggered effects, ensuring consistent behavior across all animated components. ([app/[locale]/(animations)/animation-variants.tsR1-R54](diffhunk://#diff-a1592c6dccd58b90189351e0438891d6e258fcb709e8068b75fbdeb40e082a83R1-R54)) **Integration of animated components into pages:** * Updated imports and usage in `events.tsx` and `footer.tsx` to use the new animated components instead of their static counterparts, resulting in animated event grids and animated footer link columns. ([app/[locale]/events.tsxL19-R19](diffhunk://#diff-d8ba86c912049bdd5b256623a1355c1b45682b0855f0fb9d00963a5781250e39L19-R19), [app/[locale]/events.tsxL141-R141](diffhunk://#diff-d8ba86c912049bdd5b256623a1355c1b45682b0855f0fb9d00963a5781250e39L141-R141), [app/[locale]/footer.tsxR15-R21](diffhunk://#diff-61eaebe162b94a33902a9b854548f6d1995339ba17e568a6946ca400d1844292R15-R21), [app/[locale]/footer.tsxL105-R133](diffhunk://#diff-61eaebe162b94a33902a9b854548f6d1995339ba17e568a6946ca400d1844292L105-R133)) **Styling and layout improvements:** * Minor adjustments to layout and spacing in `events.tsx` for improved visual consistency with the new animated components. ([app/[locale]/events.tsxL56-R56](diffhunk://#diff-d8ba86c912049bdd5b256623a1355c1b45682b0855f0fb9d00963a5781250e39L56-R56), [app/[locale]/events.tsxL107-R107](diffhunk://#diff-d8ba86c912049bdd5b256623a1355c1b45682b0855f0fb9d00963a5781250e39L107-R107)) **Index and exports for new animation module:** * Added an index file to export all new animated components and animation variants for easy import throughout the app. ([app/[locale]/(animations)/index.tsR1-R12](diffhunk://#diff-1c924324bea72f4fbaaf39abfa1cfb7a86396006ca5f69ae90c9d301ac320dfbR1-R12)) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request implements full support for storing, displaying, and updating user profile images for faculty and staff. It introduces a new `img` field to the `persons` table, updates the upload flow to save image URLs in the database, and ensures that profile images are consistently used across the application, including in search, profile, and listing components. The Typesense search collections and population scripts are also updated to include the new image field. **Database and API changes:** * Added an `img` (image URL) field to the `persons` table schema to store profile image URLs. * Implemented the `updatePersonProfileImage` server action to update a person's profile image in the database and trigger revalidation. **Profile image upload and display:** * Updated the faculty photo upload component to accept and display the current image, and to save the uploaded image URL to the database. ([app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxR12-R18](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72R12-R18), [app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxR38-R55](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72R38-R55), [app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxL63-R74](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72L63-R74), [app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxR121-R139](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72R121-R139), [app/[locale]/@modals/(.)profile/edit/page.tsxR72](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R72), [app/[locale]/@modals/(.)profile/edit/page.tsxR83](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R83), [app/[locale]/@modals/(.)profile/edit/page.tsxR117](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R117)) * Enhanced the `FacultyImage` component to prioritize the database image URL, then fallback to legacy paths or a placeholder if needed. ([app/[locale]/faculty-and-staff/faculty-image.tsxR18-R19](diffhunk://#diff-f3054df127f38ef9044a3b238e2c892fffc15bbda73792eaedfe36286ea35c2fR18-R19), [app/[locale]/faculty-and-staff/faculty-image.tsxR34-R45](diffhunk://#diff-f3054df127f38ef9044a3b238e2c892fffc15bbda73792eaedfe36286ea35c2fR34-R45), [app/[locale]/faculty-and-staff/faculty-image.tsxR55-R59](diffhunk://#diff-f3054df127f38ef9044a3b238e2c892fffc15bbda73792eaedfe36286ea35c2fR55-R59)) * Updated the faculty/staff listing and detail components to use the new `img` field for profile images. ([app/[locale]/faculty-and-staff/page.tsxL377-R381](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6L377-R381), [app/[locale]/faculty-and-staff/page.tsxR416](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6R416), [app/[locale]/faculty-and-staff/utils.tsxR128](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR128), [app/[locale]/faculty-and-staff/utils.tsxR247](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR247), [app/[locale]/faculty-and-staff/utils.tsxR292](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR292)) **Search and header integration:** * Modified search card rendering to use the `img` field for faculty and staff images, with a fallback if not present. ([app/[locale]/search/cards.tsxL218-R218](diffhunk://#diff-a1bf1e6421b8f7db98af617d93ab8477ad1d28a03876f953a55897f0f2ed7eafL218-R218), [app/[locale]/search/cards.tsxL296-R296](diffhunk://#diff-a1bf1e6421b8f7db98af617d93ab8477ad1d28a03876f953a55897f0f2ed7eafL296-R296)) * Updated the authenticated user section in the header to fetch and display the user's profile image from the database. ([app/[locale]/header.tsxL389-R396](diffhunk://#diff-05aeabaff5d1ec0d925bc6519f8dcf6cdc4f94efcf74117ecca3fbbd77eb7777L389-R396), [app/[locale]/header.tsxL417-R408](diffhunk://#diff-05aeabaff5d1ec0d925bc6519f8dcf6cdc4f94efcf74117ecca3fbbd77eb7777L417-R408), [app/[locale]/header.tsxL428-R418](diffhunk://#diff-05aeabaff5d1ec0d925bc6519f8dcf6cdc4f94efcf74117ecca3fbbd77eb7777L428-R418)) **Typesense search collection updates:** * Added the `img` field to the Typesense `faculty` and `staff` schemas and population scripts, ensuring search results include profile images. [[1]](diffhunk://#diff-c1462ef951f294dc2fba2c4f2e74aaa6eb664ac275887693e67be19ec4998be5R11) [[2]](diffhunk://#diff-c1462ef951f294dc2fba2c4f2e74aaa6eb664ac275887693e67be19ec4998be5L22-R32) [[3]](diffhunk://#diff-c1462ef951f294dc2fba2c4f2e74aaa6eb664ac275887693e67be19ec4998be5L48) [[4]](diffhunk://#diff-3d8eb5594a0483b1e248b500882721ebdcb0e2b005c95f03b3cf7fbb5829d804R11) [[5]](diffhunk://#diff-3d8eb5594a0483b1e248b500882721ebdcb0e2b005c95f03b3cf7fbb5829d804L21-R31)This pull request implements support for storing, updating, and displaying user profile images (specifically for faculty and staff) by introducing an `img` field to the `persons` table and propagating its use throughout the application. The changes ensure that profile images are fetched from and saved to the database, fallback images are used when necessary, and the new field is indexed in search schemas. **Database and Backend Enhancements:** - Added a new `img` field to the `persons` table schema to store the profile image URL. - Implemented the `updatePersonProfileImage` backend action to update the profile image for the currently authenticated user. **Profile Image Upload and Editing:** - Updated the faculty photo upload component to accept and display the current profile image, and to save the uploaded image URL to the database. ([app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxR12-R18](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72R12-R18), [app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxR38-R55](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72R38-R55), [app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxL63-R74](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72L63-R74), [app/[locale]/@modals/(.)profile/edit/faculty-photo-upload.tsxR121-R139](diffhunk://#diff-7866be717a5ec66dbf321ab271194ff475030422db1cdcfc38b03472f9189f72R121-R139)) - Modified the profile edit page to fetch and pass the `img` field to the photo upload component. ([app/[locale]/@modals/(.)profile/edit/page.tsxR72](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R72), [app/[locale]/@modals/(.)profile/edit/page.tsxR83](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R83), [app/[locale]/@modals/(.)profile/edit/page.tsxR117](diffhunk://#diff-e73212c94224fb2541821a5e5cdf5880f9ecace5d712ec5cd8dff6e590ded805R117)) **Frontend Usage and Display:** - Updated the `FacultyImage` component and its consumers to prioritize displaying the image from the database, falling back to legacy paths or a default image as needed. ([app/[locale]/faculty-and-staff/faculty-image.tsxR18-R19](diffhunk://#diff-f3054df127f38ef9044a3b238e2c892fffc15bbda73792eaedfe36286ea35c2fR18-R19), [app/[locale]/faculty-and-staff/faculty-image.tsxR34-R45](diffhunk://#diff-f3054df127f38ef9044a3b238e2c892fffc15bbda73792eaedfe36286ea35c2fR34-R45), [app/[locale]/faculty-and-staff/faculty-image.tsxR55-R59](diffhunk://#diff-f3054df127f38ef9044a3b238e2c892fffc15bbda73792eaedfe36286ea35c2fR55-R59), [app/[locale]/faculty-and-staff/page.tsxL377-R381](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6L377-R381), [app/[locale]/faculty-and-staff/page.tsxR416](diffhunk://#diff-73d9b8e5183a03609e638663514db195677d4e964b2ba2898d7ad4aa250d81d6R416), [app/[locale]/faculty-and-staff/utils.tsxR128](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR128), [app/[locale]/faculty-and-staff/utils.tsxR247](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR247), [app/[locale]/faculty-and-staff/utils.tsxR292](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR292)) - Updated the authentication header and profile image rendering to use the new `img` field, falling back to the previous image or a default if not set. ([app/[locale]/header.tsxL389-R396](diffhunk://#diff-05aeabaff5d1ec0d925bc6519f8dcf6cdc4f94efcf74117ecca3fbbd77eb7777L389-R396), [app/[locale]/header.tsxL417-R408](diffhunk://#diff-05aeabaff5d1ec0d925bc6519f8dcf6cdc4f94efcf74117ecca3fbbd77eb7777L417-R408), [app/[locale]/header.tsxL428-R418](diffhunk://#diff-05aeabaff5d1ec0d925bc6519f8dcf6cdc4f94efcf74117ecca3fbbd77eb7777L428-R418)) - Modified faculty and staff search cards to use the new `img` field for profile images. ([app/[locale]/search/cards.tsxL218-R218](diffhunk://#diff-a1bf1e6421b8f7db98af617d93ab8477ad1d28a03876f953a55897f0f2ed7eafL218-R218), [app/[locale]/search/cards.tsxL296-R296](diffhunk://#diff-a1bf1e6421b8f7db98af617d93ab8477ad1d28a03876f953a55897f0f2ed7eafL296-R296)) **Search Indexing and Typesense Integration:** - Added the `img` field to the Typesense search schemas and population logic for both faculty and staff, ensuring profile images are indexed and available in search results. [[1]](diffhunk://#diff-c1462ef951f294dc2fba2c4f2e74aaa6eb664ac275887693e67be19ec4998be5R11) [[2]](diffhunk://#diff-c1462ef951f294dc2fba2c4f2e74aaa6eb664ac275887693e67be19ec4998be5L22-R32) [[3]](diffhunk://#diff-c1462ef951f294dc2fba2c4f2e74aaa6eb664ac275887693e67be19ec4998be5L48) [[4]](diffhunk://#diff-3d8eb5594a0483b1e248b500882721ebdcb0e2b005c95f03b3cf7fbb5829d804R11) [[5]](diffhunk://#diff-3d8eb5594a0483b1e248b500882721ebdcb0e2b005c95f03b3cf7fbb5829d804L21-R31)
…ts and notifications
… props and fixing some CSS on events page
Co-authored-by: Navneet Kaur <navneet78141@gmail.com>
…tifications with just 'admissions' pre-selected This pull request introduces a new Admissions page with filtering and search functionality, integrates admission translations for both English and Hindi, and updates the navigation and notification loading logic to support degree-level filtering. The changes are organized into three main themes: Admissions page implementation, localization, and filtering enhancements. Admissions page implementation: * Added a new `app/[locale]/academics/admission/page.tsx` file that implements the Admissions page, including filters for department, degree level, date range, and search, as well as infinite scrolling for admissions notifications. ([app/[locale]/academics/admission/page.tsxR1-R327](diffhunk://#diff-b2a93cdde4e3f53c306980a6b6ffff8a4f6aaee250869921f169571eed668a8fR1-R327)) * Updated the main navigation in `app/[locale]/header.tsx` to include a link to the new Admissions page. ([app/[locale]/header.tsxR101-R107](diffhunk://#diff-05aeabaff5d1ec0d925bc6519f8dcf6cdc4f94efcf74117ecca3fbbd77eb7777R101-R107)) Localization: * Introduced modular admission translation files for English and Hindi in `i18n/translate/admission.ts`, and integrated them into the translation system (`i18n/en.ts`, `i18n/hi.ts`, `i18n/translations.ts`, `i18n/translate/index.ts`). [[1]](diffhunk://#diff-405979fcd81bbfd0f0aa3a28f85b089d6e67fcc5b35ec98493d76fa2c315f983R1-R79) [[2]](diffhunk://#diff-8ee4c65eaaf735c33bd37bf76d2a87fb76d02b7928096cc26db6364694988ceeR4) [[3]](diffhunk://#diff-8ee4c65eaaf735c33bd37bf76d2a87fb76d02b7928096cc26db6364694988ceeR56) [[4]](diffhunk://#diff-912c4f60653cc2c8d00fda0b21a7a65ab1c3e1c3f65007e1f211f40c951596b8R4) [[5]](diffhunk://#diff-912c4f60653cc2c8d00fda0b21a7a65ab1c3e1c3f65007e1f211f40c951596b8R56) [[6]](diffhunk://#diff-f021560af3d5a0f14642131f53f3141ab31d57c62b232272a5a097673e427d49R4) [[7]](diffhunk://#diff-f021560af3d5a0f14642131f53f3141ab31d57c62b232272a5a097673e427d49R64) [[8]](diffhunk://#diff-f021560af3d5a0f14642131f53f3141ab31d57c62b232272a5a097673e427d49R117) [[9]](diffhunk://#diff-80d9d3eb70115dcba5007d8d1dd42dc47785c965d56e566d102076ed38a47f9eR2) Filtering enhancements: * Extended the `MobileFilters` component to support degree-level filtering, including new props and UI for degree level selection. [[1]](diffhunk://#diff-2ae8611b0920a50c642a863d38c03527de3cc1f58f3e1f2d076ea4f9c7a97f67R13-R23) [[2]](diffhunk://#diff-2ae8611b0920a50c642a863d38c03527de3cc1f58f3e1f2d076ea4f9c7a97f67R45-R52) [[3]](diffhunk://#diff-2ae8611b0920a50c642a863d38c03527de3cc1f58f3e1f2d076ea4f9c7a97f67R63-R64) [[4]](diffhunk://#diff-2ae8611b0920a50c642a863d38c03527de3cc1f58f3e1f2d076ea4f9c7a97f67R88) [[5]](diffhunk://#diff-2ae8611b0920a50c642a863d38c03527de3cc1f58f3e1f2d076ea4f9c7a97f67R133) [[6]](diffhunk://#diff-2ae8611b0920a50c642a863d38c03527de3cc1f58f3e1f2d076ea4f9c7a97f67R269-R283) * Updated notification loading logic in `server/actions/notifications.ts` to accept and filter by `educationType` (degree level). [[1]](diffhunk://#diff-32e0e443dae8f8df98965cc49786e20e7ec14e2b88dcdfb00e762e88c0368a62R53) [[2]](diffhunk://#diff-32e0e443dae8f8df98965cc49786e20e7ec14e2b88dcdfb00e762e88c0368a62R68) [[3]](diffhunk://#diff-32e0e443dae8f8df98965cc49786e20e7ec14e2b88dcdfb00e762e88c0368a62R80-R83) --------- Co-authored-by: Jayant-Gautam <jayant10449@gmail.com>
…ike admissions, events and notifications are unified (#552) This pull request refactors shared UI and helper logic for filtering pages (`notifications`, `events`, and `admission`) to improve code reuse and maintainability. The main changes include extracting the `FilterSection` component and common helper functions into dedicated files, and updating the relevant pages to use these shared utilities. Component and helper extraction: * Extracted the `FilterSection` component into a new file `components/filter-section.tsx`, consolidating its logic and props (including optional `viewAllHref`) for reuse across pages. * Moved the shared helper functions `toArray`, `parseDate`, and `buildHref` into a new file `lib/helpers.ts`, centralizing filtering-related utilities. Page updates to use shared utilities: * Updated `notifications`, `events`, and `admission` pages to import and use the new `FilterSection` component and helper functions from their respective shared files, removing their local definitions. ([app/[locale]/notifications/page.tsxR9](diffhunk://#diff-2d605512a6539dbb88b2c64d00f4c93d75fa44324e807593cd0145d7a2c34288R9), [app/[locale]/notifications/page.tsxR26](diffhunk://#diff-2d605512a6539dbb88b2c64d00f4c93d75fa44324e807593cd0145d7a2c34288R26), [app/[locale]/notifications/page.tsxL288-L348](diffhunk://#diff-2d605512a6539dbb88b2c64d00f4c93d75fa44324e807593cd0145d7a2c34288L288-L348), [app/[locale]/events/page.tsxR12](diffhunk://#diff-fc847d583896d0da92ca8ec83d58994ad1f37e0ee177402a8d082a175c813e65R12), [app/[locale]/events/page.tsxR23](diffhunk://#diff-fc847d583896d0da92ca8ec83d58994ad1f37e0ee177402a8d082a175c813e65R23), [app/[locale]/events/page.tsxL263-L312](diffhunk://#diff-fc847d583896d0da92ca8ec83d58994ad1f37e0ee177402a8d082a175c813e65L263-L312), [app/[locale]/academics/admission/page.tsxR8](diffhunk://#diff-b2a93cdde4e3f53c306980a6b6ffff8a4f6aaee250869921f169571eed668a8fR8), [app/[locale]/academics/admission/page.tsxR20](diffhunk://#diff-b2a93cdde4e3f53c306980a6b6ffff8a4f6aaee250869921f169571eed668a8fR20), [app/[locale]/academics/admission/page.tsxL277-L327](diffhunk://#diff-b2a93cdde4e3f53c306980a6b6ffff8a4f6aaee250869921f169571eed668a8fL277-L327))…ike admissions, events and notifications are unified
This pull request introduces major improvements to the notification creation and editing experience by adding a rich text editor with support for image and video uploads. It also updates the layout of notification modals and pages for a better user experience. The most important changes are grouped below. ### Rich Content Editor Integration * Introduced a `RichTextEditor` component for notifications, allowing users to add rich content, including formatted text and media. The editor is now included in the `NotificationForm`, and rich content is handled alongside plain text content. (`app/[locale]/notifications/NotificationForm.tsx`, `components/editor/index.ts`, `app/[locale]/@modals/(.)notifications/add/page.tsx`, `app/[locale]/@modals/(.)notifications/edit/[id]/page.tsx`, `app/[locale]/notifications/add/page.tsx`, `app/[locale]/notifications/edit/[id]/page.tsx`) ([app/[locale]/notifications/NotificationForm.tsxR60-R62](diffhunk://#diff-c940317b11d909c14bca1fe605975dbd148bb037febf01178262b735d6686e85R60-R62), [app/[locale]/notifications/NotificationForm.tsxR144-R153](diffhunk://#diff-c940317b11d909c14bca1fe605975dbd148bb037febf01178262b735d6686e85R144-R153), [app/[locale]/notifications/NotificationForm.tsxL231-R260](diffhunk://#diff-c940317b11d909c14bca1fe605975dbd148bb037febf01178262b735d6686e85L231-R260), [components/editor/index.tsR1-R2](diffhunk://#diff-031ac8127d3122525019eeaaea8f6b55616c73b825c1d5b00c1b191b35fe1476R1-R2), [app/[locale]/@modals/(.)notifications/add/page.tsxL24-R32](diffhunk://#diff-87c70c87f8bc082341a7a318433c77c6f9b15eefe8eae0d3bda5e21e3d38dd3dL24-R32), [app/[locale]/@modals/(.)notifications/edit/[id]/page.tsxL36-R51](diffhunk://#diff-8a19de32099c182d7458fa9bac7df84c65fd5eab53f8dfb2ba3c9f122fdcbc04L36-R51), [app/[locale]/notifications/add/page.tsxL27-R27](diffhunk://#diff-f3ca8b1b3454e18173acad18d050c426ff014801f4621b24425adc5853ec8e1dL27-R27), [app/[locale]/notifications/edit/[id]/page.tsxL39-R39](diffhunk://#diff-46f0f24d73a5a7eaa9bd8f591698c08374f4a840f0b6145058c5dad821bcfbf4L39-R39), [app/[locale]/notifications/edit/[id]/page.tsxR52](diffhunk://#diff-46f0f24d73a5a7eaa9bd8f591698c08374f4a840f0b6145058c5dad821bcfbf4R52)) * Added support for storing and editing `richContent` in notifications, ensuring it is properly passed and serialized between components and server actions. (`app/[locale]/notifications/NotificationForm.tsx`, `app/[locale]/@modals/(.)notifications/edit/[id]/page.tsx`, `app/[locale]/notifications/edit/[id]/page.tsx`) ([app/[locale]/notifications/NotificationForm.tsxR30](diffhunk://#diff-c940317b11d909c14bca1fe605975dbd148bb037febf01178262b735d6686e85R30), [app/[locale]/@modals/(.)notifications/edit/[id]/page.tsxL36-R51](diffhunk://#diff-8a19de32099c182d7458fa9bac7df84c65fd5eab53f8dfb2ba3c9f122fdcbc04L36-R51), [app/[locale]/notifications/edit/[id]/page.tsxR52](diffhunk://#diff-46f0f24d73a5a7eaa9bd8f591698c08374f4a840f0b6145058c5dad821bcfbf4R52)) ### Media Upload Extensions for Editor * Implemented a custom TipTap image extension (`CustomImage`) that enables users to paste or drag-and-drop images into the editor. Images are automatically uploaded to S3, with upload progress and error handling reflected in the editor. (`components/editor/extensions/custom-image.ts`) * Added a custom TipTap video extension (`CustomVideo`) to allow embedding videos in notifications, including support for S3-hosted sources. (`components/editor/extensions/custom-video.ts`) * Exported the new editor extensions for use in the rich text editor. (`components/editor/extensions/index.ts`) ### UI and Layout Enhancements * Updated notification modal dialogs and cards to use full viewport height and width, improved scrolling, and adjusted layouts for a more modern and consistent appearance. (`app/[locale]/@modals/(.)notifications/add/page.tsx`, `app/[locale]/@modals/(.)notifications/edit/[id]/page.tsx`) ([app/[locale]/@modals/(.)notifications/add/page.tsxL24-R32](diffhunk://#diff-87c70c87f8bc082341a7a318433c77c6f9b15eefe8eae0d3bda5e21e3d38dd3dL24-R32), [app/[locale]/@modals/(.)notifications/edit/[id]/page.tsxL36-R51](diffhunk://#diff-8a19de32099c182d7458fa9bac7df84c65fd5eab53f8dfb2ba3c9f122fdcbc04L36-R51), [app/[locale]/@modals/(.)notifications/add/page.tsxL4-R4](diffhunk://#diff-87c70c87f8bc082341a7a318433c77c6f9b15eefe8eae0d3bda5e21e3d38dd3dL4-R4), [app/[locale]/@modals/(.)notifications/edit/[id]/page.tsxL4-R4](diffhunk://#diff-8a19de32099c182d7458fa9bac7df84c65fd5eab53f8dfb2ba3c9f122fdcbc04L4-R4), [app/[locale]/@modals/(.)notifications/add/page.tsxR48](diffhunk://#diff-87c70c87f8bc082341a7a318433c77c6f9b15eefe8eae0d3bda5e21e3d38dd3dR48), [app/[locale]/@modals/(.)notifications/edit/[id]/page.tsxR69](diffhunk://#diff-8a19de32099c182d7458fa9bac7df84c65fd5eab53f8dfb2ba3c9f122fdcbc04R69)) * Increased the maximum width of notification cards on add/edit pages for better content display. (`app/[locale]/notifications/add/page.tsx`, `app/[locale]/notifications/edit/[id]/page.tsx`) ([app/[locale]/notifications/add/page.tsxL27-R27](diffhunk://#diff-f3ca8b1b3454e18173acad18d050c426ff014801f4621b24425adc5853ec8e1dL27-R27), [app/[locale]/notifications/edit/[id]/page.tsxL39-R39](diffhunk://#diff-46f0f24d73a5a7eaa9bd8f591698c08374f4a840f0b6145058c5dad821bcfbf4L39-R39)) These changes collectively modernize the notification system, making it much more flexible and user-friendly for creating rich, media-enhanced notifications.
Co-authored-by: Debatreya Das <116421305+Debatreya@users.noreply.github.com>
Co-authored-by: Yashika Choudhary <161009245+yashika1221@users.noreply.github.com> Co-authored-by: Aryawart-kathpal <aryawart.kathpal2909@gmail.com> Co-authored-by: Kartik <ks25152005@gmail.com> Co-authored-by: Arnav Sharma <145358467+ArnavSharma005@users.noreply.github.com> Co-authored-by: soumil221 <soumiljain221@gmail.com> Co-authored-by: Debatreya Das <116421305+Debatreya@users.noreply.github.com> Co-authored-by: Navneet Kaur <navneet78141@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: heydoyouknowme0 <akrb2204@gmail.com> Co-authored-by: Aryawart Kathpal <132134276+Aryawart-kathpal@users.noreply.github.com> Co-authored-by: Abhay Agarwal <161469723+Abhay145@users.noreply.github.com> Co-authored-by: Debatreya <debatreyadas@gmail.com> Co-authored-by: Swastik Bhowmick <swastik200419@gmail.com> Co-authored-by: Rahul Gupta <Rahul5g3d.official@gmail.com> Co-authored-by: ArnavSharma005 <arnavoct.20@gmail.com> Co-authored-by: Jayant Gautam <jayant10449@gmail.com> Co-authored-by: Rizul Gupta <162694744+Rogan308Rylie@users.noreply.github.com> Co-authored-by: Rizul Gupta <rizulgupta2811@gmail.com> Co-authored-by: Saksham1143me <150987031+Saksham1143me@users.noreply.github.com> Co-authored-by: Ayush Sur <145102142+SurAyush@users.noreply.github.com>
Co-authored-by: Yashika Choudhary <161009245+yashika1221@users.noreply.github.com> Co-authored-by: Aryawart-kathpal <aryawart.kathpal2909@gmail.com> Co-authored-by: Kartik <ks25152005@gmail.com> Co-authored-by: Arnav Sharma <145358467+ArnavSharma005@users.noreply.github.com> Co-authored-by: soumil221 <soumiljain221@gmail.com> Co-authored-by: Navneet Kaur <navneet78141@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: heydoyouknowme0 <akrb2204@gmail.com> Co-authored-by: Aryawart Kathpal <132134276+Aryawart-kathpal@users.noreply.github.com> Co-authored-by: Abhay Agarwal <161469723+Abhay145@users.noreply.github.com> Co-authored-by: Swastik Bhowmick <swastik200419@gmail.com> Co-authored-by: Rahul Gupta <Rahul5g3d.official@gmail.com> Co-authored-by: ArnavSharma005 <arnavoct.20@gmail.com> Co-authored-by: Jayant Gautam <jayant10449@gmail.com> Co-authored-by: Rizul Gupta <162694744+Rogan308Rylie@users.noreply.github.com> Co-authored-by: Rizul Gupta <rizulgupta2811@gmail.com> Co-authored-by: Saksham1143me <150987031+Saksham1143me@users.noreply.github.com> Co-authored-by: Ayush Sur <145102142+SurAyush@users.noreply.github.com> Co-authored-by: Devansh032 <devanshsinghal627@gmail.com>
made a new branch to avoid conflicts.Modified the faculty and staff files because the were causing build to fail and eslint errors. --------- Co-authored-by: Debatreya Das <116421305+Debatreya@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a major refactor and feature expansion for the Training and Placement statistics section. The main changes include replacing hardcoded placement PDF links with a database-driven approach, implementing dynamic routing for academic session statistics, and adding a new stats page with detailed charts for both UG and PG data. Additionally, the codebase is improved with reusable chart components and a custom multi-line axis tick renderer for better chart readability. **Database-driven Placement Statistics & Dynamic Routing:** - Replaced the hardcoded placement stats PDF list in `page.tsx` with a database-driven approach: unique academic sessions are now fetched from the database, and the placement stats section dynamically links to a new per-session stats page. ([[app/[locale]/training-and-placement/page.tsxR8-L45](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aR8-L45)], [[app/[locale]/training-and-placement/page.tsxR48-R61](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aR48-R61)], [[app/[locale]/training-and-placement/page.tsxL252-R258](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL252-R258)]) - Added a mapping utility (`placement-stats-map.ts`) to associate academic sessions with their respective PDF files, and provided helper functions to retrieve sessions and PDFs. ([[app/[locale]/training-and-placement/placement-stats-map.tsR1-R87](diffhunk://#diff-c54bb5fc4851fe8fa3e79d7c079c1158290ab67c78f3a9dd916cda84b1bb6477R1-R87)]) **New Per-Session Statistics Page:** - Introduced `[session]/page.tsx`, a dynamic route that displays detailed placement statistics for a selected academic session, including: - Validation of session existence in the database. - Sectioned display of UG and PG statistics with bar charts for placement numbers, packages, and placement percentages. - A list of relevant placement report PDFs for the session. - A back navigation link to the main Training & Placement page. ([[app/[locale]/training-and-placement/stats/[session]/page.tsxR1-R306](diffhunk://#diff-aad6f042397c6770ed3119aa9b8c7362b51c38b208d3571c2b27a9d95ad680e7R1-R306)]) **Charting Components and Visualization Improvements:** - Added and exported reusable chart components: `PlacementBarChart`, `PackageBarChart`, `PercentageBarChart`, and `PgPercentageAccordion` for visualizing placement data. ([[components/charts/index.tsR1-R4](diffhunk://#diff-c56e67c541cf7a7e5db2a83a031653134e31ee5052ea230cd1187bb03c2f7bbcR1-R4)]) - Implemented a custom `MultiLineAxisTick` component to improve the readability of axis labels in charts with long programme or discipline names. ([[components/charts/multi-line-axis-tick.tsxR1-R58](diffhunk://#diff-2f7c131dbaccf9dbf04dc18e47d234d8b45f3f6a36183148ecf0d1b136687a50R1-R58)]) **UI/UX Adjustments:** - Improved section spacing and removed redundant CSS classes for a cleaner layout across notification, placement stats, and events sections. ([[app/[locale]/training-and-placement/page.tsxL122-R129](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL122-R129)], [[app/[locale]/training-and-placement/page.tsxL231-R238](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL231-R238)], [[app/[locale]/training-and-placement/page.tsxL270-R275](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL270-R275)]) --- **Placement Statistics Refactor:** - Placement stats are now database-driven, with unique academic sessions fetched and displayed dynamically instead of hardcoded PDF links. ([[app/[locale]/training-and-placement/page.tsxR8-L45](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aR8-L45)], [[app/[locale]/training-and-placement/page.tsxR48-R61](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aR48-R61)]) - Introduced `placement-stats-map.ts` to map sessions to their PDFs and provide helper retrieval functions. ([[app/[locale]/training-and-placement/placement-stats-map.tsR1-R87](diffhunk://#diff-c54bb5fc4851fe8fa3e79d7c079c1158290ab67c78f3a9dd916cda84b1bb6477R1-R87)]) **New Features:** - Added a `[session]/page.tsx` dynamic route for per-session placement stats, showing detailed UG/PG data, charts, and PDFs. ([[app/[locale]/training-and-placement/stats/[session]/page.tsxR1-R306](diffhunk://#diff-aad6f042397c6770ed3119aa9b8c7362b51c38b208d3571c2b27a9d95ad680e7R1-R306)]) **Charts and Visualization:** - Exported reusable chart components for placement statistics. ([[components/charts/index.tsR1-R4](diffhunk://#diff-c56e67c541cf7a7e5db2a83a031653134e31ee5052ea230cd1187bb03c2f7bbcR1-R4)]) - Added a custom multi-line axis tick renderer for improved chart label readability. ([[components/charts/multi-line-axis-tick.tsxR1-R58](diffhunk://#diff-2f7c131dbaccf9dbf04dc18e47d234d8b45f3f6a36183148ecf0d1b136687a50R1-R58)]) **UI/UX Improvements:** - Enhanced section spacing and layout for better clarity and consistency. ([[app/[locale]/training-and-placement/page.tsxL122-R129](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL122-R129)], [[app/[locale]/training-and-placement/page.tsxL231-R238](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL231-R238)], [[app/[locale]/training-and-placement/page.tsxL270-R275](diffhunk://#diff-3d46475657a686b8cc7d39b08ef532119e5a09c372f55bc1d9aec8e24f61d72aL270-R275)]) Issue #554
Debatreya
reviewed
Mar 6, 2026
Debatreya
left a comment
Member
There was a problem hiding this comment.
Kuch toh bhot ajeeb sa fix hai!!!
Not making sense that this can cause such issue in mobile screen.
And What is this PR title,
Member
There was a problem hiding this comment.
I know kuch changed nhi hai, but fer bhi q changed hai
Member
There was a problem hiding this comment.
Serious Issue with your prettier version.
and node version
7bb745a to
7cea3ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.