Skip to content

Migrate new admin Students(tab) workspace to TypeScript with features and documentation migration risks#519

Merged
jnnzz merged 5 commits into
PSITS-UCMAIN:stagingfrom
jnnzz:staging
May 28, 2026
Merged

Migrate new admin Students(tab) workspace to TypeScript with features and documentation migration risks#519
jnnzz merged 5 commits into
PSITS-UCMAIN:stagingfrom
jnnzz:staging

Conversation

@jnnzz

@jnnzz jnnzz commented May 27, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 08:35
@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

@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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Javabutdif self-requested a review May 28, 2026 06:24
@jnnzz jnnzz merged commit faeed5d into PSITS-UCMAIN:staging May 28, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants