Adds complete initial codebase for the RJ Bulk Supplies fuel delivery backoffice: - Authentication pages and protected route layouts - Customer, supplier, fuel purchase, and delivery note management - Custom reporting and customer statement sending tools - Full UI component library and Tailwind styling - Server actions, API routes, and PocketBase integration - Development scripts and project configuration updates - Updated README and package metadata
43 lines
1 KiB
TypeScript
43 lines
1 KiB
TypeScript
"use client";
|
|
|
|
import {
|
|
MonthlyDeliveryPerCustomerChart,
|
|
MonthVsLastChart,
|
|
StatusBreakdownChart,
|
|
PurchasesVsDeliveriesChart,
|
|
} from "./dashboard-charts";
|
|
import type {
|
|
CustomerPoint,
|
|
StatusPoint,
|
|
MonthPoint,
|
|
MonthlyPerCustomerPoint,
|
|
} from "./dashboard-charts";
|
|
|
|
interface Props {
|
|
monthlyPerCustomer: MonthlyPerCustomerPoint[];
|
|
monthComparison: {
|
|
thisMonth: number;
|
|
lastMonth: number;
|
|
thisMonthValue: number;
|
|
lastMonthValue: number;
|
|
daysIntoMonth: number;
|
|
daysInMonth: number;
|
|
};
|
|
status: StatusPoint[];
|
|
monthly: MonthPoint[];
|
|
}
|
|
|
|
export function DashboardChartsSection({ monthlyPerCustomer, monthComparison, status, monthly }: Props) {
|
|
return (
|
|
<>
|
|
<div className="grid gap-4 md:grid-cols-2">
|
|
<MonthlyDeliveryPerCustomerChart data={monthlyPerCustomer} />
|
|
<MonthVsLastChart data={monthComparison} />
|
|
</div>
|
|
<div className="grid gap-4 md:grid-cols-2">
|
|
<PurchasesVsDeliveriesChart data={monthly} />
|
|
<StatusBreakdownChart data={status} />
|
|
</div>
|
|
</>
|
|
);
|
|
}
|