feat(boss-dashboard): add order totals strip (Total / Delivered / Invoiced)
This commit is contained in:
parent
b07327eae5
commit
ca6d43e0e8
1 changed files with 29 additions and 4 deletions
|
|
@ -115,10 +115,14 @@ export default function BossDashboardView() {
|
|||
))}
|
||||
</div>
|
||||
|
||||
{/* Placeholder for order totals (Task 11) */}
|
||||
<div className="rounded-xl bg-muted/30 p-3 text-xs text-muted-foreground">
|
||||
Order totals land here in Task 11.
|
||||
</div>
|
||||
{/* Order totals */}
|
||||
{data && (
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
<OrderTotal label="Total" value={data.orderTotals.total} color="text-foreground" />
|
||||
<OrderTotal label="Delivered" value={data.orderTotals.delivered} color="text-orange-400" />
|
||||
<OrderTotal label="Invoiced" value={data.orderTotals.invoiced} color="text-emerald-400" />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Placeholder for reps (Task 12) */}
|
||||
<div className="rounded-xl bg-muted/30 p-3 text-xs text-muted-foreground">
|
||||
|
|
@ -151,3 +155,24 @@ function timeAgo(date: Date): string {
|
|||
if (hr < 24) return `${hr}h ago`;
|
||||
return date.toLocaleDateString("en-ZA", { day: "numeric", month: "short" });
|
||||
}
|
||||
|
||||
function OrderTotal({
|
||||
label,
|
||||
value,
|
||||
color,
|
||||
}: {
|
||||
label: string;
|
||||
value: number;
|
||||
color: string;
|
||||
}) {
|
||||
return (
|
||||
<div className="rounded-xl bg-card border border-border/60 p-3">
|
||||
<div className="text-[10px] font-bold uppercase tracking-widest text-muted-foreground">
|
||||
{label}
|
||||
</div>
|
||||
<div className={`mt-1 text-xl font-semibold tabular-nums ${color}`}>
|
||||
{value.toLocaleString()}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue