@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.
Files changed (37) hide show
  1. package/dist/{CreateOrderPage-V8aXfcpN.js → CreateOrderPage-CXbhJLLz.js} +163 -138
  2. package/dist/{DashboardPage-DiD-cWwD.js → DashboardPage-BoswH3ec.js} +2 -2
  3. package/dist/DriverDetailsPage-CPO0G8Ki.js +518 -0
  4. package/dist/{DriversPage-DW-FGPFW.js → DriversPage-6Z61dpDI.js} +1 -1
  5. package/dist/{FleetPage-P9k4zZqP.js → FleetPage-qWRj7WFO.js} +1 -1
  6. package/dist/{InventoryPage-BWikjZMW.js → InventoryPage-DbR4Z--d.js} +1 -1
  7. package/dist/{LiveTrackingPage-UQBWlthJ.js → LiveTrackingPage-5U68u3oA.js} +1 -1
  8. package/dist/{OrderDetailsPage-2J4ua0wd.js → OrderDetailsPage-DRYifXm9.js} +1 -1
  9. package/dist/ProductDetailsPage-CWgcRqGR.js +375 -0
  10. package/dist/{ProductsPage-Bn1U2jTj.js → ProductsPage-CokwDOR2.js} +1 -1
  11. package/dist/{RouteDetailsPage-CgSY1CTd.js → RouteDetailsPage-BHQbFgI9.js} +242 -210
  12. package/dist/{SettingsPage-2a05Sq2k.js → SettingsPage-_6SIlcBX.js} +1 -1
  13. package/dist/{TrackingPage-SnjW6qeD.js → TrackingPage-Cg0tYGJe.js} +1 -1
  14. package/dist/{VehicleDetailsPage-CvRMJ2zC.js → VehicleDetailsPage-BbZlCFPo.js} +159 -135
  15. package/dist/{VehiclesPage-qxf-1C1B.js → VehiclesPage-BfBEyXGs.js} +1 -1
  16. package/dist/WarehouseDetailsPage-DxNhiaoI.js +515 -0
  17. package/dist/{WarehousesPage-44Wj7AGT.js → WarehousesPage-M3NaBT0z.js} +1 -1
  18. package/dist/index.js +25 -5
  19. package/dist/{useFleet-BXSocBD_.js → useFleet-BfA_-VUW.js} +100 -71
  20. package/dist/{useInventory-DmZficcp.js → useInventory-BO7TSgq_.js} +98 -72
  21. package/dist/{useSettings-CteNasBE.js → useSettings-BNNzQs_B.js} +1 -1
  22. package/dist/{useTracking-B7ttexRe.js → useTracking-7nd_XOSL.js} +1 -1
  23. package/package.json +1 -1
  24. package/src/movethewheels/MoveTheWheelsRoutes.tsx +5 -0
  25. package/src/movethewheels/hooks/useFleet.ts +113 -0
  26. package/src/movethewheels/hooks/useInventory.ts +86 -0
  27. package/src/movethewheels/hooks/useSettings.ts +8 -1
  28. package/src/movethewheels/pages/CreateOrderPage.tsx +48 -6
  29. package/src/movethewheels/pages/DriverDetailsPage.tsx +56 -18
  30. package/src/movethewheels/pages/ProductDetailsPage.tsx +51 -15
  31. package/src/movethewheels/pages/RouteDetailsPage.tsx +51 -7
  32. package/src/movethewheels/pages/VehicleDetailsPage.tsx +51 -15
  33. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +46 -10
  34. package/src/movethewheels/types/index.ts +3 -0
  35. package/dist/DriverDetailsPage-DjaXaATQ.js +0 -490
  36. package/dist/ProductDetailsPage-BSjWLrty.js +0 -350
  37. package/dist/WarehouseDetailsPage-D0Wyyj1Y.js +0 -493
@@ -0,0 +1,518 @@
1
+ import { A as e, M as t, d as n, f as r, g as i, h as a, i as o, j as s, l as c, lt as l, n as u, r as d, st as f, u as p } from "./PageLayout-j9Zw3wBN.js";
2
+ import { t as m } from "./arrow-left-1dVWv2dg.js";
3
+ import { t as h } from "./clock-B4-qjGuB.js";
4
+ import { t as g } from "./dollar-sign-CYGHy2oS.js";
5
+ import { t as _ } from "./DocumentsCard-y2ybnAlu.js";
6
+ import { t as v } from "./file-text-C-cZx58r.js";
7
+ import { t as y } from "./map-pin-BISLzLwb.js";
8
+ import { t as b } from "./save-CcfoIn2J.js";
9
+ import { t as x } from "./square-pen-Dr1X-P2s.js";
10
+ import { t as S } from "./star-1Ixfuzai.js";
11
+ import { t as C } from "./users-BKmsb79k.js";
12
+ import { r as w, t as T } from "./useFleet-BfA_-VUW.js";
13
+ import { r as E } from "./StatusBadge-BfiF-nNI.js";
14
+ import { t as D } from "./FormError-D4T5FWZA.js";
15
+ import { n as O, r as k } from "./formatters-FWJDwTFv.js";
16
+ import { useEffect as A, useState as j } from "react";
17
+ import { useLocation as M, useParams as N } from "react-router-dom";
18
+ import { jsx as P, jsxs as F } from "react/jsx-runtime";
19
+ import { EmphasisPanel as I, NextSteps as L, PagePurpose as R } from "@burdenoff/fe-libs/ui";
20
+ //#region src/movethewheels/pages/DriverDetailsPage.tsx
21
+ function z({ editId: t }) {
22
+ let { basePath: n, navigate: r } = f(), { createDriver: i, updateDriver: a } = w(), { driver: c } = T(t), u = !!t, [d, h] = j({
23
+ employeeId: "",
24
+ firstName: "",
25
+ lastName: "",
26
+ email: "",
27
+ phone: "",
28
+ licenseNumber: ""
29
+ }), [g, _] = j(!1), [v, y] = j(null);
30
+ A(() => {
31
+ if (!t || !c) return;
32
+ let [e, ...n] = c.fullName.trim().split(/\s+/);
33
+ h({
34
+ employeeId: c.employeeId || "",
35
+ firstName: e || "",
36
+ lastName: n.join(" "),
37
+ email: c.email || "",
38
+ phone: c.phone || "",
39
+ licenseNumber: c.licenseNumber || ""
40
+ });
41
+ }, [t, c]);
42
+ let x = () => r?.(l(n, "fleet/drivers")), S = async (e) => {
43
+ if (e.preventDefault(), !d.employeeId.trim() || !d.firstName.trim() || !d.lastName.trim()) {
44
+ y("Employee ID, first name and last name are required.");
45
+ return;
46
+ }
47
+ _(!0), y(null);
48
+ try {
49
+ if (t) {
50
+ let e = await a(t, {
51
+ employeeId: d.employeeId.trim(),
52
+ firstName: d.firstName.trim(),
53
+ lastName: d.lastName.trim(),
54
+ email: d.email.trim() || void 0,
55
+ phone: d.phone.trim() || void 0,
56
+ licenseNumber: d.licenseNumber.trim() || void 0
57
+ });
58
+ r?.(l(n, `fleet/drivers/${e.id}`));
59
+ } else {
60
+ let e = await i({
61
+ employeeId: d.employeeId.trim(),
62
+ firstName: d.firstName.trim(),
63
+ lastName: d.lastName.trim(),
64
+ email: d.email.trim() || void 0,
65
+ phone: d.phone.trim() || void 0,
66
+ licenseNumber: d.licenseNumber.trim() || void 0
67
+ });
68
+ r?.(l(n, `fleet/drivers/${e.id}`));
69
+ }
70
+ } catch (e) {
71
+ console.error("Failed to save driver:", e), y(e instanceof Error ? e.message : "Failed to save driver. Please try again."), _(!1);
72
+ }
73
+ };
74
+ return /* @__PURE__ */ F(o, {
75
+ title: u ? "Edit Driver" : "Add Driver",
76
+ subtitle: "Add a driver to your workforce",
77
+ icon: /* @__PURE__ */ P(C, { size: 24 }),
78
+ headerActions: /* @__PURE__ */ F("div", {
79
+ className: "flex gap-2",
80
+ children: [/* @__PURE__ */ F(p, {
81
+ variant: "outline",
82
+ onClick: x,
83
+ disabled: g,
84
+ children: [/* @__PURE__ */ P(m, { size: 16 }), " Cancel"]
85
+ }), /* @__PURE__ */ F(p, {
86
+ onClick: S,
87
+ disabled: g,
88
+ children: [
89
+ /* @__PURE__ */ P(b, { size: 16 }),
90
+ " ",
91
+ u ? g ? "Saving..." : "Save Changes" : g ? "Saving..." : "Add Driver"
92
+ ]
93
+ })]
94
+ }),
95
+ children: [/* @__PURE__ */ P(R, {
96
+ icon: /* @__PURE__ */ P(C, { size: 18 }),
97
+ children: "Add a driver so they can be assigned to orders and routes. An employee ID and name get them on the roster — add contact details and license number to keep the record complete."
98
+ }), /* @__PURE__ */ F("form", {
99
+ onSubmit: S,
100
+ className: "max-w-2xl space-y-6",
101
+ children: [/* @__PURE__ */ P(D, { message: v }), /* @__PURE__ */ F(I, { children: [/* @__PURE__ */ P("h2", {
102
+ className: "text-base font-semibold text-text-primary mb-4",
103
+ children: "Driver Details"
104
+ }), /* @__PURE__ */ F("div", {
105
+ className: "space-y-4",
106
+ children: [/* @__PURE__ */ F("div", {
107
+ className: "grid grid-cols-1 md:grid-cols-3 gap-4",
108
+ children: [
109
+ /* @__PURE__ */ F("div", {
110
+ className: "space-y-2",
111
+ children: [/* @__PURE__ */ F(s, {
112
+ htmlFor: "employeeId",
113
+ children: ["Employee ID ", /* @__PURE__ */ P("span", {
114
+ className: "text-status-error-text",
115
+ children: "*"
116
+ })]
117
+ }), /* @__PURE__ */ P(e, {
118
+ id: "employeeId",
119
+ value: d.employeeId,
120
+ onChange: (e) => h((t) => ({
121
+ ...t,
122
+ employeeId: e.target.value
123
+ })),
124
+ placeholder: "EMP-001",
125
+ required: !0
126
+ })]
127
+ }),
128
+ /* @__PURE__ */ F("div", {
129
+ className: "space-y-2",
130
+ children: [/* @__PURE__ */ F(s, {
131
+ htmlFor: "firstName",
132
+ children: ["First Name ", /* @__PURE__ */ P("span", {
133
+ className: "text-status-error-text",
134
+ children: "*"
135
+ })]
136
+ }), /* @__PURE__ */ P(e, {
137
+ id: "firstName",
138
+ value: d.firstName,
139
+ onChange: (e) => h((t) => ({
140
+ ...t,
141
+ firstName: e.target.value
142
+ })),
143
+ placeholder: "Jane",
144
+ required: !0
145
+ })]
146
+ }),
147
+ /* @__PURE__ */ F("div", {
148
+ className: "space-y-2",
149
+ children: [/* @__PURE__ */ F(s, {
150
+ htmlFor: "lastName",
151
+ children: ["Last Name ", /* @__PURE__ */ P("span", {
152
+ className: "text-status-error-text",
153
+ children: "*"
154
+ })]
155
+ }), /* @__PURE__ */ P(e, {
156
+ id: "lastName",
157
+ value: d.lastName,
158
+ onChange: (e) => h((t) => ({
159
+ ...t,
160
+ lastName: e.target.value
161
+ })),
162
+ placeholder: "Doe",
163
+ required: !0
164
+ })]
165
+ })
166
+ ]
167
+ }), /* @__PURE__ */ F("div", {
168
+ className: "grid grid-cols-1 md:grid-cols-3 gap-4",
169
+ children: [
170
+ /* @__PURE__ */ F("div", {
171
+ className: "space-y-2",
172
+ children: [/* @__PURE__ */ P(s, {
173
+ htmlFor: "email",
174
+ children: "Email"
175
+ }), /* @__PURE__ */ P(e, {
176
+ id: "email",
177
+ type: "email",
178
+ value: d.email,
179
+ onChange: (e) => h((t) => ({
180
+ ...t,
181
+ email: e.target.value
182
+ })),
183
+ placeholder: "jane.doe@example.com"
184
+ })]
185
+ }),
186
+ /* @__PURE__ */ F("div", {
187
+ className: "space-y-2",
188
+ children: [/* @__PURE__ */ P(s, {
189
+ htmlFor: "phone",
190
+ children: "Phone"
191
+ }), /* @__PURE__ */ P(e, {
192
+ id: "phone",
193
+ value: d.phone,
194
+ onChange: (e) => h((t) => ({
195
+ ...t,
196
+ phone: e.target.value
197
+ })),
198
+ placeholder: "+1-555-0100"
199
+ })]
200
+ }),
201
+ /* @__PURE__ */ F("div", {
202
+ className: "space-y-2",
203
+ children: [/* @__PURE__ */ P(s, {
204
+ htmlFor: "licenseNumber",
205
+ children: "License Number"
206
+ }), /* @__PURE__ */ P(e, {
207
+ id: "licenseNumber",
208
+ value: d.licenseNumber,
209
+ onChange: (e) => h((t) => ({
210
+ ...t,
211
+ licenseNumber: e.target.value
212
+ })),
213
+ placeholder: "D1234567"
214
+ })]
215
+ })
216
+ ]
217
+ })]
218
+ })] })]
219
+ })]
220
+ });
221
+ }
222
+ function B() {
223
+ let { driverId: e } = N(), s = M().pathname.endsWith("/edit"), { basePath: b, navigate: w } = f(), { driver: D, isLoading: A, error: j, refetch: B } = T(e), V = () => w?.(l(b, "fleet/drivers")), H = (e) => w?.(l(b, e));
224
+ return e ? s ? /* @__PURE__ */ P(z, { editId: e }) : A ? /* @__PURE__ */ P(d, { message: "Loading driver details..." }) : j || !D ? /* @__PURE__ */ P(u, {
225
+ title: "Driver not found",
226
+ onRetry: B
227
+ }) : /* @__PURE__ */ F(o, {
228
+ title: D.fullName,
229
+ subtitle: `Employee ID: ${D.employeeId}`,
230
+ icon: /* @__PURE__ */ P(C, { size: 24 }),
231
+ headerActions: /* @__PURE__ */ F("div", {
232
+ className: "flex gap-2",
233
+ children: [/* @__PURE__ */ F(p, {
234
+ variant: "outline",
235
+ onClick: V,
236
+ children: [/* @__PURE__ */ P(m, { size: 16 }), " Back"]
237
+ }), /* @__PURE__ */ F(p, {
238
+ onClick: () => w?.(l(b, "fleet/drivers/" + e + "/edit")),
239
+ children: [/* @__PURE__ */ P(x, { size: 16 }), " Edit"]
240
+ })]
241
+ }),
242
+ headerContent: /* @__PURE__ */ F("div", {
243
+ className: "flex items-center gap-4",
244
+ children: [/* @__PURE__ */ P(E, {
245
+ status: D.status,
246
+ type: "driver"
247
+ }), /* @__PURE__ */ F("div", {
248
+ className: "flex items-center gap-1",
249
+ children: [
250
+ /* @__PURE__ */ P(S, {
251
+ size: 16,
252
+ className: "text-status-warning-text fill-current"
253
+ }),
254
+ /* @__PURE__ */ P("span", {
255
+ className: "font-medium",
256
+ children: D.ratings.overall.toFixed(1)
257
+ }),
258
+ /* @__PURE__ */ F("span", {
259
+ className: "text-text-secondary",
260
+ children: [
261
+ "(",
262
+ D.ratings.totalRatings,
263
+ " ratings)"
264
+ ]
265
+ })
266
+ ]
267
+ })]
268
+ }),
269
+ children: [
270
+ /* @__PURE__ */ P(R, {
271
+ icon: /* @__PURE__ */ P(C, { size: 18 }),
272
+ children: "A driver's full profile — performance ratings, working hours, documents, earnings and live location. Use it to confirm someone is road-ready and compliant before assigning them an order or route."
273
+ }),
274
+ /* @__PURE__ */ P(L, {
275
+ storageKey: "movethewheels-driver-details",
276
+ steps: [
277
+ {
278
+ id: "assign",
279
+ label: "Assign to an order",
280
+ description: "Hand a pending delivery to this driver.",
281
+ icon: /* @__PURE__ */ P(y, { size: 16 }),
282
+ onClick: () => H("orders")
283
+ },
284
+ {
285
+ id: "routes",
286
+ label: "Plan their route",
287
+ description: "Batch nearby drop-offs into an optimized itinerary.",
288
+ icon: /* @__PURE__ */ P(h, { size: 16 }),
289
+ onClick: () => H("routes")
290
+ },
291
+ {
292
+ id: "edit",
293
+ label: "Update driver record",
294
+ description: "Refresh documents, shift or compliance details.",
295
+ icon: /* @__PURE__ */ P(x, { size: 16 }),
296
+ onClick: () => {}
297
+ }
298
+ ]
299
+ }),
300
+ /* @__PURE__ */ F("div", {
301
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
302
+ children: [/* @__PURE__ */ F("div", {
303
+ className: "lg:col-span-2 space-y-6",
304
+ children: [
305
+ /* @__PURE__ */ F(I, { children: [/* @__PURE__ */ F("h2", {
306
+ className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
307
+ children: [/* @__PURE__ */ P(S, { size: 18 }), " Ratings"]
308
+ }), /* @__PURE__ */ P("div", {
309
+ className: "grid grid-cols-2 md:grid-cols-3 gap-4",
310
+ children: [
311
+ {
312
+ label: "Punctuality",
313
+ value: D.ratings.punctuality
314
+ },
315
+ {
316
+ label: "Communication",
317
+ value: D.ratings.communication
318
+ },
319
+ {
320
+ label: "Handling",
321
+ value: D.ratings.carefulHandling
322
+ },
323
+ {
324
+ label: "Professionalism",
325
+ value: D.ratings.professionalism
326
+ },
327
+ {
328
+ label: "On-Time Delivery",
329
+ value: D.ratings.onTimeDelivery
330
+ }
331
+ ].map((e) => /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
332
+ className: "text-sm text-text-secondary",
333
+ children: e.label
334
+ }), /* @__PURE__ */ F("div", {
335
+ className: "flex items-center gap-2 mt-1",
336
+ children: [/* @__PURE__ */ P(t, {
337
+ value: e.value * 20,
338
+ className: "flex-1 h-2"
339
+ }), /* @__PURE__ */ P("span", {
340
+ className: "text-sm font-medium",
341
+ children: e.value.toFixed(1)
342
+ })]
343
+ })] }, e.label))
344
+ })] }),
345
+ /* @__PURE__ */ F(n, { children: [/* @__PURE__ */ P(a, { children: /* @__PURE__ */ F(i, {
346
+ className: "flex items-center gap-2",
347
+ children: [/* @__PURE__ */ P(h, { size: 18 }), " Working Hours"]
348
+ }) }), /* @__PURE__ */ P(r, { children: /* @__PURE__ */ F("div", {
349
+ className: "grid grid-cols-2 md:grid-cols-4 gap-4",
350
+ children: [
351
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
352
+ className: "text-sm text-text-secondary",
353
+ children: "Shift"
354
+ }), /* @__PURE__ */ F("p", {
355
+ className: "font-medium",
356
+ children: [
357
+ D.workingHours.startTime,
358
+ " - ",
359
+ D.workingHours.endTime
360
+ ]
361
+ })] }),
362
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
363
+ className: "text-sm text-text-secondary",
364
+ children: "Working Days"
365
+ }), /* @__PURE__ */ F("p", {
366
+ className: "font-medium",
367
+ children: [D.workingHours.workingDays.length, " days/week"]
368
+ })] }),
369
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
370
+ className: "text-sm text-text-secondary",
371
+ children: "Hours Today"
372
+ }), /* @__PURE__ */ F("p", {
373
+ className: "font-medium",
374
+ children: [
375
+ D.workingHours.currentHoursToday,
376
+ "h / ",
377
+ D.workingHours.maxHoursPerDay,
378
+ "h"
379
+ ]
380
+ })] }),
381
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
382
+ className: "text-sm text-text-secondary",
383
+ children: "Hours This Week"
384
+ }), /* @__PURE__ */ F("p", {
385
+ className: "font-medium",
386
+ children: [
387
+ D.workingHours.currentHoursThisWeek,
388
+ "h /",
389
+ " ",
390
+ D.workingHours.maxHoursPerWeek,
391
+ "h"
392
+ ]
393
+ })] })
394
+ ]
395
+ }) })] }),
396
+ /* @__PURE__ */ F(n, { children: [/* @__PURE__ */ P(a, { children: /* @__PURE__ */ F(i, {
397
+ className: "flex items-center gap-2",
398
+ children: [/* @__PURE__ */ P(v, { size: 18 }), " License"]
399
+ }) }), /* @__PURE__ */ P(r, { children: /* @__PURE__ */ P("div", {
400
+ className: "flex items-center justify-between p-3 border rounded-lg",
401
+ children: /* @__PURE__ */ F("div", { children: [
402
+ /* @__PURE__ */ P("p", {
403
+ className: "font-medium",
404
+ children: "Driver's License"
405
+ }),
406
+ /* @__PURE__ */ F("p", {
407
+ className: "text-sm text-text-secondary",
408
+ children: [D.licenseNumber || "—", D.licenseType ? ` - ${D.licenseType}` : ""]
409
+ }),
410
+ /* @__PURE__ */ F("p", {
411
+ className: "text-sm text-text-secondary",
412
+ children: ["Expires: ", k(D.licenseExpiry)]
413
+ })
414
+ ] })
415
+ }) })] }),
416
+ /* @__PURE__ */ P(_, {
417
+ entityType: "driver",
418
+ entityId: D.id
419
+ })
420
+ ]
421
+ }), /* @__PURE__ */ F("div", {
422
+ className: "space-y-6",
423
+ children: [
424
+ /* @__PURE__ */ F(n, { children: [/* @__PURE__ */ P(a, { children: /* @__PURE__ */ P(i, { children: "Statistics" }) }), /* @__PURE__ */ F(r, {
425
+ className: "space-y-4",
426
+ children: [
427
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
428
+ className: "text-sm text-text-secondary",
429
+ children: "Total Deliveries"
430
+ }), /* @__PURE__ */ P("p", {
431
+ className: "text-2xl font-bold",
432
+ children: D.completedOrders.toLocaleString()
433
+ })] }),
434
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
435
+ className: "text-sm text-text-secondary",
436
+ children: "Today's Deliveries"
437
+ }), /* @__PURE__ */ P("p", {
438
+ className: "text-2xl font-bold",
439
+ children: D.todayOrders
440
+ })] }),
441
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
442
+ className: "text-sm text-text-secondary",
443
+ children: "Join Date"
444
+ }), /* @__PURE__ */ P("p", {
445
+ className: "font-medium",
446
+ children: k(D.joinDate)
447
+ })] })
448
+ ]
449
+ })] }),
450
+ /* @__PURE__ */ F(n, { children: [/* @__PURE__ */ P(a, { children: /* @__PURE__ */ F(i, {
451
+ className: "flex items-center gap-2",
452
+ children: [/* @__PURE__ */ P(g, { size: 18 }), " Earnings"]
453
+ }) }), /* @__PURE__ */ F(r, {
454
+ className: "space-y-3",
455
+ children: [
456
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
457
+ className: "text-sm text-text-secondary",
458
+ children: "Total Earnings"
459
+ }), /* @__PURE__ */ P("p", {
460
+ className: "text-2xl font-bold",
461
+ children: O(D.earnings.totalEarnings)
462
+ })] }),
463
+ /* @__PURE__ */ F("div", {
464
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
465
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
466
+ className: "text-sm text-text-secondary",
467
+ children: "This Week"
468
+ }), /* @__PURE__ */ P("p", {
469
+ className: "font-medium",
470
+ children: O(D.earnings.weeklyEarnings)
471
+ })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
472
+ className: "text-sm text-text-secondary",
473
+ children: "This Month"
474
+ }), /* @__PURE__ */ P("p", {
475
+ className: "font-medium",
476
+ children: O(D.earnings.monthlyEarnings)
477
+ })] })]
478
+ }),
479
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
480
+ className: "text-sm text-text-secondary",
481
+ children: "Base Salary"
482
+ }), /* @__PURE__ */ F("p", {
483
+ className: "font-medium",
484
+ children: [O(D.baseSalary), "/year"]
485
+ })] })
486
+ ]
487
+ })] }),
488
+ D.currentLocation && /* @__PURE__ */ F(n, { children: [/* @__PURE__ */ P(a, { children: /* @__PURE__ */ F(i, {
489
+ className: "flex items-center gap-2",
490
+ children: [/* @__PURE__ */ P(y, { size: 18 }), " Current Location"]
491
+ }) }), /* @__PURE__ */ F(r, { children: [/* @__PURE__ */ P("p", {
492
+ className: "text-sm",
493
+ children: D.currentLocation.address || "Location updating..."
494
+ }), /* @__PURE__ */ F("p", {
495
+ className: "text-xs text-text-secondary mt-1",
496
+ children: ["Updated ", k(D.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
497
+ })] })] }),
498
+ /* @__PURE__ */ F(n, { children: [/* @__PURE__ */ P(a, { children: /* @__PURE__ */ P(i, { children: "Compliance Status" }) }), /* @__PURE__ */ P(r, {
499
+ className: "space-y-2",
500
+ children: Object.entries(D.compliance).filter(([e]) => e !== "lastUpdate").map(([e, t]) => /* @__PURE__ */ F("div", {
501
+ className: "flex items-center justify-between",
502
+ children: [/* @__PURE__ */ P("span", {
503
+ className: "text-sm capitalize",
504
+ children: e.replace(/([A-Z])/g, " $1")
505
+ }), /* @__PURE__ */ P(c, {
506
+ variant: t ? "default" : "destructive",
507
+ children: t ? "Compliant" : "Non-compliant"
508
+ })]
509
+ }, e))
510
+ })] })
511
+ ]
512
+ })]
513
+ })
514
+ ]
515
+ }) : /* @__PURE__ */ P(z, {});
516
+ }
517
+ //#endregion
518
+ export { B as default };
@@ -6,7 +6,7 @@ import { t as l } from "./refresh-cw-C4-jecjy.js";
6
6
  import { t as u } from "./star-1Ixfuzai.js";
7
7
  import { t as d } from "./user-check-Cx6fHHll.js";
8
8
  import { t as f } from "./users-BKmsb79k.js";
9
- import { i as p, n as m } from "./useFleet-BXSocBD_.js";
9
+ import { i as p, n as m } from "./useFleet-BfA_-VUW.js";
10
10
  import { r as h, t as g } from "./MetricCard-CqU5WsyW.js";
11
11
  import { r as _ } from "./StatusBadge-BfiF-nNI.js";
12
12
  import { r as v } from "./formatters-FWJDwTFv.js";
@@ -5,7 +5,7 @@ import { t as m } from "./star-1Ixfuzai.js";
5
5
  import { t as h } from "./truck-DxhtLfkG.js";
6
6
  import { t as g } from "./users-BKmsb79k.js";
7
7
  import { t as _ } from "./wrench-DTJGFs17.js";
8
- import { i as v, n as y, o as b } from "./useFleet-BXSocBD_.js";
8
+ import { i as v, n as y, o as b } from "./useFleet-BfA_-VUW.js";
9
9
  import { n as x, r as S, t as C } from "./MetricCard-CqU5WsyW.js";
10
10
  import { a as w, r as T } from "./StatusBadge-BfiF-nNI.js";
11
11
  import { jsx as E, jsxs as D } from "react/jsx-runtime";
@@ -6,7 +6,7 @@ import { t as f } from "./package-UyaWiALC.js";
6
6
  import { t as p } from "./plus-Bk_G-lFC.js";
7
7
  import { t as m } from "./triangle-alert-Dh56Yu3-.js";
8
8
  import { t as h } from "./warehouse-DE1irFyJ.js";
9
- import { n as g, t as _ } from "./useInventory-DmZficcp.js";
9
+ import { n as g, t as _ } from "./useInventory-BO7TSgq_.js";
10
10
  import { n as v, r as y, t as b } from "./MetricCard-CqU5WsyW.js";
11
11
  import { n as x } from "./formatters-FWJDwTFv.js";
12
12
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
@@ -4,7 +4,7 @@ import { t as g } from "./map-CO0aWUae.js";
4
4
  import { t as _ } from "./package-UyaWiALC.js";
5
5
  import { t as v } from "./refresh-cw-C4-jecjy.js";
6
6
  import { t as y } from "./truck-DxhtLfkG.js";
7
- import { o as b, r as x } from "./useTracking-B7ttexRe.js";
7
+ import { o as b, r as x } from "./useTracking-7nd_XOSL.js";
8
8
  import { r as S, t as C } from "./MetricCard-CqU5WsyW.js";
9
9
  import { r as w } from "./maps-CtfuCAmh.js";
10
10
  import { r as T } from "./StatusBadge-BfiF-nNI.js";
@@ -15,7 +15,7 @@ import { t as ge } from "./truck-DxhtLfkG.js";
15
15
  import { t as _e } from "./user-check-Cx6fHHll.js";
16
16
  import { t as ve } from "./user-B1IjWJtn.js";
17
17
  import { r as ye, t as be } from "./useOrders-B5FV0kcz.js";
18
- import { r as xe } from "./useFleet-BXSocBD_.js";
18
+ import { r as xe } from "./useFleet-BfA_-VUW.js";
19
19
  import { i as Se, n as Ce, r as C, t as we } from "./StatusBadge-BfiF-nNI.js";
20
20
  import { t as Te } from "./FormError-D4T5FWZA.js";
21
21
  import { n as w, r as T, t as E } from "./formatters-FWJDwTFv.js";