@burdenoff/microfe-movethewheels 2026.626.2 → 2026.703.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 (120) hide show
  1. package/dist/{AIAssistantPage-AvsMbunM.js → AIAssistantPage-C3ovZ0Fh.js} +100 -73
  2. package/dist/AnalyticsPage-O8SpY-V4.js +215 -0
  3. package/dist/{CreateOrderPage-CjlnEtk3.js → CreateOrderPage-CB1_-_mN.js} +33 -35
  4. package/dist/{CustomerDetailsPage-I6cdDHUi.js → CustomerDetailsPage-BaeKEI1D.js} +42 -44
  5. package/dist/{CustomersPage-CGGfD4ki.js → CustomersPage-DRaLuHMC.js} +26 -28
  6. package/dist/{DashboardPage-D2HRqwg9.js → DashboardPage-DPjhNfKB.js} +85 -83
  7. package/dist/{DataTable-CD9ZhpLB.js → DataTable-DmciIKKM.js} +3 -3
  8. package/dist/{DriverDetailsPage-rg_pGNuP.js → DriverDetailsPage-CSSQTOzn.js} +52 -54
  9. package/dist/{DriversPage-DKiynISH.js → DriversPage-C2Bk0w4Q.js} +24 -26
  10. package/dist/{FinancePage-Vg8WPs38.js → FinancePage-lmp0Sdsw.js} +9 -9
  11. package/dist/FleetPage-DZn5pIqd.js +365 -0
  12. package/dist/ImportExportPage-BIUJZc7O.js +290 -0
  13. package/dist/InventoryPage-Cxh1zYJd.js +253 -0
  14. package/dist/{LiveTrackingPage-DQ1q4Id3.js → LiveTrackingPage-BY1yAkIt.js} +60 -56
  15. package/dist/MarketplacePage-RMuL17EA.js +247 -0
  16. package/dist/{MetricCard-B7yMyvMX.js → MetricCard-7aYgzZHK.js} +1 -1
  17. package/dist/{OrderDetailsPage-CFASgsYX.js → OrderDetailsPage-C2Mf4KSy.js} +83 -85
  18. package/dist/{OrdersListPage-BHeT8S5o.js → OrdersListPage-BrPBtnhp.js} +31 -33
  19. package/dist/{PageLayout-D3N8MCTm.js → PageLayout-D4LDHJJq.js} +483 -422
  20. package/dist/{ProductDetailsPage-CFGcbaHo.js → ProductDetailsPage-CezzzZcj.js} +27 -29
  21. package/dist/{ProductsPage--xEpbQ8A.js → ProductsPage-I5DilIoY.js} +21 -23
  22. package/dist/ReportsPage-BDXNmUng.js +284 -0
  23. package/dist/RouteDetailsPage-BcomL20M.js +263 -0
  24. package/dist/RoutesPage-lqX9ylHP.js +144 -0
  25. package/dist/SettingsPage-CQVIOaNs.js +421 -0
  26. package/dist/StatusBadge-NpTeHVlw.js +152 -0
  27. package/dist/{TrackingPage-CcRc_dva.js → TrackingPage-BXrjz7V8.js} +59 -61
  28. package/dist/{VehicleDetailsPage-3YDMPsPs.js → VehicleDetailsPage-DZjLcJgr.js} +40 -42
  29. package/dist/{VehiclesPage-UlxPWP9K.js → VehiclesPage-6W39XT5W.js} +19 -21
  30. package/dist/{WarehouseDetailsPage-Db7KeN-d.js → WarehouseDetailsPage-C10pgRGW.js} +38 -40
  31. package/dist/{WarehousesPage-CuTO-OPp.js → WarehousesPage-CHvBqNaQ.js} +15 -17
  32. package/dist/{arrow-left-CBpZKkpq.js → arrow-left-n48Y-Wis.js} +1 -1
  33. package/dist/{box-CAaiElsb.js → box-D9Pal4HM.js} +1 -1
  34. package/dist/{chart-column-D1Ym15-S.js → chart-column-BFIJysDR.js} +1 -1
  35. package/dist/{chevron-right-BIFGi0UA.js → chevron-right-EMIIyyJ1.js} +1 -1
  36. package/dist/{circle-alert-DjmNo5_L.js → circle-alert-iY24lSlp.js} +1 -1
  37. package/dist/{circle-check-big-CjuPVo3_.js → circle-check-big-w0TrLKMF.js} +1 -1
  38. package/dist/{clock-BjkdnddD.js → clock-DJZtdl8u.js} +1 -1
  39. package/dist/{dollar-sign-IB4O0wuQ.js → dollar-sign-CgKQRz_e.js} +1 -1
  40. package/dist/{download-Dpa9vqoG.js → download-DRXxoiQR.js} +1 -1
  41. package/dist/{file-text-C8Uioy11.js → file-text-DWWY6_f5.js} +1 -1
  42. package/dist/{filter-Da5OZaHI.js → filter-DloLC2eE.js} +1 -1
  43. package/dist/index.js +119 -111
  44. package/dist/{map-_Per4sT9.js → map-CkJaULb2.js} +1 -1
  45. package/dist/{map-pin-BSaf5IDL.js → map-pin-BGiCvyCs.js} +1 -1
  46. package/dist/{navigation-DaTbrhw2.js → navigation-D36prnAn.js} +1 -1
  47. package/dist/{package-BE7U0wQE.js → package-BChUzpJS.js} +1 -1
  48. package/dist/{phone-DV4StZiA.js → phone-Ac9s3mo_.js} +1 -1
  49. package/dist/{plus-Dl1rLeJR.js → plus-Z76q-FZm.js} +1 -1
  50. package/dist/{refresh-cw-CWfERAit.js → refresh-cw-DKt6f5T6.js} +1 -1
  51. package/dist/{save-XH8vydOn.js → save-CojywNhG.js} +1 -1
  52. package/dist/{search-OxoIiL_C.js → search-CDGefqb3.js} +1 -1
  53. package/dist/{square-pen-hLIbFQFV.js → square-pen-CopE9GmB.js} +1 -1
  54. package/dist/{star-YsVV3MNQ.js → star-nHlLjDKR.js} +1 -1
  55. package/dist/{store-RCBl7HB-.js → store-BR9Voi5E.js} +1 -1
  56. package/dist/{trending-up-C-85AwGT.js → trending-up-B7W-GL6P.js} +1 -1
  57. package/dist/{triangle-alert-BOhfGgmh.js → triangle-alert-BonHFFNz.js} +1 -1
  58. package/dist/{truck-CtDjNFbi.js → truck-DrlfSpRC.js} +1 -1
  59. package/dist/{useAnalytics-ph7eTIK6.js → useAnalytics-CgdzUfY_.js} +40 -40
  60. package/dist/useAssistant-D4v3oxD3.js +84 -0
  61. package/dist/{useCustomers-bS3a4ytk.js → useCustomers-QrlozybF.js} +24 -24
  62. package/dist/{useFleet-BdETplNE.js → useFleet-DiAC-IiH.js} +70 -67
  63. package/dist/useImportExport-BLMnAKCC.js +55 -0
  64. package/dist/{useInventory-Dwn18FPz.js → useInventory-DKoks37x.js} +33 -33
  65. package/dist/{useOrders-D_3_hGMp.js → useOrders-D3UZVy8Y.js} +42 -42
  66. package/dist/useReports-Puq4DCH9.js +78 -0
  67. package/dist/{useRoutes-v4aBaS-E.js → useRoutes-Do57LvRb.js} +31 -31
  68. package/dist/useSettings-CkDH_-gM.js +81 -0
  69. package/dist/{useTracking-De2KIUNu.js → useTracking-GJify4HN.js} +22 -22
  70. package/dist/{user-Dz5TJZFs.js → user-CjSoudeu.js} +1 -1
  71. package/dist/{users-g2N0eL-Z.js → users-BAM4gHTn.js} +1 -1
  72. package/dist/{warehouse-D3WWDeTX.js → warehouse-C7MSr47B.js} +1 -1
  73. package/dist/{wrench-CmxY1n4I.js → wrench-CANXWxF-.js} +1 -1
  74. package/package.json +1 -1
  75. package/src/movethewheels/MoveTheWheelsRoutes.tsx +27 -3
  76. package/src/movethewheels/components/StatusBadge.tsx +18 -37
  77. package/src/movethewheels/constants/index.ts +67 -26
  78. package/src/movethewheels/hooks/index.ts +12 -0
  79. package/src/movethewheels/hooks/useAnalytics.ts +20 -6
  80. package/src/movethewheels/hooks/useAssistant.ts +74 -0
  81. package/src/movethewheels/hooks/useFleet.ts +63 -59
  82. package/src/movethewheels/hooks/useImportExport.ts +101 -0
  83. package/src/movethewheels/hooks/useReports.ts +158 -0
  84. package/src/movethewheels/hooks/useSettings.ts +120 -0
  85. package/src/movethewheels/pages/AIAssistantPage.tsx +53 -15
  86. package/src/movethewheels/pages/AnalyticsPage.tsx +67 -64
  87. package/src/movethewheels/pages/CustomerDetailsPage.tsx +1 -1
  88. package/src/movethewheels/pages/CustomersPage.tsx +1 -1
  89. package/src/movethewheels/pages/DashboardPage.tsx +42 -22
  90. package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
  91. package/src/movethewheels/pages/DriversPage.tsx +1 -1
  92. package/src/movethewheels/pages/FleetPage.tsx +96 -38
  93. package/src/movethewheels/pages/ImportExportPage.tsx +174 -68
  94. package/src/movethewheels/pages/InventoryPage.tsx +66 -28
  95. package/src/movethewheels/pages/LiveTrackingPage.tsx +12 -3
  96. package/src/movethewheels/pages/MarketplacePage.tsx +87 -45
  97. package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -2
  98. package/src/movethewheels/pages/ReportsPage.tsx +194 -90
  99. package/src/movethewheels/pages/RouteDetailsPage.tsx +5 -11
  100. package/src/movethewheels/pages/RoutesPage.tsx +4 -9
  101. package/src/movethewheels/pages/SettingsPage.tsx +234 -56
  102. package/src/movethewheels/pages/TrackingPage.tsx +6 -6
  103. package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +7 -6
  104. package/src/movethewheels/store/movethewheelsStore.ts +1 -1
  105. package/dist/AnalyticsPage-CCLfHgQZ.js +0 -212
  106. package/dist/FleetPage-DddXt8r8.js +0 -332
  107. package/dist/ImportExportPage-BW6qO3kc.js +0 -248
  108. package/dist/InventoryPage-rMGuaJN-.js +0 -222
  109. package/dist/MarketplacePage-DKrXAv62.js +0 -219
  110. package/dist/ReportsPage-Bb7_90rK.js +0 -235
  111. package/dist/RouteDetailsPage-CVtDVb1N.js +0 -282
  112. package/dist/RoutesPage-s57PtgcQ.js +0 -163
  113. package/dist/SettingsPage-BYNCBOpN.js +0 -298
  114. package/dist/StatusBadge-CijYQXtb.js +0 -209
  115. package/dist/graphqlClient-CdJyR_ed.js +0 -55
  116. package/dist/navigation-BgnOfsVd.js +0 -6
  117. package/dist/route-Dp9JiN_E.js +0 -51
  118. package/dist/settings-3Rw5NwFF.js +0 -28
  119. package/src/movethewheels/constants/mockData.ts +0 -1342
  120. /package/dist/{formatters-_vJlC-47.js → formatters-DhKZ-eA1.js} +0 -0
@@ -1,248 +0,0 @@
1
- import { d as e, f as t, g as n, h as r, i, it as a, l as o, u as s } from "./PageLayout-D3N8MCTm.js";
2
- import { t as c } from "./download-Dpa9vqoG.js";
3
- import { t as l } from "./file-text-C8Uioy11.js";
4
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
- import { EmphasisPanel as f, IllustratedEmptyState as p, PagePurpose as m } from "@burdenoff/fe-libs/ui";
6
- //#region node_modules/lucide-react/dist/esm/icons/check.js
7
- var h = a("Check", [["path", {
8
- d: "M20 6 9 17l-5-5",
9
- key: "1gmf2c"
10
- }]]), g = a("FileSpreadsheet", [
11
- ["path", {
12
- d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
13
- key: "1rqfz7"
14
- }],
15
- ["path", {
16
- d: "M14 2v4a2 2 0 0 0 2 2h4",
17
- key: "tnqrlb"
18
- }],
19
- ["path", {
20
- d: "M8 13h2",
21
- key: "yr2amv"
22
- }],
23
- ["path", {
24
- d: "M14 13h2",
25
- key: "un5t4a"
26
- }],
27
- ["path", {
28
- d: "M8 17h2",
29
- key: "2yhykz"
30
- }],
31
- ["path", {
32
- d: "M14 17h2",
33
- key: "10kma7"
34
- }]
35
- ]), _ = a("Upload", [
36
- ["path", {
37
- d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
38
- key: "ih7n3h"
39
- }],
40
- ["polyline", {
41
- points: "17 8 12 3 7 8",
42
- key: "t8dd8p"
43
- }],
44
- ["line", {
45
- x1: "12",
46
- x2: "12",
47
- y1: "3",
48
- y2: "15",
49
- key: "widbto"
50
- }]
51
- ]);
52
- //#endregion
53
- //#region src/movethewheels/pages/ImportExportPage.tsx
54
- function v() {
55
- let a = [
56
- {
57
- name: "Orders",
58
- description: "Import orders from CSV or Excel",
59
- icon: g,
60
- format: "CSV, XLSX"
61
- },
62
- {
63
- name: "Customers",
64
- description: "Import customer database",
65
- icon: g,
66
- format: "CSV, XLSX"
67
- },
68
- {
69
- name: "Products",
70
- description: "Import product catalog",
71
- icon: g,
72
- format: "CSV, XLSX"
73
- },
74
- {
75
- name: "Inventory",
76
- description: "Import inventory levels",
77
- icon: g,
78
- format: "CSV, XLSX"
79
- }
80
- ], v = [
81
- {
82
- name: "Orders Report",
83
- description: "Export all orders data",
84
- formats: [
85
- "CSV",
86
- "Excel",
87
- "PDF"
88
- ]
89
- },
90
- {
91
- name: "Financial Report",
92
- description: "Export revenue and payments",
93
- formats: [
94
- "CSV",
95
- "Excel",
96
- "PDF"
97
- ]
98
- },
99
- {
100
- name: "Fleet Report",
101
- description: "Export vehicle and driver data",
102
- formats: ["CSV", "Excel"]
103
- },
104
- {
105
- name: "Analytics Report",
106
- description: "Export performance metrics",
107
- formats: [
108
- "CSV",
109
- "Excel",
110
- "PDF"
111
- ]
112
- }
113
- ], y = [
114
- {
115
- type: "export",
116
- name: "Orders Report",
117
- date: "2024-01-15",
118
- status: "completed"
119
- },
120
- {
121
- type: "import",
122
- name: "Customer Data",
123
- date: "2024-01-14",
124
- status: "completed"
125
- },
126
- {
127
- type: "export",
128
- name: "Financial Report",
129
- date: "2024-01-13",
130
- status: "completed"
131
- }
132
- ];
133
- return /* @__PURE__ */ d(i, {
134
- title: "Import / Export",
135
- subtitle: "Import and export your data",
136
- icon: /* @__PURE__ */ u(l, { size: 24 }),
137
- children: [
138
- /* @__PURE__ */ u(m, {
139
- icon: /* @__PURE__ */ u(l, { size: 18 }),
140
- children: "Move data in and out in bulk. Import orders, customers, products or inventory from CSV/Excel to onboard or migrate without re-keying, and export any dataset for accounting, BI tools or backups — no manual copy-paste required."
141
- }),
142
- /* @__PURE__ */ d("div", {
143
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
144
- children: [/* @__PURE__ */ d(f, {
145
- className: "space-y-4",
146
- children: [/* @__PURE__ */ d("h2", {
147
- className: "flex items-center gap-2 text-base font-semibold text-text-primary",
148
- children: [/* @__PURE__ */ u(_, { size: 18 }), " Import Data"]
149
- }), /* @__PURE__ */ u("div", {
150
- className: "space-y-4",
151
- children: a.map((e) => /* @__PURE__ */ d("div", {
152
- className: "flex items-center justify-between p-4 border rounded-lg hover:border-primary/50 transition-colors",
153
- children: [/* @__PURE__ */ d("div", {
154
- className: "flex items-center gap-3",
155
- children: [/* @__PURE__ */ u("div", {
156
- className: "w-10 h-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
157
- children: /* @__PURE__ */ u(e.icon, {
158
- size: 20,
159
- className: "text-primary"
160
- })
161
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
162
- className: "font-medium",
163
- children: e.name
164
- }), /* @__PURE__ */ u("p", {
165
- className: "text-sm text-text-secondary",
166
- children: e.description
167
- })] })]
168
- }), /* @__PURE__ */ d("div", {
169
- className: "text-right",
170
- children: [/* @__PURE__ */ u(o, {
171
- variant: "outline",
172
- children: e.format
173
- }), /* @__PURE__ */ u(s, {
174
- variant: "outline",
175
- size: "sm",
176
- className: "ml-2",
177
- children: /* @__PURE__ */ u(_, { size: 14 })
178
- })]
179
- })]
180
- }, e.name))
181
- })]
182
- }), /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u(r, { children: /* @__PURE__ */ d(n, {
183
- className: "flex items-center gap-2",
184
- children: [/* @__PURE__ */ u(c, { size: 18 }), " Export Data"]
185
- }) }), /* @__PURE__ */ u(t, {
186
- className: "space-y-4",
187
- children: v.map((e) => /* @__PURE__ */ d("div", {
188
- className: "flex items-center justify-between p-4 border rounded-lg hover:border-primary/50 transition-colors",
189
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
190
- className: "font-medium",
191
- children: e.name
192
- }), /* @__PURE__ */ u("p", {
193
- className: "text-sm text-text-secondary",
194
- children: e.description
195
- })] }), /* @__PURE__ */ u("div", {
196
- className: "flex gap-1",
197
- children: e.formats.map((e) => /* @__PURE__ */ u(s, {
198
- variant: "outline",
199
- size: "sm",
200
- children: e
201
- }, e))
202
- })]
203
- }, e.name))
204
- })] })]
205
- }),
206
- /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u(r, { children: /* @__PURE__ */ u(n, { children: "Recent Activity" }) }), /* @__PURE__ */ u(t, { children: y.length === 0 ? /* @__PURE__ */ u(p, {
207
- illustration: "empty-data",
208
- title: "No import or export activity yet",
209
- description: "Your recent imports and exports will show up here once you run one."
210
- }) : /* @__PURE__ */ u("div", {
211
- className: "space-y-3",
212
- children: y.map((e, t) => /* @__PURE__ */ d("div", {
213
- className: "flex items-center justify-between p-3 bg-bg-sunken/50 rounded-lg",
214
- children: [/* @__PURE__ */ d("div", {
215
- className: "flex items-center gap-3",
216
- children: [e.type === "import" ? /* @__PURE__ */ u(_, {
217
- size: 16,
218
- className: "text-primary"
219
- }) : /* @__PURE__ */ u(c, {
220
- size: 16,
221
- className: "text-primary"
222
- }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
223
- className: "font-medium",
224
- children: e.name
225
- }), /* @__PURE__ */ d("p", {
226
- className: "text-sm text-text-secondary",
227
- children: [
228
- e.type === "import" ? "Imported" : "Exported",
229
- " on ",
230
- e.date
231
- ]
232
- })] })]
233
- }), /* @__PURE__ */ d(o, {
234
- variant: "default",
235
- className: "gap-1",
236
- children: [
237
- /* @__PURE__ */ u(h, { size: 12 }),
238
- " ",
239
- e.status
240
- ]
241
- })]
242
- }, t))
243
- }) })] })
244
- ]
245
- });
246
- }
247
- //#endregion
248
- export { v as default };
@@ -1,222 +0,0 @@
1
- import { M as e, a as t, d as n, f as r, i, l as a, u as o } from "./PageLayout-D3N8MCTm.js";
2
- import { t as s } from "./chevron-right-BIFGi0UA.js";
3
- import { t as c } from "./package-BE7U0wQE.js";
4
- import { t as l } from "./plus-Dl1rLeJR.js";
5
- import { t as u } from "./triangle-alert-BOhfGgmh.js";
6
- import { t as d } from "./warehouse-D3WWDeTX.js";
7
- import { r as f } from "./graphqlClient-CdJyR_ed.js";
8
- import { n as p, t as m } from "./useInventory-Dwn18FPz.js";
9
- import { r as h, t as g } from "./MetricCard-B7yMyvMX.js";
10
- import { n as _ } from "./formatters-_vJlC-47.js";
11
- import { t as v } from "./navigation-BgnOfsVd.js";
12
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
13
- import { CTAOverflowMenu as x, EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
14
- import { useI18n as w } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
- //#region src/movethewheels/pages/InventoryPage.tsx
16
- function T() {
17
- let { t: T } = w(), E = (e, t) => {
18
- let n = T(e);
19
- return n === e ? t : n;
20
- }, { basePath: D, navigate: O } = f(), { inventory: k, products: A, warehouses: j } = m(), { stats: M } = p(), N = (e) => O?.(v(D, e)), P = k.filter((e) => e.availableQuantity <= e.reorderLevel);
21
- return /* @__PURE__ */ b(i, {
22
- title: E("movethewheels.inventory.title", "Inventory"),
23
- subtitle: E("movethewheels.inventory.subtitle", "Manage your products and warehouses"),
24
- icon: /* @__PURE__ */ y(c, { size: 24 }),
25
- headerActions: /* @__PURE__ */ y(x, {
26
- primary: {
27
- label: E("movethewheels.inventory.actions.addProduct", "Add Product"),
28
- icon: /* @__PURE__ */ y(l, { size: 16 }),
29
- onSelect: () => {}
30
- },
31
- actions: [{
32
- label: E("movethewheels.inventory.actions.products", "Products"),
33
- onSelect: () => N("inventory/products")
34
- }, {
35
- label: E("movethewheels.inventory.actions.warehouses", "Warehouses"),
36
- onSelect: () => N("inventory/warehouses")
37
- }]
38
- }),
39
- children: [
40
- /* @__PURE__ */ y(C, {
41
- icon: /* @__PURE__ */ y(c, { size: 18 }),
42
- children: E("movethewheels.inventory.purpose", "A real-time view of what you have and where. Track stock value and quantities across warehouses, catch low-stock items before they run out, and drill into products or warehouses to manage what you can promise on an order.")
43
- }),
44
- /* @__PURE__ */ b(h, {
45
- columns: 4,
46
- children: [
47
- /* @__PURE__ */ y(g, {
48
- label: E("movethewheels.inventory.metrics.totalProducts", "Total Products"),
49
- value: M.totalProducts,
50
- icon: /* @__PURE__ */ y(c, { size: 20 }),
51
- onClick: () => N("inventory/products")
52
- }),
53
- /* @__PURE__ */ y(g, {
54
- label: E("movethewheels.inventory.metrics.totalItems", "Total Items"),
55
- value: M.totalItems.toLocaleString(),
56
- icon: /* @__PURE__ */ y(c, { size: 20 })
57
- }),
58
- /* @__PURE__ */ y(g, {
59
- label: E("movethewheels.inventory.metrics.inventoryValue", "Inventory Value"),
60
- value: _(M.totalValue),
61
- icon: /* @__PURE__ */ y(c, { size: 20 })
62
- }),
63
- /* @__PURE__ */ y(g, {
64
- label: E("movethewheels.inventory.metrics.warehouses", "Warehouses"),
65
- value: M.totalWarehouses,
66
- icon: /* @__PURE__ */ y(d, { size: 20 }),
67
- onClick: () => N("inventory/warehouses")
68
- })
69
- ]
70
- }),
71
- P.length > 0 && /* @__PURE__ */ b(S, {
72
- className: "space-y-4",
73
- children: [/* @__PURE__ */ b("h2", {
74
- className: "flex items-center gap-2 text-base font-semibold text-status-warning-text",
75
- children: [
76
- /* @__PURE__ */ y(u, { size: 18 }),
77
- E("movethewheels.inventory.lowStock.title", "Low Stock Alert"),
78
- " (",
79
- P.length,
80
- " ",
81
- E("movethewheels.inventory.lowStock.items", "items"),
82
- ")"
83
- ]
84
- }), /* @__PURE__ */ y("div", { children: /* @__PURE__ */ y("div", {
85
- className: "space-y-3",
86
- children: P.slice(0, 5).map((e) => {
87
- let t = A.find((t) => t.id === e.productId);
88
- return /* @__PURE__ */ b("div", {
89
- className: "flex items-center justify-between p-3 bg-status-warning-bg/10 rounded-lg",
90
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
91
- className: "font-medium",
92
- children: t?.name || E("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product")
93
- }), /* @__PURE__ */ b("p", {
94
- className: "text-sm text-text-secondary",
95
- children: [
96
- E("movethewheels.inventory.lowStock.sku", "SKU:"),
97
- " ",
98
- t?.sku
99
- ]
100
- })] }), /* @__PURE__ */ b("div", {
101
- className: "text-right",
102
- children: [/* @__PURE__ */ b("p", {
103
- className: "font-medium text-status-warning-text",
104
- children: [
105
- e.availableQuantity,
106
- " ",
107
- E("movethewheels.inventory.lowStock.left", "left")
108
- ]
109
- }), /* @__PURE__ */ b("p", {
110
- className: "text-sm text-text-secondary",
111
- children: [
112
- E("movethewheels.inventory.lowStock.reorderAt", "Reorder at:"),
113
- " ",
114
- e.reorderLevel
115
- ]
116
- })]
117
- })]
118
- }, e.id);
119
- })
120
- }) })]
121
- }),
122
- /* @__PURE__ */ b("div", {
123
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
124
- children: [/* @__PURE__ */ y(t, {
125
- title: E("movethewheels.inventory.warehouses.title", "Warehouses"),
126
- actions: /* @__PURE__ */ b(o, {
127
- variant: "ghost",
128
- size: "sm",
129
- onClick: () => N("inventory/warehouses"),
130
- children: [
131
- E("movethewheels.inventory.common.viewAll", "View all"),
132
- " ",
133
- /* @__PURE__ */ y(s, { size: 16 })
134
- ]
135
- }),
136
- children: /* @__PURE__ */ y(n, { children: /* @__PURE__ */ y(r, {
137
- className: "p-0",
138
- children: /* @__PURE__ */ y("div", {
139
- className: "divide-y",
140
- children: j.map((t) => /* @__PURE__ */ y("div", {
141
- className: "p-4 hover:bg-bg-sunken/50 cursor-pointer",
142
- onClick: () => N(`inventory/warehouses/${t.id}`),
143
- children: /* @__PURE__ */ b("div", {
144
- className: "flex items-center justify-between",
145
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
146
- className: "font-medium",
147
- children: t.name
148
- }), /* @__PURE__ */ b("p", {
149
- className: "text-sm text-text-secondary",
150
- children: [
151
- t.address.city,
152
- ", ",
153
- t.address.state
154
- ]
155
- })] }), /* @__PURE__ */ b("div", {
156
- className: "text-right",
157
- children: [/* @__PURE__ */ y(a, {
158
- variant: t.isActive ? "default" : "secondary",
159
- children: t.isActive ? E("movethewheels.inventory.warehouses.active", "Active") : E("movethewheels.inventory.warehouses.inactive", "Inactive")
160
- }), /* @__PURE__ */ b("div", {
161
- className: "mt-2",
162
- children: [/* @__PURE__ */ y("p", {
163
- className: "text-xs text-text-secondary",
164
- children: E("movethewheels.inventory.warehouses.utilization", "Utilization")
165
- }), /* @__PURE__ */ y(e, {
166
- value: t.capacity.usedSpace / t.capacity.totalSpace * 100,
167
- className: "w-24 h-2"
168
- })]
169
- })]
170
- })]
171
- })
172
- }, t.id))
173
- })
174
- }) })
175
- }), /* @__PURE__ */ y(t, {
176
- title: E("movethewheels.inventory.products.title", "Recent Products"),
177
- actions: /* @__PURE__ */ b(o, {
178
- variant: "ghost",
179
- size: "sm",
180
- onClick: () => N("inventory/products"),
181
- children: [
182
- E("movethewheels.inventory.common.viewAll", "View all"),
183
- " ",
184
- /* @__PURE__ */ y(s, { size: 16 })
185
- ]
186
- }),
187
- children: /* @__PURE__ */ y(n, { children: /* @__PURE__ */ y(r, {
188
- className: "p-0",
189
- children: /* @__PURE__ */ y("div", {
190
- className: "divide-y",
191
- children: A.slice(0, 5).map((e) => /* @__PURE__ */ y("div", {
192
- className: "p-4 hover:bg-bg-sunken/50 cursor-pointer",
193
- onClick: () => N(`inventory/products/${e.id}`),
194
- children: /* @__PURE__ */ b("div", {
195
- className: "flex items-center justify-between",
196
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
197
- className: "font-medium",
198
- children: e.name
199
- }), /* @__PURE__ */ y("p", {
200
- className: "text-sm text-text-secondary",
201
- children: e.sku
202
- })] }), /* @__PURE__ */ b("div", {
203
- className: "text-right",
204
- children: [/* @__PURE__ */ y("p", {
205
- className: "font-medium",
206
- children: _(e.value)
207
- }), /* @__PURE__ */ y(a, {
208
- variant: "outline",
209
- children: e.category
210
- })]
211
- })]
212
- })
213
- }, e.id))
214
- })
215
- }) })
216
- })]
217
- })
218
- ]
219
- });
220
- }
221
- //#endregion
222
- export { T as default };
@@ -1,219 +0,0 @@
1
- import { A as e, d as t, f as n, g as r, h as i, i as a, l as o, u as s } from "./PageLayout-D3N8MCTm.js";
2
- import { t as c } from "./clock-BjkdnddD.js";
3
- import { t as l } from "./filter-Da5OZaHI.js";
4
- import { t as u } from "./map-pin-BSaf5IDL.js";
5
- import { t as d } from "./search-OxoIiL_C.js";
6
- import { t as f } from "./star-YsVV3MNQ.js";
7
- import { t as p } from "./store-RCBl7HB-.js";
8
- import { r as m, t as h } from "./graphqlClient-CdJyR_ed.js";
9
- import { n as g } from "./formatters-_vJlC-47.js";
10
- import { useCallback as _, useEffect as v, useMemo as y, useState as b } from "react";
11
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
12
- import { EmphasisPanel as C, IllustratedEmptyState as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
13
- //#region src/movethewheels/pages/MarketplacePage.tsx
14
- var E = "\n query ListServiceProviders($filter: ServiceProviderFilterInput, $pagination: PaginationInput) {\n serviceProviders(filter: $filter, pagination: $pagination) {\n id\n name\n type\n description\n rating\n isVerified\n isActive\n services\n contactInfo\n }\n }\n", D = "\n query ListServiceOfferings($filter: ServiceOfferingFilterInput, $pagination: PaginationInput) {\n serviceOfferings(filter: $filter, pagination: $pagination) {\n id\n providerId\n name\n description\n category\n price\n currency\n availability\n provider {\n id\n name\n type\n rating\n }\n }\n }\n";
15
- function O() {
16
- let { apiGatewayUrl: O, authToken: k, workspaceToken: A, workspaceId: j, tenantId: M, currentUser: N } = m(), [P, F] = b([]), [I, L] = b([]), [R, z] = b(""), B = y(() => ({
17
- apiGatewayUrl: O,
18
- authToken: k,
19
- workspaceToken: A,
20
- workspaceId: j,
21
- tenantId: M,
22
- actorId: N?.id
23
- }), [
24
- O,
25
- k,
26
- A,
27
- j,
28
- M,
29
- N?.id
30
- ]), V = _(async () => {
31
- let [e, t] = await Promise.all([h(B, E, { pagination: {
32
- limit: 200,
33
- offset: 0
34
- } }), h(B, D, { pagination: {
35
- limit: 200,
36
- offset: 0
37
- } })]);
38
- F(e.serviceProviders), L(t.serviceOfferings);
39
- }, [B]);
40
- v(() => {
41
- V();
42
- }, [V]);
43
- let H = y(() => {
44
- let e = R.trim().toLowerCase();
45
- return e ? P.filter((t) => t.name.toLowerCase().includes(e) || (t.description ?? "").toLowerCase().includes(e) || t.type.toLowerCase().includes(e)) : P;
46
- }, [P, R]), U = y(() => {
47
- let e = R.trim().toLowerCase();
48
- return e ? I.filter((t) => t.name.toLowerCase().includes(e) || (t.description ?? "").toLowerCase().includes(e) || (t.category ?? "").toLowerCase().includes(e)) : I;
49
- }, [I, R]);
50
- return /* @__PURE__ */ S(a, {
51
- title: "Marketplace",
52
- subtitle: "Find logistics service providers",
53
- icon: /* @__PURE__ */ x(p, { size: 24 }),
54
- headerActions: /* @__PURE__ */ S(s, {
55
- variant: "outline",
56
- children: [/* @__PURE__ */ x(l, { size: 16 }), " Filters"]
57
- }),
58
- children: [
59
- /* @__PURE__ */ x(T, {
60
- icon: /* @__PURE__ */ x(p, { size: 18 }),
61
- children: "Don't own every leg of the journey? Find vetted third-party logistics providers and service offerings here — compare ratings, verification status and pricing, then engage a partner to cover routes, warehousing or specialised handling you can't do in-house."
62
- }),
63
- /* @__PURE__ */ x(t, { children: /* @__PURE__ */ x(n, {
64
- className: "p-4",
65
- children: /* @__PURE__ */ S("div", {
66
- className: "relative",
67
- children: [/* @__PURE__ */ x(d, {
68
- className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
69
- size: 20
70
- }), /* @__PURE__ */ x(e, {
71
- placeholder: "Search services, providers, locations...",
72
- className: "pl-10",
73
- value: R,
74
- onChange: (e) => z(e.target.value)
75
- })]
76
- })
77
- }) }),
78
- /* @__PURE__ */ S("div", {
79
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
80
- children: [/* @__PURE__ */ S("div", {
81
- className: "lg:col-span-2 space-y-4",
82
- children: [
83
- /* @__PURE__ */ S("h3", {
84
- className: "font-semibold",
85
- children: [
86
- "Service Providers (",
87
- H.length,
88
- ")"
89
- ]
90
- }),
91
- H.length === 0 && /* @__PURE__ */ x(t, { children: /* @__PURE__ */ x(n, {
92
- className: "p-0",
93
- children: /* @__PURE__ */ x(w, {
94
- illustration: R.trim() ? "empty-search" : "empty-people",
95
- title: R.trim() ? "No providers match your search" : "No providers yet",
96
- description: R.trim() ? "Try a different search term to find logistics partners." : "Verified logistics service providers will appear here as they join the marketplace."
97
- })
98
- }) }),
99
- H.map((e) => /* @__PURE__ */ x(t, {
100
- className: "hover:shadow-md transition-shadow cursor-pointer",
101
- children: /* @__PURE__ */ x(n, {
102
- className: "p-6",
103
- children: /* @__PURE__ */ S("div", {
104
- className: "flex items-start justify-between",
105
- children: [/* @__PURE__ */ S("div", { children: [
106
- /* @__PURE__ */ S("div", {
107
- className: "flex items-center gap-2",
108
- children: [
109
- /* @__PURE__ */ x("h4", {
110
- className: "font-semibold text-lg",
111
- children: e.name
112
- }),
113
- e.isVerified && /* @__PURE__ */ x(o, {
114
- variant: "default",
115
- children: "Verified"
116
- }),
117
- /* @__PURE__ */ x(o, {
118
- variant: e.isActive ? "default" : "secondary",
119
- children: e.isActive ? "active" : "inactive"
120
- })
121
- ]
122
- }),
123
- /* @__PURE__ */ x("p", {
124
- className: "text-text-secondary mt-1",
125
- children: e.description
126
- }),
127
- /* @__PURE__ */ S("div", {
128
- className: "flex items-center gap-4 mt-3 text-sm text-text-secondary",
129
- children: [
130
- /* @__PURE__ */ S("span", {
131
- className: "flex items-center gap-1",
132
- children: [
133
- /* @__PURE__ */ x(f, {
134
- size: 14,
135
- className: "text-yellow-500 fill-yellow-500"
136
- }),
137
- " ",
138
- e.rating ?? 0
139
- ]
140
- }),
141
- /* @__PURE__ */ S("span", {
142
- className: "flex items-center gap-1",
143
- children: [
144
- /* @__PURE__ */ x(u, { size: 14 }),
145
- " ",
146
- e.type
147
- ]
148
- }),
149
- /* @__PURE__ */ S("span", {
150
- className: "flex items-center gap-1",
151
- children: [/* @__PURE__ */ x(c, { size: 14 }), " Listed"]
152
- })
153
- ]
154
- })
155
- ] }), /* @__PURE__ */ S("div", {
156
- className: "text-right",
157
- children: [/* @__PURE__ */ x("p", {
158
- className: "text-sm text-text-secondary",
159
- children: "Services"
160
- }), /* @__PURE__ */ x("p", {
161
- className: "text-lg font-bold",
162
- children: Array.isArray(e.services) ? e.services.length : 0
163
- })]
164
- })]
165
- })
166
- })
167
- }, e.id))
168
- ]
169
- }), /* @__PURE__ */ S(C, {
170
- className: "space-y-4",
171
- children: [
172
- /* @__PURE__ */ x("h3", {
173
- className: "text-base font-semibold text-text-primary",
174
- children: "Popular Services"
175
- }),
176
- U.length === 0 && /* @__PURE__ */ x(w, {
177
- illustration: R.trim() ? "empty-search" : "empty-generic",
178
- title: R.trim() ? "No matching services" : "No services listed yet",
179
- description: R.trim() ? "Adjust your search to discover service offerings." : "Service offerings from providers will be listed here."
180
- }),
181
- U.map((e) => /* @__PURE__ */ S(t, { children: [/* @__PURE__ */ x(i, { children: /* @__PURE__ */ x(r, {
182
- className: "text-base",
183
- children: e.name
184
- }) }), /* @__PURE__ */ S(n, { children: [
185
- /* @__PURE__ */ x("p", {
186
- className: "text-sm text-text-secondary mb-3",
187
- children: e.description
188
- }),
189
- /* @__PURE__ */ S("div", {
190
- className: "flex flex-wrap gap-1 mb-3",
191
- children: [/* @__PURE__ */ x(o, {
192
- variant: "outline",
193
- className: "text-xs",
194
- children: e.category ?? "general"
195
- }), /* @__PURE__ */ x(o, {
196
- variant: "outline",
197
- className: "text-xs",
198
- children: e.provider?.name ?? "provider"
199
- })]
200
- }),
201
- /* @__PURE__ */ S("div", {
202
- className: "flex items-center justify-between",
203
- children: [/* @__PURE__ */ x("span", {
204
- className: "font-bold",
205
- children: g(e.price)
206
- }), /* @__PURE__ */ x("span", {
207
- className: "text-sm text-text-secondary",
208
- children: e.currency
209
- })]
210
- })
211
- ] })] }, e.id))
212
- ]
213
- })]
214
- })
215
- ]
216
- });
217
- }
218
- //#endregion
219
- export { O as default };