@burdenoff/microfe-movethewheels 2026.703.2 → 2026.703.4

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 (126) hide show
  1. package/dist/{AIAssistantPage-C3cPsWt-.js → AIAssistantPage-3YOnHO9Y.js} +3 -3
  2. package/dist/{AnalyticsPage-Dz6g2MvK.js → AnalyticsPage-CMpI1070.js} +11 -11
  3. package/dist/CreateOrderPage-DRAgGo9i.js +490 -0
  4. package/dist/CustomerDetailsPage-BCeMmOFe.js +615 -0
  5. package/dist/{CustomersPage-2Y05LVyh.js → CustomersPage-CaNBMXmM.js} +64 -53
  6. package/dist/{DashboardPage-BVjQi0EB.js → DashboardPage-DIKlXde3.js} +16 -16
  7. package/dist/DataTable-XvUcTjwi.js +340 -0
  8. package/dist/DocumentsCard-U2lSe-cn.js +169 -0
  9. package/dist/{DriverDetailsPage-CN3WQ0B9.js → DriverDetailsPage-BQrYd_Lp.js} +178 -195
  10. package/dist/{DriversPage-B0Zpx8OQ.js → DriversPage-PYmdFiby.js} +65 -54
  11. package/dist/FinancePage-Cwh9Bw4M.js +136 -0
  12. package/dist/{FleetPage-DqkFi3s3.js → FleetPage-3ZHsB-TN.js} +23 -22
  13. package/dist/{FormError-BlOjnXOq.js → FormError-cuLV2jVD.js} +1 -1
  14. package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-C6f7DqhM.js} +50 -70
  15. package/dist/{InventoryPage-DwfgCUQq.js → InventoryPage-DpiqVu1v.js} +9 -9
  16. package/dist/{LiveTrackingPage-DCX-K-LR.js → LiveTrackingPage-FAzzlVnX.js} +9 -9
  17. package/dist/MarketplacePage-Bh_2ns4v.js +426 -0
  18. package/dist/Notice-CSoDYKw9.js +46 -0
  19. package/dist/OrderDetailsPage-zCj0lW0j.js +584 -0
  20. package/dist/{OrdersListPage-BjDlCKJd.js → OrdersListPage-CAMsuUck.js} +166 -89
  21. package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-wsxAQkA0.js} +12 -12
  22. package/dist/{ProductsPage-C1G9h7Xd.js → ProductsPage-DC5qDLfz.js} +60 -49
  23. package/dist/ReportsPage-BwUJ37eO.js +356 -0
  24. package/dist/RouteDetailsPage-DyMJE9AS.js +583 -0
  25. package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-Dtc669yc.js} +57 -46
  26. package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-CpH9xhQg.js} +5 -27
  27. package/dist/{TrackingPage-W-jtdM3Y.js → TrackingPage-DaNEFG_h.js} +10 -10
  28. package/dist/{VehicleDetailsPage-Bceo5oz3.js → VehicleDetailsPage-DldYNsYV.js} +125 -142
  29. package/dist/{VehiclesPage-VBtOep91.js → VehiclesPage-BFw13iMt.js} +61 -50
  30. package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-CMG7or6G.js} +17 -17
  31. package/dist/{WarehousesPage-DCbXXXWE.js → WarehousesPage-Wkytnt86.js} +58 -47
  32. package/dist/arrow-right-Q3XQpTPR.js +11 -0
  33. package/dist/arrow-up-xNF1zJUG.js +17 -0
  34. package/dist/chevron-left-B2_r0Elx.js +8 -0
  35. package/dist/{wrench-CANXWxF-.js → fuel-B6_lnKDs.js} +2 -5
  36. package/dist/index.js +163 -174
  37. package/dist/upload-CHZofOqb.js +21 -0
  38. package/dist/{useAnalytics-DS8n0xgg.js → useAnalytics-D7HW2XRb.js} +52 -2
  39. package/dist/{useCustomers-BmTNGxiI.js → useCustomers-BPW4__PR.js} +29 -26
  40. package/dist/{useFleet-DKqXZ16m.js → useFleet-ChBkxAd6.js} +81 -69
  41. package/dist/{useInventory-DkyiVY_A.js → useInventory-CAAVMRp6.js} +83 -38
  42. package/dist/{useOrders-Cfk1GLiq.js → useOrders-B465S2nt.js} +58 -47
  43. package/dist/{useReports-CTqZr-AB.js → useReports-jQ3GpNOm.js} +40 -34
  44. package/dist/{useRoutes-BQWO607N.js → useRoutes-hS3d5-xr.js} +49 -41
  45. package/dist/{useTracking-B-va1kO3.js → useTracking-RjGz9PZG.js} +2 -2
  46. package/dist/user-check-BEKRCi7v.js +20 -0
  47. package/dist/wrench-q_rgJfaP.js +8 -0
  48. package/dist/x-tMeDMcCw.js +11 -0
  49. package/package.json +1 -1
  50. package/src/movethewheels/components/DataTable.tsx +252 -84
  51. package/src/movethewheels/components/DocumentsCard.tsx +102 -0
  52. package/src/movethewheels/components/Notice.tsx +61 -0
  53. package/src/movethewheels/components/index.ts +7 -0
  54. package/src/movethewheels/hooks/index.ts +9 -0
  55. package/src/movethewheels/hooks/useAnalytics.ts +95 -0
  56. package/src/movethewheels/hooks/useCustomers.ts +11 -4
  57. package/src/movethewheels/hooks/useEntityDocuments.ts +132 -0
  58. package/src/movethewheels/hooks/useFleet.ts +26 -7
  59. package/src/movethewheels/hooks/useInventory.ts +70 -7
  60. package/src/movethewheels/hooks/useOrders.ts +32 -2
  61. package/src/movethewheels/hooks/useReports.ts +14 -4
  62. package/src/movethewheels/hooks/useRoutes.ts +20 -3
  63. package/src/movethewheels/pages/AnalyticsPage.tsx +2 -2
  64. package/src/movethewheels/pages/CreateOrderPage.tsx +44 -16
  65. package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
  66. package/src/movethewheels/pages/CustomersPage.tsx +27 -11
  67. package/src/movethewheels/pages/DriverDetailsPage.tsx +16 -30
  68. package/src/movethewheels/pages/DriversPage.tsx +26 -9
  69. package/src/movethewheels/pages/FinancePage.tsx +67 -84
  70. package/src/movethewheels/pages/InventoryPage.tsx +1 -1
  71. package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
  72. package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
  73. package/src/movethewheels/pages/OrdersListPage.tsx +77 -14
  74. package/src/movethewheels/pages/ProductsPage.tsx +27 -7
  75. package/src/movethewheels/pages/ReportsPage.tsx +65 -4
  76. package/src/movethewheels/pages/RouteDetailsPage.tsx +74 -13
  77. package/src/movethewheels/pages/RoutesPage.tsx +22 -6
  78. package/src/movethewheels/pages/SettingsPage.tsx +3 -19
  79. package/src/movethewheels/pages/VehicleDetailsPage.tsx +3 -33
  80. package/src/movethewheels/pages/VehiclesPage.tsx +26 -5
  81. package/src/movethewheels/pages/WarehousesPage.tsx +22 -17
  82. package/src/movethewheels/types/index.ts +8 -0
  83. package/src/movethewheels/utils/download.ts +62 -0
  84. package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
  85. package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
  86. package/dist/DataTable-DmciIKKM.js +0 -249
  87. package/dist/FinancePage-DEDykSOP.js +0 -158
  88. package/dist/MarketplacePage-CIQ97_zp.js +0 -247
  89. package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
  90. package/dist/ReportsPage-Zp53q3_8.js +0 -284
  91. package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
  92. /package/dist/{MetricCard-BY0QrMD4.js → MetricCard-CVBVpu7o.js} +0 -0
  93. /package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-C87mDpDP.js} +0 -0
  94. /package/dist/{box-D9Pal4HM.js → box-Eu05PXDh.js} +0 -0
  95. /package/dist/{chart-column-BFIJysDR.js → chart-column-ouzgxIv_.js} +0 -0
  96. /package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-eV4LjaSi.js} +0 -0
  97. /package/dist/{circle-alert-iY24lSlp.js → circle-alert-Bzh2DBSF.js} +0 -0
  98. /package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-CGMSpQmD.js} +0 -0
  99. /package/dist/{clock-DJZtdl8u.js → clock-Bl3ptexL.js} +0 -0
  100. /package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-CAVU95SO.js} +0 -0
  101. /package/dist/{download-DRXxoiQR.js → download-C5NbvVDc.js} +0 -0
  102. /package/dist/{file-text-DWWY6_f5.js → file-text-D-1uvLZG.js} +0 -0
  103. /package/dist/{filter-DloLC2eE.js → filter-DUfUg6BO.js} +0 -0
  104. /package/dist/{formatters-CF2S2l1m.js → formatters-BQr-aR5W.js} +0 -0
  105. /package/dist/{map-CkJaULb2.js → map-C-M-FQLR.js} +0 -0
  106. /package/dist/{map-pin-BGiCvyCs.js → map-pin-Dznl5l40.js} +0 -0
  107. /package/dist/{navigation-D36prnAn.js → navigation-BJSJl-VG.js} +0 -0
  108. /package/dist/{package-BChUzpJS.js → package-CcRttV2N.js} +0 -0
  109. /package/dist/{phone-Ac9s3mo_.js → phone-DVSZHt_j.js} +0 -0
  110. /package/dist/{plus-Z76q-FZm.js → plus-C_XZDwBz.js} +0 -0
  111. /package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-CfgN67l3.js} +0 -0
  112. /package/dist/{save-CojywNhG.js → save-DJE8Fpdv.js} +0 -0
  113. /package/dist/{search-CDGefqb3.js → search-D_VyGcZT.js} +0 -0
  114. /package/dist/{square-pen-CopE9GmB.js → square-pen-D-6JYrVQ.js} +0 -0
  115. /package/dist/{star-nHlLjDKR.js → star-BpRlUZuU.js} +0 -0
  116. /package/dist/{store-BR9Voi5E.js → store-B-8HMuyZ.js} +0 -0
  117. /package/dist/{trash-2-BKhar6Hs.js → trash-2-8vmv-XV_.js} +0 -0
  118. /package/dist/{trending-up-Dohgd4t_.js → trending-up-Dz6PqPRj.js} +0 -0
  119. /package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-D7Y3J_4z.js} +0 -0
  120. /package/dist/{truck-C0v_hbLR.js → truck-D-y2IDzv.js} +0 -0
  121. /package/dist/{useAssistant-D4v3oxD3.js → useAssistant-DVW4QgQb.js} +0 -0
  122. /package/dist/{useImportExport-DHr-SWSw.js → useImportExport-DrPDHEDK.js} +0 -0
  123. /package/dist/{useSettings-CkDH_-gM.js → useSettings-BB8X2RLh.js} +0 -0
  124. /package/dist/{user-jyFU3lXk.js → user-DzfTn4dE.js} +0 -0
  125. /package/dist/{users-DZ-ilS6B.js → users-CCrq-w0C.js} +0 -0
  126. /package/dist/{warehouse-6m5kXMLu.js → warehouse-CaqfmMKh.js} +0 -0
@@ -1,38 +1,69 @@
1
- import { F as e, I as t, L as n, P as r, R as i, ct as a, d as o, f as s, i as c, l, ot as u, u as d } from "./PageLayout-D4LDHJJq.js";
2
- import { t as f } from "./DataTable-DmciIKKM.js";
3
- import { t as p } from "./download-DRXxoiQR.js";
4
- import { t as m } from "./filter-DloLC2eE.js";
5
- import { t as h } from "./package-BChUzpJS.js";
6
- import { t as g } from "./plus-Z76q-FZm.js";
7
- import { t as _ } from "./refresh-cw-DKt6f5T6.js";
8
- import { r as v } from "./useOrders-Cfk1GLiq.js";
9
- import { i as y, n as b, r as x } from "./StatusBadge-BZurYHMy.js";
10
- import { n as S, r as C } from "./formatters-CF2S2l1m.js";
11
- import { useState as w } from "react";
12
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
13
- import { CTAOverflowMenu as D, EmphasisPanel as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
1
+ import { F as e, I as t, L as n, P as r, R as i, ct as a, d as ee, f as o, i as s, l as c, lt as l, ot as te, u } from "./PageLayout-D4LDHJJq.js";
2
+ import { t as d } from "./DataTable-XvUcTjwi.js";
3
+ import { t as f } from "./download-C5NbvVDc.js";
4
+ import { t as p } from "./filter-DUfUg6BO.js";
5
+ import { t as m } from "./package-CcRttV2N.js";
6
+ import { t as h } from "./plus-C_XZDwBz.js";
7
+ import { t as g } from "./refresh-cw-CfgN67l3.js";
8
+ import { t as _ } from "./user-check-BEKRCi7v.js";
9
+ import { n as v, r as y } from "./useOrders-B465S2nt.js";
10
+ import { i as b, n as x, r as S } from "./StatusBadge-C87mDpDP.js";
11
+ import { n as C, r as w } from "./formatters-BQr-aR5W.js";
12
+ import { useState as T } from "react";
13
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
14
+ import { CTAOverflowMenu as ne, EmphasisPanel as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
14
15
  import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
+ //#region node_modules/lucide-react/dist/esm/icons/user-plus.js
17
+ var j = l("UserPlus", [
18
+ ["path", {
19
+ d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
20
+ key: "1yyitq"
21
+ }],
22
+ ["circle", {
23
+ cx: "9",
24
+ cy: "7",
25
+ r: "4",
26
+ key: "nufk8"
27
+ }],
28
+ ["line", {
29
+ x1: "19",
30
+ x2: "19",
31
+ y1: "8",
32
+ y2: "14",
33
+ key: "1bvyxn"
34
+ }],
35
+ ["line", {
36
+ x1: "22",
37
+ x2: "16",
38
+ y1: "11",
39
+ y2: "11",
40
+ key: "1shjgl"
41
+ }]
42
+ ]);
43
+ //#endregion
15
44
  //#region src/movethewheels/pages/OrdersListPage.tsx
16
- function j() {
17
- let { t: j } = A(), M = (e, t) => {
18
- let n = j(e);
45
+ function M() {
46
+ let { t: l } = A(), M = (e, t) => {
47
+ let n = l(e);
19
48
  return n === e ? t : n;
20
- }, { basePath: N, navigate: P } = u(), [F, I] = w("all"), [L, R] = w("all"), { orders: z, totalOrders: B, isLoading: V, refetch: H } = v({
49
+ }, { basePath: N, navigate: P } = te(), [F, I] = T("all"), [L, R] = T("all"), [z, B] = T(!1), [V, H] = T(0), [U, W] = T(25), G = F !== "all" || L !== "all" || z, { orders: K, hasMore: q, isLoading: J, refetch: Y } = y({
21
50
  filters: {
22
51
  status: F === "all" ? void 0 : F,
23
- orderType: L === "all" ? void 0 : L
52
+ orderType: L === "all" ? void 0 : L,
53
+ unassigned: z || void 0
24
54
  },
25
- limit: 50
26
- }), U = (e) => {
55
+ limit: U,
56
+ offset: V * U
57
+ }), { stats: X } = v(), Z = X.total, Q = (e) => {
27
58
  P && P(a(N, e));
28
- }, W = [
59
+ }, $ = () => H(0), re = [
29
60
  {
30
61
  id: "orderNumber",
31
62
  header: M("movethewheels.orders.table.orderNumber", "Order #"),
32
63
  accessorKey: "orderNumber",
33
64
  sortable: !0,
34
65
  className: "min-w-[100px] whitespace-nowrap",
35
- cell: (e) => /* @__PURE__ */ T("span", {
66
+ cell: (e) => /* @__PURE__ */ E("span", {
36
67
  className: "font-medium text-primary",
37
68
  children: e.orderNumber
38
69
  })
@@ -41,12 +72,12 @@ function j() {
41
72
  id: "customer",
42
73
  header: M("movethewheels.orders.table.customer", "Customer"),
43
74
  className: "min-w-[180px] max-w-[220px]",
44
- cell: (e) => /* @__PURE__ */ E("div", {
75
+ cell: (e) => /* @__PURE__ */ D("div", {
45
76
  className: "min-w-0",
46
- children: [/* @__PURE__ */ T("p", {
77
+ children: [/* @__PURE__ */ E("p", {
47
78
  className: "font-medium truncate",
48
79
  children: e.customerInfo.name
49
- }), /* @__PURE__ */ T("p", {
80
+ }), /* @__PURE__ */ E("p", {
50
81
  className: "text-sm text-text-secondary truncate",
51
82
  children: e.customerInfo.email
52
83
  })]
@@ -58,7 +89,7 @@ function j() {
58
89
  accessorKey: "status",
59
90
  sortable: !0,
60
91
  className: "min-w-[130px] whitespace-nowrap",
61
- cell: (e) => /* @__PURE__ */ T(x, {
92
+ cell: (e) => /* @__PURE__ */ E(S, {
62
93
  status: e.status,
63
94
  type: "order"
64
95
  })
@@ -68,7 +99,7 @@ function j() {
68
99
  header: M("movethewheels.orders.table.type", "Type"),
69
100
  accessorKey: "orderType",
70
101
  className: "min-w-[70px] whitespace-nowrap",
71
- cell: (e) => /* @__PURE__ */ T(y, { type: e.orderType })
102
+ cell: (e) => /* @__PURE__ */ E(b, { type: e.orderType })
72
103
  },
73
104
  {
74
105
  id: "priority",
@@ -76,13 +107,13 @@ function j() {
76
107
  accessorKey: "priority",
77
108
  sortable: !0,
78
109
  className: "min-w-[90px] whitespace-nowrap",
79
- cell: (e) => /* @__PURE__ */ T(b, { priority: e.priority })
110
+ cell: (e) => /* @__PURE__ */ E(x, { priority: e.priority })
80
111
  },
81
112
  {
82
113
  id: "items",
83
114
  header: M("movethewheels.orders.table.items", "Items"),
84
115
  className: "min-w-[80px] whitespace-nowrap",
85
- cell: (e) => /* @__PURE__ */ E(l, {
116
+ cell: (e) => /* @__PURE__ */ D(c, {
86
117
  variant: "secondary",
87
118
  children: [
88
119
  e.items.length,
@@ -97,9 +128,9 @@ function j() {
97
128
  accessorKey: "pricing",
98
129
  sortable: !0,
99
130
  className: "min-w-[100px] whitespace-nowrap text-right",
100
- cell: (e) => /* @__PURE__ */ T("span", {
131
+ cell: (e) => /* @__PURE__ */ E("span", {
101
132
  className: "font-medium",
102
- children: S(e.pricing.total)
133
+ children: C(e.pricing.total)
103
134
  })
104
135
  },
105
136
  {
@@ -108,7 +139,7 @@ function j() {
108
139
  accessorKey: "scheduledDelivery",
109
140
  sortable: !0,
110
141
  className: "min-w-[110px] whitespace-nowrap",
111
- cell: (e) => e.scheduledDelivery ? C(e.scheduledDelivery) : "-"
142
+ cell: (e) => e.scheduledDelivery ? w(e.scheduledDelivery) : "-"
112
143
  },
113
144
  {
114
145
  id: "createdAt",
@@ -116,9 +147,32 @@ function j() {
116
147
  accessorKey: "createdAt",
117
148
  sortable: !0,
118
149
  className: "min-w-[100px] whitespace-nowrap",
119
- cell: (e) => C(e.createdAt, "relative")
150
+ cell: (e) => w(e.createdAt, "relative")
151
+ },
152
+ {
153
+ id: "driver",
154
+ header: M("movethewheels.orders.table.driver", "Driver"),
155
+ className: "min-w-[120px] whitespace-nowrap",
156
+ cell: (e) => e.driverId ? /* @__PURE__ */ D("span", {
157
+ className: "inline-flex items-center gap-1 text-sm text-status-success-text",
158
+ children: [
159
+ /* @__PURE__ */ E(_, { size: 14 }),
160
+ " ",
161
+ M("movethewheels.orders.table.assigned", "Assigned")
162
+ ]
163
+ }) : /* @__PURE__ */ D(u, {
164
+ variant: "outline",
165
+ size: "sm",
166
+ onClick: (t) => {
167
+ t.stopPropagation(), Q(`orders/${e.id}`);
168
+ },
169
+ children: [/* @__PURE__ */ E(j, {
170
+ size: 14,
171
+ className: "mr-1"
172
+ }), M("movethewheels.orders.table.assign", "Assign")]
173
+ })
120
174
  }
121
- ], G = [
175
+ ], ie = [
122
176
  {
123
177
  value: "all",
124
178
  label: M("movethewheels.orders.filters.allStatuses", "All Statuses")
@@ -160,141 +214,164 @@ function j() {
160
214
  label: M("movethewheels.orders.status.failed", "Failed")
161
215
  }
162
216
  ];
163
- return /* @__PURE__ */ E(c, {
217
+ return /* @__PURE__ */ D(s, {
164
218
  title: M("movethewheels.orders.title", "Orders"),
165
- subtitle: `${B} ${M("movethewheels.orders.subtitle", "total orders")}`,
166
- icon: /* @__PURE__ */ T(h, { size: 24 }),
167
- headerActions: /* @__PURE__ */ T(D, {
219
+ subtitle: `${Z} ${M("movethewheels.orders.subtitle", "total orders")}`,
220
+ icon: /* @__PURE__ */ E(m, { size: 24 }),
221
+ headerActions: /* @__PURE__ */ E(ne, {
168
222
  primary: {
169
223
  label: M("movethewheels.orders.actions.newOrder", "New Order"),
170
- icon: /* @__PURE__ */ T(g, { size: 16 }),
171
- onSelect: () => U("orders/new")
224
+ icon: /* @__PURE__ */ E(h, { size: 16 }),
225
+ onSelect: () => Q("orders/new")
172
226
  },
173
227
  actions: [{
174
228
  label: M("movethewheels.orders.actions.refresh", "Refresh"),
175
- icon: /* @__PURE__ */ T(_, { size: 16 }),
176
- onSelect: () => H()
229
+ icon: /* @__PURE__ */ E(g, { size: 16 }),
230
+ onSelect: () => Y()
177
231
  }, {
178
232
  label: M("movethewheels.orders.actions.export", "Export"),
179
- icon: /* @__PURE__ */ T(p, { size: 16 }),
180
- onSelect: () => {}
233
+ icon: /* @__PURE__ */ E(f, { size: 16 }),
234
+ onSelect: () => Q("import-export")
181
235
  }]
182
236
  }),
183
237
  children: [
184
- /* @__PURE__ */ T(k, {
185
- icon: /* @__PURE__ */ T(h, { size: 18 }),
238
+ /* @__PURE__ */ E(k, {
239
+ icon: /* @__PURE__ */ E(m, { size: 18 }),
186
240
  children: M("movethewheels.orders.purpose", "Every delivery job lives here — B2B and B2C orders, their status, priority and value. Use this list to find an order, filter by status or type, and open one to assign a driver, track it, or update fulfilment.")
187
241
  }),
188
- /* @__PURE__ */ E(O, { children: [/* @__PURE__ */ T("p", {
242
+ /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("p", {
189
243
  className: "text-sm font-medium text-text-secondary",
190
244
  children: M("movethewheels.orders.glance.title", "Pipeline at a glance")
191
- }), /* @__PURE__ */ E("div", {
245
+ }), /* @__PURE__ */ D("div", {
192
246
  className: "mt-3 grid grid-cols-2 sm:grid-cols-4 gap-4",
193
247
  children: [
194
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
248
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
195
249
  className: "text-2xl font-bold text-text-primary tabular-nums",
196
- children: B
197
- }), /* @__PURE__ */ T("p", {
250
+ children: Z
251
+ }), /* @__PURE__ */ E("p", {
198
252
  className: "text-xs text-text-secondary",
199
253
  children: M("movethewheels.orders.glance.total", "Total orders")
200
254
  })] }),
201
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
255
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
202
256
  className: "text-2xl font-bold text-text-primary tabular-nums",
203
- children: z.filter((e) => e.status === "pending").length
204
- }), /* @__PURE__ */ T("p", {
257
+ children: X.byStatus.pending
258
+ }), /* @__PURE__ */ E("p", {
205
259
  className: "text-xs text-text-secondary",
206
260
  children: M("movethewheels.orders.glance.pending", "Pending")
207
261
  })] }),
208
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
262
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
209
263
  className: "text-2xl font-bold text-text-primary tabular-nums",
210
- children: z.filter((e) => e.status === "in_transit" || e.status === "out_for_delivery").length
211
- }), /* @__PURE__ */ T("p", {
264
+ children: X.byStatus.in_transit + X.byStatus.out_for_delivery
265
+ }), /* @__PURE__ */ E("p", {
212
266
  className: "text-xs text-text-secondary",
213
267
  children: M("movethewheels.orders.glance.inTransit", "In transit")
214
268
  })] }),
215
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
269
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
216
270
  className: "text-2xl font-bold text-text-primary tabular-nums",
217
- children: z.filter((e) => e.status === "delivered").length
218
- }), /* @__PURE__ */ T("p", {
271
+ children: X.byStatus.delivered
272
+ }), /* @__PURE__ */ E("p", {
219
273
  className: "text-xs text-text-secondary",
220
274
  children: M("movethewheels.orders.glance.delivered", "Delivered")
221
275
  })] })
222
276
  ]
223
277
  })] }),
224
- /* @__PURE__ */ T(o, { children: /* @__PURE__ */ T(s, {
278
+ /* @__PURE__ */ E(ee, { children: /* @__PURE__ */ E(o, {
225
279
  className: "p-4",
226
- children: /* @__PURE__ */ E("div", {
280
+ children: /* @__PURE__ */ D("div", {
227
281
  className: "flex flex-wrap items-center gap-4",
228
282
  children: [
229
- /* @__PURE__ */ E("div", {
283
+ /* @__PURE__ */ D("div", {
230
284
  className: "flex items-center gap-2",
231
- children: [/* @__PURE__ */ T(m, {
285
+ children: [/* @__PURE__ */ E(p, {
232
286
  size: 16,
233
287
  className: "text-text-secondary"
234
- }), /* @__PURE__ */ T("span", {
288
+ }), /* @__PURE__ */ E("span", {
235
289
  className: "text-sm font-medium",
236
290
  children: M("movethewheels.orders.filters.label", "Filters:")
237
291
  })]
238
292
  }),
239
- /* @__PURE__ */ E(r, {
293
+ /* @__PURE__ */ D(r, {
240
294
  value: F,
241
- onValueChange: (e) => I(e),
242
- children: [/* @__PURE__ */ T(n, {
295
+ onValueChange: (e) => {
296
+ I(e), $();
297
+ },
298
+ children: [/* @__PURE__ */ E(n, {
243
299
  className: "w-[180px]",
244
- children: /* @__PURE__ */ T(i, { placeholder: M("movethewheels.orders.filters.status", "Status") })
245
- }), /* @__PURE__ */ T(e, { children: G.map((e) => /* @__PURE__ */ T(t, {
300
+ children: /* @__PURE__ */ E(i, { placeholder: M("movethewheels.orders.filters.status", "Status") })
301
+ }), /* @__PURE__ */ E(e, { children: ie.map((e) => /* @__PURE__ */ E(t, {
246
302
  value: e.value,
247
303
  children: e.label
248
304
  }, e.value)) })]
249
305
  }),
250
- /* @__PURE__ */ E(r, {
306
+ /* @__PURE__ */ D(r, {
251
307
  value: L,
252
- onValueChange: (e) => R(e),
253
- children: [/* @__PURE__ */ T(n, {
308
+ onValueChange: (e) => {
309
+ R(e), $();
310
+ },
311
+ children: [/* @__PURE__ */ E(n, {
254
312
  className: "w-[150px]",
255
- children: /* @__PURE__ */ T(i, { placeholder: M("movethewheels.orders.filters.type", "Type") })
256
- }), /* @__PURE__ */ E(e, { children: [
257
- /* @__PURE__ */ T(t, {
313
+ children: /* @__PURE__ */ E(i, { placeholder: M("movethewheels.orders.filters.type", "Type") })
314
+ }), /* @__PURE__ */ D(e, { children: [
315
+ /* @__PURE__ */ E(t, {
258
316
  value: "all",
259
317
  children: M("movethewheels.orders.filters.allTypes", "All Types")
260
318
  }),
261
- /* @__PURE__ */ T(t, {
319
+ /* @__PURE__ */ E(t, {
262
320
  value: "b2b",
263
321
  children: "B2B"
264
322
  }),
265
- /* @__PURE__ */ T(t, {
323
+ /* @__PURE__ */ E(t, {
266
324
  value: "b2c",
267
325
  children: "B2C"
268
326
  })
269
327
  ] })]
270
328
  }),
271
- (F !== "all" || L !== "all") && /* @__PURE__ */ T(d, {
329
+ /* @__PURE__ */ D(u, {
330
+ variant: z ? "default" : "outline",
331
+ size: "sm",
332
+ onClick: () => {
333
+ B((e) => !e), $();
334
+ },
335
+ children: [/* @__PURE__ */ E(j, {
336
+ size: 14,
337
+ className: "mr-1"
338
+ }), M("movethewheels.orders.filters.unassigned", "Needs driver")]
339
+ }),
340
+ G && /* @__PURE__ */ E(u, {
272
341
  variant: "ghost",
273
342
  size: "sm",
274
343
  onClick: () => {
275
- I("all"), R("all");
344
+ I("all"), R("all"), B(!1), $();
276
345
  },
277
346
  children: M("movethewheels.orders.filters.clear", "Clear filters")
278
347
  })
279
348
  ]
280
349
  })
281
350
  }) }),
282
- /* @__PURE__ */ T(f, {
283
- columns: W,
284
- data: z,
285
- isLoading: V,
351
+ /* @__PURE__ */ E(d, {
352
+ columns: re,
353
+ data: K,
354
+ isLoading: J,
286
355
  searchable: !0,
287
356
  searchPlaceholder: M("movethewheels.orders.searchPlaceholder", "Search orders..."),
288
357
  searchFields: ["orderNumber", "customerInfo"],
289
- onRowClick: (e) => U(`orders/${e.id}`),
358
+ onRowClick: (e) => Q(`orders/${e.id}`),
290
359
  getRowId: (e) => e.id,
360
+ pageIndex: V,
361
+ pageSize: U,
362
+ onPageChange: H,
363
+ onPageSizeChange: (e) => {
364
+ W(e), H(0);
365
+ },
366
+ totalItems: G ? void 0 : Z,
367
+ hasNextPage: q,
291
368
  emptyMessage: M("movethewheels.orders.empty", "No orders found"),
292
369
  emptyIllustration: "empty-data",
293
370
  emptyTitle: M("movethewheels.orders.emptyTitle", "No orders yet"),
294
371
  emptyDescription: M("movethewheels.orders.emptyDescription", "Create your first order to start moving shipments through the pipeline."),
295
- emptyAction: /* @__PURE__ */ E(d, {
296
- onClick: () => U("orders/new"),
297
- children: [/* @__PURE__ */ T(g, {
372
+ emptyAction: /* @__PURE__ */ D(u, {
373
+ onClick: () => Q("orders/new"),
374
+ children: [/* @__PURE__ */ E(h, {
298
375
  size: 16,
299
376
  className: "mr-1.5"
300
377
  }), M("movethewheels.orders.actions.newOrder", "New Order")]
@@ -304,4 +381,4 @@ function j() {
304
381
  });
305
382
  }
306
383
  //#endregion
307
- export { j as default };
384
+ export { M as default };
@@ -1,13 +1,13 @@
1
1
  import { A as e, ct as t, d as n, f as r, g as i, h as a, i as o, j as s, l as c, lt as l, n as u, ot as d, r as f, u as p } from "./PageLayout-D4LDHJJq.js";
2
2
  import { t as m } from "./arrow-left-n48Y-Wis.js";
3
- import { t as h } from "./box-D9Pal4HM.js";
4
- import { t as g } from "./dollar-sign-CgKQRz_e.js";
5
- import { t as _ } from "./package-BChUzpJS.js";
6
- import { t as v } from "./save-CojywNhG.js";
7
- import { t as y } from "./square-pen-CopE9GmB.js";
8
- import { r as b, t as x } from "./useInventory-DkyiVY_A.js";
9
- import { n as S } from "./formatters-CF2S2l1m.js";
10
- import { t as C } from "./FormError-BlOjnXOq.js";
3
+ import { t as h } from "./box-Eu05PXDh.js";
4
+ import { t as g } from "./dollar-sign-CAVU95SO.js";
5
+ import { t as _ } from "./package-CcRttV2N.js";
6
+ import { t as v } from "./save-DJE8Fpdv.js";
7
+ import { t as y } from "./square-pen-D-6JYrVQ.js";
8
+ import { r as b, t as x } from "./useInventory-CAAVMRp6.js";
9
+ import { t as S } from "./FormError-cuLV2jVD.js";
10
+ import { n as C } from "./formatters-BQr-aR5W.js";
11
11
  import { useState as w } from "react";
12
12
  import { useParams as T } from "react-router-dom";
13
13
  import { jsx as E, jsxs as D } from "react/jsx-runtime";
@@ -78,7 +78,7 @@ function M() {
78
78
  }), /* @__PURE__ */ D("form", {
79
79
  onSubmit: y,
80
80
  className: "max-w-2xl space-y-6",
81
- children: [/* @__PURE__ */ E(C, { message: f }), /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("h2", {
81
+ children: [/* @__PURE__ */ E(S, { message: f }), /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("h2", {
82
82
  className: "text-base font-semibold text-text-primary mb-4",
83
83
  children: "Product Details"
84
84
  }), /* @__PURE__ */ D("div", {
@@ -180,8 +180,8 @@ function M() {
180
180
  });
181
181
  }
182
182
  function N() {
183
- let { productId: e } = T(), { basePath: s, navigate: l } = d(), { product: v, isLoading: x, error: C, refetch: w } = b(e), N = () => l?.(t(s, "inventory/products")), P = (e) => l?.(t(s, e));
184
- return e ? x ? /* @__PURE__ */ E(f, { message: "Loading product details..." }) : C || !v ? /* @__PURE__ */ E(u, {
183
+ let { productId: e } = T(), { basePath: s, navigate: l } = d(), { product: v, isLoading: x, error: S, refetch: w } = b(e), N = () => l?.(t(s, "inventory/products")), P = (e) => l?.(t(s, e));
184
+ return e ? x ? /* @__PURE__ */ E(f, { message: "Loading product details..." }) : S || !v ? /* @__PURE__ */ E(u, {
185
185
  title: "Product not found",
186
186
  onRetry: w
187
187
  }) : /* @__PURE__ */ D(o, {
@@ -319,7 +319,7 @@ function N() {
319
319
  }),
320
320
  /* @__PURE__ */ E("p", {
321
321
  className: "text-3xl font-bold",
322
- children: S(v.value)
322
+ children: C(v.value)
323
323
  }),
324
324
  /* @__PURE__ */ E("p", {
325
325
  className: "text-sm text-text-secondary",