@burdenoff/microfe-movethewheels 2026.1107.4 → 2026.1107.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ScenarioPlanningPanel.js +411 -0
- package/dist/generated/wspace-types.d.ts +1786 -39
- package/dist/hooks/useScenarioPlanning.js +89 -0
- package/dist/movethewheels/components/ScenarioPlanningPanel.d.ts +4 -0
- package/dist/movethewheels/hooks/useScenarioPlanning.d.ts +94 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-compare.js +26 -0
- package/dist/pages/AnalyticsPage.js +80 -78
- package/package.json +1 -1
- package/src/generated/wspace-types.ts +2009 -39
- package/src/movethewheels/components/ScenarioPlanningPanel.tsx +539 -0
- package/src/movethewheels/hooks/useScenarioPlanning.ts +273 -0
- package/src/movethewheels/pages/AnalyticsPage.tsx +5 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
|
|
2
|
+
import { executeGraphQL as t } from "../utils/graphqlClient.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
4
|
+
//#region src/movethewheels/hooks/useScenarioPlanning.ts
|
|
5
|
+
var s = "\n name\n demandChangePct\n capacityChangePct\n closedLanes\n unknownLanes\n totalVolume\n totalRevenue\n volumeDelta\n revenueDelta\n lostVolume\n lostRevenue\n totalCapacity\n totalShortfall\n utilization\n shortfallLanes\n weeks {\n periodStart\n periodEnd\n baselineVolume\n scenarioVolume\n baselineRevenue\n scenarioRevenue\n capacity\n shortfall\n }\n lanes {\n laneKey\n laneLabel\n closed\n demandChangePct\n baselineVolume\n scenarioVolume\n baselineRevenue\n scenarioRevenue\n lostVolume\n lostRevenue\n capacity\n shortfall\n flagged\n }\n", c = `
|
|
6
|
+
query GetMovethewheelsDemandScenarioComparison($input: MtwDemandScenarioComparisonInput) {
|
|
7
|
+
demandScenarioComparison(input: $input) {
|
|
8
|
+
generatedAt
|
|
9
|
+
weeks
|
|
10
|
+
capacity {
|
|
11
|
+
activeVehicles
|
|
12
|
+
jobsPerVehiclePerWeek
|
|
13
|
+
source
|
|
14
|
+
weeklyFleetCapacity
|
|
15
|
+
laneShareBasis
|
|
16
|
+
observedVehicles
|
|
17
|
+
}
|
|
18
|
+
baseline { ${s} }
|
|
19
|
+
scenarios { ${s} }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`, l = {
|
|
23
|
+
weeks: 4,
|
|
24
|
+
jobsPerVehiclePerWeek: null,
|
|
25
|
+
scenarios: [{
|
|
26
|
+
name: "Peak season",
|
|
27
|
+
demandChangePct: 25,
|
|
28
|
+
capacityChangePct: 0,
|
|
29
|
+
closedLanes: [],
|
|
30
|
+
laneAdjustments: []
|
|
31
|
+
}, {
|
|
32
|
+
name: "Peak + 20% fleet",
|
|
33
|
+
demandChangePct: 25,
|
|
34
|
+
capacityChangePct: 20,
|
|
35
|
+
closedLanes: [],
|
|
36
|
+
laneAdjustments: []
|
|
37
|
+
}]
|
|
38
|
+
};
|
|
39
|
+
function u(s = l) {
|
|
40
|
+
let { apiGatewayUrl: u, authToken: d, workspaceToken: f, workspaceId: p, tenantId: m, currentUser: h } = e(), [g, _] = o(null), [v, y] = o(!1), [b, x] = o(null), S = a(0), C = a(s), w = i(() => ({
|
|
41
|
+
apiGatewayUrl: u,
|
|
42
|
+
authToken: d,
|
|
43
|
+
workspaceToken: f,
|
|
44
|
+
workspaceId: p,
|
|
45
|
+
tenantId: m,
|
|
46
|
+
actorId: h?.id
|
|
47
|
+
}), [
|
|
48
|
+
u,
|
|
49
|
+
d,
|
|
50
|
+
f,
|
|
51
|
+
p,
|
|
52
|
+
m,
|
|
53
|
+
h?.id
|
|
54
|
+
]), T = n(async (e) => {
|
|
55
|
+
C.current = e;
|
|
56
|
+
let n = S.current + 1;
|
|
57
|
+
S.current = n, y(!0), x(null);
|
|
58
|
+
try {
|
|
59
|
+
let r = await t(w, c, { input: {
|
|
60
|
+
weeks: e.weeks,
|
|
61
|
+
jobsPerVehiclePerWeek: e.jobsPerVehiclePerWeek,
|
|
62
|
+
scenarios: e.scenarios.map((e) => ({
|
|
63
|
+
name: e.name.trim(),
|
|
64
|
+
demandChangePct: e.demandChangePct,
|
|
65
|
+
capacityChangePct: e.capacityChangePct,
|
|
66
|
+
closedLanes: e.closedLanes,
|
|
67
|
+
laneAdjustments: e.laneAdjustments
|
|
68
|
+
}))
|
|
69
|
+
} });
|
|
70
|
+
S.current === n && _(r.demandScenarioComparison);
|
|
71
|
+
} catch (e) {
|
|
72
|
+
S.current === n && x(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to compare scenarios"));
|
|
73
|
+
} finally {
|
|
74
|
+
S.current === n && y(!1);
|
|
75
|
+
}
|
|
76
|
+
}, [w]);
|
|
77
|
+
return r(() => {
|
|
78
|
+
T(C.current);
|
|
79
|
+
}, [T]), {
|
|
80
|
+
comparison: g,
|
|
81
|
+
isLoading: v,
|
|
82
|
+
error: b,
|
|
83
|
+
run: n((e) => {
|
|
84
|
+
T(e);
|
|
85
|
+
}, [T])
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { l as DEFAULT_REQUEST, u as useScenarioPlanning };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ScenarioComparisonRequest } from '../hooks/useScenarioPlanning';
|
|
2
|
+
/** First problem with the request, or null when it can be sent. */
|
|
3
|
+
export declare function validateRequest(request: ScenarioComparisonRequest): string | null;
|
|
4
|
+
export declare function ScenarioPlanningPanel(): import('react').JSX.Element;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scenario planning (S&OP) and capacity vs demand (BOFF-10761). Runs the
|
|
3
|
+
* read-only `demandScenarioComparison` query: the baseline lane forecast and
|
|
4
|
+
* up to four what-if scenarios, each compared against fleet capacity.
|
|
5
|
+
*/
|
|
6
|
+
export type CapacitySource = 'OBSERVED' | 'OVERRIDE' | 'UNKNOWN';
|
|
7
|
+
export type LaneShareBasis = 'VEHICLE_HISTORY' | 'DEMAND_SHARE' | 'NONE';
|
|
8
|
+
export interface ScenarioLaneAdjustment {
|
|
9
|
+
laneKey: string;
|
|
10
|
+
demandChangePct: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ScenarioDraft {
|
|
13
|
+
name: string;
|
|
14
|
+
demandChangePct: number;
|
|
15
|
+
capacityChangePct: number;
|
|
16
|
+
closedLanes: string[];
|
|
17
|
+
laneAdjustments: ScenarioLaneAdjustment[];
|
|
18
|
+
}
|
|
19
|
+
export interface ScenarioComparisonRequest {
|
|
20
|
+
weeks: number;
|
|
21
|
+
jobsPerVehiclePerWeek: number | null;
|
|
22
|
+
scenarios: ScenarioDraft[];
|
|
23
|
+
}
|
|
24
|
+
export interface CapacityBasis {
|
|
25
|
+
activeVehicles: number;
|
|
26
|
+
jobsPerVehiclePerWeek: number | null;
|
|
27
|
+
source: CapacitySource;
|
|
28
|
+
weeklyFleetCapacity: number | null;
|
|
29
|
+
laneShareBasis: LaneShareBasis;
|
|
30
|
+
observedVehicles: number;
|
|
31
|
+
}
|
|
32
|
+
export interface ScenarioWeekResult {
|
|
33
|
+
periodStart: string;
|
|
34
|
+
periodEnd: string;
|
|
35
|
+
baselineVolume: number;
|
|
36
|
+
scenarioVolume: number;
|
|
37
|
+
baselineRevenue: number;
|
|
38
|
+
scenarioRevenue: number;
|
|
39
|
+
capacity: number | null;
|
|
40
|
+
shortfall: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ScenarioLaneResult {
|
|
43
|
+
laneKey: string;
|
|
44
|
+
laneLabel: string;
|
|
45
|
+
closed: boolean;
|
|
46
|
+
demandChangePct: number;
|
|
47
|
+
baselineVolume: number;
|
|
48
|
+
scenarioVolume: number;
|
|
49
|
+
baselineRevenue: number;
|
|
50
|
+
scenarioRevenue: number;
|
|
51
|
+
lostVolume: number;
|
|
52
|
+
lostRevenue: number;
|
|
53
|
+
capacity: number | null;
|
|
54
|
+
shortfall: number;
|
|
55
|
+
flagged: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface ScenarioResult {
|
|
58
|
+
name: string;
|
|
59
|
+
demandChangePct: number;
|
|
60
|
+
capacityChangePct: number;
|
|
61
|
+
closedLanes: string[];
|
|
62
|
+
unknownLanes: string[];
|
|
63
|
+
totalVolume: number;
|
|
64
|
+
totalRevenue: number;
|
|
65
|
+
volumeDelta: number;
|
|
66
|
+
revenueDelta: number;
|
|
67
|
+
lostVolume: number;
|
|
68
|
+
lostRevenue: number;
|
|
69
|
+
totalCapacity: number | null;
|
|
70
|
+
totalShortfall: number;
|
|
71
|
+
utilization: number | null;
|
|
72
|
+
shortfallLanes: number;
|
|
73
|
+
weeks: ScenarioWeekResult[];
|
|
74
|
+
lanes: ScenarioLaneResult[];
|
|
75
|
+
}
|
|
76
|
+
export interface ScenarioComparison {
|
|
77
|
+
generatedAt: string;
|
|
78
|
+
weeks: number;
|
|
79
|
+
capacity: CapacityBasis;
|
|
80
|
+
baseline: ScenarioResult;
|
|
81
|
+
scenarios: ScenarioResult[];
|
|
82
|
+
}
|
|
83
|
+
/** The scenarios a workspace sees before editing anything. */
|
|
84
|
+
export declare const DEFAULT_SCENARIOS: ScenarioDraft[];
|
|
85
|
+
export declare const DEFAULT_REQUEST: ScenarioComparisonRequest;
|
|
86
|
+
interface UseScenarioPlanningResult {
|
|
87
|
+
comparison: ScenarioComparison | null;
|
|
88
|
+
isLoading: boolean;
|
|
89
|
+
error: Error | null;
|
|
90
|
+
/** Run a comparison; the latest request wins if several overlap. */
|
|
91
|
+
run: (request: ScenarioComparisonRequest) => void;
|
|
92
|
+
}
|
|
93
|
+
export declare function useScenarioPlanning(initial?: ScenarioComparisonRequest): UseScenarioPlanningResult;
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createLucideIcon as e } from "../createLucideIcon.js";
|
|
2
|
+
//#region node_modules/lucide-react/dist/esm/icons/git-compare.js
|
|
3
|
+
var t = e("GitCompare", [
|
|
4
|
+
["circle", {
|
|
5
|
+
cx: "18",
|
|
6
|
+
cy: "18",
|
|
7
|
+
r: "3",
|
|
8
|
+
key: "1xkwt0"
|
|
9
|
+
}],
|
|
10
|
+
["circle", {
|
|
11
|
+
cx: "6",
|
|
12
|
+
cy: "6",
|
|
13
|
+
r: "3",
|
|
14
|
+
key: "1lh9wr"
|
|
15
|
+
}],
|
|
16
|
+
["path", {
|
|
17
|
+
d: "M13 6h3a2 2 0 0 1 2 2v7",
|
|
18
|
+
key: "1yeb86"
|
|
19
|
+
}],
|
|
20
|
+
["path", {
|
|
21
|
+
d: "M11 18H8a2 2 0 0 1-2-2V9",
|
|
22
|
+
key: "19pyzm"
|
|
23
|
+
}]
|
|
24
|
+
]);
|
|
25
|
+
//#endregion
|
|
26
|
+
export { t as GitCompare };
|
|
@@ -15,76 +15,77 @@ import { StatusDonut as S } from "../components/charts/StatusDonut.js";
|
|
|
15
15
|
import "../components/charts/index.js";
|
|
16
16
|
import { CarbonFootprintPanel as C } from "../components/CarbonFootprintPanel.js";
|
|
17
17
|
import { UpcomingDemandPanel as w } from "../components/UpcomingDemandPanel.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
18
|
+
import { ScenarioPlanningPanel as T } from "../components/ScenarioPlanningPanel.js";
|
|
19
|
+
import { useDemandForecast as E } from "../hooks/useDemandForecast.js";
|
|
20
|
+
import { useMemo as D } from "react";
|
|
21
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
22
|
+
import { EmphasisPanel as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
|
|
22
23
|
//#region src/movethewheels/pages/AnalyticsPage.tsx
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
let { analytics:
|
|
24
|
+
var M = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
25
|
+
function N() {
|
|
26
|
+
let { analytics: N, isLoading: P, error: F, refetch: I } = s(), { orderData: L } = l(), { fleetData: R } = c(), { laneForecast: z, customerForecast: B, laneVariance: V, customerVariance: H, isLoading: U, error: W, refetch: G } = E(4, 8), K = D(() => N.trends.dailyOrders.map((e) => e.orders), [N.trends.dailyOrders]), q = D(() => N.trends.revenue.map((e) => ({
|
|
26
27
|
month: e.month,
|
|
27
28
|
revenue: e.revenue
|
|
28
|
-
})), [
|
|
29
|
-
name:
|
|
29
|
+
})), [N.trends.revenue]), J = D(() => L.byStatus.filter((e) => e.count > 0).map((e) => ({
|
|
30
|
+
name: M(e.status),
|
|
30
31
|
value: e.count
|
|
31
|
-
})), [
|
|
32
|
-
return /* @__PURE__ */
|
|
32
|
+
})), [L.byStatus]), Y = J.reduce((e, t) => e + t.value, 0);
|
|
33
|
+
return /* @__PURE__ */ k(g, {
|
|
33
34
|
title: "Analytics",
|
|
34
35
|
subtitle: "Business performance and insights",
|
|
35
|
-
icon: /* @__PURE__ */
|
|
36
|
+
icon: /* @__PURE__ */ O(e, { size: 24 }),
|
|
36
37
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
icon: /* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ O(j, {
|
|
39
|
+
icon: /* @__PURE__ */ O(e, { size: 18 }),
|
|
39
40
|
children: "See how the operation is really performing. Track order volume, revenue, on-time rate and customer satisfaction over time so you can spot trends, find bottlenecks, and decide where to invest — whether that's more vehicles, better routes, or new customers."
|
|
40
41
|
}),
|
|
41
|
-
|
|
42
|
+
F && !P ? /* @__PURE__ */ O(d, {
|
|
42
43
|
className: "border-status-error-border",
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ k(f, {
|
|
44
45
|
className: "p-6 text-center space-y-3",
|
|
45
46
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ O("p", {
|
|
47
48
|
className: "text-status-error-text font-medium",
|
|
48
49
|
children: "Couldn't load analytics"
|
|
49
50
|
}),
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ O("p", {
|
|
51
52
|
className: "text-sm text-text-secondary",
|
|
52
|
-
children:
|
|
53
|
+
children: F.message
|
|
53
54
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ O(u, {
|
|
55
56
|
variant: "outline",
|
|
56
|
-
onClick:
|
|
57
|
+
onClick: I,
|
|
57
58
|
children: "Retry"
|
|
58
59
|
})
|
|
59
60
|
]
|
|
60
61
|
})
|
|
61
|
-
}) :
|
|
62
|
+
}) : P ? /* @__PURE__ */ O(y, {
|
|
62
63
|
columns: 4,
|
|
63
|
-
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */
|
|
64
|
-
}) : /* @__PURE__ */
|
|
64
|
+
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ O(v, {}, t))
|
|
65
|
+
}) : /* @__PURE__ */ k(y, {
|
|
65
66
|
columns: 4,
|
|
66
67
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ O(_, {
|
|
68
69
|
label: "Order Volume",
|
|
69
|
-
value:
|
|
70
|
-
icon: /* @__PURE__ */
|
|
70
|
+
value: N.overview.totalOrders.toLocaleString(),
|
|
71
|
+
icon: /* @__PURE__ */ O(n, { size: 20 }),
|
|
71
72
|
accent: "brand",
|
|
72
|
-
sparklineData:
|
|
73
|
+
sparklineData: K.length >= 2 ? K : void 0
|
|
73
74
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ O(_, {
|
|
75
76
|
treatment: "glass",
|
|
76
77
|
glow: !0,
|
|
77
78
|
label: "Revenue",
|
|
78
|
-
value: o(
|
|
79
|
-
icon: /* @__PURE__ */
|
|
79
|
+
value: o(N.overview.totalRevenue),
|
|
80
|
+
icon: /* @__PURE__ */ O(t, { size: 20 }),
|
|
80
81
|
accent: "success"
|
|
81
82
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ O(_, {
|
|
83
84
|
label: "On-Time Delivery",
|
|
84
|
-
value: `${
|
|
85
|
-
icon: /* @__PURE__ */
|
|
85
|
+
value: `${N.overview.onTimeDeliveryRate.toFixed(1)}%`,
|
|
86
|
+
icon: /* @__PURE__ */ O(i, { size: 20 }),
|
|
86
87
|
accent: "blue",
|
|
87
|
-
delta:
|
|
88
|
+
delta: N.overview.onTimeDeliveryRate >= 90 ? {
|
|
88
89
|
value: "On target",
|
|
89
90
|
direction: "up"
|
|
90
91
|
} : {
|
|
@@ -92,19 +93,19 @@ function M() {
|
|
|
92
93
|
direction: "down"
|
|
93
94
|
}
|
|
94
95
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ O(_, {
|
|
96
97
|
label: "Customer Satisfaction",
|
|
97
|
-
value:
|
|
98
|
-
icon: /* @__PURE__ */
|
|
98
|
+
value: N.overview.customerSatisfaction.toFixed(1),
|
|
99
|
+
icon: /* @__PURE__ */ O(r, { size: 20 }),
|
|
99
100
|
accent: "warning",
|
|
100
101
|
subtitle: "out of 5"
|
|
101
102
|
})
|
|
102
103
|
]
|
|
103
104
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ O(m, { children: "Order & delivery trend" }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O(b, {
|
|
105
106
|
xKey: "date",
|
|
106
107
|
height: 300,
|
|
107
|
-
data:
|
|
108
|
+
data: N.trends.dailyOrders,
|
|
108
109
|
series: [{
|
|
109
110
|
dataKey: "orders",
|
|
110
111
|
name: "Orders"
|
|
@@ -114,99 +115,100 @@ function M() {
|
|
|
114
115
|
}],
|
|
115
116
|
emptyMessage: "No order trend recorded yet"
|
|
116
117
|
}) })] }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
laneForecast:
|
|
119
|
-
customerForecast:
|
|
120
|
-
laneVariance:
|
|
121
|
-
customerVariance:
|
|
122
|
-
isLoading:
|
|
123
|
-
error:
|
|
124
|
-
onRetry:
|
|
118
|
+
/* @__PURE__ */ O(w, {
|
|
119
|
+
laneForecast: z,
|
|
120
|
+
customerForecast: B,
|
|
121
|
+
laneVariance: V,
|
|
122
|
+
customerVariance: H,
|
|
123
|
+
isLoading: U,
|
|
124
|
+
error: W,
|
|
125
|
+
onRetry: G
|
|
125
126
|
}),
|
|
126
|
-
/* @__PURE__ */ O(
|
|
127
|
+
/* @__PURE__ */ O(T, {}),
|
|
128
|
+
/* @__PURE__ */ k("div", {
|
|
127
129
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ O(m, { children: "Revenue by month" }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O(x, {
|
|
129
131
|
xKey: "month",
|
|
130
132
|
height: 280,
|
|
131
133
|
showLegend: !1,
|
|
132
|
-
data:
|
|
134
|
+
data: q,
|
|
133
135
|
series: [{
|
|
134
136
|
dataKey: "revenue",
|
|
135
137
|
name: "Revenue"
|
|
136
138
|
}],
|
|
137
139
|
valueFormatter: (e) => o(Number(e)),
|
|
138
140
|
emptyMessage: "No revenue recorded yet"
|
|
139
|
-
}) })] }), /* @__PURE__ */
|
|
140
|
-
data:
|
|
141
|
+
}) })] }), /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ O(m, { children: "Orders by status" }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O(S, {
|
|
142
|
+
data: J,
|
|
141
143
|
height: 240,
|
|
142
|
-
centerLabel:
|
|
144
|
+
centerLabel: Y.toLocaleString(),
|
|
143
145
|
centerSubLabel: "orders",
|
|
144
146
|
emptyMessage: "No orders to break down yet"
|
|
145
147
|
}) })] })]
|
|
146
148
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ k("div", {
|
|
148
150
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ O(m, { children: "Fleet Performance" }) }), /* @__PURE__ */ k(f, {
|
|
150
152
|
className: "space-y-4",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("div", {
|
|
152
154
|
className: "flex justify-between text-sm mb-1",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
154
|
-
}), /* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ O("span", { children: "Vehicle Utilization" }), /* @__PURE__ */ k("span", { children: [R.vehicleUtilization.toFixed(0), "%"] })]
|
|
156
|
+
}), /* @__PURE__ */ O(h, { value: R.vehicleUtilization })] }), R.vehiclesByType.length > 0 && /* @__PURE__ */ k("div", {
|
|
155
157
|
className: "pt-2",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ O("p", {
|
|
157
159
|
className: "text-sm text-text-secondary mb-2",
|
|
158
160
|
children: "Vehicles by Type"
|
|
159
|
-
}),
|
|
161
|
+
}), R.vehiclesByType.map(({ type: e, count: t }) => /* @__PURE__ */ k("div", {
|
|
160
162
|
className: "flex justify-between text-sm py-1",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ O("span", {
|
|
162
164
|
className: "capitalize",
|
|
163
165
|
children: e
|
|
164
|
-
}), /* @__PURE__ */
|
|
166
|
+
}), /* @__PURE__ */ O("span", {
|
|
165
167
|
className: "font-medium",
|
|
166
168
|
children: t
|
|
167
169
|
})]
|
|
168
170
|
}, e))]
|
|
169
171
|
})]
|
|
170
|
-
})] }), /* @__PURE__ */
|
|
172
|
+
})] }), /* @__PURE__ */ k(A, {
|
|
171
173
|
className: "space-y-4",
|
|
172
174
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ O("h2", {
|
|
174
176
|
className: "text-base font-semibold text-text-primary",
|
|
175
177
|
children: "Performance Metrics"
|
|
176
178
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
178
180
|
className: "text-sm text-text-secondary",
|
|
179
181
|
children: "On-Time Delivery"
|
|
180
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ k("p", {
|
|
181
183
|
className: "text-2xl font-bold",
|
|
182
|
-
children: [
|
|
184
|
+
children: [N.performance.onTimeDelivery.toFixed(1), "%"]
|
|
183
185
|
})] }),
|
|
184
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
185
187
|
className: "text-sm text-text-secondary",
|
|
186
188
|
children: "Customer Satisfaction"
|
|
187
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ k("p", {
|
|
188
190
|
className: "text-2xl font-bold",
|
|
189
|
-
children: [
|
|
191
|
+
children: [N.overview.customerSatisfaction.toFixed(1), "/5"]
|
|
190
192
|
})] }),
|
|
191
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ k("div", {
|
|
192
194
|
className: "flex items-center gap-2",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ O(a, {
|
|
194
196
|
size: 16,
|
|
195
197
|
className: "text-text-secondary"
|
|
196
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
197
199
|
className: "text-sm text-text-secondary",
|
|
198
200
|
children: "Driver Ratings"
|
|
199
|
-
}), /* @__PURE__ */
|
|
201
|
+
}), /* @__PURE__ */ k("p", {
|
|
200
202
|
className: "text-2xl font-bold",
|
|
201
|
-
children: [
|
|
203
|
+
children: [N.performance.driverRatings.toFixed(1), "/5"]
|
|
202
204
|
})] })]
|
|
203
205
|
})
|
|
204
206
|
]
|
|
205
207
|
})]
|
|
206
208
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ O(C, {})
|
|
208
210
|
]
|
|
209
211
|
});
|
|
210
212
|
}
|
|
211
213
|
//#endregion
|
|
212
|
-
export {
|
|
214
|
+
export { N as default };
|
package/package.json
CHANGED