@burdenoff/microfe-movethewheels 2026.625.1 → 2026.626.2
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/{AIAssistantPage-CNyoKtID.js → AIAssistantPage-AvsMbunM.js} +35 -29
- package/dist/{AnalyticsPage-Ck615ox7.js → AnalyticsPage-CCLfHgQZ.js} +36 -25
- package/dist/CreateOrderPage-CjlnEtk3.js +510 -0
- package/dist/CustomerDetailsPage-I6cdDHUi.js +265 -0
- package/dist/CustomersPage-CGGfD4ki.js +163 -0
- package/dist/{DashboardPage-DTmyuC11.js → DashboardPage-D2HRqwg9.js} +93 -89
- package/dist/DataTable-CD9ZhpLB.js +249 -0
- package/dist/DriverDetailsPage-rg_pGNuP.js +330 -0
- package/dist/DriversPage-DKiynISH.js +167 -0
- package/dist/FinancePage-Vg8WPs38.js +158 -0
- package/dist/{FleetPage-DCfOmBa2.js → FleetPage-DddXt8r8.js} +109 -71
- package/dist/ImportExportPage-BW6qO3kc.js +248 -0
- package/dist/{InventoryPage-BW0QXWuf.js → InventoryPage-rMGuaJN-.js} +74 -70
- package/dist/LiveTrackingPage-DQ1q4Id3.js +375 -0
- package/dist/MarketplacePage-DKrXAv62.js +219 -0
- package/dist/OrderDetailsPage-CFASgsYX.js +431 -0
- package/dist/OrdersListPage-BHeT8S5o.js +309 -0
- package/dist/ProductDetailsPage-CFGcbaHo.js +195 -0
- package/dist/ProductsPage--xEpbQ8A.js +171 -0
- package/dist/{ReportsPage-Df3hciPy.js → ReportsPage-Bb7_90rK.js} +53 -45
- package/dist/RouteDetailsPage-CVtDVb1N.js +282 -0
- package/dist/RoutesPage-s57PtgcQ.js +163 -0
- package/dist/SettingsPage-BYNCBOpN.js +298 -0
- package/dist/{TrackingPage-CU0Vk4mx.js → TrackingPage-CcRc_dva.js} +77 -72
- package/dist/VehicleDetailsPage-3YDMPsPs.js +220 -0
- package/dist/VehiclesPage-UlxPWP9K.js +167 -0
- package/dist/WarehouseDetailsPage-Db7KeN-d.js +238 -0
- package/dist/WarehousesPage-CuTO-OPp.js +164 -0
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/src/movethewheels/components/DataTable.tsx +37 -2
- package/src/movethewheels/components/MetricCard.tsx +3 -1
- package/src/movethewheels/pages/AIAssistantPage.tsx +11 -3
- package/src/movethewheels/pages/AnalyticsPage.tsx +31 -25
- package/src/movethewheels/pages/CreateOrderPage.tsx +56 -17
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +63 -38
- package/src/movethewheels/pages/CustomersPage.tsx +40 -2
- package/src/movethewheels/pages/DashboardPage.tsx +8 -1
- package/src/movethewheels/pages/DriverDetailsPage.tsx +57 -26
- package/src/movethewheels/pages/DriversPage.tsx +37 -1
- package/src/movethewheels/pages/FinancePage.tsx +45 -41
- package/src/movethewheels/pages/FleetPage.tsx +68 -25
- package/src/movethewheels/pages/ImportExportPage.tsx +46 -29
- package/src/movethewheels/pages/InventoryPage.tsx +20 -23
- package/src/movethewheels/pages/LiveTrackingPage.tsx +58 -20
- package/src/movethewheels/pages/MarketplacePage.tsx +37 -3
- package/src/movethewheels/pages/OrderDetailsPage.tsx +74 -46
- package/src/movethewheels/pages/OrdersListPage.tsx +62 -1
- package/src/movethewheels/pages/ProductDetailsPage.tsx +36 -11
- package/src/movethewheels/pages/ProductsPage.tsx +33 -1
- package/src/movethewheels/pages/ReportsPage.tsx +23 -19
- package/src/movethewheels/pages/RouteDetailsPage.tsx +71 -31
- package/src/movethewheels/pages/RoutesPage.tsx +41 -5
- package/src/movethewheels/pages/SettingsPage.tsx +68 -26
- package/src/movethewheels/pages/TrackingPage.tsx +50 -47
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +49 -24
- package/src/movethewheels/pages/VehiclesPage.tsx +33 -1
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +55 -30
- package/src/movethewheels/pages/WarehousesPage.tsx +42 -4
- package/dist/CreateOrderPage-C9Vb57Yn.js +0 -471
- package/dist/CustomerDetailsPage-BVkHRZvi.js +0 -239
- package/dist/CustomersPage-DhQg-6h_.js +0 -118
- package/dist/DataTable-CfWvFw5B.js +0 -239
- package/dist/DriverDetailsPage-DaaCQ-2O.js +0 -297
- package/dist/DriversPage-D0RMBB_t.js +0 -129
- package/dist/FinancePage-BUXqW1IM.js +0 -154
- package/dist/ImportExportPage-BM1BoRcE.js +0 -232
- package/dist/LiveTrackingPage-DqcGXdkw.js +0 -332
- package/dist/MarketplacePage-DFqsxNYU.js +0 -192
- package/dist/OrderDetailsPage-Dx1m3cVA.js +0 -398
- package/dist/OrdersListPage-DHYBGrWf.js +0 -256
- package/dist/ProductDetailsPage-DOXO90kb.js +0 -168
- package/dist/ProductsPage-RLMTwWN0.js +0 -133
- package/dist/RouteDetailsPage-xzFDeR-X.js +0 -240
- package/dist/RoutesPage-DDFy1QVi.js +0 -118
- package/dist/SettingsPage-JH_-UPbf.js +0 -247
- package/dist/VehicleDetailsPage-P4xDttKw.js +0 -194
- package/dist/VehiclesPage-tJZ64QKV.js +0 -129
- package/dist/WarehouseDetailsPage-Bt_w2Yf7.js +0 -215
- package/dist/WarehousesPage-HsPpEFeG.js +0 -126
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { M as e, d as t, f as n, g as r, h as i, i as a, l as o, n as s, r as c, u as l } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as u } from "./arrow-left-CBpZKkpq.js";
|
|
3
|
+
import { t as d } from "./file-text-C8Uioy11.js";
|
|
4
|
+
import { n as f, t as p } from "./wrench-CmxY1n4I.js";
|
|
5
|
+
import { t as m } from "./map-pin-BSaf5IDL.js";
|
|
6
|
+
import { t as h } from "./square-pen-hLIbFQFV.js";
|
|
7
|
+
import { t as g } from "./truck-CtDjNFbi.js";
|
|
8
|
+
import { r as _ } from "./graphqlClient-CdJyR_ed.js";
|
|
9
|
+
import { a as v } from "./useFleet-BdETplNE.js";
|
|
10
|
+
import { a as y, r as b } from "./StatusBadge-CijYQXtb.js";
|
|
11
|
+
import { r as x } from "./formatters-_vJlC-47.js";
|
|
12
|
+
import { t as S } from "./navigation-BgnOfsVd.js";
|
|
13
|
+
import { useParams as C } from "react-router-dom";
|
|
14
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
15
|
+
import { EmphasisPanel as E, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
//#region src/movethewheels/pages/VehicleDetailsPage.tsx
|
|
17
|
+
function k() {
|
|
18
|
+
let { vehicleId: k } = C(), { basePath: A, navigate: j } = _(), { vehicle: M, isLoading: N, error: P, refetch: F } = v(k), I = () => j?.(S(A, "fleet/vehicles")), L = (e) => j?.(S(A, e));
|
|
19
|
+
return N ? /* @__PURE__ */ w(c, { message: "Loading vehicle details..." }) : P || !M ? /* @__PURE__ */ w(s, {
|
|
20
|
+
title: "Vehicle not found",
|
|
21
|
+
onRetry: F
|
|
22
|
+
}) : /* @__PURE__ */ T(a, {
|
|
23
|
+
title: M.vehicleNumber,
|
|
24
|
+
subtitle: `${M.make} ${M.model} (${M.year})`,
|
|
25
|
+
icon: /* @__PURE__ */ w(g, { size: 24 }),
|
|
26
|
+
headerActions: /* @__PURE__ */ T("div", {
|
|
27
|
+
className: "flex gap-2",
|
|
28
|
+
children: [/* @__PURE__ */ T(l, {
|
|
29
|
+
variant: "outline",
|
|
30
|
+
onClick: I,
|
|
31
|
+
children: [/* @__PURE__ */ w(u, { size: 16 }), " Back"]
|
|
32
|
+
}), /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(h, { size: 16 }), " Edit"] })]
|
|
33
|
+
}),
|
|
34
|
+
headerContent: /* @__PURE__ */ T("div", {
|
|
35
|
+
className: "flex gap-2",
|
|
36
|
+
children: [/* @__PURE__ */ w(b, {
|
|
37
|
+
status: M.status,
|
|
38
|
+
type: "vehicle"
|
|
39
|
+
}), /* @__PURE__ */ w(y, { type: M.type })]
|
|
40
|
+
}),
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ w(O, {
|
|
43
|
+
icon: /* @__PURE__ */ w(g, { size: 18 }),
|
|
44
|
+
children: "The full record for this vehicle — specs, capacity, fuel and mileage, maintenance schedule and current location. Use it to confirm a vehicle is fuelled, serviced and the right size before dispatching it on a delivery."
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ w(D, {
|
|
47
|
+
storageKey: "movethewheels-vehicle-details",
|
|
48
|
+
steps: [{
|
|
49
|
+
id: "assign",
|
|
50
|
+
label: "Assign to a delivery",
|
|
51
|
+
description: "Put this vehicle on an order that fits its capacity.",
|
|
52
|
+
icon: /* @__PURE__ */ w(m, { size: 16 }),
|
|
53
|
+
onClick: () => L("orders")
|
|
54
|
+
}, {
|
|
55
|
+
id: "maintenance",
|
|
56
|
+
label: "Schedule maintenance",
|
|
57
|
+
description: "Keep it road-ready and compliant.",
|
|
58
|
+
icon: /* @__PURE__ */ w(p, { size: 16 }),
|
|
59
|
+
onClick: () => {}
|
|
60
|
+
}]
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ T("div", {
|
|
63
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
64
|
+
children: [/* @__PURE__ */ T("div", {
|
|
65
|
+
className: "lg:col-span-2 space-y-6",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ T(E, { children: [/* @__PURE__ */ w("h2", {
|
|
68
|
+
className: "text-base font-semibold text-text-primary mb-4",
|
|
69
|
+
children: "Vehicle Information"
|
|
70
|
+
}), /* @__PURE__ */ T("div", {
|
|
71
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-6",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
74
|
+
className: "text-sm text-text-secondary",
|
|
75
|
+
children: "Type"
|
|
76
|
+
}), /* @__PURE__ */ w("p", {
|
|
77
|
+
className: "font-medium capitalize",
|
|
78
|
+
children: M.type
|
|
79
|
+
})] }),
|
|
80
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
81
|
+
className: "text-sm text-text-secondary",
|
|
82
|
+
children: "Make"
|
|
83
|
+
}), /* @__PURE__ */ w("p", {
|
|
84
|
+
className: "font-medium",
|
|
85
|
+
children: M.make
|
|
86
|
+
})] }),
|
|
87
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
88
|
+
className: "text-sm text-text-secondary",
|
|
89
|
+
children: "Model"
|
|
90
|
+
}), /* @__PURE__ */ w("p", {
|
|
91
|
+
className: "font-medium",
|
|
92
|
+
children: M.model
|
|
93
|
+
})] }),
|
|
94
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
95
|
+
className: "text-sm text-text-secondary",
|
|
96
|
+
children: "Year"
|
|
97
|
+
}), /* @__PURE__ */ w("p", {
|
|
98
|
+
className: "font-medium",
|
|
99
|
+
children: M.year
|
|
100
|
+
})] })
|
|
101
|
+
]
|
|
102
|
+
})] }),
|
|
103
|
+
/* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(r, { children: "Capacity" }) }), /* @__PURE__ */ w(n, { children: /* @__PURE__ */ T("div", {
|
|
104
|
+
className: "grid grid-cols-3 gap-6",
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
107
|
+
className: "text-sm text-text-secondary",
|
|
108
|
+
children: "Weight"
|
|
109
|
+
}), /* @__PURE__ */ T("p", {
|
|
110
|
+
className: "text-2xl font-bold",
|
|
111
|
+
children: [M.capacity.weight, /* @__PURE__ */ w("span", {
|
|
112
|
+
className: "text-sm font-normal",
|
|
113
|
+
children: " kg"
|
|
114
|
+
})]
|
|
115
|
+
})] }),
|
|
116
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
117
|
+
className: "text-sm text-text-secondary",
|
|
118
|
+
children: "Volume"
|
|
119
|
+
}), /* @__PURE__ */ T("p", {
|
|
120
|
+
className: "text-2xl font-bold",
|
|
121
|
+
children: [M.capacity.volume, /* @__PURE__ */ w("span", {
|
|
122
|
+
className: "text-sm font-normal",
|
|
123
|
+
children: " m³"
|
|
124
|
+
})]
|
|
125
|
+
})] }),
|
|
126
|
+
M.capacity.pallets && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
127
|
+
className: "text-sm text-text-secondary",
|
|
128
|
+
children: "Pallets"
|
|
129
|
+
}), /* @__PURE__ */ w("p", {
|
|
130
|
+
className: "text-2xl font-bold",
|
|
131
|
+
children: M.capacity.pallets
|
|
132
|
+
})] })
|
|
133
|
+
]
|
|
134
|
+
}) })] }),
|
|
135
|
+
/* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
|
|
136
|
+
className: "flex items-center gap-2",
|
|
137
|
+
children: [/* @__PURE__ */ w(d, { size: 18 }), " Documents"]
|
|
138
|
+
}) }), /* @__PURE__ */ w(n, { children: M.documents.length > 0 ? /* @__PURE__ */ w("div", {
|
|
139
|
+
className: "space-y-3",
|
|
140
|
+
children: M.documents.map((e) => /* @__PURE__ */ T("div", {
|
|
141
|
+
className: "flex items-center justify-between p-3 border rounded-lg",
|
|
142
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
143
|
+
className: "font-medium capitalize",
|
|
144
|
+
children: e.type.replace("_", " ")
|
|
145
|
+
}), /* @__PURE__ */ T("p", {
|
|
146
|
+
className: "text-sm text-text-secondary",
|
|
147
|
+
children: ["Expires: ", x(e.expiryDate)]
|
|
148
|
+
})] }), /* @__PURE__ */ w(o, {
|
|
149
|
+
variant: e.verified ? "default" : "secondary",
|
|
150
|
+
children: e.verified ? "Verified" : "Pending"
|
|
151
|
+
})]
|
|
152
|
+
}, e.id))
|
|
153
|
+
}) : /* @__PURE__ */ w("p", {
|
|
154
|
+
className: "text-text-secondary text-center py-4",
|
|
155
|
+
children: "No documents uploaded"
|
|
156
|
+
}) })] })
|
|
157
|
+
]
|
|
158
|
+
}), /* @__PURE__ */ T("div", {
|
|
159
|
+
className: "space-y-6",
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
|
|
162
|
+
className: "flex items-center gap-2",
|
|
163
|
+
children: [/* @__PURE__ */ w(f, { size: 18 }), " Fuel & Mileage"]
|
|
164
|
+
}) }), /* @__PURE__ */ T(n, {
|
|
165
|
+
className: "space-y-4",
|
|
166
|
+
children: [M.fuelLevel !== void 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
|
|
167
|
+
className: "flex justify-between text-sm mb-2",
|
|
168
|
+
children: [/* @__PURE__ */ w("span", { children: "Fuel Level" }), /* @__PURE__ */ T("span", { children: [M.fuelLevel, "%"] })]
|
|
169
|
+
}), /* @__PURE__ */ w(e, { value: M.fuelLevel })] }), M.mileage !== void 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
170
|
+
className: "text-sm text-text-secondary",
|
|
171
|
+
children: "Total Mileage"
|
|
172
|
+
}), /* @__PURE__ */ T("p", {
|
|
173
|
+
className: "text-2xl font-bold",
|
|
174
|
+
children: [
|
|
175
|
+
M.mileage.toLocaleString(),
|
|
176
|
+
" ",
|
|
177
|
+
/* @__PURE__ */ w("span", {
|
|
178
|
+
className: "text-sm font-normal",
|
|
179
|
+
children: "miles"
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
})] })]
|
|
183
|
+
})] }),
|
|
184
|
+
/* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
|
|
185
|
+
className: "flex items-center gap-2",
|
|
186
|
+
children: [/* @__PURE__ */ w(p, { size: 18 }), " Maintenance"]
|
|
187
|
+
}) }), /* @__PURE__ */ T(n, {
|
|
188
|
+
className: "space-y-3",
|
|
189
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
190
|
+
className: "text-sm text-text-secondary",
|
|
191
|
+
children: "Last Maintenance"
|
|
192
|
+
}), /* @__PURE__ */ w("p", {
|
|
193
|
+
className: "font-medium",
|
|
194
|
+
children: M.lastMaintenance ? x(M.lastMaintenance) : "N/A"
|
|
195
|
+
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
196
|
+
className: "text-sm text-text-secondary",
|
|
197
|
+
children: "Next Scheduled"
|
|
198
|
+
}), /* @__PURE__ */ w("p", {
|
|
199
|
+
className: "font-medium",
|
|
200
|
+
children: M.nextMaintenance ? x(M.nextMaintenance) : "N/A"
|
|
201
|
+
})] })]
|
|
202
|
+
})] }),
|
|
203
|
+
M.currentLocation && /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
|
|
204
|
+
className: "flex items-center gap-2",
|
|
205
|
+
children: [/* @__PURE__ */ w(m, { size: 18 }), " Current Location"]
|
|
206
|
+
}) }), /* @__PURE__ */ T(n, { children: [/* @__PURE__ */ w("p", {
|
|
207
|
+
className: "text-sm",
|
|
208
|
+
children: M.currentLocation.address || "Location updating..."
|
|
209
|
+
}), /* @__PURE__ */ T("p", {
|
|
210
|
+
className: "text-xs text-text-secondary mt-1",
|
|
211
|
+
children: ["Updated ", x(M.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
|
|
212
|
+
})] })] })
|
|
213
|
+
]
|
|
214
|
+
})]
|
|
215
|
+
})
|
|
216
|
+
]
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
export { k as default };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { M as e, i as t } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as n } from "./DataTable-CD9ZhpLB.js";
|
|
3
|
+
import { t as r } from "./download-Dpa9vqoG.js";
|
|
4
|
+
import { t as i } from "./plus-Dl1rLeJR.js";
|
|
5
|
+
import { t as a } from "./refresh-cw-CWfERAit.js";
|
|
6
|
+
import { t as o } from "./truck-CtDjNFbi.js";
|
|
7
|
+
import { r as s } from "./graphqlClient-CdJyR_ed.js";
|
|
8
|
+
import { o as c } from "./useFleet-BdETplNE.js";
|
|
9
|
+
import { a as l, r as u } from "./StatusBadge-CijYQXtb.js";
|
|
10
|
+
import { t as d } from "./navigation-BgnOfsVd.js";
|
|
11
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
import { CTAOverflowMenu as m, EmphasisPanel as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
//#region src/movethewheels/pages/VehiclesPage.tsx
|
|
14
|
+
function _() {
|
|
15
|
+
let { basePath: _, navigate: v } = s(), { vehicles: y, totalVehicles: b, isLoading: x, refetch: S } = c(), C = (e) => {
|
|
16
|
+
v && v(d(_, e));
|
|
17
|
+
};
|
|
18
|
+
return /* @__PURE__ */ p(t, {
|
|
19
|
+
title: "Vehicles",
|
|
20
|
+
subtitle: `${b} vehicles in fleet`,
|
|
21
|
+
icon: /* @__PURE__ */ f(o, { size: 24 }),
|
|
22
|
+
headerActions: /* @__PURE__ */ f(m, {
|
|
23
|
+
primary: {
|
|
24
|
+
label: "Add Vehicle",
|
|
25
|
+
icon: /* @__PURE__ */ f(i, { size: 16 }),
|
|
26
|
+
onSelect: () => {}
|
|
27
|
+
},
|
|
28
|
+
actions: [{
|
|
29
|
+
label: "Refresh",
|
|
30
|
+
icon: /* @__PURE__ */ f(a, { size: 16 }),
|
|
31
|
+
onSelect: () => S()
|
|
32
|
+
}, {
|
|
33
|
+
label: "Export",
|
|
34
|
+
icon: /* @__PURE__ */ f(r, { size: 16 }),
|
|
35
|
+
onSelect: () => {}
|
|
36
|
+
}]
|
|
37
|
+
}),
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ f(g, {
|
|
40
|
+
icon: /* @__PURE__ */ f(o, { size: 18 }),
|
|
41
|
+
children: "Every truck, van and bike in your fleet. Monitor capacity, fuel level, mileage and maintenance status here so you always know which vehicles are road-ready before dispatching an order."
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f("p", {
|
|
44
|
+
className: "text-sm font-medium text-text-secondary",
|
|
45
|
+
children: "Fleet at a glance"
|
|
46
|
+
}), /* @__PURE__ */ p("div", {
|
|
47
|
+
className: "mt-3 grid grid-cols-3 gap-4",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
50
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
51
|
+
children: b
|
|
52
|
+
}), /* @__PURE__ */ f("p", {
|
|
53
|
+
className: "text-xs text-text-secondary",
|
|
54
|
+
children: "Total vehicles"
|
|
55
|
+
})] }),
|
|
56
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
57
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
58
|
+
children: y.filter((e) => e.status === "available").length
|
|
59
|
+
}), /* @__PURE__ */ f("p", {
|
|
60
|
+
className: "text-xs text-text-secondary",
|
|
61
|
+
children: "Available now"
|
|
62
|
+
})] }),
|
|
63
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
64
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
65
|
+
children: y.filter((e) => e.status === "maintenance").length
|
|
66
|
+
}), /* @__PURE__ */ f("p", {
|
|
67
|
+
className: "text-xs text-text-secondary",
|
|
68
|
+
children: "In maintenance"
|
|
69
|
+
})] })
|
|
70
|
+
]
|
|
71
|
+
})] }),
|
|
72
|
+
/* @__PURE__ */ f(n, {
|
|
73
|
+
columns: [
|
|
74
|
+
{
|
|
75
|
+
id: "vehicleNumber",
|
|
76
|
+
header: "Vehicle #",
|
|
77
|
+
accessorKey: "vehicleNumber",
|
|
78
|
+
sortable: !0,
|
|
79
|
+
cell: (e) => /* @__PURE__ */ f("span", {
|
|
80
|
+
className: "font-medium",
|
|
81
|
+
children: e.vehicleNumber
|
|
82
|
+
})
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "type",
|
|
86
|
+
header: "Type",
|
|
87
|
+
accessorKey: "type",
|
|
88
|
+
cell: (e) => /* @__PURE__ */ f(l, { type: e.type })
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "details",
|
|
92
|
+
header: "Vehicle",
|
|
93
|
+
cell: (e) => /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", {
|
|
94
|
+
className: "font-medium",
|
|
95
|
+
children: [
|
|
96
|
+
e.make,
|
|
97
|
+
" ",
|
|
98
|
+
e.model
|
|
99
|
+
]
|
|
100
|
+
}), /* @__PURE__ */ f("p", {
|
|
101
|
+
className: "text-sm text-text-secondary",
|
|
102
|
+
children: e.year
|
|
103
|
+
})] })
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "status",
|
|
107
|
+
header: "Status",
|
|
108
|
+
accessorKey: "status",
|
|
109
|
+
sortable: !0,
|
|
110
|
+
cell: (e) => /* @__PURE__ */ f(u, {
|
|
111
|
+
status: e.status,
|
|
112
|
+
type: "vehicle"
|
|
113
|
+
})
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "capacity",
|
|
117
|
+
header: "Capacity",
|
|
118
|
+
cell: (e) => /* @__PURE__ */ p("div", {
|
|
119
|
+
className: "text-sm",
|
|
120
|
+
children: [/* @__PURE__ */ p("p", { children: [e.capacity.weight, " kg"] }), /* @__PURE__ */ p("p", {
|
|
121
|
+
className: "text-text-secondary",
|
|
122
|
+
children: [e.capacity.volume, " m³"]
|
|
123
|
+
})]
|
|
124
|
+
})
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "fuel",
|
|
128
|
+
header: "Fuel Level",
|
|
129
|
+
cell: (t) => t.fuelLevel === void 0 ? "-" : /* @__PURE__ */ p("div", {
|
|
130
|
+
className: "flex items-center gap-2",
|
|
131
|
+
children: [/* @__PURE__ */ f(e, {
|
|
132
|
+
value: t.fuelLevel,
|
|
133
|
+
className: "w-16 h-2"
|
|
134
|
+
}), /* @__PURE__ */ p("span", {
|
|
135
|
+
className: "text-sm",
|
|
136
|
+
children: [t.fuelLevel, "%"]
|
|
137
|
+
})]
|
|
138
|
+
})
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: "mileage",
|
|
142
|
+
header: "Mileage",
|
|
143
|
+
accessorKey: "mileage",
|
|
144
|
+
sortable: !0,
|
|
145
|
+
cell: (e) => e.mileage ? `${e.mileage.toLocaleString()} mi` : "-"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
data: y,
|
|
149
|
+
isLoading: x,
|
|
150
|
+
searchable: !0,
|
|
151
|
+
searchPlaceholder: "Search vehicles...",
|
|
152
|
+
searchFields: [
|
|
153
|
+
"vehicleNumber",
|
|
154
|
+
"make",
|
|
155
|
+
"model"
|
|
156
|
+
],
|
|
157
|
+
onRowClick: (e) => C(`fleet/vehicles/${e.id}`),
|
|
158
|
+
getRowId: (e) => e.id,
|
|
159
|
+
emptyIllustration: "empty-data",
|
|
160
|
+
emptyTitle: "No vehicles yet",
|
|
161
|
+
emptyDescription: "Add vehicles to your fleet to start assigning them to deliveries."
|
|
162
|
+
})
|
|
163
|
+
]
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
export { _ as default };
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { M as e, d as t, f as n, g as r, h as i, i as a, l as o, n as s, r as c, u as l } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as u } from "./arrow-left-CBpZKkpq.js";
|
|
3
|
+
import { t as d } from "./box-CAaiElsb.js";
|
|
4
|
+
import { t as f } from "./clock-BjkdnddD.js";
|
|
5
|
+
import { t as p } from "./map-pin-BSaf5IDL.js";
|
|
6
|
+
import { t as m } from "./square-pen-hLIbFQFV.js";
|
|
7
|
+
import { t as h } from "./users-g2N0eL-Z.js";
|
|
8
|
+
import { t as g } from "./warehouse-D3WWDeTX.js";
|
|
9
|
+
import { r as _ } from "./graphqlClient-CdJyR_ed.js";
|
|
10
|
+
import { a as v } from "./useInventory-Dwn18FPz.js";
|
|
11
|
+
import { t as y } from "./formatters-_vJlC-47.js";
|
|
12
|
+
import { t as b } from "./navigation-BgnOfsVd.js";
|
|
13
|
+
import { useParams as x } from "react-router-dom";
|
|
14
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
15
|
+
import { EmphasisPanel as w, NextSteps as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
//#region src/movethewheels/pages/WarehouseDetailsPage.tsx
|
|
17
|
+
function D() {
|
|
18
|
+
let { warehouseId: D } = x(), { basePath: O, navigate: k } = _(), { warehouse: A, isLoading: j, error: M, refetch: N } = v(D), P = () => k?.(b(O, "inventory/warehouses")), F = (e) => k?.(b(O, e));
|
|
19
|
+
if (j) return /* @__PURE__ */ S(c, { message: "Loading warehouse details..." });
|
|
20
|
+
if (M || !A) return /* @__PURE__ */ S(s, {
|
|
21
|
+
title: "Warehouse not found",
|
|
22
|
+
onRetry: N
|
|
23
|
+
});
|
|
24
|
+
let I = A.capacity.usedSpace / A.capacity.totalSpace * 100;
|
|
25
|
+
return /* @__PURE__ */ C(a, {
|
|
26
|
+
title: A.name,
|
|
27
|
+
subtitle: `Code: ${A.code}`,
|
|
28
|
+
icon: /* @__PURE__ */ S(g, { size: 24 }),
|
|
29
|
+
headerActions: /* @__PURE__ */ C("div", {
|
|
30
|
+
className: "flex gap-2",
|
|
31
|
+
children: [/* @__PURE__ */ C(l, {
|
|
32
|
+
variant: "outline",
|
|
33
|
+
onClick: P,
|
|
34
|
+
children: [/* @__PURE__ */ S(u, { size: 16 }), " Back"]
|
|
35
|
+
}), /* @__PURE__ */ C(l, { children: [/* @__PURE__ */ S(m, { size: 16 }), " Edit"] })]
|
|
36
|
+
}),
|
|
37
|
+
headerContent: /* @__PURE__ */ C("div", {
|
|
38
|
+
className: "flex gap-2",
|
|
39
|
+
children: [/* @__PURE__ */ S(o, {
|
|
40
|
+
variant: A.isActive ? "default" : "secondary",
|
|
41
|
+
children: A.isActive ? "Active" : "Inactive"
|
|
42
|
+
}), /* @__PURE__ */ S(o, {
|
|
43
|
+
variant: "outline",
|
|
44
|
+
className: "capitalize",
|
|
45
|
+
children: A.type.replace("_", " ")
|
|
46
|
+
})]
|
|
47
|
+
}),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ S(E, {
|
|
50
|
+
icon: /* @__PURE__ */ S(g, { size: 18 }),
|
|
51
|
+
children: "A storage and fulfilment site at a glance — how full it is, its zones, operating hours, throughput and staff. Use it to decide whether this warehouse has the space and hours to fulfil an order, and where stock is running tight."
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ S(T, {
|
|
54
|
+
storageKey: "movethewheels-warehouse-details",
|
|
55
|
+
steps: [{
|
|
56
|
+
id: "inventory",
|
|
57
|
+
label: "Review stock here",
|
|
58
|
+
description: "See which products are stored at this site.",
|
|
59
|
+
icon: /* @__PURE__ */ S(d, { size: 16 }),
|
|
60
|
+
onClick: () => F("inventory/products")
|
|
61
|
+
}, {
|
|
62
|
+
id: "fulfil",
|
|
63
|
+
label: "Fulfil an order from this site",
|
|
64
|
+
description: "Pick a pending order to ship out of this warehouse.",
|
|
65
|
+
icon: /* @__PURE__ */ S(p, { size: 16 }),
|
|
66
|
+
onClick: () => F("orders")
|
|
67
|
+
}]
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ C("div", {
|
|
70
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
71
|
+
children: [/* @__PURE__ */ C("div", {
|
|
72
|
+
className: "lg:col-span-2 space-y-6",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ C(w, { children: [/* @__PURE__ */ C("h2", {
|
|
75
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
|
|
76
|
+
children: [/* @__PURE__ */ S(d, { size: 18 }), " Capacity"]
|
|
77
|
+
}), /* @__PURE__ */ C("div", {
|
|
78
|
+
className: "space-y-4",
|
|
79
|
+
children: [/* @__PURE__ */ C("div", { children: [
|
|
80
|
+
/* @__PURE__ */ C("div", {
|
|
81
|
+
className: "flex justify-between text-sm mb-2",
|
|
82
|
+
children: [/* @__PURE__ */ S("span", { children: "Space Utilization" }), /* @__PURE__ */ C("span", { children: [I.toFixed(0), "%"] })]
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ S(e, { value: I }),
|
|
85
|
+
/* @__PURE__ */ C("p", {
|
|
86
|
+
className: "text-sm text-text-secondary mt-1",
|
|
87
|
+
children: [
|
|
88
|
+
A.capacity.usedSpace.toLocaleString(),
|
|
89
|
+
" /",
|
|
90
|
+
" ",
|
|
91
|
+
A.capacity.totalSpace.toLocaleString(),
|
|
92
|
+
" sq ft"
|
|
93
|
+
]
|
|
94
|
+
})
|
|
95
|
+
] }), /* @__PURE__ */ S("div", {
|
|
96
|
+
className: "grid grid-cols-2 gap-4",
|
|
97
|
+
children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
98
|
+
className: "text-sm text-text-secondary",
|
|
99
|
+
children: "Pallets Used"
|
|
100
|
+
}), /* @__PURE__ */ C("p", {
|
|
101
|
+
className: "text-2xl font-bold",
|
|
102
|
+
children: [A.capacity.usedPallets, /* @__PURE__ */ C("span", {
|
|
103
|
+
className: "text-sm font-normal text-text-secondary",
|
|
104
|
+
children: [
|
|
105
|
+
" ",
|
|
106
|
+
"/ ",
|
|
107
|
+
A.capacity.totalPallets
|
|
108
|
+
]
|
|
109
|
+
})]
|
|
110
|
+
})] })
|
|
111
|
+
})]
|
|
112
|
+
})] }),
|
|
113
|
+
/* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, { children: [
|
|
114
|
+
"Zones (",
|
|
115
|
+
A.zones.length,
|
|
116
|
+
")"
|
|
117
|
+
] }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("div", {
|
|
118
|
+
className: "space-y-3",
|
|
119
|
+
children: A.zones.map((t) => /* @__PURE__ */ C("div", {
|
|
120
|
+
className: "flex items-center justify-between p-3 border rounded-lg",
|
|
121
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
122
|
+
className: "font-medium",
|
|
123
|
+
children: t.name
|
|
124
|
+
}), /* @__PURE__ */ C("p", {
|
|
125
|
+
className: "text-sm text-text-secondary capitalize",
|
|
126
|
+
children: [
|
|
127
|
+
t.type,
|
|
128
|
+
" - ",
|
|
129
|
+
t.location
|
|
130
|
+
]
|
|
131
|
+
})] }), /* @__PURE__ */ C("div", {
|
|
132
|
+
className: "text-right",
|
|
133
|
+
children: [/* @__PURE__ */ S(e, {
|
|
134
|
+
value: t.currentOccupancy / t.capacity * 100,
|
|
135
|
+
className: "w-24 h-2"
|
|
136
|
+
}), /* @__PURE__ */ C("p", {
|
|
137
|
+
className: "text-sm text-text-secondary",
|
|
138
|
+
children: [
|
|
139
|
+
t.currentOccupancy,
|
|
140
|
+
" / ",
|
|
141
|
+
t.capacity
|
|
142
|
+
]
|
|
143
|
+
})]
|
|
144
|
+
})]
|
|
145
|
+
}, t.id))
|
|
146
|
+
}) })] }),
|
|
147
|
+
/* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
|
|
148
|
+
className: "flex items-center gap-2",
|
|
149
|
+
children: [/* @__PURE__ */ S(f, { size: 18 }), " Operating Hours"]
|
|
150
|
+
}) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("div", {
|
|
151
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
152
|
+
children: Object.entries(A.operatingHours).map(([e, t]) => /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
153
|
+
className: "text-sm font-medium",
|
|
154
|
+
children: e
|
|
155
|
+
}), /* @__PURE__ */ S("p", {
|
|
156
|
+
className: "text-sm text-text-secondary",
|
|
157
|
+
children: t ? `${t.open} - ${t.close}` : "Closed"
|
|
158
|
+
})] }, e))
|
|
159
|
+
}) })] })
|
|
160
|
+
]
|
|
161
|
+
}), /* @__PURE__ */ C("div", {
|
|
162
|
+
className: "space-y-6",
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
|
|
165
|
+
className: "flex items-center gap-2",
|
|
166
|
+
children: [/* @__PURE__ */ S(p, { size: 18 }), " Location"]
|
|
167
|
+
}) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("p", {
|
|
168
|
+
className: "text-sm",
|
|
169
|
+
children: y(A.address)
|
|
170
|
+
}) })] }),
|
|
171
|
+
/* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ S(r, { children: "Metrics" }) }), /* @__PURE__ */ C(n, {
|
|
172
|
+
className: "space-y-3",
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
175
|
+
className: "text-sm text-text-secondary",
|
|
176
|
+
children: "Throughput"
|
|
177
|
+
}), /* @__PURE__ */ C("p", {
|
|
178
|
+
className: "text-2xl font-bold",
|
|
179
|
+
children: [A.metrics.throughput, /* @__PURE__ */ S("span", {
|
|
180
|
+
className: "text-sm font-normal",
|
|
181
|
+
children: " orders/day"
|
|
182
|
+
})]
|
|
183
|
+
})] }),
|
|
184
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
185
|
+
className: "text-sm text-text-secondary",
|
|
186
|
+
children: "Accuracy"
|
|
187
|
+
}), /* @__PURE__ */ C("p", {
|
|
188
|
+
className: "text-2xl font-bold",
|
|
189
|
+
children: [A.metrics.accuracy, "%"]
|
|
190
|
+
})] }),
|
|
191
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
192
|
+
className: "text-sm text-text-secondary",
|
|
193
|
+
children: "Productivity"
|
|
194
|
+
}), /* @__PURE__ */ C("p", {
|
|
195
|
+
className: "text-2xl font-bold",
|
|
196
|
+
children: [A.metrics.productivity, "%"]
|
|
197
|
+
})] }),
|
|
198
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
199
|
+
className: "text-sm text-text-secondary",
|
|
200
|
+
children: "Orders Fulfilled"
|
|
201
|
+
}), /* @__PURE__ */ S("p", {
|
|
202
|
+
className: "text-2xl font-bold",
|
|
203
|
+
children: A.metrics.ordersFulfilled.toLocaleString()
|
|
204
|
+
})] })
|
|
205
|
+
]
|
|
206
|
+
})] }),
|
|
207
|
+
/* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
|
|
208
|
+
className: "flex items-center gap-2",
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ S(h, { size: 18 }),
|
|
211
|
+
" Staff (",
|
|
212
|
+
A.staff.length,
|
|
213
|
+
")"
|
|
214
|
+
]
|
|
215
|
+
}) }), /* @__PURE__ */ S(n, { children: A.staff.length > 0 ? /* @__PURE__ */ S("div", {
|
|
216
|
+
className: "space-y-2",
|
|
217
|
+
children: A.staff.map((e, t) => /* @__PURE__ */ C("div", {
|
|
218
|
+
className: "flex items-center justify-between p-2 border rounded",
|
|
219
|
+
children: [/* @__PURE__ */ S("span", {
|
|
220
|
+
className: "text-sm capitalize",
|
|
221
|
+
children: e.role
|
|
222
|
+
}), /* @__PURE__ */ S(o, {
|
|
223
|
+
variant: "outline",
|
|
224
|
+
children: e.shift
|
|
225
|
+
})]
|
|
226
|
+
}, t))
|
|
227
|
+
}) : /* @__PURE__ */ S("p", {
|
|
228
|
+
className: "text-text-secondary",
|
|
229
|
+
children: "No staff assigned"
|
|
230
|
+
}) })] })
|
|
231
|
+
]
|
|
232
|
+
})]
|
|
233
|
+
})
|
|
234
|
+
]
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
//#endregion
|
|
238
|
+
export { D as default };
|