@burdenoff/microfe-movethewheels 2026.1031.2 → 2026.1031.3

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 (29) hide show
  1. package/dist/MoveTheWheelsRoot.js +144 -136
  2. package/dist/MoveTheWheelsRoutes.js +61 -57
  3. package/dist/generated/tracking-quality-operations.d.ts +84 -0
  4. package/dist/hooks/useEntityImport.js +68 -0
  5. package/dist/movethewheels/hooks/useEntityImport.d.ts +19 -0
  6. package/dist/movethewheels/pages/ImportExportPage.d.ts +9 -0
  7. package/dist/movethewheels/utils/entityImport.d.ts +109 -0
  8. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down-up.js +22 -0
  9. package/dist/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js +30 -0
  10. package/dist/node_modules/lucide-react/dist/esm/icons/file-up.js +22 -0
  11. package/dist/pages/CustomersPage.js +88 -79
  12. package/dist/pages/DriversPage.js +115 -106
  13. package/dist/pages/ImportExportPage.js +435 -0
  14. package/dist/pages/ProductsPage.js +85 -76
  15. package/dist/pages/VehiclesPage.js +99 -90
  16. package/dist/pages/WarehousesPage.js +97 -88
  17. package/dist/utils/entityImport.js +73 -0
  18. package/package.json +3 -2
  19. package/src/generated/tracking-quality-operations.ts +122 -0
  20. package/src/movethewheels/MoveTheWheelsRoot.tsx +8 -0
  21. package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
  22. package/src/movethewheels/hooks/useEntityImport.ts +108 -0
  23. package/src/movethewheels/pages/CustomersPage.tsx +6 -1
  24. package/src/movethewheels/pages/DriversPage.tsx +6 -0
  25. package/src/movethewheels/pages/ImportExportPage.tsx +483 -0
  26. package/src/movethewheels/pages/ProductsPage.tsx +14 -1
  27. package/src/movethewheels/pages/VehiclesPage.tsx +6 -0
  28. package/src/movethewheels/pages/WarehousesPage.tsx +6 -1
  29. package/src/movethewheels/utils/entityImport.ts +239 -0
@@ -4,91 +4,100 @@ import { Plus as n } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
4
4
  import { RefreshCw as r } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
5
5
  import { Thermometer as i } from "../node_modules/lucide-react/dist/esm/icons/thermometer.js";
6
6
  import { TriangleAlert as a } from "../node_modules/lucide-react/dist/esm/icons/triangle-alert.js";
7
- import { joinPath as o } from "../utils/navigation.js";
8
- import { useMoveTheWheels as s } from "../providers/MoveTheWheelsProvider.js";
9
- import { useProductStats as c, useProducts as l } from "../hooks/useInventory.js";
10
- import { Badge as u } from "../components/ui.js";
11
- import { PageLayout as d } from "../components/PageLayout.js";
12
- import { MetricCard as f, MetricGrid as p } from "../components/MetricCard.js";
13
- import { DataTable as m } from "../components/DataTable.js";
14
- import { formatCurrency as h } from "../utils/formatters.js";
15
- import { useDebouncedValue as g } from "../hooks/useDebouncedValue.js";
16
- import { useEntityExport as _ } from "../hooks/useEntityExport.js";
17
- import { ExportStatusBanner as v } from "../components/ExportStatusBanner.js";
18
- import { useState as y } from "react";
19
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
20
- import { CTAOverflowMenu as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
7
+ import { Upload as o } from "../node_modules/lucide-react/dist/esm/icons/upload.js";
8
+ import { joinPath as s } from "../utils/navigation.js";
9
+ import { useMoveTheWheels as c } from "../providers/MoveTheWheelsProvider.js";
10
+ import { useProductStats as l, useProducts as u } from "../hooks/useInventory.js";
11
+ import { Badge as d } from "../components/ui.js";
12
+ import { PageLayout as f } from "../components/PageLayout.js";
13
+ import { MetricCard as p, MetricGrid as m } from "../components/MetricCard.js";
14
+ import { DataTable as h } from "../components/DataTable.js";
15
+ import { formatCurrency as g } from "../utils/formatters.js";
16
+ import { useDebouncedValue as _ } from "../hooks/useDebouncedValue.js";
17
+ import { useEntityExport as v } from "../hooks/useEntityExport.js";
18
+ import { ExportStatusBanner as y } from "../components/ExportStatusBanner.js";
19
+ import { useState as b } from "react";
20
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
21
+ import { CTAOverflowMenu as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
21
22
  //#region src/movethewheels/pages/ProductsPage.tsx
22
- function w() {
23
- let { basePath: w, navigate: T } = s(), { state: E, isExporting: D, startExport: O, dismiss: k } = _("products", "product"), [A, j] = y(0), [M, N] = y(25), [P, F] = y(""), I = g(P), { products: L, totalProducts: R, hasMore: z, isLoading: B, error: V, refetch: H } = l({
24
- limit: M,
25
- offset: A * M,
26
- search: I
27
- }), { stats: U } = c(), W = (e) => T?.(o(w, e));
28
- return /* @__PURE__ */ x(d, {
23
+ function T() {
24
+ let { basePath: T, navigate: E } = c(), { state: D, isExporting: O, startExport: k, dismiss: A } = v("products", "product"), [j, M] = b(0), [N, P] = b(25), [F, I] = b(""), L = _(F), { products: R, totalProducts: z, hasMore: B, isLoading: V, error: H, refetch: U } = u({
25
+ limit: N,
26
+ offset: j * N,
27
+ search: L
28
+ }), { stats: W } = l(), G = (e) => E?.(s(T, e));
29
+ return /* @__PURE__ */ S(f, {
29
30
  title: "Products",
30
- subtitle: `${U.total} products`,
31
- icon: /* @__PURE__ */ b(t, { size: 24 }),
32
- headerActions: /* @__PURE__ */ b(S, {
31
+ subtitle: `${W.total} products`,
32
+ icon: /* @__PURE__ */ x(t, { size: 24 }),
33
+ headerActions: /* @__PURE__ */ x(C, {
33
34
  primary: {
34
35
  label: "Add Product",
35
- icon: /* @__PURE__ */ b(n, { size: 16 }),
36
- onSelect: () => W("inventory/products/new")
36
+ icon: /* @__PURE__ */ x(n, { size: 16 }),
37
+ onSelect: () => G("inventory/products/new")
37
38
  },
38
- actions: [{
39
- label: "Refresh",
40
- icon: /* @__PURE__ */ b(r, { size: 16 }),
41
- onSelect: () => H()
42
- }, {
43
- label: D ? "Exporting…" : "Export",
44
- icon: /* @__PURE__ */ b(e, { size: 16 }),
45
- onSelect: O
46
- }]
39
+ actions: [
40
+ {
41
+ label: "Refresh",
42
+ icon: /* @__PURE__ */ x(r, { size: 16 }),
43
+ onSelect: () => U()
44
+ },
45
+ {
46
+ label: "Import",
47
+ icon: /* @__PURE__ */ x(o, { size: 16 }),
48
+ onSelect: () => G("import-export?entity=CARGO_ITEM")
49
+ },
50
+ {
51
+ label: O ? "Exporting…" : "Export",
52
+ icon: /* @__PURE__ */ x(e, { size: 16 }),
53
+ onSelect: k
54
+ }
55
+ ]
47
56
  }),
48
57
  children: [
49
- /* @__PURE__ */ b(C, {
50
- icon: /* @__PURE__ */ b(t, { size: 18 }),
58
+ /* @__PURE__ */ x(w, {
59
+ icon: /* @__PURE__ */ x(t, { size: 18 }),
51
60
  children: "The catalog of items you ship. Each product's dimensions, weight, value and handling flags (fragile, hazardous, temperature-controlled) drive how it's packed, priced and routed — keep them accurate so shipments are quoted and handled correctly."
52
61
  }),
53
- /* @__PURE__ */ b(v, {
54
- state: E,
55
- onDismiss: k
62
+ /* @__PURE__ */ x(y, {
63
+ state: D,
64
+ onDismiss: A
56
65
  }),
57
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
66
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
58
67
  className: "mb-3 text-sm font-medium text-text-secondary",
59
68
  children: "Catalog at a glance"
60
- }), /* @__PURE__ */ x(p, {
69
+ }), /* @__PURE__ */ S(m, {
61
70
  columns: 3,
62
71
  children: [
63
- /* @__PURE__ */ b(f, {
72
+ /* @__PURE__ */ x(p, {
64
73
  label: "Total products",
65
- value: U.total,
66
- icon: /* @__PURE__ */ b(t, { size: 20 }),
74
+ value: W.total,
75
+ icon: /* @__PURE__ */ x(t, { size: 20 }),
67
76
  accent: "brand"
68
77
  }),
69
- /* @__PURE__ */ b(f, {
78
+ /* @__PURE__ */ x(p, {
70
79
  label: "Special handling",
71
- value: U.specialHandling,
72
- icon: /* @__PURE__ */ b(a, { size: 20 }),
80
+ value: W.specialHandling,
81
+ icon: /* @__PURE__ */ x(a, { size: 20 }),
73
82
  accent: "warning",
74
83
  subtitle: "Fragile or hazardous"
75
84
  }),
76
- /* @__PURE__ */ b(f, {
85
+ /* @__PURE__ */ x(p, {
77
86
  label: "Temp-controlled",
78
- value: U.temperatureControlled,
79
- icon: /* @__PURE__ */ b(i, { size: 20 }),
87
+ value: W.temperatureControlled,
88
+ icon: /* @__PURE__ */ x(i, { size: 20 }),
80
89
  accent: "blue"
81
90
  })
82
91
  ]
83
92
  })] }),
84
- /* @__PURE__ */ b(m, {
93
+ /* @__PURE__ */ x(h, {
85
94
  columns: [
86
95
  {
87
96
  id: "sku",
88
97
  header: "SKU",
89
98
  accessorKey: "sku",
90
99
  sortable: !0,
91
- cell: (e) => /* @__PURE__ */ b("span", {
100
+ cell: (e) => /* @__PURE__ */ x("span", {
92
101
  className: "font-mono",
93
102
  children: e.sku
94
103
  })
@@ -98,10 +107,10 @@ function w() {
98
107
  header: "Product Name",
99
108
  accessorKey: "name",
100
109
  sortable: !0,
101
- cell: (e) => /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
110
+ cell: (e) => /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
102
111
  className: "font-medium",
103
112
  children: e.name
104
- }), /* @__PURE__ */ b("p", {
113
+ }), /* @__PURE__ */ x("p", {
105
114
  className: "text-sm text-text-secondary line-clamp-1",
106
115
  children: e.description ?? "Not provided"
107
116
  })] })
@@ -111,7 +120,7 @@ function w() {
111
120
  header: "Category",
112
121
  accessorKey: "category",
113
122
  sortable: !0,
114
- cell: (e) => /* @__PURE__ */ b(u, {
123
+ cell: (e) => /* @__PURE__ */ x(d, {
115
124
  variant: "outline",
116
125
  children: e.category ?? "Not provided"
117
126
  })
@@ -133,28 +142,28 @@ function w() {
133
142
  header: "Value",
134
143
  accessorKey: "value",
135
144
  sortable: !0,
136
- cell: (e) => /* @__PURE__ */ b("span", {
145
+ cell: (e) => /* @__PURE__ */ x("span", {
137
146
  className: "font-medium",
138
- children: e.value === void 0 ? "Not provided" : h(e.value)
147
+ children: e.value === void 0 ? "Not provided" : g(e.value)
139
148
  })
140
149
  },
141
150
  {
142
151
  id: "flags",
143
152
  header: "Flags",
144
- cell: (e) => /* @__PURE__ */ x("div", {
153
+ cell: (e) => /* @__PURE__ */ S("div", {
145
154
  className: "flex gap-1",
146
155
  children: [
147
- e.fragile && /* @__PURE__ */ b(u, {
156
+ e.fragile && /* @__PURE__ */ x(d, {
148
157
  variant: "destructive",
149
158
  className: "text-xs",
150
159
  children: "Fragile"
151
160
  }),
152
- e.hazardous && /* @__PURE__ */ b(u, {
161
+ e.hazardous && /* @__PURE__ */ x(d, {
153
162
  variant: "destructive",
154
163
  className: "text-xs",
155
164
  children: "Hazardous"
156
165
  }),
157
- e.temperatureControlled && /* @__PURE__ */ b(u, {
166
+ e.temperatureControlled && /* @__PURE__ */ x(d, {
158
167
  variant: "secondary",
159
168
  className: "text-xs",
160
169
  children: "Temp Control"
@@ -163,10 +172,10 @@ function w() {
163
172
  })
164
173
  }
165
174
  ],
166
- data: L,
167
- isLoading: B,
168
- error: V,
169
- onRetry: H,
175
+ data: R,
176
+ isLoading: V,
177
+ error: H,
178
+ onRetry: U,
170
179
  searchable: !0,
171
180
  searchPlaceholder: "Search products...",
172
181
  searchFields: [
@@ -174,20 +183,20 @@ function w() {
174
183
  "sku",
175
184
  "category"
176
185
  ],
177
- searchQuery: P,
186
+ searchQuery: F,
178
187
  onSearchQueryChange: (e) => {
179
- F(e), j(0);
188
+ I(e), M(0);
180
189
  },
181
- onRowClick: (e) => W(`inventory/products/${e.id}`),
190
+ onRowClick: (e) => G(`inventory/products/${e.id}`),
182
191
  getRowId: (e) => e.id,
183
- pageIndex: A,
184
- pageSize: M,
185
- onPageChange: j,
192
+ pageIndex: j,
193
+ pageSize: N,
194
+ onPageChange: M,
186
195
  onPageSizeChange: (e) => {
187
- N(e), j(0);
196
+ P(e), M(0);
188
197
  },
189
- totalItems: R,
190
- hasNextPage: z,
198
+ totalItems: z,
199
+ hasNextPage: B,
191
200
  emptyIllustration: "empty-files",
192
201
  emptyTitle: "No products yet",
193
202
  emptyDescription: "Add products to your catalog so they can be added to orders and stocked in warehouses."
@@ -196,4 +205,4 @@ function w() {
196
205
  });
197
206
  }
198
207
  //#endregion
199
- export { w as default };
208
+ export { T as default };
@@ -5,148 +5,157 @@ import { Plus as r } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
5
5
  import { RefreshCw as i } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
6
6
  import { Route as a } from "../node_modules/lucide-react/dist/esm/icons/route.js";
7
7
  import { Truck as o } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
8
- import { Wrench as s } from "../node_modules/lucide-react/dist/esm/icons/wrench.js";
9
- import { joinPath as c } from "../utils/navigation.js";
10
- import { useMoveTheWheels as l } from "../providers/MoveTheWheelsProvider.js";
11
- import { useFleetStats as u, useVehicles as d } from "../hooks/useFleet.js";
12
- import { Button as f, Card as ee, CardContent as p, Progress as m, Select as h, SelectContent as g, SelectItem as te, SelectTrigger as ne, SelectValue as re } from "../components/ui.js";
13
- import { PageLayout as ie } from "../components/PageLayout.js";
14
- import { MetricCard as _, MetricGrid as v } from "../components/MetricCard.js";
15
- import { VEHICLE_STATUS_LABELS as y } from "../constants/index.js";
16
- import { StatusBadge as b, VehicleTypeBadge as x } from "../components/StatusBadge.js";
17
- import { DataTable as S } from "../components/DataTable.js";
18
- import { useDebouncedValue as C } from "../hooks/useDebouncedValue.js";
19
- import { useEntityExport as w } from "../hooks/useEntityExport.js";
20
- import { ExportStatusBanner as T } from "../components/ExportStatusBanner.js";
21
- import { useState as E } from "react";
22
- import { jsx as D, jsxs as O } from "react/jsx-runtime";
23
- import { CTAOverflowMenu as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
8
+ import { Upload as s } from "../node_modules/lucide-react/dist/esm/icons/upload.js";
9
+ import { Wrench as c } from "../node_modules/lucide-react/dist/esm/icons/wrench.js";
10
+ import { joinPath as l } from "../utils/navigation.js";
11
+ import { useMoveTheWheels as u } from "../providers/MoveTheWheelsProvider.js";
12
+ import { useFleetStats as d, useVehicles as f } from "../hooks/useFleet.js";
13
+ import { Button as p, Card as m, CardContent as h, Progress as g, Select as ee, SelectContent as te, SelectItem as ne, SelectTrigger as re, SelectValue as _ } from "../components/ui.js";
14
+ import { PageLayout as v } from "../components/PageLayout.js";
15
+ import { MetricCard as y, MetricGrid as b } from "../components/MetricCard.js";
16
+ import { VEHICLE_STATUS_LABELS as x } from "../constants/index.js";
17
+ import { StatusBadge as S, VehicleTypeBadge as C } from "../components/StatusBadge.js";
18
+ import { DataTable as w } from "../components/DataTable.js";
19
+ import { useDebouncedValue as T } from "../hooks/useDebouncedValue.js";
20
+ import { useEntityExport as E } from "../hooks/useEntityExport.js";
21
+ import { ExportStatusBanner as D } from "../components/ExportStatusBanner.js";
22
+ import { useState as O } from "react";
23
+ import { jsx as k, jsxs as A } from "react/jsx-runtime";
24
+ import { CTAOverflowMenu as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
24
25
  //#region src/movethewheels/pages/VehiclesPage.tsx
25
- var j = [{
26
+ var N = [{
26
27
  value: "all",
27
28
  label: "All statuses"
28
- }, ...Object.entries(y).map(([e, t]) => ({
29
+ }, ...Object.entries(x).map(([e, t]) => ({
29
30
  value: e,
30
31
  label: t
31
32
  }))];
32
- function M() {
33
- let { basePath: y, navigate: M } = l(), { state: N, isExporting: P, startExport: F, dismiss: ae } = w("vehicles", "vehicle"), [I, L] = E(0), [R, z] = E(25), [B, V] = E(""), [H, U] = E("all"), W = C(B), { vehicles: G, totalVehicles: K, hasMore: q, isLoading: J, error: Y, refetch: X } = d({
34
- limit: R,
35
- offset: I * R,
36
- search: W || void 0,
37
- status: H === "all" ? void 0 : H
38
- }), oe = H !== "all" || B.length > 0, { stats: Z } = u(), Q = Z.totalVehicles, $ = (e) => {
39
- M && M(c(y, e));
33
+ function P() {
34
+ let { basePath: x, navigate: P } = u(), { state: F, isExporting: I, startExport: ie, dismiss: L } = E("vehicles", "vehicle"), [R, z] = O(0), [B, V] = O(25), [H, U] = O(""), [W, G] = O("all"), K = T(H), { vehicles: q, totalVehicles: J, hasMore: Y, isLoading: ae, error: oe, refetch: X } = f({
35
+ limit: B,
36
+ offset: R * B,
37
+ search: K || void 0,
38
+ status: W === "all" ? void 0 : W
39
+ }), se = W !== "all" || H.length > 0, { stats: Z } = d(), Q = Z.totalVehicles, $ = (e) => {
40
+ P && P(l(x, e));
40
41
  };
41
- return /* @__PURE__ */ O(ie, {
42
+ return /* @__PURE__ */ A(v, {
42
43
  title: "Vehicles",
43
44
  subtitle: `${Q} vehicles in fleet`,
44
- icon: /* @__PURE__ */ D(o, { size: 24 }),
45
- headerActions: /* @__PURE__ */ D(k, {
45
+ icon: /* @__PURE__ */ k(o, { size: 24 }),
46
+ headerActions: /* @__PURE__ */ k(j, {
46
47
  primary: {
47
48
  label: "Add Vehicle",
48
- icon: /* @__PURE__ */ D(r, { size: 16 }),
49
+ icon: /* @__PURE__ */ k(r, { size: 16 }),
49
50
  onSelect: () => $("fleet/vehicles/new")
50
51
  },
51
- actions: [{
52
- label: "Refresh",
53
- icon: /* @__PURE__ */ D(i, { size: 16 }),
54
- onSelect: () => X()
55
- }, {
56
- label: P ? "Exporting…" : "Export",
57
- icon: /* @__PURE__ */ D(t, { size: 16 }),
58
- onSelect: F
59
- }]
52
+ actions: [
53
+ {
54
+ label: "Refresh",
55
+ icon: /* @__PURE__ */ k(i, { size: 16 }),
56
+ onSelect: () => X()
57
+ },
58
+ {
59
+ label: "Import",
60
+ icon: /* @__PURE__ */ k(s, { size: 16 }),
61
+ onSelect: () => $("import-export?entity=VEHICLE")
62
+ },
63
+ {
64
+ label: I ? "Exporting…" : "Export",
65
+ icon: /* @__PURE__ */ k(t, { size: 16 }),
66
+ onSelect: ie
67
+ }
68
+ ]
60
69
  }),
61
70
  children: [
62
- /* @__PURE__ */ D(A, {
63
- icon: /* @__PURE__ */ D(o, { size: 18 }),
71
+ /* @__PURE__ */ k(M, {
72
+ icon: /* @__PURE__ */ k(o, { size: 18 }),
64
73
  children: "Every truck, van and bike in your fleet. Monitor capacity, fuel level, mileage and maintenance status here so you always know which vehicles are road-ready before dispatching an order."
65
74
  }),
66
- /* @__PURE__ */ D(T, {
67
- state: N,
68
- onDismiss: ae
75
+ /* @__PURE__ */ k(D, {
76
+ state: F,
77
+ onDismiss: L
69
78
  }),
70
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
79
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
71
80
  className: "mb-3 text-sm font-medium text-text-secondary",
72
81
  children: "Fleet at a glance"
73
- }), /* @__PURE__ */ O(v, {
82
+ }), /* @__PURE__ */ A(b, {
74
83
  columns: 4,
75
84
  children: [
76
- /* @__PURE__ */ D(_, {
85
+ /* @__PURE__ */ k(y, {
77
86
  label: "Total vehicles",
78
87
  value: Q,
79
- icon: /* @__PURE__ */ D(o, { size: 20 }),
88
+ icon: /* @__PURE__ */ k(o, { size: 20 }),
80
89
  accent: "brand"
81
90
  }),
82
- /* @__PURE__ */ D(_, {
91
+ /* @__PURE__ */ k(y, {
83
92
  label: "Available now",
84
93
  value: Z.vehiclesByStatus.available,
85
- icon: /* @__PURE__ */ D(e, { size: 20 }),
94
+ icon: /* @__PURE__ */ k(e, { size: 20 }),
86
95
  accent: "success",
87
96
  subtitle: "Ready to dispatch"
88
97
  }),
89
- /* @__PURE__ */ D(_, {
98
+ /* @__PURE__ */ k(y, {
90
99
  label: "On assignment",
91
100
  value: Z.vehiclesByStatus.assigned,
92
- icon: /* @__PURE__ */ D(a, { size: 20 }),
101
+ icon: /* @__PURE__ */ k(a, { size: 20 }),
93
102
  accent: "blue"
94
103
  }),
95
- /* @__PURE__ */ D(_, {
104
+ /* @__PURE__ */ k(y, {
96
105
  label: "In maintenance",
97
106
  value: Z.vehiclesByStatus.maintenance,
98
- icon: /* @__PURE__ */ D(s, { size: 20 }),
107
+ icon: /* @__PURE__ */ k(c, { size: 20 }),
99
108
  accent: "warning"
100
109
  })
101
110
  ]
102
111
  })] }),
103
- /* @__PURE__ */ D(ee, { children: /* @__PURE__ */ D(p, {
112
+ /* @__PURE__ */ k(m, { children: /* @__PURE__ */ k(h, {
104
113
  className: "p-4",
105
- children: /* @__PURE__ */ O("div", {
114
+ children: /* @__PURE__ */ A("div", {
106
115
  className: "flex flex-wrap items-center gap-4",
107
116
  children: [
108
- /* @__PURE__ */ O("div", {
117
+ /* @__PURE__ */ A("div", {
109
118
  className: "flex items-center gap-2",
110
- children: [/* @__PURE__ */ D(n, {
119
+ children: [/* @__PURE__ */ k(n, {
111
120
  size: 16,
112
121
  className: "text-text-secondary"
113
- }), /* @__PURE__ */ D("span", {
122
+ }), /* @__PURE__ */ k("span", {
114
123
  className: "text-sm font-medium",
115
124
  children: "Filters:"
116
125
  })]
117
126
  }),
118
- /* @__PURE__ */ O(h, {
119
- value: H,
127
+ /* @__PURE__ */ A(ee, {
128
+ value: W,
120
129
  onValueChange: (e) => {
121
- U(e), L(0);
130
+ G(e), z(0);
122
131
  },
123
- children: [/* @__PURE__ */ D(ne, {
132
+ children: [/* @__PURE__ */ k(re, {
124
133
  className: "w-[180px]",
125
- children: /* @__PURE__ */ D(re, { placeholder: "Status" })
126
- }), /* @__PURE__ */ D(g, { children: j.map((e) => /* @__PURE__ */ D(te, {
134
+ children: /* @__PURE__ */ k(_, { placeholder: "Status" })
135
+ }), /* @__PURE__ */ k(te, { children: N.map((e) => /* @__PURE__ */ k(ne, {
127
136
  value: e.value,
128
137
  children: e.label
129
138
  }, e.value)) })]
130
139
  }),
131
- oe && /* @__PURE__ */ D(f, {
140
+ se && /* @__PURE__ */ k(p, {
132
141
  variant: "ghost",
133
142
  size: "sm",
134
143
  onClick: () => {
135
- U("all"), V(""), L(0);
144
+ G("all"), U(""), z(0);
136
145
  },
137
146
  children: "Clear filters"
138
147
  })
139
148
  ]
140
149
  })
141
150
  }) }),
142
- /* @__PURE__ */ D(S, {
151
+ /* @__PURE__ */ k(w, {
143
152
  columns: [
144
153
  {
145
154
  id: "vehicleNumber",
146
155
  header: "Vehicle #",
147
156
  accessorKey: "vehicleNumber",
148
157
  sortable: !0,
149
- cell: (e) => /* @__PURE__ */ D("span", {
158
+ cell: (e) => /* @__PURE__ */ k("span", {
150
159
  className: "font-medium",
151
160
  children: e.vehicleNumber
152
161
  })
@@ -155,19 +164,19 @@ function M() {
155
164
  id: "type",
156
165
  header: "Type",
157
166
  accessorKey: "type",
158
- cell: (e) => /* @__PURE__ */ D(x, { type: e.type })
167
+ cell: (e) => /* @__PURE__ */ k(C, { type: e.type })
159
168
  },
160
169
  {
161
170
  id: "details",
162
171
  header: "Vehicle",
163
- cell: (e) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("p", {
172
+ cell: (e) => /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("p", {
164
173
  className: "font-medium",
165
174
  children: [
166
175
  e.make,
167
176
  " ",
168
177
  e.model
169
178
  ]
170
- }), /* @__PURE__ */ D("p", {
179
+ }), /* @__PURE__ */ k("p", {
171
180
  className: "text-sm text-text-secondary",
172
181
  children: e.year ?? "—"
173
182
  })] })
@@ -177,7 +186,7 @@ function M() {
177
186
  header: "Status",
178
187
  accessorKey: "status",
179
188
  sortable: !0,
180
- cell: (e) => /* @__PURE__ */ D(b, {
189
+ cell: (e) => /* @__PURE__ */ k(S, {
181
190
  status: e.status,
182
191
  type: "vehicle"
183
192
  })
@@ -185,9 +194,9 @@ function M() {
185
194
  {
186
195
  id: "capacity",
187
196
  header: "Capacity",
188
- cell: (e) => /* @__PURE__ */ O("div", {
197
+ cell: (e) => /* @__PURE__ */ A("div", {
189
198
  className: "text-sm",
190
- children: [/* @__PURE__ */ D("p", { children: e.capacity.weight === void 0 ? "—" : `${e.capacity.weight} kg` }), /* @__PURE__ */ D("p", {
199
+ children: [/* @__PURE__ */ k("p", { children: e.capacity.weight === void 0 ? "—" : `${e.capacity.weight} kg` }), /* @__PURE__ */ k("p", {
191
200
  className: "text-text-secondary",
192
201
  children: e.capacity.volume === void 0 ? "—" : `${e.capacity.volume} m³`
193
202
  })]
@@ -196,12 +205,12 @@ function M() {
196
205
  {
197
206
  id: "fuel",
198
207
  header: "Fuel Level",
199
- cell: (e) => e.fuelLevel === void 0 ? "-" : /* @__PURE__ */ O("div", {
208
+ cell: (e) => e.fuelLevel === void 0 ? "-" : /* @__PURE__ */ A("div", {
200
209
  className: "flex items-center gap-2",
201
- children: [/* @__PURE__ */ D(m, {
210
+ children: [/* @__PURE__ */ k(g, {
202
211
  value: e.fuelLevel,
203
212
  className: "w-16 h-2"
204
- }), /* @__PURE__ */ O("span", {
213
+ }), /* @__PURE__ */ A("span", {
205
214
  className: "text-sm",
206
215
  children: [e.fuelLevel, "%"]
207
216
  })]
@@ -215,9 +224,9 @@ function M() {
215
224
  cell: (e) => e.mileage ? `${e.mileage.toLocaleString()} mi` : "-"
216
225
  }
217
226
  ],
218
- data: G,
219
- isLoading: J,
220
- error: Y,
227
+ data: q,
228
+ isLoading: ae,
229
+ error: oe,
221
230
  onRetry: X,
222
231
  searchable: !0,
223
232
  searchPlaceholder: "Search vehicles...",
@@ -226,20 +235,20 @@ function M() {
226
235
  "make",
227
236
  "model"
228
237
  ],
229
- searchQuery: B,
238
+ searchQuery: H,
230
239
  onSearchQueryChange: (e) => {
231
- V(e), L(0);
240
+ U(e), z(0);
232
241
  },
233
242
  onRowClick: (e) => $(`fleet/vehicles/${e.id}`),
234
243
  getRowId: (e) => e.id,
235
- pageIndex: I,
236
- pageSize: R,
237
- onPageChange: L,
244
+ pageIndex: R,
245
+ pageSize: B,
246
+ onPageChange: z,
238
247
  onPageSizeChange: (e) => {
239
- z(e), L(0);
248
+ V(e), z(0);
240
249
  },
241
- totalItems: K,
242
- hasNextPage: q,
250
+ totalItems: J,
251
+ hasNextPage: Y,
243
252
  emptyIllustration: "empty-data",
244
253
  emptyTitle: "No vehicles yet",
245
254
  emptyDescription: "Add vehicles to your fleet to start assigning them to deliveries."
@@ -248,4 +257,4 @@ function M() {
248
257
  });
249
258
  }
250
259
  //#endregion
251
- export { M as default };
260
+ export { P as default };