Migrate new admin Students(tab) workspace to TypeScript with features and documentation migration risks#519
Merged
Merged
Conversation
|
@jnnzz is attempting to deploy a commit to the PSITS-UCMAIN's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Migrates the new Admin Students workspace into the TypeScript frontend and wires it into the admin navigation/routing, alongside a few related UI/API adjustments to support the migration.
Changes:
- Adds the new Students page/feature (types, hook, view) and routes it under
/admin/students. - Updates admin API typings/return-shapes for students-related endpoints and adds an admin change-password helper.
- Improves admin UI consistency (events loading skeleton, organization filter popover UX, dashboard course display).
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/ADMIN_FRONTEND_TS_MIGRATION_PLAN.md | Adds post-implementation findings/risks for the Students TS migration. |
| client-side-ts/src/router.tsx | Registers the new /admin/students route. |
| client-side-ts/src/pages/admin/Students.tsx | New page wrapper rendering StudentsView. |
| client-side-ts/src/pages/admin/EventsPage.tsx | Switches events loading UI to a shared skeleton component. |
| client-side-ts/src/features/admin/students/types/students.types.ts | Introduces Students feature domain types. |
| client-side-ts/src/features/admin/students/index.ts | Feature barrel export. |
| client-side-ts/src/features/admin/students/hooks/useStudentsData.ts | Adds Students data-fetching/mutation hook and selection/sort/filter logic. |
| client-side-ts/src/features/admin/students/components/StudentsView.tsx | Implements the Students UI (tabs, table, dialogs, bulk actions). |
| client-side-ts/src/features/admin/students/components/index.ts | Components barrel export. |
| client-side-ts/src/features/admin/organization/components/OrganizationView.tsx | Improves filter popover state handling and adds “clear filters” UX. |
| client-side-ts/src/features/admin/index.ts | Exports the new students feature. |
| client-side-ts/src/features/admin/event-management/components/index.ts | Re-exports EventsGridSkeleton from EventsGrid. |
| client-side-ts/src/features/admin/event-management/components/EventsGrid.tsx | Adds EventsGridSkeleton for consistent loading UI. |
| client-side-ts/src/features/admin/dashboard/types/dashboard.types.ts | Removes course percentage from CourseDatum. |
| client-side-ts/src/features/admin/dashboard/hooks/useDashboardData.ts | Removes percentage computation from course data. |
| client-side-ts/src/features/admin/dashboard/components/DashboardView.tsx | Displays course counts instead of percentages in the bubble chart. |
| client-side-ts/src/features/admin/components/AdminSidebar.tsx | Enables Students navigation (UC-Main gated in UI). |
| client-side-ts/src/features/admin/api/admin.ts | Expands student/membership types, normalizes some endpoints to return arrays, and adds changeStudentPasswordAdmin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
100
to
106
| Component: AdminLayout, | ||
| children: [ | ||
| { path: "dashboard", Component: Dashboard }, | ||
| { path: "organization", Component: Organization }, | ||
| { path: "students", Component: Students }, | ||
| { path: "events", Component: EventsPage }, | ||
| { path: "events/:eventId", Component: EventManagement }, |
Comment on lines
+163
to
+174
| const result = | ||
| activeTab === "all" | ||
| ? await getDashboardActiveStudents() | ||
| : activeTab === "requests" | ||
| ? await membershipRequest() | ||
| : await deletedStudent(); | ||
|
|
||
| setStudents( | ||
| ((result || []) as StudentApiRecord[]).map((record) => | ||
| normalizeStudent(record) | ||
| ) | ||
| ); |
| useEffect(() => { | ||
| const fetchMembershipFee = async () => { | ||
| const price = await membershipPrice(); | ||
| if (price) setMembershipFee(price); |
| await fetchStudents(); | ||
| return true; | ||
| } | ||
| return false; |
Comment on lines
+365
to
+378
| const results = await Promise.all( | ||
| records.map((record) => { | ||
| if (action === "delete") { | ||
| return studentDeletion(record.id_number, user?.name || "Admin"); | ||
| } | ||
| if (action === "restore") return studentRestore(record.id_number); | ||
| if (action === "cancelRequest") return cancelMembership(record.id_number); | ||
| return approveStudentMembership(record); | ||
| }) | ||
| ); | ||
|
|
||
| const isSuccess = results.every((result) => | ||
| typeof result === "boolean" ? result : result === 200 || result === undefined | ||
| ); |
Comment on lines
+1139
to
+1164
| const primaryLabel = isDelete | ||
| ? "Delete" | ||
| : isRestore | ||
| ? "Restore" | ||
| : isCancel | ||
| ? "Deny" | ||
| : action === "approve" | ||
| ? "Approve" | ||
| : "Request"; | ||
| const title = isDelete | ||
| ? "Are you sure you want to delete this account?" | ||
| : isRestore | ||
| ? "Restore this student account?" | ||
| : isCancel | ||
| ? "Cancel this membership request?" | ||
| : action === "approve" | ||
| ? "Approve this membership request?" | ||
| : "Confirm Request"; | ||
| const description = isDelete | ||
| ? "The user will no longer be able to access the system. This action requires administrative review to reverse." | ||
| : isRestore | ||
| ? "The student account will become active again." | ||
| : isCancel | ||
| ? "The student's membership status will return to not applied." | ||
| : `Are you sure you want to request membership for this student, and that the payment of PHP ${membershipFee.toLocaleString()} will be charged automatically?`; | ||
|
|
Javabutdif
approved these changes
May 28, 2026
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.