@burdenoff/microfe-movethewheels 2026.827.1 → 2026.830.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 (39) hide show
  1. package/dist/MoveTheWheelsRoot.js +86 -83
  2. package/dist/MoveTheWheelsRoutes.js +107 -104
  3. package/dist/hooks/index.js +1 -0
  4. package/dist/hooks/useImportExport.js +22 -51
  5. package/dist/hooks/useReports.js +63 -73
  6. package/dist/hooks/useSettings.js +52 -44
  7. package/dist/index.js +38 -37
  8. package/dist/movethewheels/hooks/index.d.ts +1 -0
  9. package/dist/movethewheels/hooks/useImportExport.d.ts +10 -0
  10. package/dist/movethewheels/pages/MarketplacePage.d.ts +7 -4
  11. package/dist/movethewheels/shared/hooks/useTr.d.ts +16 -0
  12. package/dist/pages/AIAssistantPage.js +45 -43
  13. package/dist/pages/DashboardPage.js +6 -6
  14. package/dist/pages/FleetPage.js +7 -7
  15. package/dist/pages/InventoryPage.js +6 -6
  16. package/dist/pages/MarketplacePage.js +11 -432
  17. package/dist/pages/OrdersListPage.js +5 -5
  18. package/dist/pages/ReportsPage.js +120 -109
  19. package/dist/pages/SettingsPage.js +175 -154
  20. package/dist/pages/TrackingPage.js +5 -5
  21. package/dist/shared/hooks/useTr.js +12 -0
  22. package/package.json +2 -2
  23. package/src/movethewheels/MoveTheWheelsRoot.tsx +28 -24
  24. package/src/movethewheels/MoveTheWheelsRoutes.tsx +5 -2
  25. package/src/movethewheels/hooks/index.ts +3 -0
  26. package/src/movethewheels/hooks/useImportExport.ts +36 -72
  27. package/src/movethewheels/hooks/useReports.ts +73 -87
  28. package/src/movethewheels/hooks/useSettings.ts +50 -53
  29. package/src/movethewheels/pages/AIAssistantPage.tsx +50 -32
  30. package/src/movethewheels/pages/MarketplacePage.tsx +16 -539
  31. package/src/movethewheels/pages/ReportsPage.tsx +23 -0
  32. package/src/movethewheels/pages/SettingsPage.tsx +154 -70
  33. package/src/movethewheels/shared/hooks/useTr.ts +37 -0
  34. package/dist/generated/global-operations.d.ts +0 -1
  35. package/dist/generated/global-types.d.ts +0 -23526
  36. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -8
  37. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -8
  38. package/src/generated/global-operations.ts +0 -2
  39. package/src/generated/global-types.ts +0 -27259
@@ -27,8 +27,8 @@ import { formatCurrency as O, formatDate as k } from "../utils/formatters.js";
27
27
  import { deliveryMarkerStatus as oe, firstRealLatLng as se } from "../utils/mapMarkers.js";
28
28
  import { useMemo as A } from "react";
29
29
  import { jsx as j, jsxs as M } from "react/jsx-runtime";
30
- import { CTAOverflowMenu as ce, EmphasisPanel as N, PagePurpose as P } from "@burdenoff/fe-libs/ui";
31
- import { useI18n as F } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
30
+ import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
31
+ import { CTAOverflowMenu as N, EmphasisPanel as P, PagePurpose as F } from "@burdenoff/fe-libs/ui";
32
32
  //#region src/movethewheels/pages/DashboardPage.tsx
33
33
  function I(e, t = !1) {
34
34
  if (e.length < 2) return;
@@ -42,7 +42,7 @@ function I(e, t = !1) {
42
42
  };
43
43
  }
44
44
  function L() {
45
- let { t: L } = F(), R = (e, t) => {
45
+ let { t: L } = ce(), R = (e, t) => {
46
46
  let n = L(e);
47
47
  return n === e ? t : n;
48
48
  }, { basePath: z, navigate: B } = u(), { metrics: V } = m(), { analytics: H } = ne(), { orders: U } = f({ limit: 5 }), { stats: W } = d(), { stats: G } = p(), { activeDeliveries: K } = re(), { unacknowledgedAlerts: q } = ie(), J = A(() => H.trends.dailyOrders.map((e) => e.orders), [H.trends.dailyOrders]), Y = A(() => H.trends.dailyOrders.map((e) => e.deliveries), [H.trends.dailyOrders]), X = A(() => H.trends.revenue.map((e) => e.revenue), [H.trends.revenue]), le = A(() => H.trends.dailyOrders.slice(-7), [H.trends.dailyOrders]), ue = A(() => K.flatMap((e) => {
@@ -67,7 +67,7 @@ function L() {
67
67
  title: R("movethewheels.dashboard.title", "Dashboard"),
68
68
  subtitle: R("movethewheels.dashboard.subtitle", "Overview of your logistics operations"),
69
69
  icon: /* @__PURE__ */ j(s, { size: 24 }),
70
- headerActions: /* @__PURE__ */ j(ce, {
70
+ headerActions: /* @__PURE__ */ j(N, {
71
71
  primary: {
72
72
  label: R("movethewheels.dashboard.actions.newOrder", "New Order"),
73
73
  icon: /* @__PURE__ */ j(a, { size: 16 }),
@@ -84,7 +84,7 @@ function L() {
84
84
  }]
85
85
  }),
86
86
  children: [
87
- /* @__PURE__ */ j(P, {
87
+ /* @__PURE__ */ j(F, {
88
88
  icon: /* @__PURE__ */ j(s, { size: 18 }),
89
89
  children: R("movethewheels.dashboard.purpose", "Your logistics command center — a live snapshot of orders, active deliveries, fleet health and revenue. Start here each day to spot what needs attention, then jump straight into an order, the live map or fleet status.")
90
90
  }),
@@ -381,7 +381,7 @@ function L() {
381
381
  /* @__PURE__ */ M("div", {
382
382
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
383
383
  children: [
384
- /* @__PURE__ */ M(N, {
384
+ /* @__PURE__ */ M(P, {
385
385
  className: "space-y-4",
386
386
  children: [/* @__PURE__ */ j("h2", {
387
387
  className: "text-base font-semibold text-text-primary",
@@ -12,11 +12,11 @@ import { PageLayout as y, PageSection as b } from "../components/PageLayout.js";
12
12
  import { MetricCard as x, MetricCardSkeleton as S, MetricGrid as C } from "../components/MetricCard.js";
13
13
  import { StatusBadge as w, VehicleTypeBadge as T } from "../components/StatusBadge.js";
14
14
  import { jsx as E, jsxs as D } from "react/jsx-runtime";
15
- import { CTAOverflowMenu as O, EmphasisPanel as k, NextSteps as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
16
- import { useI18n as M } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
+ import { useI18n as O } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
+ import { CTAOverflowMenu as k, EmphasisPanel as A, NextSteps as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
17
17
  //#region src/movethewheels/pages/FleetPage.tsx
18
18
  function N() {
19
- let { t: N } = M(), P = (e, t) => {
19
+ let { t: N } = O(), P = (e, t) => {
20
20
  let n = N(e);
21
21
  return n === e ? t : n;
22
22
  }, { basePath: F, navigate: I } = s(), { stats: L, isLoading: R, error: z, refetch: B } = l(), { vehicles: V, isLoading: H, error: U, refetch: W } = u(), { drivers: G, isLoading: K, error: q, refetch: J } = c(), Y = R || H || K, X = z ?? U ?? q, Z = () => {
@@ -30,7 +30,7 @@ function N() {
30
30
  title: P("movethewheels.fleet.title", "Fleet Management"),
31
31
  subtitle: P("movethewheels.fleet.subtitle", "Manage your vehicles and drivers"),
32
32
  icon: /* @__PURE__ */ E(r, { size: 24 }),
33
- headerActions: /* @__PURE__ */ E(O, {
33
+ headerActions: /* @__PURE__ */ E(k, {
34
34
  primary: {
35
35
  label: P("movethewheels.fleet.actions.allVehicles", "All Vehicles"),
36
36
  icon: /* @__PURE__ */ E(r, { size: 16 }),
@@ -43,11 +43,11 @@ function N() {
43
43
  }]
44
44
  }),
45
45
  children: [
46
- /* @__PURE__ */ E(j, {
46
+ /* @__PURE__ */ E(M, {
47
47
  icon: /* @__PURE__ */ E(r, { size: 18 }),
48
48
  children: P("movethewheels.fleet.purpose", "Your command center for vehicles and drivers. See utilization at a glance, keep an eye on availability and ratings, and act on maintenance alerts so you always have road-ready capacity to fulfil orders.")
49
49
  }),
50
- /* @__PURE__ */ E(A, {
50
+ /* @__PURE__ */ E(j, {
51
51
  storageKey: "movethewheels-fleet",
52
52
  steps: [
53
53
  {
@@ -278,7 +278,7 @@ function N() {
278
278
  }),
279
279
  /* @__PURE__ */ D("div", {
280
280
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
281
- children: [/* @__PURE__ */ D(k, {
281
+ children: [/* @__PURE__ */ D(A, {
282
282
  className: "space-y-4",
283
283
  children: [/* @__PURE__ */ E("h2", {
284
284
  className: "text-base font-semibold text-text-primary",
@@ -21,8 +21,8 @@ import { DataTable as ne } from "../components/DataTable.js";
21
21
  import { formatCurrency as re, formatDate as ie } from "../utils/formatters.js";
22
22
  import { useMemo as ae } from "react";
23
23
  import { jsx as O, jsxs as k } from "react/jsx-runtime";
24
- import { CTAOverflowMenu as A, EmphasisPanel as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
25
- import { useI18n as N } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
+ import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
25
+ import { CTAOverflowMenu as j, EmphasisPanel as M, PagePurpose as N } from "@burdenoff/fe-libs/ui";
26
26
  //#region src/movethewheels/pages/InventoryPage.tsx
27
27
  var P = {
28
28
  out_of_stock: {
@@ -51,7 +51,7 @@ var P = {
51
51
  ADJUSTMENT: "Adjustment"
52
52
  };
53
53
  function L() {
54
- let { t: L } = N(), R = (e, t) => {
54
+ let { t: L } = A(), R = (e, t) => {
55
55
  let n = L(e);
56
56
  return n === e ? t : n;
57
57
  }, { basePath: z, navigate: B } = p(), { inventory: V, products: H, warehouses: U, isLoading: W, error: G, refetch: K } = ee(), { stats: q } = m(), { transactions: J, isLoading: oe, error: Y } = h({ limit: 8 }), X = (e) => B?.(f(z, e)), Z = (e, t) => {
@@ -153,7 +153,7 @@ function L() {
153
153
  title: R("movethewheels.inventory.title", "Inventory"),
154
154
  subtitle: R("movethewheels.inventory.subtitle", "Manage your products and warehouses"),
155
155
  icon: /* @__PURE__ */ O(c, { size: 24 }),
156
- headerActions: /* @__PURE__ */ O(A, {
156
+ headerActions: /* @__PURE__ */ O(j, {
157
157
  primary: {
158
158
  label: R("movethewheels.inventory.actions.addProduct", "Add Product"),
159
159
  icon: /* @__PURE__ */ O(l, { size: 16 }),
@@ -168,7 +168,7 @@ function L() {
168
168
  }]
169
169
  }),
170
170
  children: [
171
- /* @__PURE__ */ O(M, {
171
+ /* @__PURE__ */ O(N, {
172
172
  icon: /* @__PURE__ */ O(c, { size: 18 }),
173
173
  children: R("movethewheels.inventory.purpose", "A real-time view of what you have and where. Track on-hand, allocated and free-to-promise quantities across warehouses, follow every stock movement, catch low-stock items before they run out, and drill into products or warehouses to manage what you can promise on an order.")
174
174
  }),
@@ -242,7 +242,7 @@ function L() {
242
242
  })
243
243
  ]
244
244
  }),
245
- Q.length > 0 && /* @__PURE__ */ k(j, {
245
+ Q.length > 0 && /* @__PURE__ */ k(M, {
246
246
  className: "space-y-4",
247
247
  children: [/* @__PURE__ */ k("h2", {
248
248
  className: "flex items-center gap-2 text-base font-semibold text-status-warning-text",
@@ -1,438 +1,17 @@
1
- import { ChevronDown as e } from "../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
2
- import { ChevronLeft as t } from "../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
3
- import { ChevronRight as n } from "../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
4
- import { ChevronUp as ee } from "../node_modules/lucide-react/dist/esm/icons/chevron-up.js";
5
- import { Clock as te } from "../node_modules/lucide-react/dist/esm/icons/clock.js";
6
- import { Filter as r } from "../node_modules/lucide-react/dist/esm/icons/filter.js";
7
- import { MapPin as ne } from "../node_modules/lucide-react/dist/esm/icons/map-pin.js";
8
- import { Search as re } from "../node_modules/lucide-react/dist/esm/icons/search.js";
9
- import { Star as ie } from "../node_modules/lucide-react/dist/esm/icons/star.js";
10
- import { Store as i } from "../node_modules/lucide-react/dist/esm/icons/store.js";
11
- import { useMoveTheWheels as ae } from "../providers/MoveTheWheelsProvider.js";
12
- import { executeGraphQL as a } from "../utils/graphqlClient.js";
13
- import { Badge as o, Button as s, Card as c, CardContent as l, CardHeader as oe, CardTitle as se, Input as ce, Select as u, SelectContent as d, SelectItem as f, SelectTrigger as p, SelectValue as m, Skeleton as le } from "../components/ui.js";
14
- import { PageLayout as h } from "../components/PageLayout.js";
15
- import { formatCurrency as g } from "../utils/formatters.js";
16
- import { useCallback as _, useEffect as ue, useMemo as v, useState as y } from "react";
17
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
18
- import { useFeatureFlag as de } from "@burdenoff/fe-libs/shared/feature-flags";
19
- import { EmphasisPanel as fe, IllustratedEmptyState as C, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
1
+ import { Store as e } from "../node_modules/lucide-react/dist/esm/icons/store.js";
2
+ import { Card as t, CardContent as n } from "../components/ui.js";
3
+ import { PageLayout as r } from "../components/PageLayout.js";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import { IllustratedEmptyState as a } from "@burdenoff/fe-libs/ui";
20
6
  //#region src/movethewheels/pages/MarketplacePage.tsx
21
- var me = "movethewheels.marketplace", he = "\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", ge = "\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", w = 12, _e = [
22
- {
23
- value: "0",
24
- label: "Any rating"
25
- },
26
- {
27
- value: "3",
28
- label: "3.0+"
29
- },
30
- {
31
- value: "4",
32
- label: "4.0+"
33
- },
34
- {
35
- value: "4.5",
36
- label: "4.5+"
37
- }
38
- ];
39
- function T() {
40
- let T = de(me, !1), { apiGatewayUrl: E, authToken: D, workspaceToken: O, workspaceId: k, tenantId: A, currentUser: j } = ae(), [M, ve] = y([]), [N, ye] = y([]), [P, be] = y(""), [F, I] = y(!1), [L, R] = y(null), [z, B] = y(0), [xe, Se] = y(!1), [V, Ce] = y(!1), [H, U] = y("all"), [W, G] = y(!1), [K, q] = y("0"), [we, J] = y(null), Y = v(() => ({
41
- apiGatewayUrl: E,
42
- authToken: D,
43
- workspaceToken: O,
44
- workspaceId: k,
45
- tenantId: A,
46
- actorId: j?.id
47
- }), [
48
- E,
49
- D,
50
- O,
51
- k,
52
- A,
53
- j?.id
54
- ]), X = _(async () => {
55
- if (T) {
56
- I(!0), R(null);
57
- try {
58
- let [e, t] = await Promise.all([a(Y, he, { pagination: {
59
- limit: w,
60
- offset: z * w
61
- } }), a(Y, ge, { pagination: {
62
- limit: 200,
63
- offset: 0
64
- } })]);
65
- ve(e.serviceProviders), Se(e.serviceProviders.length === w), ye(t.serviceOfferings);
66
- } catch (e) {
67
- R(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load marketplace"));
68
- } finally {
69
- I(!1);
70
- }
71
- }
72
- }, [
73
- Y,
74
- z,
75
- T
76
- ]);
77
- ue(() => {
78
- X();
79
- }, [X]);
80
- let Te = v(() => {
81
- let e = /* @__PURE__ */ new Set();
82
- return M.forEach((t) => e.add(t.type)), Array.from(e).sort();
83
- }, [M]), Z = v(() => {
84
- let e = P.trim().toLowerCase(), t = Number(K);
85
- return M.filter((n) => !(e && !(n.name.toLowerCase().includes(e) || (n.description ?? "").toLowerCase().includes(e) || n.type.toLowerCase().includes(e)) || H !== "all" && n.type !== H || W && !n.isVerified || t > 0 && (n.rating ?? 0) < t));
86
- }, [
87
- M,
88
- P,
89
- H,
90
- W,
91
- K
92
- ]), Q = v(() => {
93
- let e = P.trim().toLowerCase();
94
- return e ? N.filter((t) => t.name.toLowerCase().includes(e) || (t.description ?? "").toLowerCase().includes(e) || (t.category ?? "").toLowerCase().includes(e)) : N;
95
- }, [N, P]), Ee = _((e) => N.filter((t) => t.providerId === e), [N]), $ = H !== "all" || W || K !== "0";
96
- return T ? /* @__PURE__ */ S(h, {
7
+ function o() {
8
+ return /* @__PURE__ */ i(r, {
97
9
  title: "Marketplace",
98
10
  subtitle: "Find logistics service providers",
99
- icon: /* @__PURE__ */ x(i, { size: 24 }),
100
- headerActions: /* @__PURE__ */ S(s, {
101
- variant: V || $ ? "default" : "outline",
102
- onClick: () => Ce((e) => !e),
103
- children: [/* @__PURE__ */ x(r, { size: 16 }), " Filters"]
104
- }),
105
- children: [
106
- /* @__PURE__ */ x(pe, {
107
- icon: /* @__PURE__ */ x(i, { size: 18 }),
108
- 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."
109
- }),
110
- /* @__PURE__ */ x(c, { children: /* @__PURE__ */ S(l, {
111
- className: "p-4 space-y-4",
112
- children: [/* @__PURE__ */ S("div", {
113
- className: "relative",
114
- children: [/* @__PURE__ */ x(re, {
115
- className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
116
- size: 20
117
- }), /* @__PURE__ */ x(ce, {
118
- placeholder: "Search services, providers, locations...",
119
- className: "pl-10",
120
- value: P,
121
- onChange: (e) => be(e.target.value)
122
- })]
123
- }), V && /* @__PURE__ */ S("div", {
124
- className: "flex flex-wrap items-center gap-3 border-t border-border-seam pt-4",
125
- children: [
126
- /* @__PURE__ */ S("div", {
127
- className: "flex items-center gap-2",
128
- children: [/* @__PURE__ */ x("span", {
129
- className: "text-sm font-medium text-text-secondary",
130
- children: "Type"
131
- }), /* @__PURE__ */ S(u, {
132
- value: H,
133
- onValueChange: U,
134
- children: [/* @__PURE__ */ x(p, {
135
- className: "w-[160px]",
136
- children: /* @__PURE__ */ x(m, { placeholder: "All types" })
137
- }), /* @__PURE__ */ S(d, { children: [/* @__PURE__ */ x(f, {
138
- value: "all",
139
- children: "All types"
140
- }), Te.map((e) => /* @__PURE__ */ x(f, {
141
- value: e,
142
- children: e
143
- }, e))] })]
144
- })]
145
- }),
146
- /* @__PURE__ */ S("div", {
147
- className: "flex items-center gap-2",
148
- children: [/* @__PURE__ */ x("span", {
149
- className: "text-sm font-medium text-text-secondary",
150
- children: "Min rating"
151
- }), /* @__PURE__ */ S(u, {
152
- value: K,
153
- onValueChange: q,
154
- children: [/* @__PURE__ */ x(p, {
155
- className: "w-[130px]",
156
- children: /* @__PURE__ */ x(m, {})
157
- }), /* @__PURE__ */ x(d, { children: _e.map((e) => /* @__PURE__ */ x(f, {
158
- value: e.value,
159
- children: e.label
160
- }, e.value)) })]
161
- })]
162
- }),
163
- /* @__PURE__ */ x(s, {
164
- variant: W ? "default" : "outline",
165
- size: "sm",
166
- onClick: () => G((e) => !e),
167
- children: "Verified only"
168
- }),
169
- $ && /* @__PURE__ */ x(s, {
170
- variant: "ghost",
171
- size: "sm",
172
- onClick: () => {
173
- U("all"), G(!1), q("0");
174
- },
175
- children: "Clear filters"
176
- })
177
- ]
178
- })]
179
- }) }),
180
- /* @__PURE__ */ S("div", {
181
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
182
- children: [/* @__PURE__ */ S("div", {
183
- className: "lg:col-span-2 space-y-4",
184
- children: [
185
- /* @__PURE__ */ S("h3", {
186
- className: "font-semibold",
187
- children: [
188
- "Service Providers (",
189
- Z.length,
190
- ")"
191
- ]
192
- }),
193
- L && !F && /* @__PURE__ */ x(c, {
194
- className: "border-status-error-border",
195
- children: /* @__PURE__ */ S(l, {
196
- className: "p-6 text-center space-y-3",
197
- children: [
198
- /* @__PURE__ */ x("p", {
199
- className: "text-status-error-text font-medium",
200
- children: "Couldn't load providers"
201
- }),
202
- /* @__PURE__ */ x("p", {
203
- className: "text-sm text-text-secondary",
204
- children: L.message
205
- }),
206
- /* @__PURE__ */ x(s, {
207
- variant: "outline",
208
- onClick: () => void X(),
209
- children: "Retry"
210
- })
211
- ]
212
- })
213
- }),
214
- F && Array.from({ length: 3 }).map((e, t) => /* @__PURE__ */ x(le, { className: "h-32 w-full rounded-lg" }, t)),
215
- !F && !L && Z.length === 0 && /* @__PURE__ */ x(c, { children: /* @__PURE__ */ x(l, {
216
- className: "p-0",
217
- children: /* @__PURE__ */ x(C, {
218
- illustration: P.trim() || $ ? "empty-search" : "empty-people",
219
- title: P.trim() || $ ? "No providers match your filters" : "No providers yet",
220
- description: P.trim() || $ ? "Adjust your search or filters to find logistics partners." : "Verified logistics service providers will appear here as they join the marketplace."
221
- })
222
- }) }),
223
- !F && !L && Z.map((t) => {
224
- let n = we === t.id, r = Ee(t.id);
225
- return /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ x("button", {
226
- type: "button",
227
- "aria-expanded": n,
228
- className: "w-full text-left",
229
- onClick: () => J(n ? null : t.id),
230
- children: /* @__PURE__ */ x(l, {
231
- className: "p-6",
232
- children: /* @__PURE__ */ S("div", {
233
- className: "flex items-start justify-between gap-3",
234
- children: [/* @__PURE__ */ S("div", {
235
- className: "min-w-0",
236
- children: [
237
- /* @__PURE__ */ S("div", {
238
- className: "flex items-center gap-2 flex-wrap",
239
- children: [
240
- /* @__PURE__ */ x("h4", {
241
- className: "font-semibold text-lg",
242
- children: t.name
243
- }),
244
- t.isVerified && /* @__PURE__ */ x(o, {
245
- variant: "default",
246
- children: "Verified"
247
- }),
248
- /* @__PURE__ */ x(o, {
249
- variant: t.isActive ? "default" : "secondary",
250
- children: t.isActive ? "active" : "inactive"
251
- })
252
- ]
253
- }),
254
- /* @__PURE__ */ x("p", {
255
- className: "text-text-secondary mt-1",
256
- children: t.description
257
- }),
258
- /* @__PURE__ */ S("div", {
259
- className: "flex items-center gap-4 mt-3 text-sm text-text-secondary",
260
- children: [
261
- /* @__PURE__ */ S("span", {
262
- className: "flex items-center gap-1",
263
- children: [
264
- /* @__PURE__ */ x(ie, {
265
- size: 14,
266
- className: "text-status-warning-text fill-current"
267
- }),
268
- " ",
269
- t.rating ?? 0
270
- ]
271
- }),
272
- /* @__PURE__ */ S("span", {
273
- className: "flex items-center gap-1",
274
- children: [
275
- /* @__PURE__ */ x(ne, { size: 14 }),
276
- " ",
277
- t.type
278
- ]
279
- }),
280
- /* @__PURE__ */ S("span", {
281
- className: "flex items-center gap-1",
282
- children: [/* @__PURE__ */ x(te, { size: 14 }), " Listed"]
283
- })
284
- ]
285
- })
286
- ]
287
- }), /* @__PURE__ */ S("div", {
288
- className: "text-right shrink-0",
289
- children: [
290
- /* @__PURE__ */ x("p", {
291
- className: "text-sm text-text-secondary",
292
- children: "Services"
293
- }),
294
- /* @__PURE__ */ x("p", {
295
- className: "text-lg font-bold",
296
- children: r.length
297
- }),
298
- /* @__PURE__ */ x("span", {
299
- className: "mt-1 inline-flex items-center gap-1 text-xs text-primary",
300
- children: n ? /* @__PURE__ */ S(b, { children: ["Hide ", /* @__PURE__ */ x(ee, { size: 14 })] }) : /* @__PURE__ */ S(b, { children: ["View ", /* @__PURE__ */ x(e, { size: 14 })] })
301
- })
302
- ]
303
- })]
304
- })
305
- })
306
- }), n && /* @__PURE__ */ S("div", {
307
- className: "border-t border-border-seam px-6 py-4 space-y-3",
308
- children: [/* @__PURE__ */ S("p", {
309
- className: "text-sm font-medium text-text-secondary",
310
- children: ["Offerings from ", t.name]
311
- }), r.length === 0 ? /* @__PURE__ */ x("p", {
312
- className: "text-sm text-text-secondary",
313
- children: "This provider hasn't listed any offerings yet."
314
- }) : r.map((e) => /* @__PURE__ */ S("div", {
315
- className: "flex items-center justify-between gap-3 rounded-lg border border-border-seam p-3",
316
- children: [/* @__PURE__ */ S("div", {
317
- className: "min-w-0",
318
- children: [/* @__PURE__ */ x("p", {
319
- className: "font-medium truncate",
320
- children: e.name
321
- }), /* @__PURE__ */ x("p", {
322
- className: "text-sm text-text-secondary truncate",
323
- children: e.category ?? "general"
324
- })]
325
- }), /* @__PURE__ */ S("div", {
326
- className: "text-right shrink-0",
327
- children: [/* @__PURE__ */ x("p", {
328
- className: "font-bold",
329
- children: g(e.price)
330
- }), /* @__PURE__ */ x("p", {
331
- className: "text-xs text-text-secondary",
332
- children: e.currency
333
- })]
334
- })]
335
- }, e.id))]
336
- })] }, t.id);
337
- }),
338
- !F && !L && (M.length > 0 || z > 0) && /* @__PURE__ */ S("div", {
339
- className: "flex flex-wrap items-center justify-between gap-3 pt-1",
340
- children: [/* @__PURE__ */ S("span", {
341
- className: "text-sm text-text-secondary",
342
- children: [
343
- "Showing ",
344
- M.length === 0 ? 0 : z * w + 1,
345
- " to",
346
- " ",
347
- z * w + M.length
348
- ]
349
- }), /* @__PURE__ */ S("div", {
350
- className: "flex items-center gap-1",
351
- children: [
352
- /* @__PURE__ */ x(s, {
353
- variant: "outline",
354
- size: "icon",
355
- className: "h-8 w-8",
356
- "aria-label": "Previous page",
357
- onClick: () => {
358
- J(null), B((e) => Math.max(0, e - 1));
359
- },
360
- disabled: z === 0,
361
- children: /* @__PURE__ */ x(t, { className: "h-4 w-4" })
362
- }),
363
- /* @__PURE__ */ S("span", {
364
- className: "px-3 text-sm",
365
- children: ["Page ", z + 1]
366
- }),
367
- /* @__PURE__ */ x(s, {
368
- variant: "outline",
369
- size: "icon",
370
- className: "h-8 w-8",
371
- "aria-label": "Next page",
372
- onClick: () => {
373
- J(null), B((e) => e + 1);
374
- },
375
- disabled: !xe,
376
- children: /* @__PURE__ */ x(n, { className: "h-4 w-4" })
377
- })
378
- ]
379
- })]
380
- })
381
- ]
382
- }), /* @__PURE__ */ S(fe, {
383
- className: "space-y-4",
384
- children: [
385
- /* @__PURE__ */ x("h3", {
386
- className: "text-base font-semibold text-text-primary",
387
- children: "Popular Services"
388
- }),
389
- Q.length === 0 && /* @__PURE__ */ x(C, {
390
- illustration: P.trim() ? "empty-search" : "empty-generic",
391
- title: P.trim() ? "No matching services" : "No services listed yet",
392
- description: P.trim() ? "Adjust your search to discover service offerings." : "Service offerings from providers will be listed here."
393
- }),
394
- Q.map((e) => /* @__PURE__ */ S(c, { children: [/* @__PURE__ */ x(oe, { children: /* @__PURE__ */ x(se, {
395
- className: "text-base",
396
- children: e.name
397
- }) }), /* @__PURE__ */ S(l, { children: [
398
- /* @__PURE__ */ x("p", {
399
- className: "text-sm text-text-secondary mb-3",
400
- children: e.description
401
- }),
402
- /* @__PURE__ */ S("div", {
403
- className: "flex flex-wrap gap-1 mb-3",
404
- children: [/* @__PURE__ */ x(o, {
405
- variant: "outline",
406
- className: "text-xs",
407
- children: e.category ?? "general"
408
- }), /* @__PURE__ */ x(o, {
409
- variant: "outline",
410
- className: "text-xs",
411
- children: e.provider?.name ?? "provider"
412
- })]
413
- }),
414
- /* @__PURE__ */ S("div", {
415
- className: "flex items-center justify-between",
416
- children: [/* @__PURE__ */ x("span", {
417
- className: "font-bold",
418
- children: g(e.price)
419
- }), /* @__PURE__ */ x("span", {
420
- className: "text-sm text-text-secondary",
421
- children: e.currency
422
- })]
423
- })
424
- ] })] }, e.id))
425
- ]
426
- })]
427
- })
428
- ]
429
- }) : /* @__PURE__ */ x(h, {
430
- title: "Marketplace",
431
- subtitle: "Find logistics service providers",
432
- icon: /* @__PURE__ */ x(i, { size: 24 }),
433
- children: /* @__PURE__ */ x(c, { children: /* @__PURE__ */ x(l, {
11
+ icon: /* @__PURE__ */ i(e, { size: 24 }),
12
+ children: /* @__PURE__ */ i(t, { children: /* @__PURE__ */ i(n, {
434
13
  className: "p-0",
435
- children: /* @__PURE__ */ x(C, {
14
+ children: /* @__PURE__ */ i(a, {
436
15
  illustration: "empty-people",
437
16
  title: "Marketplace is coming soon",
438
17
  description: "The collaborative logistics marketplace is not open yet. Check back after it launches to browse verified third-party service providers."
@@ -441,4 +20,4 @@ function T() {
441
20
  });
442
21
  }
443
22
  //#endregion
444
- export { T as default };
23
+ export { o as default };
@@ -19,11 +19,11 @@ import { DataTable as w } from "../components/DataTable.js";
19
19
  import { formatCurrency as ie, formatDate as T } from "../utils/formatters.js";
20
20
  import { useState as E } from "react";
21
21
  import { jsx as D, jsxs as O } from "react/jsx-runtime";
22
- import { CTAOverflowMenu as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
23
- import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { CTAOverflowMenu as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
24
24
  //#region src/movethewheels/pages/OrdersListPage.tsx
25
25
  function M() {
26
- let { t: M } = j(), N = (e, t) => {
26
+ let { t: M } = k(), N = (e, t) => {
27
27
  let n = M(e);
28
28
  return n === e ? t : n;
29
29
  }, { basePath: P, navigate: F } = u(), [I, L] = E("all"), [R, z] = E(!1), [B, V] = E(0), [H, U] = E(25), W = I !== "all" || R, { orders: G, hasMore: K, isLoading: q, error: J, refetch: Y } = f({
@@ -190,7 +190,7 @@ function M() {
190
190
  title: N("movethewheels.orders.title", "Orders"),
191
191
  subtitle: `${Z} ${N("movethewheels.orders.subtitle", "total orders")}`,
192
192
  icon: /* @__PURE__ */ D(r, { size: 24 }),
193
- headerActions: /* @__PURE__ */ D(k, {
193
+ headerActions: /* @__PURE__ */ D(A, {
194
194
  primary: {
195
195
  label: N("movethewheels.orders.actions.newOrder", "New Order"),
196
196
  icon: /* @__PURE__ */ D(i, { size: 16 }),
@@ -207,7 +207,7 @@ function M() {
207
207
  }]
208
208
  }),
209
209
  children: [
210
- /* @__PURE__ */ D(A, {
210
+ /* @__PURE__ */ D(j, {
211
211
  icon: /* @__PURE__ */ D(r, { size: 18 }),
212
212
  children: N("movethewheels.orders.purpose", "Every delivery job lives here — their status, priority and value. Use this list to find an order, filter by status, and open one to assign a driver, track it, or update fulfilment.")
213
213
  }),