4 Commits

Author SHA1 Message Date
Ichsan Kurniawan 7f8e6637e4 Move auth config and build admin menus
Extract NextAuth configuration into a shared library, load admin sidebar items from role permissions, and update related RBAC types and UI.
2026-11-06 18:25:54 +07:00
Ichsan Kurniawan 32aab111dd Add POST fetch hook and render mention links
Introduce useFetchPOSTWithAxios (SWR + axios POST) and use it in ApprovalLeaveSick to fetch TLs (position_code P02). Map cc IDs to fullname entries, store them in state (mentionsTo) and render linked mention badges to /performance/:id instead of raw IDs. Also format birthday as 'YYYY-MM-DD' in EditProfile form, comment out a dashboard console.log, and apply small JSX/spacing cleanups.
2026-03-06 10:51:45 +07:00
Ichsan Kurniawan 7d18e9f38f Add CreateAttendance and update UI/hooks
Add a new CreateAttendance component to allow admins to create manual attendance (Alpha) with confirmation dialog and server API call. Lazy-load the CreateAttendance component in EmployeeAlpha and wrap usages with Suspense plus a loading fallback to reduce initial bundle size. Update Performance page to use a centered Suspense fallback. Improve ImportExcel UX by showing a full-loading state, tweaking button/icon styles, and fixing modal sizing/scroll behavior. Enhance useFetchWithAxios to accept nullable URLs and SWR options, adjust the fetcher signature, and return the nested data payload. Add a "use server" directive and imports in lib/server-api, and apply small type/formatting tweaks (table size cast and minor UI/text refinements).
2026-02-22 23:33:15 +07:00
Ichsan Kurniawan 7e172f5cf7 initial commit for new hats app 2025-12-19 13:57:55 +07:00