@burdenoff/microfe-movethewheels 2026.822.1 → 2026.828.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 (71) hide show
  1. package/dist/generated/wspace-operations.d.ts +168 -912
  2. package/dist/generated/wspace-types.d.ts +78432 -35831
  3. package/dist/hooks/useFleet.js +142 -74
  4. package/dist/hooks/useImportExport.js +22 -51
  5. package/dist/hooks/useInventory.js +163 -70
  6. package/dist/hooks/useOrders.js +2 -2
  7. package/dist/hooks/useReports.js +63 -73
  8. package/dist/hooks/useSettings.js +52 -44
  9. package/dist/hooks/useTracking.js +5 -5
  10. package/dist/index.js +33 -33
  11. package/dist/movethewheels/hooks/index.d.ts +2 -2
  12. package/dist/movethewheels/hooks/useFleet.d.ts +32 -1
  13. package/dist/movethewheels/hooks/useImportExport.d.ts +10 -0
  14. package/dist/movethewheels/hooks/useInventory.d.ts +67 -12
  15. package/dist/movethewheels/hooks/useOrders.d.ts +25 -2
  16. package/dist/movethewheels/pages/MarketplacePage.d.ts +7 -4
  17. package/dist/movethewheels/types/index.d.ts +2 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down-right.js +11 -0
  19. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-left-right.js +22 -0
  20. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-up-right.js +11 -0
  21. package/dist/node_modules/lucide-react/dist/esm/icons/calendar-clock.js +32 -0
  22. package/dist/node_modules/lucide-react/dist/esm/icons/history.js +18 -0
  23. package/dist/node_modules/lucide-react/dist/esm/icons/lock.js +16 -0
  24. package/dist/node_modules/lucide-react/dist/esm/icons/user-round.js +13 -0
  25. package/dist/pages/CreateOrderPage.js +246 -195
  26. package/dist/pages/DeliveryCapturePage.js +91 -78
  27. package/dist/pages/DriversPage.js +202 -108
  28. package/dist/pages/InventoryPage.js +356 -131
  29. package/dist/pages/MarketplacePage.js +11 -432
  30. package/dist/pages/ProductDetailsPage.js +212 -156
  31. package/dist/pages/ReportsPage.js +120 -109
  32. package/dist/pages/VehicleDetailsPage.js +257 -193
  33. package/dist/utils/formatters.js +4 -1
  34. package/package.json +2 -2
  35. package/src/generated/wspace-operations.ts +134 -929
  36. package/src/generated/wspace-types.ts +91730 -40059
  37. package/src/movethewheels/hooks/index.ts +9 -0
  38. package/src/movethewheels/hooks/useFleet.ts +133 -3
  39. package/src/movethewheels/hooks/useImportExport.ts +36 -72
  40. package/src/movethewheels/hooks/useInventory.ts +311 -53
  41. package/src/movethewheels/hooks/useOrders.ts +31 -7
  42. package/src/movethewheels/hooks/useReports.ts +73 -87
  43. package/src/movethewheels/hooks/useSettings.ts +50 -53
  44. package/src/movethewheels/hooks/useTracking.ts +14 -14
  45. package/src/movethewheels/pages/CreateOrderPage.tsx +67 -10
  46. package/src/movethewheels/pages/DeliveryCapturePage.tsx +8 -0
  47. package/src/movethewheels/pages/DriversPage.tsx +181 -31
  48. package/src/movethewheels/pages/InventoryPage.tsx +299 -19
  49. package/src/movethewheels/pages/MarketplacePage.tsx +16 -539
  50. package/src/movethewheels/pages/ProductDetailsPage.tsx +68 -3
  51. package/src/movethewheels/pages/ReportsPage.tsx +23 -0
  52. package/src/movethewheels/pages/VehicleDetailsPage.tsx +86 -27
  53. package/src/movethewheels/types/index.ts +2 -0
  54. package/src/operations/wspace/movethewheels/fragments/core.graphql +23 -53
  55. package/src/operations/wspace/movethewheels/fragments/core.withdrawn.graphql +59 -0
  56. package/src/operations/wspace/movethewheels/mutations/entities.graphql +5 -5
  57. package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +18 -78
  58. package/src/operations/wspace/movethewheels/mutations/marketplace-reports.withdrawn.graphql +93 -0
  59. package/src/operations/wspace/movethewheels/mutations/orders.graphql +7 -7
  60. package/src/operations/wspace/movethewheels/queries/dashboard.graphql +3 -3
  61. package/src/operations/wspace/movethewheels/queries/entities.graphql +3 -3
  62. package/src/operations/wspace/movethewheels/queries/logistics.graphql +3 -3
  63. package/src/operations/wspace/movethewheels/queries/marketplace-reports.withdrawn.graphql +58 -0
  64. package/src/operations/wspace/movethewheels/queries/orders.graphql +3 -3
  65. package/dist/generated/global-operations.d.ts +0 -1
  66. package/dist/generated/global-types.d.ts +0 -23526
  67. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -8
  68. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -8
  69. package/src/generated/global-operations.ts +0 -2
  70. package/src/generated/global-types.ts +0 -27259
  71. package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +0 -40
@@ -1,59 +1,67 @@
1
1
  import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
2
- import { executeGraphQL as t } from "../utils/graphqlClient.js";
3
- import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
2
+ import { useCallback as t, useEffect as n, useMemo as r, useState as i } from "react";
4
3
  //#region src/movethewheels/hooks/useSettings.ts
5
- var o = "\n query MovethewheelsModuleSettings {\n moduleSettings {\n preferences\n updatedAt\n workspaceId\n }\n }\n", s = "\n mutation UpdateMovethewheelsModuleSettings($input: UpdateMovethewheelsModuleSettingsInput!) {\n updateModuleSettings(input: $input) {\n preferences\n updatedAt\n workspaceId\n }\n }\n";
6
- function c() {
7
- let { apiGatewayUrl: c, authToken: l, workspaceToken: u, workspaceId: d, tenantId: f, currentUser: p } = e(), [m, h] = a(null), [g, _] = a(!1), [v, y] = a(!1), [b, x] = a(null), S = i(() => ({
8
- apiGatewayUrl: c,
9
- authToken: l,
10
- workspaceToken: u,
11
- workspaceId: d,
12
- tenantId: f,
13
- actorId: p?.id
14
- }), [
15
- c,
16
- l,
17
- u,
18
- d,
19
- f,
20
- p?.id
21
- ]), C = n(async () => {
22
- _(!0), x(null);
4
+ function a(e) {
5
+ if (typeof window > "u") return null;
6
+ try {
7
+ let t = window.localStorage.getItem(`movethewheels:moduleSettings:${e}`);
8
+ if (!t) return null;
9
+ let n = JSON.parse(t);
10
+ return n && typeof n == "object" && "preferences" in n ? n : null;
11
+ } catch {
12
+ return null;
13
+ }
14
+ }
15
+ function o(e) {
16
+ if (!(typeof window > "u")) try {
17
+ window.localStorage.setItem(`movethewheels:moduleSettings:${e.workspaceId}`, JSON.stringify(e));
18
+ } catch {}
19
+ }
20
+ function s() {
21
+ let { workspaceId: s } = e(), [c, l] = i(null), [u, d] = i(!1), [f, p] = i(!1), [m, h] = i(null), g = t(() => {
22
+ d(!0), h(null);
23
23
  try {
24
- h((await t(S, o)).moduleSettings);
24
+ l((s ? a(s) : null) ?? {
25
+ preferences: {},
26
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
27
+ workspaceId: s ?? ""
28
+ });
25
29
  } catch (e) {
26
- x(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load settings"));
30
+ h(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load settings"));
27
31
  } finally {
28
- _(!1);
32
+ d(!1);
29
33
  }
30
- }, [S]);
31
- r(() => {
32
- C();
33
- }, [C]);
34
- let w = n(() => {
35
- C();
36
- }, [C]), T = n(async (e) => {
37
- y(!0), x(null);
34
+ }, [s]);
35
+ n(() => {
36
+ g();
37
+ }, [g]);
38
+ let _ = t(() => {
39
+ g();
40
+ }, [g]), v = t(async (e) => {
41
+ p(!0), h(null);
38
42
  try {
39
- let n = await t(S, s, { input: { preferences: e } });
40
- return h(n.updateModuleSettings), n.updateModuleSettings;
43
+ let t = {
44
+ preferences: e,
45
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
46
+ workspaceId: s ?? ""
47
+ };
48
+ return o(t), l(t), t;
41
49
  } catch (e) {
42
50
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to save settings");
43
- throw x(t), t;
51
+ throw h(t), t;
44
52
  } finally {
45
- y(!1);
53
+ p(!1);
46
54
  }
47
- }, [S]);
55
+ }, [s]);
48
56
  return {
49
- settings: m,
50
- preferences: i(() => m?.preferences ?? {}, [m]),
51
- isLoading: g,
52
- isSaving: v,
53
- error: b,
54
- refetch: w,
55
- savePreferences: T
57
+ settings: c,
58
+ preferences: r(() => c?.preferences ?? {}, [c]),
59
+ isLoading: u,
60
+ isSaving: f,
61
+ error: m,
62
+ refetch: _,
63
+ savePreferences: v
56
64
  };
57
65
  }
58
66
  //#endregion
59
- export { c as useModuleSettings };
67
+ export { s as useModuleSettings };
@@ -4,7 +4,7 @@ import { useOrder as n, useOrders as r } from "./useOrders.js";
4
4
  import { useDriver as i, useDrivers as a, useVehicle as o, useVehicles as s } from "./useFleet.js";
5
5
  import { useCallback as c, useEffect as l, useMemo as u, useState as d } from "react";
6
6
  //#region src/movethewheels/hooks/useTracking.ts
7
- 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";
7
+ var f = "\n query ListShipments($filter: ShipmentFilterInput, $pagination: PaginationInput) {\n shipments(filter: $filter, pagination: $pagination) {\n id\n shipmentNumber\n deliveryJobId\n status\n estimatedDelivery\n }\n }\n", p = "\n query GetShipment($id: ID!) {\n shipment(id: $id) {\n id\n shipmentNumber\n deliveryJobId\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 GetDeliveryJobTracking($deliveryJobId: ID!) {\n deliveryJobTracking(deliveryJobId: $deliveryJobId) {\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 deliveryJobId\n status\n estimatedDelivery\n }\n }\n", g = "\n query GetTrackingAlerts {\n trackingAlerts {\n shipmentId\n shipmentNumber\n alertType\n message\n }\n }\n";
8
8
  function _(e, t) {
9
9
  let n = {
10
10
  latitude: Number(e.location?.latitude ?? 0),
@@ -52,7 +52,7 @@ function y(e = {}) {
52
52
  offset: 0
53
53
  } })).shipments.map((e) => ({
54
54
  id: e.id,
55
- entityId: e.orderId,
55
+ entityId: e.deliveryJobId ?? e.id,
56
56
  entityType: "order",
57
57
  currentLocation: {
58
58
  latitude: 0,
@@ -93,7 +93,7 @@ function b(e) {
93
93
  }
94
94
  u(!0), p(null);
95
95
  try {
96
- let n = await t(r, m, { orderId: e }), i = n.orderTracking[n.orderTracking.length - 1];
96
+ let n = await t(r, m, { deliveryJobId: e }), i = n.deliveryJobTracking[n.deliveryJobTracking.length - 1];
97
97
  o(i ? _(i, e) : null);
98
98
  } catch (e) {
99
99
  p(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load order tracking"));
@@ -155,12 +155,12 @@ function C() {
155
155
  try {
156
156
  let r = await t(e, h);
157
157
  f((await Promise.all(r.activeDeliveries.map(async (r) => {
158
- let a = (await t(e, p, { id: r.id })).shipment?.trackingEvents ?? [], s = a[a.length - 1], c = n.find((e) => e.id === r.orderId);
158
+ let a = (await t(e, p, { id: r.id })).shipment?.trackingEvents ?? [], s = a[a.length - 1], c = n.find((e) => e.id === r.deliveryJobId);
159
159
  return c ? {
160
160
  order: c,
161
161
  driver: c.driverId ? o.find((e) => e.id === c.driverId || e.userId === c.driverId) ?? null : null,
162
162
  vehicle: c.vehicleId ? i.find((e) => e.id === c.vehicleId) ?? null : null,
163
- tracking: s ? _(s, r.orderId) : null,
163
+ tracking: s ? _(s, r.deliveryJobId ?? r.id) : null,
164
164
  estimatedArrival: r.estimatedDelivery ? new Date(r.estimatedDelivery) : void 0
165
165
  } : null;
166
166
  }))).filter((e) => e !== null));
package/dist/index.js CHANGED
@@ -3,38 +3,38 @@ import { MoveTheWheelsRoot as n } from "./MoveTheWheelsRoot.js";
3
3
  import { useMoveTheWheelsStore as r } from "./store/movethewheelsStore.js";
4
4
  import { useSandboxAssistantTransport as i } from "./services/createSandboxAssistantTransport.js";
5
5
  import { useOrder as a, useOrderStats as o, useOrders as s } from "./hooks/useOrders.js";
6
- import { useDriver as c, useDrivers as l, useFleet as u, useFleetStats as d, useVehicle as f, useVehicles as p } from "./hooks/useFleet.js";
7
- import { useInventory as m, useInventoryStats as h, useProduct as g, useProducts as _, useWarehouse as v, useWarehouses as y } from "./hooks/useInventory.js";
8
- import { useCustomer as b, useCustomerStats as x, useCustomers as S } from "./hooks/useCustomers.js";
9
- import { useRoute as C, useRouteStats as w, useRoutes as T } from "./hooks/useRoutes.js";
10
- import { useAnalytics as E, useDashboardMetrics as D, useEmissionsSummary as O, useFinanceMetrics as k, useFleetAnalytics as A, useOrderAnalytics as j, usePerformanceAnalytics as M, useRevenueAnalytics as N } from "./hooks/useAnalytics.js";
11
- import { useDriverTracking as P, useGeofence as F, useLiveTracking as I, useOrderTracking as L, useTracking as R, useTrackingAlerts as z, useVehicleTracking as B } from "./hooks/useTracking.js";
12
- import { useReports as V } from "./hooks/useReports.js";
13
- import { useImportExport as H } from "./hooks/useImportExport.js";
14
- import { useModuleSettings as U } from "./hooks/useSettings.js";
15
- import { useEntityDocuments as W } from "./hooks/useEntityDocuments.js";
16
- import { useCaptureEpod as G, useEpod as K, useEpodPhotoUpload as q, useEpodPhotoUrl as J, useMyPendingEpodDeliveryJobs as Y } from "./hooks/useEpod.js";
6
+ import { useDriver as c, useDriverStatusCounts as l, useDrivers as u, useFleet as d, useFleetStats as f, useVehicle as p, useVehicleDrivers as m, useVehicles as h } from "./hooks/useFleet.js";
7
+ import { useInventory as g, useInventoryStats as _, useInventoryTransactions as v, useProduct as y, useProductStockLevels as b, useProducts as x, useWarehouse as S, useWarehouses as C } from "./hooks/useInventory.js";
8
+ import { useCustomer as w, useCustomerStats as T, useCustomers as E } from "./hooks/useCustomers.js";
9
+ import { useRoute as D, useRouteStats as O, useRoutes as k } from "./hooks/useRoutes.js";
10
+ import { useAnalytics as A, useDashboardMetrics as j, useEmissionsSummary as M, useFinanceMetrics as N, useFleetAnalytics as P, useOrderAnalytics as F, usePerformanceAnalytics as I, useRevenueAnalytics as L } from "./hooks/useAnalytics.js";
11
+ import { useDriverTracking as R, useGeofence as z, useLiveTracking as B, useOrderTracking as V, useTracking as H, useTrackingAlerts as U, useVehicleTracking as W } from "./hooks/useTracking.js";
12
+ import { useReports as G } from "./hooks/useReports.js";
13
+ import { useImportExport as K } from "./hooks/useImportExport.js";
14
+ import { useModuleSettings as q } from "./hooks/useSettings.js";
15
+ import { useEntityDocuments as J } from "./hooks/useEntityDocuments.js";
16
+ import { useCaptureEpod as Y, useEpod as X, useEpodPhotoUpload as Z, useEpodPhotoUrl as Q, useMyPendingEpodDeliveryJobs as $ } from "./hooks/useEpod.js";
17
17
  import "./hooks/index.js";
18
- import { Avatar as X, AvatarFallback as Z, AvatarImage as Q, Badge as $, Button as ee, Card as te, CardContent as ne, CardDescription as re, CardFooter as ie, CardHeader as ae, CardTitle as oe, Checkbox as se, Dialog as ce, DialogContent as le, DialogDescription as ue, DialogFooter as de, DialogHeader as fe, DialogTitle as pe, DialogTrigger as me, DropdownMenu as he, DropdownMenuContent as ge, DropdownMenuItem as _e, DropdownMenuSeparator as ve, DropdownMenuTrigger as ye, Input as be, Label as xe, Progress as Se, ScrollArea as Ce, Select as we, SelectContent as Te, SelectItem as Ee, SelectTrigger as De, SelectValue as Oe, Separator as ke, Skeleton as Ae, Switch as je, Table as Me, TableBody as Ne, TableCell as Pe, TableHead as Fe, TableHeader as Ie, TableRow as Le, Tabs as Re, TabsContent as ze, TabsList as Be, TabsTrigger as Ve, Textarea as He, Tooltip as Ue, TooltipContent as We, TooltipProvider as Ge, TooltipTrigger as Ke } from "./components/ui.js";
19
- import { EmptyState as qe, ErrorState as Je, LoadingState as Ye, PageLayout as Xe, PageSection as Ze } from "./components/PageLayout.js";
20
- import { chartTokens as Qe, seriesColor as $e } from "./components/charts/chartTokens.js";
21
- import { Sparkline as et } from "./components/charts/Sparkline.js";
22
- import { MetricCard as tt, MetricCardSkeleton as nt, MetricGrid as rt } from "./components/MetricCard.js";
23
- import { GlassPanel as it } from "./components/GlassPanel.js";
24
- import { ChartEmpty as at, ChartTooltip as ot } from "./components/charts/ChartShell.js";
25
- import { TrendChart as st } from "./components/charts/TrendChart.js";
26
- import { VolumeBar as ct } from "./components/charts/VolumeBar.js";
27
- import { StatusDonut as lt } from "./components/charts/StatusDonut.js";
28
- import { createCurrentIcon as ut, createPinIcon as dt, createStopIcon as ft, isRealCoord as pt } from "./components/maps/leaflet-setup.js";
29
- import { MapCanvas as mt } from "./components/maps/MapCanvas.js";
30
- import { LogisticsMap as ht } from "./components/maps/LogisticsMap.js";
31
- import { RouteMap as gt } from "./components/maps/RouteMap.js";
32
- import { TrackingMap as _t } from "./components/maps/TrackingMap.js";
33
- import { PaymentStatusBadge as vt, PriorityBadge as yt, StatusBadge as bt, TypeBadge as xt, VehicleTypeBadge as St } from "./components/StatusBadge.js";
34
- import { DataTable as Ct } from "./components/DataTable.js";
35
- import { FormError as wt } from "./components/FormError.js";
36
- import { Notice as Tt, useNotice as Et } from "./components/Notice.js";
37
- import { DocumentsCard as Dt } from "./components/DocumentsCard.js";
38
- import { CarbonFootprintPanel as Ot } from "./components/CarbonFootprintPanel.js";
18
+ import { Avatar as ee, AvatarFallback as te, AvatarImage as ne, Badge as re, Button as ie, Card as ae, CardContent as oe, CardDescription as se, CardFooter as ce, CardHeader as le, CardTitle as ue, Checkbox as de, Dialog as fe, DialogContent as pe, DialogDescription as me, DialogFooter as he, DialogHeader as ge, DialogTitle as _e, DialogTrigger as ve, DropdownMenu as ye, DropdownMenuContent as be, DropdownMenuItem as xe, DropdownMenuSeparator as Se, DropdownMenuTrigger as Ce, Input as we, Label as Te, Progress as Ee, ScrollArea as De, Select as Oe, SelectContent as ke, SelectItem as Ae, SelectTrigger as je, SelectValue as Me, Separator as Ne, Skeleton as Pe, Switch as Fe, Table as Ie, TableBody as Le, TableCell as Re, TableHead as ze, TableHeader as Be, TableRow as Ve, Tabs as He, TabsContent as Ue, TabsList as We, TabsTrigger as Ge, Textarea as Ke, Tooltip as qe, TooltipContent as Je, TooltipProvider as Ye, TooltipTrigger as Xe } from "./components/ui.js";
19
+ import { EmptyState as Ze, ErrorState as Qe, LoadingState as $e, PageLayout as et, PageSection as tt } from "./components/PageLayout.js";
20
+ import { chartTokens as nt, seriesColor as rt } from "./components/charts/chartTokens.js";
21
+ import { Sparkline as it } from "./components/charts/Sparkline.js";
22
+ import { MetricCard as at, MetricCardSkeleton as ot, MetricGrid as st } from "./components/MetricCard.js";
23
+ import { GlassPanel as ct } from "./components/GlassPanel.js";
24
+ import { ChartEmpty as lt, ChartTooltip as ut } from "./components/charts/ChartShell.js";
25
+ import { TrendChart as dt } from "./components/charts/TrendChart.js";
26
+ import { VolumeBar as ft } from "./components/charts/VolumeBar.js";
27
+ import { StatusDonut as pt } from "./components/charts/StatusDonut.js";
28
+ import { createCurrentIcon as mt, createPinIcon as ht, createStopIcon as gt, isRealCoord as _t } from "./components/maps/leaflet-setup.js";
29
+ import { MapCanvas as vt } from "./components/maps/MapCanvas.js";
30
+ import { LogisticsMap as yt } from "./components/maps/LogisticsMap.js";
31
+ import { RouteMap as bt } from "./components/maps/RouteMap.js";
32
+ import { TrackingMap as xt } from "./components/maps/TrackingMap.js";
33
+ import { PaymentStatusBadge as St, PriorityBadge as Ct, StatusBadge as wt, TypeBadge as Tt, VehicleTypeBadge as Et } from "./components/StatusBadge.js";
34
+ import { DataTable as Dt } from "./components/DataTable.js";
35
+ import { FormError as Ot } from "./components/FormError.js";
36
+ import { Notice as kt, useNotice as At } from "./components/Notice.js";
37
+ import { DocumentsCard as jt } from "./components/DocumentsCard.js";
38
+ import { CarbonFootprintPanel as Mt } from "./components/CarbonFootprintPanel.js";
39
39
  import "./components/index.js";
40
- export { X as Avatar, Z as AvatarFallback, Q as AvatarImage, $ as Badge, ee as Button, Ot as CarbonFootprintPanel, te as Card, ne as CardContent, re as CardDescription, ie as CardFooter, ae as CardHeader, oe as CardTitle, at as ChartEmpty, ot as ChartTooltip, se as Checkbox, Ct as DataTable, ce as Dialog, le as DialogContent, ue as DialogDescription, de as DialogFooter, fe as DialogHeader, pe as DialogTitle, me as DialogTrigger, Dt as DocumentsCard, he as DropdownMenu, ge as DropdownMenuContent, _e as DropdownMenuItem, ve as DropdownMenuSeparator, ye as DropdownMenuTrigger, qe as EmptyState, Je as ErrorState, wt as FormError, it as GlassPanel, be as Input, xe as Label, Ye as LoadingState, ht as LogisticsMap, mt as MapCanvas, tt as MetricCard, nt as MetricCardSkeleton, rt as MetricGrid, n as MoveTheWheelsRoot, Tt as Notice, Xe as PageLayout, Ze as PageSection, vt as PaymentStatusBadge, yt as PriorityBadge, Se as Progress, gt as RouteMap, Ce as ScrollArea, we as Select, Te as SelectContent, Ee as SelectItem, De as SelectTrigger, Oe as SelectValue, ke as Separator, Ae as Skeleton, et as Sparkline, bt as StatusBadge, lt as StatusDonut, je as Switch, Me as Table, Ne as TableBody, Pe as TableCell, Fe as TableHead, Ie as TableHeader, Le as TableRow, Re as Tabs, ze as TabsContent, Be as TabsList, Ve as TabsTrigger, He as Textarea, Ue as Tooltip, We as TooltipContent, Ge as TooltipProvider, Ke as TooltipTrigger, _t as TrackingMap, st as TrendChart, xt as TypeBadge, St as VehicleTypeBadge, ct as VolumeBar, Qe as chartTokens, ut as createCurrentIcon, dt as createPinIcon, ft as createStopIcon, pt as isRealCoord, $e as seriesColor, E as useAnalytics, G as useCaptureEpod, b as useCustomer, x as useCustomerStats, S as useCustomers, D as useDashboardMetrics, c as useDriver, P as useDriverTracking, l as useDrivers, O as useEmissionsSummary, W as useEntityDocuments, K as useEpod, q as useEpodPhotoUpload, J as useEpodPhotoUrl, k as useFinanceMetrics, u as useFleet, A as useFleetAnalytics, d as useFleetStats, F as useGeofence, H as useImportExport, m as useInventory, h as useInventoryStats, I as useLiveTracking, U as useModuleSettings, e as useMoveTheWheels, t as useMoveTheWheelsNavigate, r as useMoveTheWheelsStore, Y as useMyPendingEpodDeliveryJobs, Et as useNotice, a as useOrder, j as useOrderAnalytics, o as useOrderStats, L as useOrderTracking, s as useOrders, M as usePerformanceAnalytics, g as useProduct, _ as useProducts, V as useReports, N as useRevenueAnalytics, C as useRoute, w as useRouteStats, T as useRoutes, i as useSandboxAssistantTransport, R as useTracking, z as useTrackingAlerts, f as useVehicle, B as useVehicleTracking, p as useVehicles, v as useWarehouse, y as useWarehouses };
40
+ export { ee as Avatar, te as AvatarFallback, ne as AvatarImage, re as Badge, ie as Button, Mt as CarbonFootprintPanel, ae as Card, oe as CardContent, se as CardDescription, ce as CardFooter, le as CardHeader, ue as CardTitle, lt as ChartEmpty, ut as ChartTooltip, de as Checkbox, Dt as DataTable, fe as Dialog, pe as DialogContent, me as DialogDescription, he as DialogFooter, ge as DialogHeader, _e as DialogTitle, ve as DialogTrigger, jt as DocumentsCard, ye as DropdownMenu, be as DropdownMenuContent, xe as DropdownMenuItem, Se as DropdownMenuSeparator, Ce as DropdownMenuTrigger, Ze as EmptyState, Qe as ErrorState, Ot as FormError, ct as GlassPanel, we as Input, Te as Label, $e as LoadingState, yt as LogisticsMap, vt as MapCanvas, at as MetricCard, ot as MetricCardSkeleton, st as MetricGrid, n as MoveTheWheelsRoot, kt as Notice, et as PageLayout, tt as PageSection, St as PaymentStatusBadge, Ct as PriorityBadge, Ee as Progress, bt as RouteMap, De as ScrollArea, Oe as Select, ke as SelectContent, Ae as SelectItem, je as SelectTrigger, Me as SelectValue, Ne as Separator, Pe as Skeleton, it as Sparkline, wt as StatusBadge, pt as StatusDonut, Fe as Switch, Ie as Table, Le as TableBody, Re as TableCell, ze as TableHead, Be as TableHeader, Ve as TableRow, He as Tabs, Ue as TabsContent, We as TabsList, Ge as TabsTrigger, Ke as Textarea, qe as Tooltip, Je as TooltipContent, Ye as TooltipProvider, Xe as TooltipTrigger, xt as TrackingMap, dt as TrendChart, Tt as TypeBadge, Et as VehicleTypeBadge, ft as VolumeBar, nt as chartTokens, mt as createCurrentIcon, ht as createPinIcon, gt as createStopIcon, _t as isRealCoord, rt as seriesColor, A as useAnalytics, Y as useCaptureEpod, w as useCustomer, T as useCustomerStats, E as useCustomers, j as useDashboardMetrics, c as useDriver, l as useDriverStatusCounts, R as useDriverTracking, u as useDrivers, M as useEmissionsSummary, J as useEntityDocuments, X as useEpod, Z as useEpodPhotoUpload, Q as useEpodPhotoUrl, N as useFinanceMetrics, d as useFleet, P as useFleetAnalytics, f as useFleetStats, z as useGeofence, K as useImportExport, g as useInventory, _ as useInventoryStats, v as useInventoryTransactions, B as useLiveTracking, q as useModuleSettings, e as useMoveTheWheels, t as useMoveTheWheelsNavigate, r as useMoveTheWheelsStore, $ as useMyPendingEpodDeliveryJobs, At as useNotice, a as useOrder, F as useOrderAnalytics, o as useOrderStats, V as useOrderTracking, s as useOrders, I as usePerformanceAnalytics, y as useProduct, b as useProductStockLevels, x as useProducts, G as useReports, L as useRevenueAnalytics, D as useRoute, O as useRouteStats, k as useRoutes, i as useSandboxAssistantTransport, H as useTracking, U as useTrackingAlerts, p as useVehicle, m as useVehicleDrivers, W as useVehicleTracking, h as useVehicles, S as useWarehouse, C as useWarehouses };
@@ -4,8 +4,8 @@
4
4
  * All custom hooks for data access and operations.
5
5
  */
6
6
  export { useOrders, useOrder, useOrderStats } from './useOrders';
7
- export { useFleet, useVehicles, useVehicle, useDrivers, useDriver, useFleetStats, } from './useFleet';
8
- export { useInventory, useProducts, useProduct, useWarehouses, useWarehouse, useInventoryStats, } from './useInventory';
7
+ export { useFleet, useVehicles, useVehicle, useVehicleDrivers, useDrivers, useDriver, useDriverStatusCounts, useFleetStats, type DriverStatusCounts, } from './useFleet';
8
+ export { useInventory, useProducts, useProduct, useProductStockLevels, useWarehouses, useWarehouse, useInventoryStats, useInventoryTransactions, type InventoryStats, type InventoryTransaction, type InventoryTransactionType, type ProductStockLevel, } from './useInventory';
9
9
  export { useCustomers, useCustomer, useCustomerStats } from './useCustomers';
10
10
  export { useRoutes, useRoute, useRouteStats } from './useRoutes';
11
11
  export { useAnalytics, useDashboardMetrics, useRevenueAnalytics, useOrderAnalytics, useFleetAnalytics, usePerformanceAnalytics, useFinanceMetrics, type FinanceMetrics, useEmissionsSummary, type EmissionsSummary, } from './useAnalytics';
@@ -66,13 +66,44 @@ interface UseDriversResult {
66
66
  updateDriverStatus: (id: string, status: DriverStatus) => Promise<Driver>;
67
67
  assignVehicle: (driverId: string, vehicleId: string) => Promise<Driver>;
68
68
  }
69
- export declare function useDrivers(options?: UseListOptions): UseDriversResult;
69
+ interface UseDriversOptions extends UseListOptions {
70
+ /**
71
+ * Narrows the roster server-side via `DriverFilterInput.status` so the pager
72
+ * still counts whole result sets rather than filtering one fetched page.
73
+ */
74
+ status?: DriverStatus;
75
+ }
76
+ export declare function useDrivers(options?: UseDriversOptions): UseDriversResult;
70
77
  export declare function useDriver(driverId: string | undefined): {
71
78
  driver: Driver | null;
72
79
  isLoading: boolean;
73
80
  error: Error | null;
74
81
  refetch: () => void;
75
82
  };
83
+ export interface DriverStatusCounts {
84
+ onBreak: number;
85
+ offDuty: number;
86
+ inactive: number;
87
+ }
88
+ /** Exact per-status driver counts for the roster tiles (see DRIVER_STATUS_COUNTS_QUERY). */
89
+ export declare function useDriverStatusCounts(): {
90
+ counts: DriverStatusCounts;
91
+ isLoading: boolean;
92
+ error: Error | null;
93
+ refetch: () => void;
94
+ };
95
+ /**
96
+ * The driver(s) currently assigned to a vehicle, resolved server-side through
97
+ * `DriverFilterInput.vehicleId` (the same link `assignDriverVehicle` writes).
98
+ * A vehicle normally has one driver, but the filter returns a list, so the
99
+ * caller gets every assignment rather than a silently-picked first row.
100
+ */
101
+ export declare function useVehicleDrivers(vehicleId: string | undefined): {
102
+ drivers: Driver[];
103
+ isLoading: boolean;
104
+ error: Error | null;
105
+ refetch: () => void;
106
+ };
76
107
  export declare function useFleetStats(): {
77
108
  stats: {
78
109
  totalVehicles: number;
@@ -9,5 +9,15 @@ interface UseImportExportResult {
9
9
  isBusy: boolean;
10
10
  error: Error | null;
11
11
  }
12
+ /**
13
+ * Import/export surface withdrawn from wspace-movethewheels-svc by migration
14
+ * 20260707000001_movethewheels_reuse_cleanup. The service now exposes
15
+ * `exportMtwEntities` (async job, returns MtwExportJob) but no import
16
+ * counterpart, so the old synchronous exportData/importData mutations are no
17
+ * longer resolvable. This hook keeps the same contract for consumers but
18
+ * rejects calls with a clear message until a replacement import/export flow is
19
+ * designed. The original operations are preserved in
20
+ * src/operations/wspace/movethewheels/mutations/marketplace-reports.withdrawn.graphql.
21
+ */
12
22
  export declare function useImportExport(): UseImportExportResult;
13
23
  export {};
@@ -102,20 +102,75 @@ export declare function useWarehouse(warehouseId: string | undefined): {
102
102
  error: Error | null;
103
103
  refetch: () => undefined;
104
104
  };
105
+ export interface InventoryStats {
106
+ /** Units physically in the warehouses. */
107
+ totalOnHand: number;
108
+ /** Units free to promise on a new order. */
109
+ totalAvailable: number;
110
+ /** Units already committed to open orders. */
111
+ totalAllocated: number;
112
+ /** Units written off as damaged. */
113
+ totalDamaged: number;
114
+ /** Stock lines at or under their reorder point. */
115
+ lowStockCount: number;
116
+ /** Catalog size (`cargoItemsCount`), workspace-wide — not a page length. */
117
+ totalProducts: number;
118
+ /** Warehouse count (`warehousesCount`), workspace-wide. */
119
+ totalWarehouses: number;
120
+ }
121
+ /**
122
+ * Workspace-wide inventory aggregates, every figure served by the module:
123
+ * `inventoryStats` for the stock position, `cargoItemsCount`/`warehousesCount`
124
+ * for catalog and network size. There is no aggregate stock-value field on the
125
+ * subgraph, so no monetary total is reported here.
126
+ */
105
127
  export declare function useInventoryStats(): {
106
- stats: {
107
- totalItems: number;
108
- lowStockItems: number;
109
- totalValue: number;
110
- totalProducts: number;
111
- totalWarehouses: number;
112
- warehouseUtilization: Array<{
113
- id: string;
114
- name: string;
115
- utilization: number;
116
- }>;
117
- };
128
+ stats: InventoryStats;
118
129
  isLoading: boolean;
119
130
  error: Error | null;
120
131
  };
132
+ export interface ProductStockLevel {
133
+ inventoryItemId: string;
134
+ warehouseId: string;
135
+ warehouseName: string;
136
+ warehouseCode: string;
137
+ onHand: number;
138
+ available: number;
139
+ allocated: number;
140
+ damaged: number;
141
+ reorderPoint?: number;
142
+ }
143
+ /** Where a catalog item is stocked, and how much of it is free to promise. */
144
+ export declare function useProductStockLevels(productId: string | undefined): {
145
+ levels: ProductStockLevel[];
146
+ isLoading: boolean;
147
+ error: Error | null;
148
+ refetch: () => void;
149
+ };
150
+ export type InventoryTransactionType = 'RECEIPT' | 'ISSUE' | 'TRANSFER' | 'ADJUSTMENT' | 'RETURN';
151
+ export interface InventoryTransaction {
152
+ id: string;
153
+ transactionNumber: string;
154
+ type: InventoryTransactionType;
155
+ /** Signed by `type`: receipts/returns add stock, issues remove it. */
156
+ quantity: number;
157
+ productId: string;
158
+ warehouseId: string;
159
+ notes?: string;
160
+ referenceType?: string;
161
+ referenceId?: string;
162
+ createdAt: Date;
163
+ }
164
+ interface UseInventoryTransactionsOptions {
165
+ limit?: number;
166
+ productId?: string;
167
+ warehouseId?: string;
168
+ }
169
+ /** Recent stock movements from `Query.inventoryTransactions` (newest first). */
170
+ export declare function useInventoryTransactions(options?: UseInventoryTransactionsOptions): {
171
+ transactions: InventoryTransaction[];
172
+ isLoading: boolean;
173
+ error: Error | null;
174
+ refetch: () => void;
175
+ };
121
176
  export {};
@@ -5,6 +5,16 @@ interface UseOrdersOptions {
5
5
  limit?: number;
6
6
  offset?: number;
7
7
  }
8
+ /**
9
+ * Write shape for create/update. Identical to `Partial<Order>` except that
10
+ * `scheduledDelivery` also accepts `null`: `UpdateDeliveryJobInput.scheduledDelivery`
11
+ * is nullable on the service, so an explicit `null` clears a previously booked
12
+ * slot, while `undefined` leaves it untouched. Without the distinction, clearing
13
+ * the field in the form would silently keep the old date.
14
+ */
15
+ export type OrderWriteInput = Omit<Partial<Order>, 'scheduledDelivery'> & {
16
+ scheduledDelivery?: Date | null;
17
+ };
8
18
  interface UseOrdersResult {
9
19
  orders: Order[];
10
20
  totalOrders: number;
@@ -17,11 +27,24 @@ interface UseOrdersResult {
17
27
  isLoading: boolean;
18
28
  error: Error | null;
19
29
  refetch: () => void;
20
- createOrder: (order: Partial<Order>) => Promise<Order>;
21
- updateOrder: (id: string, updates: Partial<Order>) => Promise<Order>;
30
+ createOrder: (order: OrderWriteInput) => Promise<Order>;
31
+ updateOrder: (id: string, updates: OrderWriteInput) => Promise<Order>;
22
32
  deleteOrder: (id: string) => Promise<void>;
23
33
  updateOrderStatus: (id: string, status: OrderStatus) => Promise<Order>;
24
34
  }
35
+ /**
36
+ * Normalises a service `DeliveryJobStatus` into the MFE's OrderStatus union.
37
+ * Exported so any surface rendering a raw job status badge normalises it the
38
+ * same way — the service casing is upper snake case and would miss the badge
39
+ * colour map otherwise.
40
+ */
41
+ export declare function mapOrderStatus(status: string): OrderStatus;
42
+ /**
43
+ * Normalises a service `DeliveryPriority` (LOW/MEDIUM/HIGH/URGENT/CRITICAL)
44
+ * into the four-level union PriorityBadge understands. MEDIUM and CRITICAL have
45
+ * no direct badge entry, so rendering the raw value would break the colour map.
46
+ */
47
+ export declare function mapOrderPriority(priority: string): 'low' | 'normal' | 'high' | 'urgent';
25
48
  export declare function useOrders(options?: UseOrdersOptions): UseOrdersResult;
26
49
  export declare function useOrder(orderId: string | undefined): {
27
50
  order: Order | null;
@@ -1,9 +1,12 @@
1
1
  /**
2
2
  * Marketplace Page
3
3
  *
4
- * Browse third-party logistics service providers and their offerings. Providers
5
- * are paginated server-side (offset); clicking a provider expands its offerings
6
- * inline. The Filters control narrows the current page by type, verification and
7
- * minimum rating.
4
+ * The collaborative logistics marketplace (service providers / service offerings)
5
+ * was withdrawn from wspace-movethewheels-svc by migration
6
+ * 20260707000001_movethewheels_reuse_cleanup. The original query and mutation
7
+ * documents are preserved verbatim in
8
+ * src/operations/wspace/movethewheels/{queries,mutations}/marketplace-reports.withdrawn.graphql
9
+ * so they can be restored if the surface returns. Until then the page renders a
10
+ * static "coming soon" state.
8
11
  */
9
12
  export default function MarketplacePage(): import("react").JSX.Element;
@@ -264,6 +264,8 @@ export interface Vehicle {
264
264
  make: string;
265
265
  model: string;
266
266
  licensePlate: string;
267
+ /** MtwVehicle.ownershipType — free-text, e.g. "owned", "leased". */
268
+ ownershipType?: string;
267
269
  year: number;
268
270
  capacity: {
269
271
  weight: number;
@@ -0,0 +1,11 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/arrow-down-right.js
3
+ var t = e("ArrowDownRight", [["path", {
4
+ d: "m7 7 10 10",
5
+ key: "1fmybs"
6
+ }], ["path", {
7
+ d: "M17 7v10H7",
8
+ key: "6fjiku"
9
+ }]]);
10
+ //#endregion
11
+ export { t as ArrowDownRight };
@@ -0,0 +1,22 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/arrow-left-right.js
3
+ var t = e("ArrowLeftRight", [
4
+ ["path", {
5
+ d: "M8 3 4 7l4 4",
6
+ key: "9rb6wj"
7
+ }],
8
+ ["path", {
9
+ d: "M4 7h16",
10
+ key: "6tx8e3"
11
+ }],
12
+ ["path", {
13
+ d: "m16 21 4-4-4-4",
14
+ key: "siv7j2"
15
+ }],
16
+ ["path", {
17
+ d: "M20 17H4",
18
+ key: "h6l3hr"
19
+ }]
20
+ ]);
21
+ //#endregion
22
+ export { t as ArrowLeftRight };
@@ -0,0 +1,11 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/arrow-up-right.js
3
+ var t = e("ArrowUpRight", [["path", {
4
+ d: "M7 7h10v10",
5
+ key: "1tivn9"
6
+ }], ["path", {
7
+ d: "M7 17 17 7",
8
+ key: "1vkiza"
9
+ }]]);
10
+ //#endregion
11
+ export { t as ArrowUpRight };
@@ -0,0 +1,32 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/calendar-clock.js
3
+ var t = e("CalendarClock", [
4
+ ["path", {
5
+ d: "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",
6
+ key: "1osxxc"
7
+ }],
8
+ ["path", {
9
+ d: "M16 2v4",
10
+ key: "4m81vk"
11
+ }],
12
+ ["path", {
13
+ d: "M8 2v4",
14
+ key: "1cmpym"
15
+ }],
16
+ ["path", {
17
+ d: "M3 10h5",
18
+ key: "r794hk"
19
+ }],
20
+ ["path", {
21
+ d: "M17.5 17.5 16 16.3V14",
22
+ key: "akvzfd"
23
+ }],
24
+ ["circle", {
25
+ cx: "16",
26
+ cy: "16",
27
+ r: "6",
28
+ key: "qoo3c4"
29
+ }]
30
+ ]);
31
+ //#endregion
32
+ export { t as CalendarClock };
@@ -0,0 +1,18 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/history.js
3
+ var t = e("History", [
4
+ ["path", {
5
+ d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
6
+ key: "1357e3"
7
+ }],
8
+ ["path", {
9
+ d: "M3 3v5h5",
10
+ key: "1xhq8a"
11
+ }],
12
+ ["path", {
13
+ d: "M12 7v5l4 2",
14
+ key: "1fdv2h"
15
+ }]
16
+ ]);
17
+ //#endregion
18
+ export { t as History };
@@ -0,0 +1,16 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/lock.js
3
+ var t = e("Lock", [["rect", {
4
+ width: "18",
5
+ height: "11",
6
+ x: "3",
7
+ y: "11",
8
+ rx: "2",
9
+ ry: "2",
10
+ key: "1w4ew1"
11
+ }], ["path", {
12
+ d: "M7 11V7a5 5 0 0 1 10 0v4",
13
+ key: "fwvmzm"
14
+ }]]);
15
+ //#endregion
16
+ export { t as Lock };
@@ -0,0 +1,13 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/user-round.js
3
+ var t = e("UserRound", [["circle", {
4
+ cx: "12",
5
+ cy: "8",
6
+ r: "5",
7
+ key: "1hypcn"
8
+ }], ["path", {
9
+ d: "M20 21a8 8 0 0 0-16 0",
10
+ key: "rfgkzh"
11
+ }]]);
12
+ //#endregion
13
+ export { t as UserRound };