@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,490 +0,0 @@
|
|
|
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-BXSocBD_.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 { useState as A } from "react";
|
|
17
|
-
import { useParams as j } from "react-router-dom";
|
|
18
|
-
import { jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
19
|
-
import { EmphasisPanel as P, NextSteps as F, PagePurpose as I } from "@burdenoff/fe-libs/ui";
|
|
20
|
-
//#region src/movethewheels/pages/DriverDetailsPage.tsx
|
|
21
|
-
function L() {
|
|
22
|
-
let { basePath: t, navigate: n } = f(), { createDriver: r } = w(), [i, a] = A({
|
|
23
|
-
employeeId: "",
|
|
24
|
-
firstName: "",
|
|
25
|
-
lastName: "",
|
|
26
|
-
email: "",
|
|
27
|
-
phone: "",
|
|
28
|
-
licenseNumber: ""
|
|
29
|
-
}), [c, u] = A(!1), [d, h] = A(null), g = () => n?.(l(t, "fleet/drivers")), _ = async (e) => {
|
|
30
|
-
if (e.preventDefault(), !i.employeeId.trim() || !i.firstName.trim() || !i.lastName.trim()) {
|
|
31
|
-
h("Employee ID, first name and last name are required.");
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
u(!0), h(null);
|
|
35
|
-
try {
|
|
36
|
-
let e = await r({
|
|
37
|
-
employeeId: i.employeeId.trim(),
|
|
38
|
-
firstName: i.firstName.trim(),
|
|
39
|
-
lastName: i.lastName.trim(),
|
|
40
|
-
email: i.email.trim() || void 0,
|
|
41
|
-
phone: i.phone.trim() || void 0,
|
|
42
|
-
licenseNumber: i.licenseNumber.trim() || void 0
|
|
43
|
-
});
|
|
44
|
-
n?.(l(t, `fleet/drivers/${e.id}`));
|
|
45
|
-
} catch (e) {
|
|
46
|
-
console.error("Failed to create driver:", e), h(e instanceof Error ? e.message : "Failed to create driver. Please try again."), u(!1);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
return /* @__PURE__ */ N(o, {
|
|
50
|
-
title: "Add Driver",
|
|
51
|
-
subtitle: "Add a driver to your workforce",
|
|
52
|
-
icon: /* @__PURE__ */ M(C, { size: 24 }),
|
|
53
|
-
headerActions: /* @__PURE__ */ N("div", {
|
|
54
|
-
className: "flex gap-2",
|
|
55
|
-
children: [/* @__PURE__ */ N(p, {
|
|
56
|
-
variant: "outline",
|
|
57
|
-
onClick: g,
|
|
58
|
-
disabled: c,
|
|
59
|
-
children: [/* @__PURE__ */ M(m, { size: 16 }), " Cancel"]
|
|
60
|
-
}), /* @__PURE__ */ N(p, {
|
|
61
|
-
onClick: _,
|
|
62
|
-
disabled: c,
|
|
63
|
-
children: [
|
|
64
|
-
/* @__PURE__ */ M(b, { size: 16 }),
|
|
65
|
-
" ",
|
|
66
|
-
c ? "Saving..." : "Add Driver"
|
|
67
|
-
]
|
|
68
|
-
})]
|
|
69
|
-
}),
|
|
70
|
-
children: [/* @__PURE__ */ M(I, {
|
|
71
|
-
icon: /* @__PURE__ */ M(C, { size: 18 }),
|
|
72
|
-
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."
|
|
73
|
-
}), /* @__PURE__ */ N("form", {
|
|
74
|
-
onSubmit: _,
|
|
75
|
-
className: "max-w-2xl space-y-6",
|
|
76
|
-
children: [/* @__PURE__ */ M(D, { message: d }), /* @__PURE__ */ N(P, { children: [/* @__PURE__ */ M("h2", {
|
|
77
|
-
className: "text-base font-semibold text-text-primary mb-4",
|
|
78
|
-
children: "Driver Details"
|
|
79
|
-
}), /* @__PURE__ */ N("div", {
|
|
80
|
-
className: "space-y-4",
|
|
81
|
-
children: [/* @__PURE__ */ N("div", {
|
|
82
|
-
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ N("div", {
|
|
85
|
-
className: "space-y-2",
|
|
86
|
-
children: [/* @__PURE__ */ N(s, {
|
|
87
|
-
htmlFor: "employeeId",
|
|
88
|
-
children: ["Employee ID ", /* @__PURE__ */ M("span", {
|
|
89
|
-
className: "text-status-error-text",
|
|
90
|
-
children: "*"
|
|
91
|
-
})]
|
|
92
|
-
}), /* @__PURE__ */ M(e, {
|
|
93
|
-
id: "employeeId",
|
|
94
|
-
value: i.employeeId,
|
|
95
|
-
onChange: (e) => a((t) => ({
|
|
96
|
-
...t,
|
|
97
|
-
employeeId: e.target.value
|
|
98
|
-
})),
|
|
99
|
-
placeholder: "EMP-001",
|
|
100
|
-
required: !0
|
|
101
|
-
})]
|
|
102
|
-
}),
|
|
103
|
-
/* @__PURE__ */ N("div", {
|
|
104
|
-
className: "space-y-2",
|
|
105
|
-
children: [/* @__PURE__ */ N(s, {
|
|
106
|
-
htmlFor: "firstName",
|
|
107
|
-
children: ["First Name ", /* @__PURE__ */ M("span", {
|
|
108
|
-
className: "text-status-error-text",
|
|
109
|
-
children: "*"
|
|
110
|
-
})]
|
|
111
|
-
}), /* @__PURE__ */ M(e, {
|
|
112
|
-
id: "firstName",
|
|
113
|
-
value: i.firstName,
|
|
114
|
-
onChange: (e) => a((t) => ({
|
|
115
|
-
...t,
|
|
116
|
-
firstName: e.target.value
|
|
117
|
-
})),
|
|
118
|
-
placeholder: "Jane",
|
|
119
|
-
required: !0
|
|
120
|
-
})]
|
|
121
|
-
}),
|
|
122
|
-
/* @__PURE__ */ N("div", {
|
|
123
|
-
className: "space-y-2",
|
|
124
|
-
children: [/* @__PURE__ */ N(s, {
|
|
125
|
-
htmlFor: "lastName",
|
|
126
|
-
children: ["Last Name ", /* @__PURE__ */ M("span", {
|
|
127
|
-
className: "text-status-error-text",
|
|
128
|
-
children: "*"
|
|
129
|
-
})]
|
|
130
|
-
}), /* @__PURE__ */ M(e, {
|
|
131
|
-
id: "lastName",
|
|
132
|
-
value: i.lastName,
|
|
133
|
-
onChange: (e) => a((t) => ({
|
|
134
|
-
...t,
|
|
135
|
-
lastName: e.target.value
|
|
136
|
-
})),
|
|
137
|
-
placeholder: "Doe",
|
|
138
|
-
required: !0
|
|
139
|
-
})]
|
|
140
|
-
})
|
|
141
|
-
]
|
|
142
|
-
}), /* @__PURE__ */ N("div", {
|
|
143
|
-
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
144
|
-
children: [
|
|
145
|
-
/* @__PURE__ */ N("div", {
|
|
146
|
-
className: "space-y-2",
|
|
147
|
-
children: [/* @__PURE__ */ M(s, {
|
|
148
|
-
htmlFor: "email",
|
|
149
|
-
children: "Email"
|
|
150
|
-
}), /* @__PURE__ */ M(e, {
|
|
151
|
-
id: "email",
|
|
152
|
-
type: "email",
|
|
153
|
-
value: i.email,
|
|
154
|
-
onChange: (e) => a((t) => ({
|
|
155
|
-
...t,
|
|
156
|
-
email: e.target.value
|
|
157
|
-
})),
|
|
158
|
-
placeholder: "jane.doe@example.com"
|
|
159
|
-
})]
|
|
160
|
-
}),
|
|
161
|
-
/* @__PURE__ */ N("div", {
|
|
162
|
-
className: "space-y-2",
|
|
163
|
-
children: [/* @__PURE__ */ M(s, {
|
|
164
|
-
htmlFor: "phone",
|
|
165
|
-
children: "Phone"
|
|
166
|
-
}), /* @__PURE__ */ M(e, {
|
|
167
|
-
id: "phone",
|
|
168
|
-
value: i.phone,
|
|
169
|
-
onChange: (e) => a((t) => ({
|
|
170
|
-
...t,
|
|
171
|
-
phone: e.target.value
|
|
172
|
-
})),
|
|
173
|
-
placeholder: "+1-555-0100"
|
|
174
|
-
})]
|
|
175
|
-
}),
|
|
176
|
-
/* @__PURE__ */ N("div", {
|
|
177
|
-
className: "space-y-2",
|
|
178
|
-
children: [/* @__PURE__ */ M(s, {
|
|
179
|
-
htmlFor: "licenseNumber",
|
|
180
|
-
children: "License Number"
|
|
181
|
-
}), /* @__PURE__ */ M(e, {
|
|
182
|
-
id: "licenseNumber",
|
|
183
|
-
value: i.licenseNumber,
|
|
184
|
-
onChange: (e) => a((t) => ({
|
|
185
|
-
...t,
|
|
186
|
-
licenseNumber: e.target.value
|
|
187
|
-
})),
|
|
188
|
-
placeholder: "D1234567"
|
|
189
|
-
})]
|
|
190
|
-
})
|
|
191
|
-
]
|
|
192
|
-
})]
|
|
193
|
-
})] })]
|
|
194
|
-
})]
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
function R() {
|
|
198
|
-
let { driverId: e } = j(), { basePath: s, navigate: b } = f(), { driver: w, isLoading: D, error: A, refetch: R } = T(e), z = () => b?.(l(s, "fleet/drivers")), B = (e) => b?.(l(s, e));
|
|
199
|
-
return e ? D ? /* @__PURE__ */ M(d, { message: "Loading driver details..." }) : A || !w ? /* @__PURE__ */ M(u, {
|
|
200
|
-
title: "Driver not found",
|
|
201
|
-
onRetry: R
|
|
202
|
-
}) : /* @__PURE__ */ N(o, {
|
|
203
|
-
title: w.fullName,
|
|
204
|
-
subtitle: `Employee ID: ${w.employeeId}`,
|
|
205
|
-
icon: /* @__PURE__ */ M(C, { size: 24 }),
|
|
206
|
-
headerActions: /* @__PURE__ */ N("div", {
|
|
207
|
-
className: "flex gap-2",
|
|
208
|
-
children: [/* @__PURE__ */ N(p, {
|
|
209
|
-
variant: "outline",
|
|
210
|
-
onClick: z,
|
|
211
|
-
children: [/* @__PURE__ */ M(m, { size: 16 }), " Back"]
|
|
212
|
-
}), /* @__PURE__ */ N(p, { children: [/* @__PURE__ */ M(x, { size: 16 }), " Edit"] })]
|
|
213
|
-
}),
|
|
214
|
-
headerContent: /* @__PURE__ */ N("div", {
|
|
215
|
-
className: "flex items-center gap-4",
|
|
216
|
-
children: [/* @__PURE__ */ M(E, {
|
|
217
|
-
status: w.status,
|
|
218
|
-
type: "driver"
|
|
219
|
-
}), /* @__PURE__ */ N("div", {
|
|
220
|
-
className: "flex items-center gap-1",
|
|
221
|
-
children: [
|
|
222
|
-
/* @__PURE__ */ M(S, {
|
|
223
|
-
size: 16,
|
|
224
|
-
className: "text-status-warning-text fill-current"
|
|
225
|
-
}),
|
|
226
|
-
/* @__PURE__ */ M("span", {
|
|
227
|
-
className: "font-medium",
|
|
228
|
-
children: w.ratings.overall.toFixed(1)
|
|
229
|
-
}),
|
|
230
|
-
/* @__PURE__ */ N("span", {
|
|
231
|
-
className: "text-text-secondary",
|
|
232
|
-
children: [
|
|
233
|
-
"(",
|
|
234
|
-
w.ratings.totalRatings,
|
|
235
|
-
" ratings)"
|
|
236
|
-
]
|
|
237
|
-
})
|
|
238
|
-
]
|
|
239
|
-
})]
|
|
240
|
-
}),
|
|
241
|
-
children: [
|
|
242
|
-
/* @__PURE__ */ M(I, {
|
|
243
|
-
icon: /* @__PURE__ */ M(C, { size: 18 }),
|
|
244
|
-
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."
|
|
245
|
-
}),
|
|
246
|
-
/* @__PURE__ */ M(F, {
|
|
247
|
-
storageKey: "movethewheels-driver-details",
|
|
248
|
-
steps: [
|
|
249
|
-
{
|
|
250
|
-
id: "assign",
|
|
251
|
-
label: "Assign to an order",
|
|
252
|
-
description: "Hand a pending delivery to this driver.",
|
|
253
|
-
icon: /* @__PURE__ */ M(y, { size: 16 }),
|
|
254
|
-
onClick: () => B("orders")
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
id: "routes",
|
|
258
|
-
label: "Plan their route",
|
|
259
|
-
description: "Batch nearby drop-offs into an optimized itinerary.",
|
|
260
|
-
icon: /* @__PURE__ */ M(h, { size: 16 }),
|
|
261
|
-
onClick: () => B("routes")
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
id: "edit",
|
|
265
|
-
label: "Update driver record",
|
|
266
|
-
description: "Refresh documents, shift or compliance details.",
|
|
267
|
-
icon: /* @__PURE__ */ M(x, { size: 16 }),
|
|
268
|
-
onClick: () => {}
|
|
269
|
-
}
|
|
270
|
-
]
|
|
271
|
-
}),
|
|
272
|
-
/* @__PURE__ */ N("div", {
|
|
273
|
-
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
274
|
-
children: [/* @__PURE__ */ N("div", {
|
|
275
|
-
className: "lg:col-span-2 space-y-6",
|
|
276
|
-
children: [
|
|
277
|
-
/* @__PURE__ */ N(P, { children: [/* @__PURE__ */ N("h2", {
|
|
278
|
-
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
|
|
279
|
-
children: [/* @__PURE__ */ M(S, { size: 18 }), " Ratings"]
|
|
280
|
-
}), /* @__PURE__ */ M("div", {
|
|
281
|
-
className: "grid grid-cols-2 md:grid-cols-3 gap-4",
|
|
282
|
-
children: [
|
|
283
|
-
{
|
|
284
|
-
label: "Punctuality",
|
|
285
|
-
value: w.ratings.punctuality
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
label: "Communication",
|
|
289
|
-
value: w.ratings.communication
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
label: "Handling",
|
|
293
|
-
value: w.ratings.carefulHandling
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
label: "Professionalism",
|
|
297
|
-
value: w.ratings.professionalism
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
label: "On-Time Delivery",
|
|
301
|
-
value: w.ratings.onTimeDelivery
|
|
302
|
-
}
|
|
303
|
-
].map((e) => /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
304
|
-
className: "text-sm text-text-secondary",
|
|
305
|
-
children: e.label
|
|
306
|
-
}), /* @__PURE__ */ N("div", {
|
|
307
|
-
className: "flex items-center gap-2 mt-1",
|
|
308
|
-
children: [/* @__PURE__ */ M(t, {
|
|
309
|
-
value: e.value * 20,
|
|
310
|
-
className: "flex-1 h-2"
|
|
311
|
-
}), /* @__PURE__ */ M("span", {
|
|
312
|
-
className: "text-sm font-medium",
|
|
313
|
-
children: e.value.toFixed(1)
|
|
314
|
-
})]
|
|
315
|
-
})] }, e.label))
|
|
316
|
-
})] }),
|
|
317
|
-
/* @__PURE__ */ N(n, { children: [/* @__PURE__ */ M(a, { children: /* @__PURE__ */ N(i, {
|
|
318
|
-
className: "flex items-center gap-2",
|
|
319
|
-
children: [/* @__PURE__ */ M(h, { size: 18 }), " Working Hours"]
|
|
320
|
-
}) }), /* @__PURE__ */ M(r, { children: /* @__PURE__ */ N("div", {
|
|
321
|
-
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
322
|
-
children: [
|
|
323
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
324
|
-
className: "text-sm text-text-secondary",
|
|
325
|
-
children: "Shift"
|
|
326
|
-
}), /* @__PURE__ */ N("p", {
|
|
327
|
-
className: "font-medium",
|
|
328
|
-
children: [
|
|
329
|
-
w.workingHours.startTime,
|
|
330
|
-
" - ",
|
|
331
|
-
w.workingHours.endTime
|
|
332
|
-
]
|
|
333
|
-
})] }),
|
|
334
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
335
|
-
className: "text-sm text-text-secondary",
|
|
336
|
-
children: "Working Days"
|
|
337
|
-
}), /* @__PURE__ */ N("p", {
|
|
338
|
-
className: "font-medium",
|
|
339
|
-
children: [w.workingHours.workingDays.length, " days/week"]
|
|
340
|
-
})] }),
|
|
341
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
342
|
-
className: "text-sm text-text-secondary",
|
|
343
|
-
children: "Hours Today"
|
|
344
|
-
}), /* @__PURE__ */ N("p", {
|
|
345
|
-
className: "font-medium",
|
|
346
|
-
children: [
|
|
347
|
-
w.workingHours.currentHoursToday,
|
|
348
|
-
"h / ",
|
|
349
|
-
w.workingHours.maxHoursPerDay,
|
|
350
|
-
"h"
|
|
351
|
-
]
|
|
352
|
-
})] }),
|
|
353
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
354
|
-
className: "text-sm text-text-secondary",
|
|
355
|
-
children: "Hours This Week"
|
|
356
|
-
}), /* @__PURE__ */ N("p", {
|
|
357
|
-
className: "font-medium",
|
|
358
|
-
children: [
|
|
359
|
-
w.workingHours.currentHoursThisWeek,
|
|
360
|
-
"h /",
|
|
361
|
-
" ",
|
|
362
|
-
w.workingHours.maxHoursPerWeek,
|
|
363
|
-
"h"
|
|
364
|
-
]
|
|
365
|
-
})] })
|
|
366
|
-
]
|
|
367
|
-
}) })] }),
|
|
368
|
-
/* @__PURE__ */ N(n, { children: [/* @__PURE__ */ M(a, { children: /* @__PURE__ */ N(i, {
|
|
369
|
-
className: "flex items-center gap-2",
|
|
370
|
-
children: [/* @__PURE__ */ M(v, { size: 18 }), " License"]
|
|
371
|
-
}) }), /* @__PURE__ */ M(r, { children: /* @__PURE__ */ M("div", {
|
|
372
|
-
className: "flex items-center justify-between p-3 border rounded-lg",
|
|
373
|
-
children: /* @__PURE__ */ N("div", { children: [
|
|
374
|
-
/* @__PURE__ */ M("p", {
|
|
375
|
-
className: "font-medium",
|
|
376
|
-
children: "Driver's License"
|
|
377
|
-
}),
|
|
378
|
-
/* @__PURE__ */ N("p", {
|
|
379
|
-
className: "text-sm text-text-secondary",
|
|
380
|
-
children: [w.licenseNumber || "—", w.licenseType ? ` - ${w.licenseType}` : ""]
|
|
381
|
-
}),
|
|
382
|
-
/* @__PURE__ */ N("p", {
|
|
383
|
-
className: "text-sm text-text-secondary",
|
|
384
|
-
children: ["Expires: ", k(w.licenseExpiry)]
|
|
385
|
-
})
|
|
386
|
-
] })
|
|
387
|
-
}) })] }),
|
|
388
|
-
/* @__PURE__ */ M(_, {
|
|
389
|
-
entityType: "driver",
|
|
390
|
-
entityId: w.id
|
|
391
|
-
})
|
|
392
|
-
]
|
|
393
|
-
}), /* @__PURE__ */ N("div", {
|
|
394
|
-
className: "space-y-6",
|
|
395
|
-
children: [
|
|
396
|
-
/* @__PURE__ */ N(n, { children: [/* @__PURE__ */ M(a, { children: /* @__PURE__ */ M(i, { children: "Statistics" }) }), /* @__PURE__ */ N(r, {
|
|
397
|
-
className: "space-y-4",
|
|
398
|
-
children: [
|
|
399
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
400
|
-
className: "text-sm text-text-secondary",
|
|
401
|
-
children: "Total Deliveries"
|
|
402
|
-
}), /* @__PURE__ */ M("p", {
|
|
403
|
-
className: "text-2xl font-bold",
|
|
404
|
-
children: w.completedOrders.toLocaleString()
|
|
405
|
-
})] }),
|
|
406
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
407
|
-
className: "text-sm text-text-secondary",
|
|
408
|
-
children: "Today's Deliveries"
|
|
409
|
-
}), /* @__PURE__ */ M("p", {
|
|
410
|
-
className: "text-2xl font-bold",
|
|
411
|
-
children: w.todayOrders
|
|
412
|
-
})] }),
|
|
413
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
414
|
-
className: "text-sm text-text-secondary",
|
|
415
|
-
children: "Join Date"
|
|
416
|
-
}), /* @__PURE__ */ M("p", {
|
|
417
|
-
className: "font-medium",
|
|
418
|
-
children: k(w.joinDate)
|
|
419
|
-
})] })
|
|
420
|
-
]
|
|
421
|
-
})] }),
|
|
422
|
-
/* @__PURE__ */ N(n, { children: [/* @__PURE__ */ M(a, { children: /* @__PURE__ */ N(i, {
|
|
423
|
-
className: "flex items-center gap-2",
|
|
424
|
-
children: [/* @__PURE__ */ M(g, { size: 18 }), " Earnings"]
|
|
425
|
-
}) }), /* @__PURE__ */ N(r, {
|
|
426
|
-
className: "space-y-3",
|
|
427
|
-
children: [
|
|
428
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
429
|
-
className: "text-sm text-text-secondary",
|
|
430
|
-
children: "Total Earnings"
|
|
431
|
-
}), /* @__PURE__ */ M("p", {
|
|
432
|
-
className: "text-2xl font-bold",
|
|
433
|
-
children: O(w.earnings.totalEarnings)
|
|
434
|
-
})] }),
|
|
435
|
-
/* @__PURE__ */ N("div", {
|
|
436
|
-
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
437
|
-
children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
438
|
-
className: "text-sm text-text-secondary",
|
|
439
|
-
children: "This Week"
|
|
440
|
-
}), /* @__PURE__ */ M("p", {
|
|
441
|
-
className: "font-medium",
|
|
442
|
-
children: O(w.earnings.weeklyEarnings)
|
|
443
|
-
})] }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
444
|
-
className: "text-sm text-text-secondary",
|
|
445
|
-
children: "This Month"
|
|
446
|
-
}), /* @__PURE__ */ M("p", {
|
|
447
|
-
className: "font-medium",
|
|
448
|
-
children: O(w.earnings.monthlyEarnings)
|
|
449
|
-
})] })]
|
|
450
|
-
}),
|
|
451
|
-
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
|
|
452
|
-
className: "text-sm text-text-secondary",
|
|
453
|
-
children: "Base Salary"
|
|
454
|
-
}), /* @__PURE__ */ N("p", {
|
|
455
|
-
className: "font-medium",
|
|
456
|
-
children: [O(w.baseSalary), "/year"]
|
|
457
|
-
})] })
|
|
458
|
-
]
|
|
459
|
-
})] }),
|
|
460
|
-
w.currentLocation && /* @__PURE__ */ N(n, { children: [/* @__PURE__ */ M(a, { children: /* @__PURE__ */ N(i, {
|
|
461
|
-
className: "flex items-center gap-2",
|
|
462
|
-
children: [/* @__PURE__ */ M(y, { size: 18 }), " Current Location"]
|
|
463
|
-
}) }), /* @__PURE__ */ N(r, { children: [/* @__PURE__ */ M("p", {
|
|
464
|
-
className: "text-sm",
|
|
465
|
-
children: w.currentLocation.address || "Location updating..."
|
|
466
|
-
}), /* @__PURE__ */ N("p", {
|
|
467
|
-
className: "text-xs text-text-secondary mt-1",
|
|
468
|
-
children: ["Updated ", k(w.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
|
|
469
|
-
})] })] }),
|
|
470
|
-
/* @__PURE__ */ N(n, { children: [/* @__PURE__ */ M(a, { children: /* @__PURE__ */ M(i, { children: "Compliance Status" }) }), /* @__PURE__ */ M(r, {
|
|
471
|
-
className: "space-y-2",
|
|
472
|
-
children: Object.entries(w.compliance).filter(([e]) => e !== "lastUpdate").map(([e, t]) => /* @__PURE__ */ N("div", {
|
|
473
|
-
className: "flex items-center justify-between",
|
|
474
|
-
children: [/* @__PURE__ */ M("span", {
|
|
475
|
-
className: "text-sm capitalize",
|
|
476
|
-
children: e.replace(/([A-Z])/g, " $1")
|
|
477
|
-
}), /* @__PURE__ */ M(c, {
|
|
478
|
-
variant: t ? "default" : "destructive",
|
|
479
|
-
children: t ? "Compliant" : "Non-compliant"
|
|
480
|
-
})]
|
|
481
|
-
}, e))
|
|
482
|
-
})] })
|
|
483
|
-
]
|
|
484
|
-
})]
|
|
485
|
-
})
|
|
486
|
-
]
|
|
487
|
-
}) : /* @__PURE__ */ M(L, {});
|
|
488
|
-
}
|
|
489
|
-
//#endregion
|
|
490
|
-
export { R as default };
|