Ringkasan
The admin home: what needs you today, payroll readiness, setup and who is out.
$ npx shadcn@latest add https://mahrdesign.faizintifada.com/r/screen-ringkasan.jsonWhen to use
- The first screen after an admin or HR signs in: what needs them today, whether payroll is ready, who is out.
- One per company. The payroll card follows the payroll month: readiness → all ready → pay day → after pay day.
When not to use
- Employees and managers → their own Beranda (a later phase), not this screen.
- A full list of leave requests → Cuti · Permintaan; "Lihat semua" links there.
- Payroll work itself → the Gaji screens; this card only shows readiness and the next step.
Built from
Usage
The screen is the page content only. Put it inside AppShell (once, in your layout) and pass your data.
Installation
Adds the screen, its parts and its types. The components it uses come with it (registry dependencies).
API
import { Ringkasan } from "@/components/screens/ringkasan/ringkasan"| Prop | Type | Default | Description |
|---|---|---|---|
status | "ready" | "loading" | "error" | "empty" | – | empty = new company: "Mulai di sini" + an empty "Hari ini". loading keeps the quick actions real. |
data | RingkasanData | – | quickActions, kpis, approvals, payroll (4 forms), schedule, setup | null, contracts, today. See types.ts. |
error | { code: string; at: string } | – | Shown under "Coba lagi" for support ("Kode: DASH-500 · 16 Des 2026, 09.41"). |
onRetry | () => void | – | "Coba lagi" in the error card. |
onApprove · onUndoApprove | (id: string) => void | – | Setujui acts at once; the row then says "Cuti … disetujui" with "Urungkan" (undo). Remove the request from data once it can no longer be undone. |
onReject | (id: string, reason?: string) => void | – | Called from the built-in dialog "Tolak cuti … ?" (optional reason). Tolak never acts without that confirmation. |
defaultUi | { approved?: string[]; rejecting?: string } | – | Start UI state for previews and tests only. |
onQuickAction · onSetupStep | (id: string) => void | – | Quick-action chips and the active setup step button. |
onTodayMove | (delta: -1 | 1) => void | – | Day arrows in "Hari ini"; pass the new day's data back in data.today. |
linkRender | ReactElement | – | Router link for every "Lihat …" link, e.g. <Link href="" />. |