@burdenoff/microfe-movethewheels 2026.703.8 → 2026.704.1
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/{CreateOrderPage-V8aXfcpN.js → CreateOrderPage-CXbhJLLz.js} +163 -138
- package/dist/{DashboardPage-DiD-cWwD.js → DashboardPage-BoswH3ec.js} +2 -2
- package/dist/DriverDetailsPage-CPO0G8Ki.js +518 -0
- package/dist/{DriversPage-DW-FGPFW.js → DriversPage-6Z61dpDI.js} +1 -1
- package/dist/{FleetPage-P9k4zZqP.js → FleetPage-qWRj7WFO.js} +1 -1
- package/dist/{InventoryPage-BWikjZMW.js → InventoryPage-DbR4Z--d.js} +1 -1
- package/dist/{LiveTrackingPage-UQBWlthJ.js → LiveTrackingPage-5U68u3oA.js} +1 -1
- package/dist/{OrderDetailsPage-2J4ua0wd.js → OrderDetailsPage-DRYifXm9.js} +1 -1
- package/dist/ProductDetailsPage-CWgcRqGR.js +375 -0
- package/dist/{ProductsPage-Bn1U2jTj.js → ProductsPage-CokwDOR2.js} +1 -1
- package/dist/{RouteDetailsPage-CgSY1CTd.js → RouteDetailsPage-BHQbFgI9.js} +242 -210
- package/dist/{SettingsPage-2a05Sq2k.js → SettingsPage-_6SIlcBX.js} +1 -1
- package/dist/{TrackingPage-SnjW6qeD.js → TrackingPage-Cg0tYGJe.js} +1 -1
- package/dist/{VehicleDetailsPage-CvRMJ2zC.js → VehicleDetailsPage-BbZlCFPo.js} +159 -135
- package/dist/{VehiclesPage-qxf-1C1B.js → VehiclesPage-BfBEyXGs.js} +1 -1
- package/dist/WarehouseDetailsPage-DxNhiaoI.js +515 -0
- package/dist/{WarehousesPage-44Wj7AGT.js → WarehousesPage-M3NaBT0z.js} +1 -1
- package/dist/index.js +25 -5
- package/dist/{useFleet-BXSocBD_.js → useFleet-BfA_-VUW.js} +100 -71
- package/dist/{useInventory-DmZficcp.js → useInventory-BO7TSgq_.js} +98 -72
- package/dist/{useSettings-CteNasBE.js → useSettings-BNNzQs_B.js} +1 -1
- package/dist/{useTracking-B7ttexRe.js → useTracking-7nd_XOSL.js} +1 -1
- package/package.json +1 -1
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +5 -0
- package/src/movethewheels/hooks/useFleet.ts +113 -0
- package/src/movethewheels/hooks/useInventory.ts +86 -0
- package/src/movethewheels/hooks/useSettings.ts +8 -1
- package/src/movethewheels/pages/CreateOrderPage.tsx +48 -6
- package/src/movethewheels/pages/DriverDetailsPage.tsx +56 -18
- package/src/movethewheels/pages/ProductDetailsPage.tsx +51 -15
- package/src/movethewheels/pages/RouteDetailsPage.tsx +51 -7
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +51 -15
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +46 -10
- package/src/movethewheels/types/index.ts +3 -0
- package/dist/DriverDetailsPage-DjaXaATQ.js +0 -490
- package/dist/ProductDetailsPage-BSjWLrty.js +0 -350
- package/dist/WarehouseDetailsPage-D0Wyyj1Y.js +0 -493
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as e, F as t, I as n, J as r, L as i, P as a, R as o, V as s, X as c, Y as l, Z as u, d, f, g as p, h as m, i as h, j as g, p as _, u as v, ut as y } from "./PageLayout-j9Zw3wBN.js";
|
|
2
|
-
import { n as b, r as x, t as S } from "./useSettings-
|
|
2
|
+
import { n as b, r as x, t as S } from "./useSettings-BNNzQs_B.js";
|
|
3
3
|
import { t as C } from "./save-CcfoIn2J.js";
|
|
4
4
|
import { t as w } from "./user-B1IjWJtn.js";
|
|
5
5
|
import { useEffect as T, useMemo as E, useState as D } from "react";
|
|
@@ -6,7 +6,7 @@ import { t as p } from "./map-pin-BISLzLwb.js";
|
|
|
6
6
|
import { t as m } from "./package-UyaWiALC.js";
|
|
7
7
|
import { t as h } from "./search-C3YRxW9e.js";
|
|
8
8
|
import { t as g } from "./truck-DxhtLfkG.js";
|
|
9
|
-
import { i as _ } from "./useTracking-
|
|
9
|
+
import { i as _ } from "./useTracking-7nd_XOSL.js";
|
|
10
10
|
import { t as v } from "./maps-CtfuCAmh.js";
|
|
11
11
|
import { r as y } from "./StatusBadge-BfiF-nNI.js";
|
|
12
12
|
import { r as b, t as x } from "./formatters-FWJDwTFv.js";
|
|
@@ -7,16 +7,16 @@ import { t as S } from "./save-CcfoIn2J.js";
|
|
|
7
7
|
import { t as C } from "./square-pen-Dr1X-P2s.js";
|
|
8
8
|
import { t as w } from "./truck-DxhtLfkG.js";
|
|
9
9
|
import { t as T } from "./wrench-DTJGFs17.js";
|
|
10
|
-
import { a as E, r as D } from "./useFleet-
|
|
10
|
+
import { a as E, r as D } from "./useFleet-BfA_-VUW.js";
|
|
11
11
|
import { a as O, r as k } from "./StatusBadge-BfiF-nNI.js";
|
|
12
12
|
import { t as A } from "./FormError-D4T5FWZA.js";
|
|
13
13
|
import { r as j } from "./formatters-FWJDwTFv.js";
|
|
14
|
-
import {
|
|
15
|
-
import { useParams as
|
|
16
|
-
import { jsx as
|
|
17
|
-
import { EmphasisPanel as
|
|
14
|
+
import { useEffect as M, useState as N } from "react";
|
|
15
|
+
import { useLocation as P, useParams as F } from "react-router-dom";
|
|
16
|
+
import { jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
17
|
+
import { EmphasisPanel as R, NextSteps as z, PagePurpose as B } from "@burdenoff/fe-libs/ui";
|
|
18
18
|
//#region src/movethewheels/pages/VehicleDetailsPage.tsx
|
|
19
|
-
var
|
|
19
|
+
var V = [
|
|
20
20
|
{
|
|
21
21
|
value: "TRUCK",
|
|
22
22
|
label: "Truck"
|
|
@@ -50,149 +50,170 @@ var z = [
|
|
|
50
50
|
label: "Drone"
|
|
51
51
|
}
|
|
52
52
|
];
|
|
53
|
-
function
|
|
54
|
-
let { basePath:
|
|
53
|
+
function H({ editId: i }) {
|
|
54
|
+
let { basePath: s, navigate: c } = g(), { createVehicle: l, updateVehicle: u } = D(), { vehicle: m } = E(i), h = !!i, [y, b] = N({
|
|
55
55
|
vehicleNumber: "",
|
|
56
56
|
type: "VAN",
|
|
57
57
|
make: "",
|
|
58
58
|
model: "",
|
|
59
59
|
licensePlate: ""
|
|
60
|
-
}), [
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
}), [x, C] = N(!1), [T, O] = N(null);
|
|
61
|
+
M(() => {
|
|
62
|
+
i && m && b({
|
|
63
|
+
vehicleNumber: m.vehicleNumber ?? "",
|
|
64
|
+
type: m.type ? m.type.toUpperCase() : "VAN",
|
|
65
|
+
make: m.make ?? "",
|
|
66
|
+
model: m.model ?? "",
|
|
67
|
+
licensePlate: m.licensePlate ?? ""
|
|
68
|
+
});
|
|
69
|
+
}, [i, m]);
|
|
70
|
+
let k = () => c?.(p(s, "fleet/vehicles")), j = async (e) => {
|
|
71
|
+
if (e.preventDefault(), !y.vehicleNumber.trim()) {
|
|
72
|
+
O("Vehicle number is required.");
|
|
63
73
|
return;
|
|
64
74
|
}
|
|
65
|
-
|
|
75
|
+
C(!0), O(null);
|
|
66
76
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
if (i) {
|
|
78
|
+
let e = await u(i, {
|
|
79
|
+
vehicleNumber: y.vehicleNumber.trim(),
|
|
80
|
+
type: y.type,
|
|
81
|
+
make: y.make.trim() || void 0,
|
|
82
|
+
model: y.model.trim() || void 0,
|
|
83
|
+
licensePlate: y.licensePlate.trim() || void 0
|
|
84
|
+
});
|
|
85
|
+
c?.(p(s, `fleet/vehicles/${e.id}`));
|
|
86
|
+
} else {
|
|
87
|
+
let e = await l({
|
|
88
|
+
vehicleNumber: y.vehicleNumber.trim(),
|
|
89
|
+
type: y.type,
|
|
90
|
+
make: y.make.trim() || void 0,
|
|
91
|
+
model: y.model.trim() || void 0,
|
|
92
|
+
licensePlate: y.licensePlate.trim() || void 0
|
|
93
|
+
});
|
|
94
|
+
c?.(p(s, `fleet/vehicles/${e.id}`));
|
|
95
|
+
}
|
|
75
96
|
} catch (e) {
|
|
76
|
-
console.error("Failed to create vehicle:", e),
|
|
97
|
+
console.error("Failed to create vehicle:", e), O(e instanceof Error ? e.message : "Failed to create vehicle. Please try again."), C(!1);
|
|
77
98
|
}
|
|
78
99
|
};
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
title: "Add Vehicle",
|
|
100
|
+
return /* @__PURE__ */ L(d, {
|
|
101
|
+
title: h ? "Edit Vehicle" : "Add Vehicle",
|
|
81
102
|
subtitle: "Register a new vehicle in your fleet",
|
|
82
|
-
icon: /* @__PURE__ */
|
|
83
|
-
headerActions: /* @__PURE__ */
|
|
103
|
+
icon: /* @__PURE__ */ I(w, { size: 24 }),
|
|
104
|
+
headerActions: /* @__PURE__ */ L("div", {
|
|
84
105
|
className: "flex gap-2",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ L(_, {
|
|
86
107
|
variant: "outline",
|
|
87
|
-
onClick:
|
|
88
|
-
disabled:
|
|
89
|
-
children: [/* @__PURE__ */
|
|
90
|
-
}), /* @__PURE__ */
|
|
91
|
-
onClick:
|
|
92
|
-
disabled:
|
|
108
|
+
onClick: k,
|
|
109
|
+
disabled: x,
|
|
110
|
+
children: [/* @__PURE__ */ I(v, { size: 16 }), " Cancel"]
|
|
111
|
+
}), /* @__PURE__ */ L(_, {
|
|
112
|
+
onClick: j,
|
|
113
|
+
disabled: x,
|
|
93
114
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ I(S, { size: 16 }),
|
|
95
116
|
" ",
|
|
96
|
-
|
|
117
|
+
h ? x ? "Saving..." : "Save Changes" : x ? "Saving..." : "Add Vehicle"
|
|
97
118
|
]
|
|
98
119
|
})]
|
|
99
120
|
}),
|
|
100
|
-
children: [/* @__PURE__ */
|
|
101
|
-
icon: /* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ I(B, {
|
|
122
|
+
icon: /* @__PURE__ */ I(w, { size: 18 }),
|
|
102
123
|
children: "Add a vehicle so it can be assigned to deliveries and routes. Give it a fleet number and type to start — make, model and plate help identify it on the road."
|
|
103
|
-
}), /* @__PURE__ */
|
|
104
|
-
onSubmit:
|
|
124
|
+
}), /* @__PURE__ */ L("form", {
|
|
125
|
+
onSubmit: j,
|
|
105
126
|
className: "max-w-2xl space-y-6",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ I(A, { message: T }), /* @__PURE__ */ L(R, { children: [/* @__PURE__ */ I("h2", {
|
|
107
128
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
108
129
|
children: "Vehicle Details"
|
|
109
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ L("div", {
|
|
110
131
|
className: "space-y-4",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ L("div", {
|
|
112
133
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ L("div", {
|
|
114
135
|
className: "space-y-2",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ L(f, {
|
|
116
137
|
htmlFor: "vehicleNumber",
|
|
117
|
-
children: ["Vehicle Number ", /* @__PURE__ */
|
|
138
|
+
children: ["Vehicle Number ", /* @__PURE__ */ I("span", {
|
|
118
139
|
className: "text-status-error-text",
|
|
119
140
|
children: "*"
|
|
120
141
|
})]
|
|
121
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ I(e, {
|
|
122
143
|
id: "vehicleNumber",
|
|
123
|
-
value:
|
|
124
|
-
onChange: (e) =>
|
|
144
|
+
value: y.vehicleNumber,
|
|
145
|
+
onChange: (e) => b((t) => ({
|
|
125
146
|
...t,
|
|
126
147
|
vehicleNumber: e.target.value
|
|
127
148
|
})),
|
|
128
149
|
placeholder: "MTW-001",
|
|
129
150
|
required: !0
|
|
130
151
|
})]
|
|
131
|
-
}), /* @__PURE__ */
|
|
152
|
+
}), /* @__PURE__ */ L("div", {
|
|
132
153
|
className: "space-y-2",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ L(f, {
|
|
134
155
|
htmlFor: "type",
|
|
135
|
-
children: ["Type ", /* @__PURE__ */
|
|
156
|
+
children: ["Type ", /* @__PURE__ */ I("span", {
|
|
136
157
|
className: "text-status-error-text",
|
|
137
158
|
children: "*"
|
|
138
159
|
})]
|
|
139
|
-
}), /* @__PURE__ */
|
|
140
|
-
value:
|
|
141
|
-
onValueChange: (e) =>
|
|
160
|
+
}), /* @__PURE__ */ L(a, {
|
|
161
|
+
value: y.type,
|
|
162
|
+
onValueChange: (e) => b((t) => ({
|
|
142
163
|
...t,
|
|
143
164
|
type: e
|
|
144
165
|
})),
|
|
145
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ I(r, {
|
|
146
167
|
id: "type",
|
|
147
|
-
children: /* @__PURE__ */
|
|
148
|
-
}), /* @__PURE__ */
|
|
168
|
+
children: /* @__PURE__ */ I(o, {})
|
|
169
|
+
}), /* @__PURE__ */ I(t, { children: V.map((e) => /* @__PURE__ */ I(n, {
|
|
149
170
|
value: e.value,
|
|
150
171
|
children: e.label
|
|
151
172
|
}, e.value)) })]
|
|
152
173
|
})]
|
|
153
174
|
})]
|
|
154
|
-
}), /* @__PURE__ */
|
|
175
|
+
}), /* @__PURE__ */ L("div", {
|
|
155
176
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
156
177
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ L("div", {
|
|
158
179
|
className: "space-y-2",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ I(f, {
|
|
160
181
|
htmlFor: "make",
|
|
161
182
|
children: "Make"
|
|
162
|
-
}), /* @__PURE__ */
|
|
183
|
+
}), /* @__PURE__ */ I(e, {
|
|
163
184
|
id: "make",
|
|
164
|
-
value:
|
|
165
|
-
onChange: (e) =>
|
|
185
|
+
value: y.make,
|
|
186
|
+
onChange: (e) => b((t) => ({
|
|
166
187
|
...t,
|
|
167
188
|
make: e.target.value
|
|
168
189
|
})),
|
|
169
190
|
placeholder: "Ford"
|
|
170
191
|
})]
|
|
171
192
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ L("div", {
|
|
173
194
|
className: "space-y-2",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ I(f, {
|
|
175
196
|
htmlFor: "model",
|
|
176
197
|
children: "Model"
|
|
177
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ I(e, {
|
|
178
199
|
id: "model",
|
|
179
|
-
value:
|
|
180
|
-
onChange: (e) =>
|
|
200
|
+
value: y.model,
|
|
201
|
+
onChange: (e) => b((t) => ({
|
|
181
202
|
...t,
|
|
182
203
|
model: e.target.value
|
|
183
204
|
})),
|
|
184
205
|
placeholder: "Transit"
|
|
185
206
|
})]
|
|
186
207
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ L("div", {
|
|
188
209
|
className: "space-y-2",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ I(f, {
|
|
190
211
|
htmlFor: "licensePlate",
|
|
191
212
|
children: "License Plate"
|
|
192
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ I(e, {
|
|
193
214
|
id: "licensePlate",
|
|
194
|
-
value:
|
|
195
|
-
onChange: (e) =>
|
|
215
|
+
value: y.licensePlate,
|
|
216
|
+
onChange: (e) => b((t) => ({
|
|
196
217
|
...t,
|
|
197
218
|
licensePlate: e.target.value
|
|
198
219
|
})),
|
|
@@ -205,181 +226,184 @@ function B() {
|
|
|
205
226
|
})]
|
|
206
227
|
});
|
|
207
228
|
}
|
|
208
|
-
function
|
|
209
|
-
let { vehicleId: e } =
|
|
210
|
-
return e ? a ? /* @__PURE__ */
|
|
229
|
+
function U() {
|
|
230
|
+
let { vehicleId: e } = F(), { basePath: t, navigate: n } = g(), { vehicle: r, isLoading: a, error: o, refetch: f } = E(e), S = P().pathname.endsWith("/edit"), D = () => n?.(p(t, "fleet/vehicles")), A = (e) => n?.(p(t, e));
|
|
231
|
+
return e ? S ? /* @__PURE__ */ I(H, { editId: e }) : a ? /* @__PURE__ */ I(h, { message: "Loading vehicle details..." }) : o || !r ? /* @__PURE__ */ I(m, {
|
|
211
232
|
title: "Vehicle not found",
|
|
212
233
|
onRetry: f
|
|
213
|
-
}) : /* @__PURE__ */
|
|
234
|
+
}) : /* @__PURE__ */ L(d, {
|
|
214
235
|
title: r.vehicleNumber,
|
|
215
236
|
subtitle: `${r.make} ${r.model} (${r.year})`,
|
|
216
|
-
icon: /* @__PURE__ */
|
|
217
|
-
headerActions: /* @__PURE__ */
|
|
237
|
+
icon: /* @__PURE__ */ I(w, { size: 24 }),
|
|
238
|
+
headerActions: /* @__PURE__ */ L("div", {
|
|
218
239
|
className: "flex gap-2",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ L(_, {
|
|
220
241
|
variant: "outline",
|
|
221
|
-
onClick:
|
|
222
|
-
children: [/* @__PURE__ */
|
|
223
|
-
}), /* @__PURE__ */
|
|
242
|
+
onClick: D,
|
|
243
|
+
children: [/* @__PURE__ */ I(v, { size: 16 }), " Back"]
|
|
244
|
+
}), /* @__PURE__ */ L(_, {
|
|
245
|
+
onClick: () => n?.(p(t, "fleet/vehicles/" + e + "/edit")),
|
|
246
|
+
children: [/* @__PURE__ */ I(C, { size: 16 }), " Edit"]
|
|
247
|
+
})]
|
|
224
248
|
}),
|
|
225
|
-
headerContent: /* @__PURE__ */
|
|
249
|
+
headerContent: /* @__PURE__ */ L("div", {
|
|
226
250
|
className: "flex gap-2",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ I(k, {
|
|
228
252
|
status: r.status,
|
|
229
253
|
type: "vehicle"
|
|
230
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ I(O, { type: r.type })]
|
|
231
255
|
}),
|
|
232
256
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
icon: /* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ I(B, {
|
|
258
|
+
icon: /* @__PURE__ */ I(w, { size: 18 }),
|
|
235
259
|
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."
|
|
236
260
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ I(z, {
|
|
238
262
|
storageKey: "movethewheels-vehicle-details",
|
|
239
263
|
steps: [{
|
|
240
264
|
id: "assign",
|
|
241
265
|
label: "Assign to a delivery",
|
|
242
266
|
description: "Put this vehicle on an order that fits its capacity.",
|
|
243
|
-
icon: /* @__PURE__ */
|
|
244
|
-
onClick: () =>
|
|
267
|
+
icon: /* @__PURE__ */ I(x, { size: 16 }),
|
|
268
|
+
onClick: () => A("orders")
|
|
245
269
|
}, {
|
|
246
270
|
id: "maintenance",
|
|
247
271
|
label: "Schedule maintenance",
|
|
248
272
|
description: "Keep it road-ready and compliant.",
|
|
249
|
-
icon: /* @__PURE__ */
|
|
273
|
+
icon: /* @__PURE__ */ I(T, { size: 16 }),
|
|
250
274
|
onClick: () => {}
|
|
251
275
|
}]
|
|
252
276
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ L("div", {
|
|
254
278
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ L("div", {
|
|
256
280
|
className: "lg:col-span-2 space-y-6",
|
|
257
281
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ L(R, { children: [/* @__PURE__ */ I("h2", {
|
|
259
283
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
260
284
|
children: "Vehicle Information"
|
|
261
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ L("div", {
|
|
262
286
|
className: "grid grid-cols-2 md:grid-cols-4 gap-6",
|
|
263
287
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
265
289
|
className: "text-sm text-text-secondary",
|
|
266
290
|
children: "Type"
|
|
267
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ I("p", {
|
|
268
292
|
className: "font-medium capitalize",
|
|
269
293
|
children: r.type
|
|
270
294
|
})] }),
|
|
271
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
272
296
|
className: "text-sm text-text-secondary",
|
|
273
297
|
children: "Make"
|
|
274
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ I("p", {
|
|
275
299
|
className: "font-medium",
|
|
276
300
|
children: r.make
|
|
277
301
|
})] }),
|
|
278
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
279
303
|
className: "text-sm text-text-secondary",
|
|
280
304
|
children: "Model"
|
|
281
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ I("p", {
|
|
282
306
|
className: "font-medium",
|
|
283
307
|
children: r.model
|
|
284
308
|
})] }),
|
|
285
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
286
310
|
className: "text-sm text-text-secondary",
|
|
287
311
|
children: "Year"
|
|
288
|
-
}), /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ I("p", {
|
|
289
313
|
className: "font-medium",
|
|
290
314
|
children: r.year
|
|
291
315
|
})] })
|
|
292
316
|
]
|
|
293
317
|
})] }),
|
|
294
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ I(l, { children: "Capacity" }) }), /* @__PURE__ */ I(c, { children: /* @__PURE__ */ L("div", {
|
|
295
319
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-6",
|
|
296
320
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
298
322
|
className: "text-sm text-text-secondary",
|
|
299
323
|
children: "Weight"
|
|
300
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ L("p", {
|
|
301
325
|
className: "text-2xl font-bold",
|
|
302
|
-
children: [r.capacity.weight, /* @__PURE__ */
|
|
326
|
+
children: [r.capacity.weight, /* @__PURE__ */ I("span", {
|
|
303
327
|
className: "text-sm font-normal",
|
|
304
328
|
children: " kg"
|
|
305
329
|
})]
|
|
306
330
|
})] }),
|
|
307
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
308
332
|
className: "text-sm text-text-secondary",
|
|
309
333
|
children: "Volume"
|
|
310
|
-
}), /* @__PURE__ */
|
|
334
|
+
}), /* @__PURE__ */ L("p", {
|
|
311
335
|
className: "text-2xl font-bold",
|
|
312
|
-
children: [r.capacity.volume, /* @__PURE__ */
|
|
336
|
+
children: [r.capacity.volume, /* @__PURE__ */ I("span", {
|
|
313
337
|
className: "text-sm font-normal",
|
|
314
338
|
children: " m³"
|
|
315
339
|
})]
|
|
316
340
|
})] }),
|
|
317
|
-
r.capacity.pallets && /* @__PURE__ */
|
|
341
|
+
r.capacity.pallets && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
318
342
|
className: "text-sm text-text-secondary",
|
|
319
343
|
children: "Pallets"
|
|
320
|
-
}), /* @__PURE__ */
|
|
344
|
+
}), /* @__PURE__ */ I("p", {
|
|
321
345
|
className: "text-2xl font-bold",
|
|
322
346
|
children: r.capacity.pallets
|
|
323
347
|
})] })
|
|
324
348
|
]
|
|
325
349
|
}) })] }),
|
|
326
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ I(y, {
|
|
327
351
|
entityType: "vehicle",
|
|
328
352
|
entityId: r.id
|
|
329
353
|
})
|
|
330
354
|
]
|
|
331
|
-
}), /* @__PURE__ */
|
|
355
|
+
}), /* @__PURE__ */ L("div", {
|
|
332
356
|
className: "space-y-6",
|
|
333
357
|
children: [
|
|
334
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ L(l, {
|
|
335
359
|
className: "flex items-center gap-2",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
337
|
-
}) }), /* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ I(b, { size: 18 }), " Fuel & Mileage"]
|
|
361
|
+
}) }), /* @__PURE__ */ L(c, {
|
|
338
362
|
className: "space-y-4",
|
|
339
|
-
children: [r.fuelLevel !== void 0 && /* @__PURE__ */
|
|
363
|
+
children: [r.fuelLevel !== void 0 && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ L("div", {
|
|
340
364
|
className: "flex justify-between text-sm mb-2",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
342
|
-
}), /* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ I("span", { children: "Fuel Level" }), /* @__PURE__ */ L("span", { children: [r.fuelLevel, "%"] })]
|
|
366
|
+
}), /* @__PURE__ */ I(i, { value: r.fuelLevel })] }), r.mileage !== void 0 && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
343
367
|
className: "text-sm text-text-secondary",
|
|
344
368
|
children: "Total Mileage"
|
|
345
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ L("p", {
|
|
346
370
|
className: "text-2xl font-bold",
|
|
347
371
|
children: [
|
|
348
372
|
r.mileage.toLocaleString(),
|
|
349
373
|
" ",
|
|
350
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ I("span", {
|
|
351
375
|
className: "text-sm font-normal",
|
|
352
376
|
children: "miles"
|
|
353
377
|
})
|
|
354
378
|
]
|
|
355
379
|
})] })]
|
|
356
380
|
})] }),
|
|
357
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ L(l, {
|
|
358
382
|
className: "flex items-center gap-2",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
360
|
-
}) }), /* @__PURE__ */
|
|
383
|
+
children: [/* @__PURE__ */ I(T, { size: 18 }), " Maintenance"]
|
|
384
|
+
}) }), /* @__PURE__ */ L(c, {
|
|
361
385
|
className: "space-y-3",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
363
387
|
className: "text-sm text-text-secondary",
|
|
364
388
|
children: "Last Maintenance"
|
|
365
|
-
}), /* @__PURE__ */
|
|
389
|
+
}), /* @__PURE__ */ I("p", {
|
|
366
390
|
className: "font-medium",
|
|
367
391
|
children: r.lastMaintenance ? j(r.lastMaintenance) : "N/A"
|
|
368
|
-
})] }), /* @__PURE__ */
|
|
392
|
+
})] }), /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
369
393
|
className: "text-sm text-text-secondary",
|
|
370
394
|
children: "Next Scheduled"
|
|
371
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ I("p", {
|
|
372
396
|
className: "font-medium",
|
|
373
397
|
children: r.nextMaintenance ? j(r.nextMaintenance) : "N/A"
|
|
374
398
|
})] })]
|
|
375
399
|
})] }),
|
|
376
|
-
r.currentLocation && /* @__PURE__ */
|
|
400
|
+
r.currentLocation && /* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ L(l, {
|
|
377
401
|
className: "flex items-center gap-2",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
379
|
-
}) }), /* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ I(x, { size: 18 }), " Current Location"]
|
|
403
|
+
}) }), /* @__PURE__ */ L(c, { children: [/* @__PURE__ */ I("p", {
|
|
380
404
|
className: "text-sm",
|
|
381
405
|
children: r.currentLocation.address || "Location updating..."
|
|
382
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ L("p", {
|
|
383
407
|
className: "text-xs text-text-secondary mt-1",
|
|
384
408
|
children: ["Updated ", j(r.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
|
|
385
409
|
})] })] })
|
|
@@ -387,7 +411,7 @@ function V() {
|
|
|
387
411
|
})]
|
|
388
412
|
})
|
|
389
413
|
]
|
|
390
|
-
}) : /* @__PURE__ */
|
|
414
|
+
}) : /* @__PURE__ */ I(H, {});
|
|
391
415
|
}
|
|
392
416
|
//#endregion
|
|
393
|
-
export {
|
|
417
|
+
export { U as default };
|
|
@@ -7,7 +7,7 @@ import { t as c } from "./refresh-cw-C4-jecjy.js";
|
|
|
7
7
|
import { t as l } from "./route-WpCP6F1x.js";
|
|
8
8
|
import { t as u } from "./truck-DxhtLfkG.js";
|
|
9
9
|
import { t as d } from "./wrench-DTJGFs17.js";
|
|
10
|
-
import { i as f, o as p } from "./useFleet-
|
|
10
|
+
import { i as f, o as p } from "./useFleet-BfA_-VUW.js";
|
|
11
11
|
import { r as m, t as h } from "./MetricCard-CqU5WsyW.js";
|
|
12
12
|
import { a as g, r as _ } from "./StatusBadge-BfiF-nNI.js";
|
|
13
13
|
import { useState as v } from "react";
|