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).
This commit is contained in:
Ichsan Kurniawan
2026-02-22 23:33:15 +07:00
parent 85d8db1e54
commit 7d18e9f38f
9 changed files with 241 additions and 33 deletions
+2
View File
@@ -1,3 +1,5 @@
"use server"
import { getServerSession } from "next-auth";
import { authOptions } from "@/pages/api/auth/[...nextauth]"; // Adjust path as needed
import axios from "@/lib/axios"; // Your axios instance