feat: enhance admin page functionality with new components and hooks

- Added `AdminDutyList` and `ReassignSheet` components for improved duty management in the admin panel.
- Introduced `useAdminPage` hook to encapsulate admin-related logic, including user and duty loading, and reassign functionality.
- Updated `frontend.mdc` documentation to reflect new admin components and their usage.
- Improved error handling for API responses, particularly for access denied scenarios.
- Refactored admin page to utilize new components, streamlining the UI and enhancing maintainability.
This commit is contained in:
2026-03-06 10:17:28 +03:00
parent c390a4dd6e
commit a3152a4545
7 changed files with 565 additions and 420 deletions

View File

@@ -0,0 +1,9 @@
/**
* Admin feature: hook and presentational components for the admin page.
*/
export { useAdminPage } from "./useAdminPage";
export { AdminDutyList } from "./AdminDutyList";
export { ReassignSheet } from "./ReassignSheet";
export type { AdminDutyListProps } from "./AdminDutyList";
export type { ReassignSheetProps } from "./ReassignSheet";