@burdenoff/microfe-movethewheels 2026.929.3 → 2026.930.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 (72) hide show
  1. package/dist/components/CustomerPicker.js +52 -48
  2. package/dist/components/EntityCombobox.js +25 -23
  3. package/dist/components/OrderItemRow.js +123 -78
  4. package/dist/generated/wspace-types.d.ts +1547 -64
  5. package/dist/hooks/useCustomers.js +55 -26
  6. package/dist/hooks/useFleet.js +236 -157
  7. package/dist/hooks/useInventory.js +214 -153
  8. package/dist/hooks/useMultiModalShipments.js +30 -26
  9. package/dist/hooks/useRoutes.js +64 -24
  10. package/dist/hooks/useTracking.js +14 -16
  11. package/dist/movethewheels/components/CustomerPicker.d.ts +5 -1
  12. package/dist/movethewheels/components/EntityCombobox.d.ts +6 -3
  13. package/dist/movethewheels/components/OrderItemRow.d.ts +7 -1
  14. package/dist/movethewheels/hooks/useCustomers.d.ts +3 -0
  15. package/dist/movethewheels/hooks/useFleet.d.ts +15 -2
  16. package/dist/movethewheels/hooks/useInventory.d.ts +15 -12
  17. package/dist/movethewheels/hooks/useMultiModalShipments.d.ts +1 -0
  18. package/dist/movethewheels/hooks/useRoutes.d.ts +7 -1
  19. package/dist/movethewheels/types/index.d.ts +33 -23
  20. package/dist/movethewheels/utils/formatters.d.ts +1 -1
  21. package/dist/movethewheels/utils/orderValidation.d.ts +11 -0
  22. package/dist/pages/CreateOrderPage.js +349 -297
  23. package/dist/pages/CustomerDetailsPage.js +6 -6
  24. package/dist/pages/CustomersPage.js +2 -2
  25. package/dist/pages/DashboardPage.js +1 -1
  26. package/dist/pages/DriverDetailsPage.js +340 -332
  27. package/dist/pages/DriversPage.js +7 -5
  28. package/dist/pages/FleetPage.js +1 -1
  29. package/dist/pages/InventoryPage.js +11 -12
  30. package/dist/pages/LiveTrackingPage.js +4 -4
  31. package/dist/pages/MultiModalShipmentPage.js +139 -125
  32. package/dist/pages/OrderDetailsPage.js +132 -140
  33. package/dist/pages/ProductDetailsPage.js +408 -249
  34. package/dist/pages/ProductsPage.js +5 -5
  35. package/dist/pages/RouteDetailsPage.js +208 -210
  36. package/dist/pages/RoutesPage.js +2 -2
  37. package/dist/pages/TrackingPage.js +16 -9
  38. package/dist/pages/WarehouseDetailsPage.js +166 -163
  39. package/dist/pages/WarehousesPage.js +29 -21
  40. package/dist/utils/orderValidation.js +18 -0
  41. package/package.json +1 -1
  42. package/src/generated/wspace-types.ts +1762 -64
  43. package/src/movethewheels/components/CustomerPicker.tsx +12 -0
  44. package/src/movethewheels/components/EntityCombobox.tsx +30 -11
  45. package/src/movethewheels/components/OrderItemRow.tsx +44 -0
  46. package/src/movethewheels/hooks/useCustomers.ts +45 -9
  47. package/src/movethewheels/hooks/useFleet.ts +214 -36
  48. package/src/movethewheels/hooks/useInventory.ts +185 -49
  49. package/src/movethewheels/hooks/useMultiModalShipments.ts +9 -7
  50. package/src/movethewheels/hooks/useRoutes.ts +87 -16
  51. package/src/movethewheels/hooks/useTracking.ts +23 -15
  52. package/src/movethewheels/pages/CreateOrderPage.tsx +66 -2
  53. package/src/movethewheels/pages/CustomerDetailsPage.tsx +14 -8
  54. package/src/movethewheels/pages/CustomersPage.tsx +5 -2
  55. package/src/movethewheels/pages/DashboardPage.tsx +3 -1
  56. package/src/movethewheels/pages/DriverDetailsPage.tsx +25 -4
  57. package/src/movethewheels/pages/DriversPage.tsx +8 -2
  58. package/src/movethewheels/pages/FleetPage.tsx +1 -1
  59. package/src/movethewheels/pages/InventoryPage.tsx +20 -16
  60. package/src/movethewheels/pages/LiveTrackingPage.tsx +6 -4
  61. package/src/movethewheels/pages/MultiModalShipmentPage.tsx +15 -1
  62. package/src/movethewheels/pages/OrderDetailsPage.tsx +25 -25
  63. package/src/movethewheels/pages/ProductDetailsPage.tsx +228 -49
  64. package/src/movethewheels/pages/ProductsPage.tsx +13 -5
  65. package/src/movethewheels/pages/RouteDetailsPage.tsx +24 -12
  66. package/src/movethewheels/pages/RoutesPage.tsx +4 -2
  67. package/src/movethewheels/pages/TrackingPage.tsx +32 -12
  68. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +42 -29
  69. package/src/movethewheels/pages/WarehousesPage.tsx +23 -15
  70. package/src/movethewheels/types/index.ts +36 -24
  71. package/src/movethewheels/utils/formatters.ts +1 -1
  72. package/src/movethewheels/utils/orderValidation.ts +53 -0
@@ -129,7 +129,9 @@ function P() {
129
129
  }),
130
130
  /* @__PURE__ */ A(g, {
131
131
  value: W,
132
- onValueChange: G,
132
+ onValueChange: (e) => {
133
+ G(e), I(0);
134
+ },
133
135
  children: [/* @__PURE__ */ k(y, {
134
136
  className: "w-[180px]",
135
137
  children: /* @__PURE__ */ k(b, { placeholder: "License class" })
@@ -206,7 +208,10 @@ function P() {
206
208
  {
207
209
  id: "rating",
208
210
  header: "Rating",
209
- cell: (e) => e.rating > 0 ? /* @__PURE__ */ A("div", {
211
+ cell: (e) => e.rating === void 0 ? /* @__PURE__ */ k("span", {
212
+ className: "text-sm text-text-secondary",
213
+ children: "Not rated"
214
+ }) : /* @__PURE__ */ A("div", {
210
215
  className: "flex items-center gap-1",
211
216
  children: [/* @__PURE__ */ k(i, {
212
217
  size: 14,
@@ -215,9 +220,6 @@ function P() {
215
220
  className: "font-medium",
216
221
  children: e.rating.toFixed(1)
217
222
  })]
218
- }) : /* @__PURE__ */ k("span", {
219
- className: "text-sm text-text-secondary",
220
- children: "Not rated"
221
223
  })
222
224
  },
223
225
  {
@@ -261,7 +261,7 @@ function A() {
261
261
  status: e.status,
262
262
  type: "driver",
263
263
  size: "sm"
264
- }), e.rating > 0 && /* @__PURE__ */ w("div", {
264
+ }), e.rating !== void 0 && /* @__PURE__ */ w("div", {
265
265
  className: "mt-1 flex items-center gap-1 justify-end",
266
266
  children: [/* @__PURE__ */ C(n, {
267
267
  size: 12,
@@ -409,25 +409,24 @@ function M() {
409
409
  children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
410
410
  className: "font-medium",
411
411
  children: e.name
412
- }), /* @__PURE__ */ w("p", {
412
+ }), /* @__PURE__ */ C("p", {
413
413
  className: "text-sm text-text-secondary",
414
- children: [
415
- e.address.city,
416
- ", ",
417
- e.address.state
418
- ]
414
+ children: [e.address.city, e.address.state].filter(Boolean).join(", ") || "Not provided"
419
415
  })] }), /* @__PURE__ */ w("div", {
420
416
  className: "text-right",
421
417
  children: [/* @__PURE__ */ C(d, {
422
- variant: e.status.toUpperCase() === "ACTIVE" ? "default" : "secondary",
423
- children: e.status.toUpperCase() === "ACTIVE" ? N("movethewheels.inventory.warehouses.active", "Active") : N("movethewheels.inventory.warehouses.inactive", "Inactive")
418
+ variant: e.status?.toUpperCase() === "ACTIVE" ? "default" : "secondary",
419
+ children: e.status ? e.status.toUpperCase() === "ACTIVE" ? N("movethewheels.inventory.warehouses.active", "Active") : N("movethewheels.inventory.warehouses.inactive", "Inactive") : "Not provided"
424
420
  }), /* @__PURE__ */ w("div", {
425
421
  className: "mt-2",
426
422
  children: [/* @__PURE__ */ C("p", {
427
423
  className: "text-xs text-text-secondary",
428
424
  children: N("movethewheels.inventory.warehouses.utilization", "Utilization")
429
- }), /* @__PURE__ */ C(g, {
430
- value: e.capacity.totalSpace > 0 ? e.capacity.usedSpace / e.capacity.totalSpace * 100 : 0,
425
+ }), e.utilization === void 0 ? /* @__PURE__ */ C("p", {
426
+ className: "text-xs text-text-tertiary",
427
+ children: "Not provided"
428
+ }) : /* @__PURE__ */ C(g, {
429
+ value: e.utilization,
431
430
  className: "w-24 h-2"
432
431
  })]
433
432
  })]
@@ -471,10 +470,10 @@ function M() {
471
470
  className: "text-right",
472
471
  children: [/* @__PURE__ */ C("p", {
473
472
  className: "font-medium",
474
- children: le(e.value)
473
+ children: e.value === void 0 ? "Not provided" : le(e.value)
475
474
  }), /* @__PURE__ */ C(d, {
476
475
  variant: "outline",
477
- children: e.category
476
+ children: e.category ?? "Not provided"
478
477
  })]
479
478
  })]
480
479
  })
@@ -34,7 +34,7 @@ function I() {
34
34
  lng: t.lng,
35
35
  label: e.order.orderNumber,
36
36
  status: D(e.order.status),
37
- sublabel: e.driver?.fullName || e.vehicle?.vehicleNumber || e.tracking?.currentLocation.address || void 0
37
+ sublabel: e.driver?.fullName || e.vehicle?.vehicleNumber || e.tracking?.currentLocation?.address || void 0
38
38
  }] : [];
39
39
  }), [X]), Q = Z.length, $ = [
40
40
  {
@@ -226,7 +226,7 @@ function I() {
226
226
  ]
227
227
  }), /* @__PURE__ */ j("p", {
228
228
  className: "text-xs text-text-secondary",
229
- children: e.tracking?.currentLocation.address || "Location updating..."
229
+ children: e.tracking?.currentLocation?.address || "Location updating..."
230
230
  })]
231
231
  })]
232
232
  })
@@ -299,7 +299,7 @@ function I() {
299
299
  }),
300
300
  /* @__PURE__ */ j("p", {
301
301
  className: "text-sm",
302
- children: Y.tracking?.currentLocation.address || "Updating..."
302
+ children: Y.tracking?.currentLocation?.address || "Updating..."
303
303
  }),
304
304
  (() => {
305
305
  let e = O(Y.vehicle?.currentLocation, Y.driver?.currentLocation, Y.tracking?.currentLocation);
@@ -363,7 +363,7 @@ function I() {
363
363
  children: e.message
364
364
  }), /* @__PURE__ */ j("p", {
365
365
  className: "text-xs text-text-secondary mt-1",
366
- children: E(e.timestamp, "relative")
366
+ children: e.timestamp ? E(e.timestamp, "relative") : "Time not recorded"
367
367
  })]
368
368
  }, e.id))
369
369
  }) : /* @__PURE__ */ j("div", {