@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
@@ -1,8 +1,8 @@
1
1
  import { at as e, st as t } from "./PageLayout-j9Zw3wBN.js";
2
2
  import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
3
3
  //#region src/movethewheels/hooks/useInventory.ts
4
- var o = "\n query ListInventoryItems($filter: InventoryFilterInput, $pagination: PaginationInput) {\n inventoryItems(filter: $filter, pagination: $pagination) {\n id\n productId\n warehouseId\n onHand\n available\n allocated\n damaged\n reorderPoint\n createdAt\n updatedAt\n }\n }\n", s = "\n query ListProducts($filter: ProductFilterInput, $pagination: PaginationInput) {\n products(filter: $filter, pagination: $pagination) {\n id\n sku\n name\n description\n category\n brand\n dimensions\n weight\n value\n hazardous\n fragile\n temperatureControlled\n createdAt\n updatedAt\n }\n }\n", c = "\n query ListWarehouses($filter: WarehouseFilterInput, $pagination: PaginationInput) {\n warehouses(filter: $filter, pagination: $pagination) {\n id\n name\n code\n type\n address\n totalCapacity\n usedCapacity\n createdAt\n }\n }\n", l = "\n query GetProduct($id: ID!) {\n product(id: $id) {\n id\n sku\n name\n description\n category\n brand\n dimensions\n weight\n value\n hazardous\n fragile\n temperatureControlled\n createdAt\n updatedAt\n }\n }\n", u = "\n query GetWarehouse($id: ID!) {\n warehouse(id: $id) {\n id\n name\n code\n type\n address\n totalCapacity\n usedCapacity\n createdAt\n }\n }\n", d = "\n query GetInventoryStats {\n inventoryStats {\n totalOnHand\n totalAvailable\n totalAllocated\n totalDamaged\n lowStockCount\n }\n }\n", f = "\n mutation CreateProduct($input: CreateProductInput!) {\n createProduct(input: $input) {\n id\n sku\n name\n description\n category\n brand\n dimensions\n weight\n value\n hazardous\n fragile\n temperatureControlled\n createdAt\n updatedAt\n }\n }\n", p = "\n mutation CreateWarehouse($input: CreateWarehouseInput!) {\n createWarehouse(input: $input) {\n id\n name\n code\n type\n address\n totalCapacity\n usedCapacity\n createdAt\n }\n }\n", m = "\n mutation AdjustInventoryStock($input: AdjustInventoryStockInput!) {\n adjustInventoryStock(input: $input) {\n id\n productId\n warehouseId\n onHand\n available\n allocated\n damaged\n reorderPoint\n createdAt\n updatedAt\n }\n }\n";
5
- function h(e) {
4
+ var o = "\n query ListInventoryItems($filter: InventoryFilterInput, $pagination: PaginationInput) {\n inventoryItems(filter: $filter, pagination: $pagination) {\n id\n productId\n warehouseId\n onHand\n available\n allocated\n damaged\n reorderPoint\n createdAt\n updatedAt\n }\n }\n", s = "\n query ListProducts($filter: ProductFilterInput, $pagination: PaginationInput) {\n products(filter: $filter, pagination: $pagination) {\n id\n sku\n name\n description\n category\n brand\n dimensions\n weight\n value\n hazardous\n fragile\n temperatureControlled\n createdAt\n updatedAt\n }\n }\n", c = "\n query ListWarehouses($filter: WarehouseFilterInput, $pagination: PaginationInput) {\n warehouses(filter: $filter, pagination: $pagination) {\n id\n name\n code\n type\n address\n totalCapacity\n usedCapacity\n createdAt\n }\n }\n", l = "\n query GetProduct($id: ID!) {\n product(id: $id) {\n id\n sku\n name\n description\n category\n brand\n dimensions\n weight\n value\n hazardous\n fragile\n temperatureControlled\n createdAt\n updatedAt\n }\n }\n", u = "\n query GetWarehouse($id: ID!) {\n warehouse(id: $id) {\n id\n name\n code\n type\n address\n totalCapacity\n usedCapacity\n createdAt\n }\n }\n", d = "\n query GetInventoryStats {\n inventoryStats {\n totalOnHand\n totalAvailable\n totalAllocated\n totalDamaged\n lowStockCount\n }\n }\n", f = "\n mutation CreateProduct($input: CreateProductInput!) {\n createProduct(input: $input) {\n id\n sku\n name\n description\n category\n brand\n dimensions\n weight\n value\n hazardous\n fragile\n temperatureControlled\n createdAt\n updatedAt\n }\n }\n", p = "\n mutation UpdateProduct($id: ID!, $input: UpdateProductInput!) {\n updateProduct(id: $id, input: $input) {\n id\n sku\n name\n description\n category\n brand\n dimensions\n weight\n value\n hazardous\n fragile\n temperatureControlled\n createdAt\n updatedAt\n }\n }\n", m = "\n mutation CreateWarehouse($input: CreateWarehouseInput!) {\n createWarehouse(input: $input) {\n id\n name\n code\n type\n address\n totalCapacity\n usedCapacity\n createdAt\n }\n }\n", h = "\n mutation UpdateWarehouse($id: ID!, $input: UpdateWarehouseInput!) {\n updateWarehouse(id: $id, input: $input) {\n id\n name\n code\n type\n address\n totalCapacity\n usedCapacity\n createdAt\n }\n }\n", g = "\n mutation AdjustInventoryStock($input: AdjustInventoryStockInput!) {\n adjustInventoryStock(input: $input) {\n id\n productId\n warehouseId\n onHand\n available\n allocated\n damaged\n reorderPoint\n createdAt\n updatedAt\n }\n }\n";
5
+ function _(e) {
6
6
  return {
7
7
  id: e.id,
8
8
  sku: e.sku,
@@ -29,7 +29,7 @@ function h(e) {
29
29
  updatedAt: new Date(e.updatedAt)
30
30
  };
31
31
  }
32
- function g(e) {
32
+ function v(e) {
33
33
  let t = e.totalCapacity ?? 0, n = e.usedCapacity ?? 0;
34
34
  return {
35
35
  id: e.id,
@@ -69,7 +69,7 @@ function g(e) {
69
69
  createdAt: new Date(e.createdAt)
70
70
  };
71
71
  }
72
- function _(e) {
72
+ function y(e) {
73
73
  return {
74
74
  id: e.id,
75
75
  productId: e.productId,
@@ -92,7 +92,7 @@ function _(e) {
92
92
  updatedAt: new Date(e.updatedAt)
93
93
  };
94
94
  }
95
- function v() {
95
+ function b() {
96
96
  let { apiGatewayUrl: e, authToken: n, workspaceToken: r, workspaceId: a, tenantId: o, currentUser: s } = t();
97
97
  return i(() => ({
98
98
  apiGatewayUrl: e,
@@ -110,13 +110,13 @@ function v() {
110
110
  s?.id
111
111
  ]);
112
112
  }
113
- function y(t = {}) {
113
+ function x(t = {}) {
114
114
  let { filters: l } = t, u = i(() => l, [
115
115
  l?.lowStock,
116
116
  l?.productId,
117
117
  l?.warehouseId
118
- ]), d = v(), [y, b] = a([]), [x, S] = a([]), [C, w] = a([]), [T, E] = a(!1), [D, O] = a(null), k = n(async () => {
119
- E(!0), O(null);
118
+ ]), d = b(), [x, S] = a([]), [C, w] = a([]), [T, E] = a([]), [D, O] = a(!1), [k, A] = a(null), j = n(async () => {
119
+ O(!0), A(null);
120
120
  try {
121
121
  let [t, n, r] = await Promise.all([
122
122
  e(d, o, {
@@ -137,80 +137,106 @@ function y(t = {}) {
137
137
  limit: 500,
138
138
  offset: 0
139
139
  } })
140
- ]), i = t.inventoryItems.map(_);
141
- u?.lowStock && (i = i.filter((e) => e.availableQuantity <= e.reorderLevel)), b(i), S(n.products.map(h)), w(r.warehouses.map(g));
140
+ ]), i = t.inventoryItems.map(y);
141
+ u?.lowStock && (i = i.filter((e) => e.availableQuantity <= e.reorderLevel)), S(i), w(n.products.map(_)), E(r.warehouses.map(v));
142
142
  } catch (e) {
143
- O(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load inventory data"));
143
+ A(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load inventory data"));
144
144
  } finally {
145
- E(!1);
145
+ O(!1);
146
146
  }
147
147
  }, [u, d]);
148
148
  r(() => {
149
- k();
150
- }, [k]);
151
- let A = n(() => {
152
- k();
153
- }, [k]), j = n(async (t, n, r) => {
154
- let i = y.find((e) => e.id === t);
149
+ j();
150
+ }, [j]);
151
+ let M = n(() => {
152
+ j();
153
+ }, [j]), N = n(async (t, n, r) => {
154
+ let i = x.find((e) => e.id === t);
155
155
  if (!i) throw Error("Inventory item not found");
156
- let a = _((await e(d, m, { input: {
156
+ let a = y((await e(d, g, { input: {
157
157
  id: t,
158
158
  onHand: i.quantity + n,
159
159
  available: i.availableQuantity + n,
160
160
  allocated: i.reservedQuantity,
161
161
  damaged: 0
162
162
  } })).adjustInventoryStock);
163
- return b((e) => e.map((e) => e.id === t ? a : e)), a;
164
- }, [d, y]), M = n(async (e, t, n, r) => {
165
- let i = y.find((t) => t.warehouseId === e && t.productId === n);
163
+ return S((e) => e.map((e) => e.id === t ? a : e)), a;
164
+ }, [d, x]), P = n(async (e, t, n, r) => {
165
+ let i = x.find((t) => t.warehouseId === e && t.productId === n);
166
166
  if (!i) throw Error("Source inventory not found");
167
- await j(i.id, -Math.abs(r), "transfer out");
168
- let a = y.find((e) => e.warehouseId === t && e.productId === n);
169
- a && await j(a.id, Math.abs(r), "transfer in");
170
- }, [y, j]), N = n(async (t) => {
171
- let n = h((await e(d, f, { input: {
167
+ await N(i.id, -Math.abs(r), "transfer out");
168
+ let a = x.find((e) => e.warehouseId === t && e.productId === n);
169
+ a && await N(a.id, Math.abs(r), "transfer in");
170
+ }, [x, N]), F = n(async (t) => {
171
+ let n = _((await e(d, f, { input: {
172
172
  name: t.name,
173
173
  sku: t.sku,
174
174
  category: t.category,
175
175
  brand: t.brand,
176
176
  weight: t.weight
177
177
  } })).createProduct);
178
- return S((e) => [n, ...e]), n;
179
- }, [d]), P = n(async (t) => {
180
- let n = g((await e(d, p, { input: {
178
+ return w((e) => [n, ...e]), n;
179
+ }, [d]), I = n(async (t) => {
180
+ let n = v((await e(d, m, { input: {
181
181
  code: t.code,
182
182
  name: t.name,
183
183
  type: t.type,
184
184
  address: t.address,
185
185
  totalCapacity: t.totalCapacity
186
186
  } })).createWarehouse);
187
- return w((e) => [n, ...e]), n;
187
+ return E((e) => [n, ...e]), n;
188
+ }, [d]), L = n(async (t, n) => {
189
+ let r = _((await e(d, p, {
190
+ id: t,
191
+ input: {
192
+ name: n.name,
193
+ sku: n.sku,
194
+ category: n.category,
195
+ brand: n.brand,
196
+ weight: n.weight
197
+ }
198
+ })).updateProduct);
199
+ return w((e) => e.map((e) => e.id === t ? r : e)), r;
200
+ }, [d]), R = n(async (t, n) => {
201
+ let r = v((await e(d, h, {
202
+ id: t,
203
+ input: {
204
+ code: n.code,
205
+ name: n.name,
206
+ type: n.type,
207
+ address: n.address,
208
+ totalCapacity: n.totalCapacity
209
+ }
210
+ })).updateWarehouse);
211
+ return E((e) => e.map((e) => e.id === t ? r : e)), r;
188
212
  }, [d]);
189
213
  return {
190
- inventory: y,
191
- products: x,
192
- warehouses: C,
193
- totalItems: y.length,
194
- isLoading: T,
195
- error: D,
196
- refetch: A,
197
- updateStock: j,
198
- transferStock: M,
199
- createProduct: N,
200
- createWarehouse: P
214
+ inventory: x,
215
+ products: C,
216
+ warehouses: T,
217
+ totalItems: x.length,
218
+ isLoading: D,
219
+ error: k,
220
+ refetch: M,
221
+ updateStock: N,
222
+ transferStock: P,
223
+ createProduct: F,
224
+ createWarehouse: I,
225
+ updateProduct: L,
226
+ updateWarehouse: R
201
227
  };
202
228
  }
203
- function b(t = {}) {
204
- let { limit: i = 500, offset: o = 0 } = t, c = v(), [l, u] = a([]), [d, f] = a(!1), [p, m] = a(!1), [g, _] = a(null), y = n(async () => {
205
- m(!0), _(null);
229
+ function S(t = {}) {
230
+ let { limit: i = 500, offset: o = 0 } = t, c = b(), [l, u] = a([]), [d, f] = a(!1), [p, m] = a(!1), [h, g] = a(null), v = n(async () => {
231
+ m(!0), g(null);
206
232
  try {
207
233
  let t = await e(c, s, { pagination: {
208
234
  limit: i,
209
235
  offset: o
210
236
  } });
211
- f(t.products.length === i), u(t.products.map(h));
237
+ f(t.products.length === i), u(t.products.map(_));
212
238
  } catch (e) {
213
- _(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load products"));
239
+ g(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load products"));
214
240
  } finally {
215
241
  m(!1);
216
242
  }
@@ -220,18 +246,18 @@ function b(t = {}) {
220
246
  o
221
247
  ]);
222
248
  return r(() => {
223
- y();
224
- }, [y]), {
249
+ v();
250
+ }, [v]), {
225
251
  products: l,
226
252
  totalProducts: l.length,
227
253
  hasMore: d,
228
254
  isLoading: p,
229
- error: g,
230
- refetch: () => void y()
255
+ error: h,
256
+ refetch: () => void v()
231
257
  };
232
258
  }
233
- function x(e = 500) {
234
- let { products: t, isLoading: n, error: r } = b({
259
+ function C(e = 500) {
260
+ let { products: t, isLoading: n, error: r } = S({
235
261
  limit: e,
236
262
  offset: 0
237
263
  });
@@ -245,8 +271,8 @@ function x(e = 500) {
245
271
  error: r
246
272
  };
247
273
  }
248
- function S(t) {
249
- let i = v(), [o, s] = a(null), [c, u] = a(!1), [d, f] = a(null), p = n(async () => {
274
+ function w(t) {
275
+ let i = b(), [o, s] = a(null), [c, u] = a(!1), [d, f] = a(null), p = n(async () => {
250
276
  if (!t) {
251
277
  s(null);
252
278
  return;
@@ -254,7 +280,7 @@ function S(t) {
254
280
  u(!0), f(null);
255
281
  try {
256
282
  let n = await e(i, l, { id: t });
257
- s(n.product ? h(n.product) : null);
283
+ s(n.product ? _(n.product) : null);
258
284
  } catch (e) {
259
285
  f(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load product"));
260
286
  } finally {
@@ -270,17 +296,17 @@ function S(t) {
270
296
  refetch: () => void p()
271
297
  };
272
298
  }
273
- function C(t = {}) {
274
- let { limit: i = 500, offset: o = 0 } = t, s = v(), [l, u] = a([]), [d, f] = a(!1), [p, m] = a(!1), [h, _] = a(null), y = n(async () => {
275
- m(!0), _(null);
299
+ function T(t = {}) {
300
+ let { limit: i = 500, offset: o = 0 } = t, s = b(), [l, u] = a([]), [d, f] = a(!1), [p, m] = a(!1), [h, g] = a(null), _ = n(async () => {
301
+ m(!0), g(null);
276
302
  try {
277
303
  let t = await e(s, c, { pagination: {
278
304
  limit: i,
279
305
  offset: o
280
306
  } });
281
- f(t.warehouses.length === i), u(t.warehouses.map(g));
307
+ f(t.warehouses.length === i), u(t.warehouses.map(v));
282
308
  } catch (e) {
283
- _(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load warehouses"));
309
+ g(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load warehouses"));
284
310
  } finally {
285
311
  m(!1);
286
312
  }
@@ -290,18 +316,18 @@ function C(t = {}) {
290
316
  o
291
317
  ]);
292
318
  return r(() => {
293
- y();
294
- }, [y]), {
319
+ _();
320
+ }, [_]), {
295
321
  warehouses: l,
296
322
  totalWarehouses: l.length,
297
323
  hasMore: d,
298
324
  isLoading: p,
299
325
  error: h,
300
- refetch: () => void y()
326
+ refetch: () => void _()
301
327
  };
302
328
  }
303
- function w(e = 500) {
304
- let { warehouses: t, isLoading: n, error: r } = C({
329
+ function E(e = 500) {
330
+ let { warehouses: t, isLoading: n, error: r } = T({
305
331
  limit: e,
306
332
  offset: 0
307
333
  });
@@ -318,8 +344,8 @@ function w(e = 500) {
318
344
  error: r
319
345
  };
320
346
  }
321
- function T(t) {
322
- let i = v(), [o, s] = a(null), [c, l] = a(!1), [d, f] = a(null), p = n(async () => {
347
+ function D(t) {
348
+ let i = b(), [o, s] = a(null), [c, l] = a(!1), [d, f] = a(null), p = n(async () => {
323
349
  if (!t) {
324
350
  s(null);
325
351
  return;
@@ -327,7 +353,7 @@ function T(t) {
327
353
  l(!0), f(null);
328
354
  try {
329
355
  let n = await e(i, u, { id: t });
330
- s(n.warehouse ? g(n.warehouse) : null);
356
+ s(n.warehouse ? v(n.warehouse) : null);
331
357
  } catch (e) {
332
358
  f(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load warehouse"));
333
359
  } finally {
@@ -343,8 +369,8 @@ function T(t) {
343
369
  refetch: () => void p()
344
370
  };
345
371
  }
346
- function E() {
347
- let t = v(), [n, i] = a({
372
+ function O() {
373
+ let t = b(), [n, i] = a({
348
374
  totalItems: 0,
349
375
  lowStockItems: 0,
350
376
  totalValue: 0,
@@ -385,4 +411,4 @@ function E() {
385
411
  };
386
412
  }
387
413
  //#endregion
388
- export { b as a, C as c, x as i, E as n, T as o, S as r, w as s, y as t };
414
+ export { S as a, T as c, C as i, O as n, D as o, w as r, E as s, x as t };
@@ -69,7 +69,7 @@ function d() {
69
69
  }, [S]);
70
70
  return {
71
71
  settings: m,
72
- preferences: m?.preferences ?? {},
72
+ preferences: a(() => m?.preferences ?? {}, [m]),
73
73
  isLoading: g,
74
74
  isSaving: v,
75
75
  error: b,
@@ -1,6 +1,6 @@
1
1
  import { at as e, st as t } from "./PageLayout-j9Zw3wBN.js";
2
2
  import { r as n, t as r } from "./useOrders-B5FV0kcz.js";
3
- import { a as i, n as a, o, t as s } from "./useFleet-BXSocBD_.js";
3
+ import { a as i, n as a, o, t as s } from "./useFleet-BfA_-VUW.js";
4
4
  import { useCallback as c, useEffect as l, useMemo as u, useState as d } from "react";
5
5
  //#region src/movethewheels/hooks/useTracking.ts
6
6
  var f = "\n query ListShipments($filter: ShipmentFilterInput, $pagination: PaginationInput) {\n shipments(filter: $filter, pagination: $pagination) {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n }\n }\n", p = "\n query GetShipment($id: ID!) {\n shipment(id: $id) {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n trackingEvents {\n id\n shipmentId\n eventType\n location\n details\n timestamp\n }\n }\n }\n", m = "\n query GetOrderTracking($orderId: ID!) {\n orderTracking(orderId: $orderId) {\n id\n shipmentId\n eventType\n location\n details\n timestamp\n }\n }\n", h = "\n query GetActiveDeliveries {\n activeDeliveries {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n }\n }\n", g = "\n query GetTrackingAlerts {\n trackingAlerts {\n shipmentId\n shipmentNumber\n alertType\n message\n }\n }\n";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-movethewheels",
3
- "version": "2026.703.8",
3
+ "version": "2026.704.1",
4
4
  "description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -95,18 +95,22 @@ export function MoveTheWheelsRoutes() {
95
95
  <Route path="fleet/vehicles" element={<VehiclesPage />} />
96
96
  <Route path="fleet/vehicles/new" element={<VehicleDetailsPage />} />
97
97
  <Route path="fleet/vehicles/:vehicleId" element={<VehicleDetailsPage />} />
98
+ <Route path="fleet/vehicles/:vehicleId/edit" element={<VehicleDetailsPage />} />
98
99
  <Route path="fleet/drivers" element={<DriversPage />} />
99
100
  <Route path="fleet/drivers/new" element={<DriverDetailsPage />} />
100
101
  <Route path="fleet/drivers/:driverId" element={<DriverDetailsPage />} />
102
+ <Route path="fleet/drivers/:driverId/edit" element={<DriverDetailsPage />} />
101
103
 
102
104
  {/* Inventory */}
103
105
  <Route path="inventory" element={<InventoryPage />} />
104
106
  <Route path="inventory/products" element={<ProductsPage />} />
105
107
  <Route path="inventory/products/new" element={<ProductDetailsPage />} />
106
108
  <Route path="inventory/products/:productId" element={<ProductDetailsPage />} />
109
+ <Route path="inventory/products/:productId/edit" element={<ProductDetailsPage />} />
107
110
  <Route path="inventory/warehouses" element={<WarehousesPage />} />
108
111
  <Route path="inventory/warehouses/new" element={<WarehouseDetailsPage />} />
109
112
  <Route path="inventory/warehouses/:warehouseId" element={<WarehouseDetailsPage />} />
113
+ <Route path="inventory/warehouses/:warehouseId/edit" element={<WarehouseDetailsPage />} />
110
114
 
111
115
  {/* Customers */}
112
116
  <Route path="customers" element={<CustomersPage />} />
@@ -117,6 +121,7 @@ export function MoveTheWheelsRoutes() {
117
121
  <Route path="routes" element={<RoutesPage />} />
118
122
  <Route path="routes/new" element={<RouteDetailsPage />} />
119
123
  <Route path="routes/:routeId" element={<RouteDetailsPage />} />
124
+ <Route path="routes/:routeId/edit" element={<RouteDetailsPage />} />
120
125
 
121
126
  {/* Analytics */}
122
127
  <Route path="analytics" element={<AnalyticsPage />} />
@@ -35,6 +35,8 @@ interface UseFleetResult {
35
35
  refetch: () => void;
36
36
  createVehicle: (input: CreateVehicleInput) => Promise<Vehicle>;
37
37
  createDriver: (input: CreateDriverInput) => Promise<Driver>;
38
+ updateVehicle: (id: string, input: CreateVehicleInput) => Promise<Vehicle>;
39
+ updateDriver: (id: string, input: CreateDriverInput) => Promise<Driver>;
38
40
  }
39
41
 
40
42
  interface ApiVehicle {
@@ -43,6 +45,7 @@ interface ApiVehicle {
43
45
  type: string;
44
46
  make?: string | null;
45
47
  model?: string | null;
48
+ licensePlate?: string | null;
46
49
  year?: number | null;
47
50
  capacity?: Record<string, unknown> | null;
48
51
  status: string;
@@ -58,6 +61,8 @@ interface ApiDriver {
58
61
  userId?: string | null;
59
62
  firstName: string;
60
63
  lastName: string;
64
+ email?: string | null;
65
+ phone?: string | null;
61
66
  employeeId: string;
62
67
  licenseNumber?: string | null;
63
68
  licenseClass?: string | null;
@@ -77,6 +82,7 @@ const LIST_VEHICLES_QUERY = `
77
82
  type
78
83
  make
79
84
  model
85
+ licensePlate
80
86
  year
81
87
  capacity
82
88
  status
@@ -96,6 +102,8 @@ const LIST_DRIVERS_QUERY = `
96
102
  userId
97
103
  firstName
98
104
  lastName
105
+ email
106
+ phone
99
107
  employeeId
100
108
  licenseNumber
101
109
  licenseClass
@@ -117,6 +125,7 @@ const GET_VEHICLE_QUERY = `
117
125
  type
118
126
  make
119
127
  model
128
+ licensePlate
120
129
  year
121
130
  capacity
122
131
  status
@@ -136,6 +145,8 @@ const GET_DRIVER_QUERY = `
136
145
  userId
137
146
  firstName
138
147
  lastName
148
+ email
149
+ phone
139
150
  employeeId
140
151
  licenseNumber
141
152
  licenseClass
@@ -157,6 +168,7 @@ const UPDATE_VEHICLE_STATUS_MUTATION = `
157
168
  type
158
169
  make
159
170
  model
171
+ licensePlate
160
172
  year
161
173
  capacity
162
174
  status
@@ -176,6 +188,8 @@ const ASSIGN_DRIVER_VEHICLE_MUTATION = `
176
188
  userId
177
189
  firstName
178
190
  lastName
191
+ email
192
+ phone
179
193
  employeeId
180
194
  licenseNumber
181
195
  licenseClass
@@ -196,6 +210,8 @@ const UPDATE_DRIVER_STATUS_MUTATION = `
196
210
  userId
197
211
  firstName
198
212
  lastName
213
+ email
214
+ phone
199
215
  employeeId
200
216
  licenseNumber
201
217
  licenseClass
@@ -217,6 +233,7 @@ const CREATE_VEHICLE_MUTATION = `
217
233
  type
218
234
  make
219
235
  model
236
+ licensePlate
220
237
  year
221
238
  capacity
222
239
  status
@@ -236,6 +253,51 @@ const CREATE_DRIVER_MUTATION = `
236
253
  userId
237
254
  firstName
238
255
  lastName
256
+ email
257
+ phone
258
+ employeeId
259
+ licenseNumber
260
+ licenseClass
261
+ licenseExpiry
262
+ status
263
+ currentLocation
264
+ rating
265
+ vehicleId
266
+ createdAt
267
+ }
268
+ }
269
+ `;
270
+
271
+ const UPDATE_VEHICLE_MUTATION = `
272
+ mutation UpdateVehicle($id: ID!, $input: UpdateVehicleInput!) {
273
+ updateVehicle(id: $id, input: $input) {
274
+ id
275
+ vehicleNumber
276
+ type
277
+ make
278
+ model
279
+ licensePlate
280
+ year
281
+ capacity
282
+ status
283
+ currentLocation
284
+ fuelLevel
285
+ mileage
286
+ createdAt
287
+ updatedAt
288
+ }
289
+ }
290
+ `;
291
+
292
+ const UPDATE_DRIVER_MUTATION = `
293
+ mutation UpdateDriver($id: ID!, $input: UpdateDriverInput!) {
294
+ updateDriver(id: $id, input: $input) {
295
+ id
296
+ userId
297
+ firstName
298
+ lastName
299
+ email
300
+ phone
239
301
  employeeId
240
302
  licenseNumber
241
303
  licenseClass
@@ -323,6 +385,7 @@ function mapVehicle(vehicle: ApiVehicle): Vehicle {
323
385
  type: (vehicle.type?.toLowerCase() ?? 'van') as Vehicle['type'],
324
386
  make: vehicle.make ?? '',
325
387
  model: vehicle.model ?? '',
388
+ licensePlate: vehicle.licensePlate ?? '',
326
389
  year: vehicle.year ?? new Date().getFullYear(),
327
390
  capacity: {
328
391
  weight: 0,
@@ -353,6 +416,8 @@ function mapDriver(driver: ApiDriver): Driver {
353
416
  id: driver.id,
354
417
  userId: driver.userId ?? driver.id,
355
418
  fullName: `${driver.firstName} ${driver.lastName}`.trim(),
419
+ email: driver.email ?? '',
420
+ phone: driver.phone ?? '',
356
421
  employeeId: driver.employeeId,
357
422
  licenseNumber: driver.licenseNumber ?? '',
358
423
  licenseType: driver.licenseClass ?? 'standard',
@@ -523,6 +588,52 @@ export function useFleet(options: UseFleetOptions = {}): UseFleetResult {
523
588
  [graphQLOptions]
524
589
  );
525
590
 
591
+ const updateVehicle = useCallback(
592
+ async (id: string, input: CreateVehicleInput): Promise<Vehicle> => {
593
+ const data = await executeGraphQL<{ updateVehicle: ApiVehicle }>(
594
+ graphQLOptions,
595
+ UPDATE_VEHICLE_MUTATION,
596
+ {
597
+ id,
598
+ input: {
599
+ vehicleNumber: input.vehicleNumber,
600
+ type: input.type,
601
+ make: input.make,
602
+ model: input.model,
603
+ licensePlate: input.licensePlate,
604
+ },
605
+ }
606
+ );
607
+ const updated = mapVehicle(data.updateVehicle);
608
+ setVehicles((previous) => previous.map((item) => (item.id === id ? updated : item)));
609
+ return updated;
610
+ },
611
+ [graphQLOptions]
612
+ );
613
+
614
+ const updateDriver = useCallback(
615
+ async (id: string, input: CreateDriverInput): Promise<Driver> => {
616
+ const data = await executeGraphQL<{ updateDriver: ApiDriver }>(
617
+ graphQLOptions,
618
+ UPDATE_DRIVER_MUTATION,
619
+ {
620
+ id,
621
+ input: {
622
+ firstName: input.firstName,
623
+ lastName: input.lastName,
624
+ email: input.email,
625
+ phone: input.phone,
626
+ licenseNumber: input.licenseNumber,
627
+ },
628
+ }
629
+ );
630
+ const updated = mapDriver(data.updateDriver);
631
+ setDrivers((previous) => previous.map((item) => (item.id === id ? updated : item)));
632
+ return updated;
633
+ },
634
+ [graphQLOptions]
635
+ );
636
+
526
637
  return {
527
638
  vehicles,
528
639
  drivers,
@@ -533,6 +644,8 @@ export function useFleet(options: UseFleetOptions = {}): UseFleetResult {
533
644
  refetch,
534
645
  createVehicle,
535
646
  createDriver,
647
+ updateVehicle,
648
+ updateDriver,
536
649
  };
537
650
  }
538
651