feat(dashboard): add 6-month profit chart, indonesian inventory types, and refine dashboard metrics #157

Closed
opened 2026-09-29 17:30:01 +00:00 by yuris · 0 comments
Owner

Acceptance Criteria

1. Alert Banner Subtext (Image #1)

  • In apps/management/app/(dashboard)/page.tsx, separate unpriced goods count and total value into two lines.
  • Line 1: count of unpriced items (X barang fisik belum memiliki harga jual).
  • Line 2: total cost value as subtext (Senilai Rp ...).
  • Ensure proper alignment with the alert icon on mobile and desktop.

2. Modal Mengendap Metric Header (Image #2)

  • In apps/management/app/(dashboard)/page.tsx, remove (>60 HR) from the KPI card header so it reads cleanly as MODAL MENGENDAP.

3. Inventory Types in Indonesian

  • In apps/management/lib/inventory/types.ts, define canonical mapping INVENTORY_TYPE_LABELS:
    • Part: "Suku Cadang"
    • Consumable: "Bahan & Cairan"
    • Accessory: "Aksesori"
    • Service: "Jasa"
  • Update type displays and selection dropdowns across the management app (apps/management):
    • Dashboard aged inventory table (page.tsx)
    • Stok table and type filters (app/(dashboard)/stok/page.tsx, inventory-table.tsx)
    • Add inventory modal & edit form (add-inventory-modal.tsx, inventory-edit-form.tsx)
    • Pembelian modal & item editor (add-purchase-modal.tsx, purchase-item-editor.tsx, unreconciled-banner.tsx)
    • Penjualan modal & details sheet (add-penjualan-modal.tsx)

4. 6-Month Laba Bersih Operasional Graphic

  • Add a 6-month operational profit trend graphic below the 4 KPI cards and above the warning banner in apps/management/app/(dashboard)/page.tsx.
  • Calculates monthly net operational profit for the past 6 months (5 past months + current month), splitting barang vs jasa profit.
  • Lightweight, zero-dependency SVG/CSS bar chart rendered as a Server Component.
  • Displays month label, total profit, and visual representation of goods vs service profit.
  • Clicking a month links to /laporan?month=M&year=Y.

5. Verification

  • Run typecheck and existing tests: pnpm --filter garage test, pnpm --filter garage typecheck.
  • Run linting: pnpm --filter garage lint.
## Acceptance Criteria ### 1. Alert Banner Subtext (Image #1) - In `apps/management/app/(dashboard)/page.tsx`, separate unpriced goods count and total value into two lines. - Line 1: count of unpriced items (`X barang fisik belum memiliki harga jual`). - Line 2: total cost value as subtext (`Senilai Rp ...`). - Ensure proper alignment with the alert icon on mobile and desktop. ### 2. Modal Mengendap Metric Header (Image #2) - In `apps/management/app/(dashboard)/page.tsx`, remove `(>60 HR)` from the KPI card header so it reads cleanly as `MODAL MENGENDAP`. ### 3. Inventory Types in Indonesian - In `apps/management/lib/inventory/types.ts`, define canonical mapping `INVENTORY_TYPE_LABELS`: - `Part`: "Suku Cadang" - `Consumable`: "Bahan & Cairan" - `Accessory`: "Aksesori" - `Service`: "Jasa" - Update type displays and selection dropdowns across the management app (`apps/management`): - Dashboard aged inventory table (`page.tsx`) - Stok table and type filters (`app/(dashboard)/stok/page.tsx`, `inventory-table.tsx`) - Add inventory modal & edit form (`add-inventory-modal.tsx`, `inventory-edit-form.tsx`) - Pembelian modal & item editor (`add-purchase-modal.tsx`, `purchase-item-editor.tsx`, `unreconciled-banner.tsx`) - Penjualan modal & details sheet (`add-penjualan-modal.tsx`) ### 4. 6-Month Laba Bersih Operasional Graphic - Add a 6-month operational profit trend graphic below the 4 KPI cards and above the warning banner in `apps/management/app/(dashboard)/page.tsx`. - Calculates monthly net operational profit for the past 6 months (5 past months + current month), splitting barang vs jasa profit. - Lightweight, zero-dependency SVG/CSS bar chart rendered as a Server Component. - Displays month label, total profit, and visual representation of goods vs service profit. - Clicking a month links to `/laporan?month=M&year=Y`. ### 5. Verification - Run typecheck and existing tests: `pnpm --filter garage test`, `pnpm --filter garage typecheck`. - Run linting: `pnpm --filter garage lint`.
yuris closed this issue 2026-09-29 17:48:19 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/garage#157
No description provided.