@burdenoff/microfe-movethewheels 2026.703.8 → 2026.704.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.
Files changed (40) 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-sRRVY5UM.js} +243 -211
  12. package/dist/{RoutesPage-Dqd5Don6.js → RoutesPage-hec06HnD.js} +1 -1
  13. package/dist/{SettingsPage-2a05Sq2k.js → SettingsPage-_6SIlcBX.js} +1 -1
  14. package/dist/{TrackingPage-SnjW6qeD.js → TrackingPage-Cg0tYGJe.js} +1 -1
  15. package/dist/{VehicleDetailsPage-CvRMJ2zC.js → VehicleDetailsPage-BbZlCFPo.js} +159 -135
  16. package/dist/{VehiclesPage-qxf-1C1B.js → VehiclesPage-BfBEyXGs.js} +1 -1
  17. package/dist/WarehouseDetailsPage-DxNhiaoI.js +515 -0
  18. package/dist/{WarehousesPage-44Wj7AGT.js → WarehousesPage-M3NaBT0z.js} +1 -1
  19. package/dist/index.js +26 -6
  20. package/dist/{useFleet-BXSocBD_.js → useFleet-BfA_-VUW.js} +100 -71
  21. package/dist/{useInventory-DmZficcp.js → useInventory-BO7TSgq_.js} +98 -72
  22. package/dist/{useRoutes-C_ZCYJ_h.js → useRoutes-DAdy2BGv.js} +8 -8
  23. package/dist/{useSettings-CteNasBE.js → useSettings-BNNzQs_B.js} +1 -1
  24. package/dist/{useTracking-B7ttexRe.js → useTracking-7nd_XOSL.js} +1 -1
  25. package/package.json +1 -1
  26. package/src/movethewheels/MoveTheWheelsRoutes.tsx +5 -0
  27. package/src/movethewheels/hooks/useFleet.ts +113 -0
  28. package/src/movethewheels/hooks/useInventory.ts +86 -0
  29. package/src/movethewheels/hooks/useRoutes.ts +17 -7
  30. package/src/movethewheels/hooks/useSettings.ts +8 -1
  31. package/src/movethewheels/pages/CreateOrderPage.tsx +48 -6
  32. package/src/movethewheels/pages/DriverDetailsPage.tsx +56 -18
  33. package/src/movethewheels/pages/ProductDetailsPage.tsx +51 -15
  34. package/src/movethewheels/pages/RouteDetailsPage.tsx +51 -7
  35. package/src/movethewheels/pages/VehicleDetailsPage.tsx +51 -15
  36. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +46 -10
  37. package/src/movethewheels/types/index.ts +3 -0
  38. package/dist/DriverDetailsPage-DjaXaATQ.js +0 -490
  39. package/dist/ProductDetailsPage-BSjWLrty.js +0 -350
  40. package/dist/WarehouseDetailsPage-D0Wyyj1Y.js +0 -493
@@ -1,350 +0,0 @@
1
- import { A as e, d as t, f as n, g as r, h as i, i as a, j as o, l as s, lt as c, n as l, r as u, st as d, u as f, ut as p } from "./PageLayout-j9Zw3wBN.js";
2
- import { t as m } from "./arrow-left-1dVWv2dg.js";
3
- import { t as h } from "./box-DW1KNP8j.js";
4
- import { t as g } from "./dollar-sign-CYGHy2oS.js";
5
- import { t as _ } from "./package-UyaWiALC.js";
6
- import { t as v } from "./save-CcfoIn2J.js";
7
- import { t as y } from "./square-pen-Dr1X-P2s.js";
8
- import { r as b, t as x } from "./useInventory-DmZficcp.js";
9
- import { t as S } from "./FormError-D4T5FWZA.js";
10
- import { n as C } from "./formatters-FWJDwTFv.js";
11
- import { useState as w } from "react";
12
- import { useParams as T } from "react-router-dom";
13
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
14
- import { EmphasisPanel as O, NextSteps as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
15
- //#region node_modules/lucide-react/dist/esm/icons/tag.js
16
- var j = p("Tag", [["path", {
17
- d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
18
- key: "vktsd0"
19
- }], ["circle", {
20
- cx: "7.5",
21
- cy: "7.5",
22
- r: ".5",
23
- fill: "currentColor",
24
- key: "kqv944"
25
- }]]);
26
- //#endregion
27
- //#region src/movethewheels/pages/ProductDetailsPage.tsx
28
- function M() {
29
- let { basePath: t, navigate: n } = d(), { createProduct: r } = x(), [i, s] = w({
30
- name: "",
31
- sku: "",
32
- category: "",
33
- brand: "",
34
- weight: ""
35
- }), [l, u] = w(!1), [p, h] = w(null), g = () => n?.(c(t, "inventory/products")), y = async (e) => {
36
- if (e.preventDefault(), !i.name.trim() || !i.sku.trim()) {
37
- h("Product name and SKU are required.");
38
- return;
39
- }
40
- u(!0), h(null);
41
- try {
42
- let e = i.weight.trim() ? Number(i.weight) : void 0, a = await r({
43
- name: i.name.trim(),
44
- sku: i.sku.trim(),
45
- category: i.category.trim() || void 0,
46
- brand: i.brand.trim() || void 0,
47
- weight: e !== void 0 && !Number.isNaN(e) ? e : void 0
48
- });
49
- n?.(c(t, `inventory/products/${a.id}`));
50
- } catch (e) {
51
- console.error("Failed to create product:", e), h(e instanceof Error ? e.message : "Failed to create product. Please try again."), u(!1);
52
- }
53
- };
54
- return /* @__PURE__ */ D(a, {
55
- title: "Add Product",
56
- subtitle: "Add an item to your catalog",
57
- icon: /* @__PURE__ */ E(_, { size: 24 }),
58
- headerActions: /* @__PURE__ */ D("div", {
59
- className: "flex gap-2",
60
- children: [/* @__PURE__ */ D(f, {
61
- variant: "outline",
62
- onClick: g,
63
- disabled: l,
64
- children: [/* @__PURE__ */ E(m, { size: 16 }), " Cancel"]
65
- }), /* @__PURE__ */ D(f, {
66
- onClick: y,
67
- disabled: l,
68
- children: [
69
- /* @__PURE__ */ E(v, { size: 16 }),
70
- " ",
71
- l ? "Saving..." : "Add Product"
72
- ]
73
- })]
74
- }),
75
- children: [/* @__PURE__ */ E(A, {
76
- icon: /* @__PURE__ */ E(_, { size: 18 }),
77
- children: "Add a product so it can be added to orders and stocked in warehouses. A name and SKU are all it takes to start — category, brand and weight help with picking, pricing and routing."
78
- }), /* @__PURE__ */ D("form", {
79
- onSubmit: y,
80
- className: "max-w-2xl space-y-6",
81
- children: [/* @__PURE__ */ E(S, { message: p }), /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("h2", {
82
- className: "text-base font-semibold text-text-primary mb-4",
83
- children: "Product Details"
84
- }), /* @__PURE__ */ D("div", {
85
- className: "space-y-4",
86
- children: [/* @__PURE__ */ D("div", {
87
- className: "grid grid-cols-1 md:grid-cols-2 gap-4",
88
- children: [/* @__PURE__ */ D("div", {
89
- className: "space-y-2",
90
- children: [/* @__PURE__ */ D(o, {
91
- htmlFor: "name",
92
- children: ["Name ", /* @__PURE__ */ E("span", {
93
- className: "text-status-error-text",
94
- children: "*"
95
- })]
96
- }), /* @__PURE__ */ E(e, {
97
- id: "name",
98
- value: i.name,
99
- onChange: (e) => s((t) => ({
100
- ...t,
101
- name: e.target.value
102
- })),
103
- placeholder: "Wireless Headphones",
104
- required: !0
105
- })]
106
- }), /* @__PURE__ */ D("div", {
107
- className: "space-y-2",
108
- children: [/* @__PURE__ */ D(o, {
109
- htmlFor: "sku",
110
- children: ["SKU ", /* @__PURE__ */ E("span", {
111
- className: "text-status-error-text",
112
- children: "*"
113
- })]
114
- }), /* @__PURE__ */ E(e, {
115
- id: "sku",
116
- value: i.sku,
117
- onChange: (e) => s((t) => ({
118
- ...t,
119
- sku: e.target.value
120
- })),
121
- placeholder: "SKU-001",
122
- required: !0
123
- })]
124
- })]
125
- }), /* @__PURE__ */ D("div", {
126
- className: "grid grid-cols-1 md:grid-cols-3 gap-4",
127
- children: [
128
- /* @__PURE__ */ D("div", {
129
- className: "space-y-2",
130
- children: [/* @__PURE__ */ E(o, {
131
- htmlFor: "category",
132
- children: "Category"
133
- }), /* @__PURE__ */ E(e, {
134
- id: "category",
135
- value: i.category,
136
- onChange: (e) => s((t) => ({
137
- ...t,
138
- category: e.target.value
139
- })),
140
- placeholder: "Electronics"
141
- })]
142
- }),
143
- /* @__PURE__ */ D("div", {
144
- className: "space-y-2",
145
- children: [/* @__PURE__ */ E(o, {
146
- htmlFor: "brand",
147
- children: "Brand"
148
- }), /* @__PURE__ */ E(e, {
149
- id: "brand",
150
- value: i.brand,
151
- onChange: (e) => s((t) => ({
152
- ...t,
153
- brand: e.target.value
154
- })),
155
- placeholder: "Acme"
156
- })]
157
- }),
158
- /* @__PURE__ */ D("div", {
159
- className: "space-y-2",
160
- children: [/* @__PURE__ */ E(o, {
161
- htmlFor: "weight",
162
- children: "Weight (kg)"
163
- }), /* @__PURE__ */ E(e, {
164
- id: "weight",
165
- type: "number",
166
- min: "0",
167
- step: "0.01",
168
- value: i.weight,
169
- onChange: (e) => s((t) => ({
170
- ...t,
171
- weight: e.target.value
172
- })),
173
- placeholder: "0.5"
174
- })]
175
- })
176
- ]
177
- })]
178
- })] })]
179
- })]
180
- });
181
- }
182
- function N() {
183
- let { productId: e } = T(), { basePath: o, navigate: p } = d(), { product: v, isLoading: x, error: S, refetch: w } = b(e), N = () => p?.(c(o, "inventory/products")), P = (e) => p?.(c(o, e));
184
- return e ? x ? /* @__PURE__ */ E(u, { message: "Loading product details..." }) : S || !v ? /* @__PURE__ */ E(l, {
185
- title: "Product not found",
186
- onRetry: w
187
- }) : /* @__PURE__ */ D(a, {
188
- title: v.name,
189
- subtitle: `SKU: ${v.sku}`,
190
- icon: /* @__PURE__ */ E(_, { size: 24 }),
191
- headerActions: /* @__PURE__ */ D("div", {
192
- className: "flex gap-2",
193
- children: [/* @__PURE__ */ D(f, {
194
- variant: "outline",
195
- onClick: N,
196
- children: [/* @__PURE__ */ E(m, { size: 16 }), " Back"]
197
- }), /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(y, { size: 16 }), " Edit"] })]
198
- }),
199
- headerContent: /* @__PURE__ */ D("div", {
200
- className: "flex gap-2",
201
- children: [
202
- /* @__PURE__ */ E(s, {
203
- variant: "outline",
204
- children: v.category
205
- }),
206
- v.brand && /* @__PURE__ */ E(s, {
207
- variant: "secondary",
208
- children: v.brand
209
- }),
210
- v.fragile && /* @__PURE__ */ E(s, {
211
- variant: "destructive",
212
- children: "Fragile"
213
- }),
214
- v.hazardous && /* @__PURE__ */ E(s, {
215
- variant: "destructive",
216
- children: "Hazardous"
217
- }),
218
- v.temperatureControlled && /* @__PURE__ */ E(s, {
219
- variant: "secondary",
220
- children: "Temp Controlled"
221
- })
222
- ]
223
- }),
224
- children: [
225
- /* @__PURE__ */ E(A, {
226
- icon: /* @__PURE__ */ E(_, { size: 18 }),
227
- children: "The catalog record for this item — its dimensions, weight, value and handling flags. These drive how it's packed, priced and routed, so keep them accurate before adding the product to an order or stocking it in a warehouse."
228
- }),
229
- /* @__PURE__ */ E(k, {
230
- storageKey: "movethewheels-product-details",
231
- steps: [{
232
- id: "order",
233
- label: "Add this product to an order",
234
- description: "Include it on a new delivery.",
235
- icon: /* @__PURE__ */ E(_, { size: 16 }),
236
- onClick: () => P("orders/new")
237
- }, {
238
- id: "edit",
239
- label: "Edit product details",
240
- description: "Update dimensions, value or handling flags.",
241
- icon: /* @__PURE__ */ E(j, { size: 16 }),
242
- onClick: () => {}
243
- }]
244
- }),
245
- /* @__PURE__ */ D("div", {
246
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
247
- children: [/* @__PURE__ */ D("div", {
248
- className: "lg:col-span-2 space-y-6",
249
- children: [
250
- /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ E(r, { children: "Description" }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E("p", { children: v.description }) })] }),
251
- /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(r, {
252
- className: "flex items-center gap-2",
253
- children: [/* @__PURE__ */ E(h, { size: 18 }), " Dimensions & Weight"]
254
- }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ D("div", {
255
- className: "grid grid-cols-2 md:grid-cols-4 gap-4",
256
- children: [
257
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
258
- className: "text-sm text-text-secondary",
259
- children: "Length"
260
- }), /* @__PURE__ */ D("p", {
261
- className: "text-2xl font-bold",
262
- children: [v.dimensions.length, /* @__PURE__ */ D("span", {
263
- className: "text-sm font-normal",
264
- children: [" ", v.dimensions.unit]
265
- })]
266
- })] }),
267
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
268
- className: "text-sm text-text-secondary",
269
- children: "Width"
270
- }), /* @__PURE__ */ D("p", {
271
- className: "text-2xl font-bold",
272
- children: [v.dimensions.width, /* @__PURE__ */ D("span", {
273
- className: "text-sm font-normal",
274
- children: [" ", v.dimensions.unit]
275
- })]
276
- })] }),
277
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
278
- className: "text-sm text-text-secondary",
279
- children: "Height"
280
- }), /* @__PURE__ */ D("p", {
281
- className: "text-2xl font-bold",
282
- children: [v.dimensions.height, /* @__PURE__ */ D("span", {
283
- className: "text-sm font-normal",
284
- children: [" ", v.dimensions.unit]
285
- })]
286
- })] }),
287
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
288
- className: "text-sm text-text-secondary",
289
- children: "Weight"
290
- }), /* @__PURE__ */ D("p", {
291
- className: "text-2xl font-bold",
292
- children: [v.weight, /* @__PURE__ */ E("span", {
293
- className: "text-sm font-normal",
294
- children: " kg"
295
- })]
296
- })] })
297
- ]
298
- }) })] }),
299
- v.attributes.length > 0 && /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(r, {
300
- className: "flex items-center gap-2",
301
- children: [/* @__PURE__ */ E(j, { size: 18 }), " Attributes"]
302
- }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E("div", {
303
- className: "grid grid-cols-2 md:grid-cols-3 gap-4",
304
- children: v.attributes.map((e, t) => /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
305
- className: "text-sm text-text-secondary",
306
- children: e.name
307
- }), /* @__PURE__ */ E("p", {
308
- className: "font-medium",
309
- children: e.value
310
- })] }, t))
311
- }) })] })
312
- ]
313
- }), /* @__PURE__ */ D("div", {
314
- className: "space-y-6",
315
- children: [/* @__PURE__ */ D(O, { children: [
316
- /* @__PURE__ */ D("h2", {
317
- className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-3",
318
- children: [/* @__PURE__ */ E(g, { size: 18 }), " Pricing"]
319
- }),
320
- /* @__PURE__ */ E("p", {
321
- className: "text-3xl font-bold",
322
- children: C(v.value)
323
- }),
324
- /* @__PURE__ */ E("p", {
325
- className: "text-sm text-text-secondary",
326
- children: "Unit price"
327
- })
328
- ] }), /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ E(r, { children: "Identifiers" }) }), /* @__PURE__ */ D(n, {
329
- className: "space-y-3",
330
- children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
331
- className: "text-sm text-text-secondary",
332
- children: "SKU"
333
- }), /* @__PURE__ */ E("p", {
334
- className: "font-mono",
335
- children: v.sku
336
- })] }), v.barcode && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
337
- className: "text-sm text-text-secondary",
338
- children: "Barcode"
339
- }), /* @__PURE__ */ E("p", {
340
- className: "font-mono",
341
- children: v.barcode
342
- })] })]
343
- })] })]
344
- })]
345
- })
346
- ]
347
- }) : /* @__PURE__ */ E(M, {});
348
- }
349
- //#endregion
350
- export { N as default };