Fix/administration mobile UI#474
Open
Saksham1143me wants to merge 16 commits intonitkkr-dev:stagedfrom
Open
Conversation
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))
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.
Made font sizes consistent on mobile, aligned with the /director page.
Improved text readability inside buttons and content sections, similar to /institute where fonts are clearer on mobile.
Updated the Deans section layout to better match the Figma design:
Adjusted font sizes
Fixed mobile responsiveness and spacing