@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.
- package/dist/MoveTheWheelsRoot.js +144 -136
- package/dist/MoveTheWheelsRoutes.js +61 -57
- package/dist/generated/tracking-quality-operations.d.ts +84 -0
- package/dist/hooks/useEntityImport.js +68 -0
- package/dist/movethewheels/hooks/useEntityImport.d.ts +19 -0
- package/dist/movethewheels/pages/ImportExportPage.d.ts +9 -0
- package/dist/movethewheels/utils/entityImport.d.ts +109 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down-up.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js +30 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-up.js +22 -0
- package/dist/pages/CustomersPage.js +88 -79
- package/dist/pages/DriversPage.js +115 -106
- package/dist/pages/ImportExportPage.js +435 -0
- package/dist/pages/ProductsPage.js +85 -76
- package/dist/pages/VehiclesPage.js +99 -90
- package/dist/pages/WarehousesPage.js +97 -88
- package/dist/utils/entityImport.js +73 -0
- package/package.json +3 -2
- package/src/generated/tracking-quality-operations.ts +122 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +8 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
- package/src/movethewheels/hooks/useEntityImport.ts +108 -0
- package/src/movethewheels/pages/CustomersPage.tsx +6 -1
- package/src/movethewheels/pages/DriversPage.tsx +6 -0
- package/src/movethewheels/pages/ImportExportPage.tsx +483 -0
- package/src/movethewheels/pages/ProductsPage.tsx +14 -1
- package/src/movethewheels/pages/VehiclesPage.tsx +6 -0
- package/src/movethewheels/pages/WarehousesPage.tsx +6 -1
- 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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
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
|
|
23
|
-
let { basePath:
|
|
24
|
-
limit:
|
|
25
|
-
offset:
|
|
26
|
-
search:
|
|
27
|
-
}), { stats:
|
|
28
|
-
return /* @__PURE__ */
|
|
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: `${
|
|
31
|
-
icon: /* @__PURE__ */
|
|
32
|
-
headerActions: /* @__PURE__ */
|
|
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__ */
|
|
36
|
-
onSelect: () =>
|
|
36
|
+
icon: /* @__PURE__ */ x(n, { size: 16 }),
|
|
37
|
+
onSelect: () => G("inventory/products/new")
|
|
37
38
|
},
|
|
38
|
-
actions: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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__ */
|
|
50
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
54
|
-
state:
|
|
55
|
-
onDismiss:
|
|
62
|
+
/* @__PURE__ */ x(y, {
|
|
63
|
+
state: D,
|
|
64
|
+
onDismiss: A
|
|
56
65
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
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__ */
|
|
69
|
+
}), /* @__PURE__ */ S(m, {
|
|
61
70
|
columns: 3,
|
|
62
71
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ x(p, {
|
|
64
73
|
label: "Total products",
|
|
65
|
-
value:
|
|
66
|
-
icon: /* @__PURE__ */
|
|
74
|
+
value: W.total,
|
|
75
|
+
icon: /* @__PURE__ */ x(t, { size: 20 }),
|
|
67
76
|
accent: "brand"
|
|
68
77
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ x(p, {
|
|
70
79
|
label: "Special handling",
|
|
71
|
-
value:
|
|
72
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
85
|
+
/* @__PURE__ */ x(p, {
|
|
77
86
|
label: "Temp-controlled",
|
|
78
|
-
value:
|
|
79
|
-
icon: /* @__PURE__ */
|
|
87
|
+
value: W.temperatureControlled,
|
|
88
|
+
icon: /* @__PURE__ */ x(i, { size: 20 }),
|
|
80
89
|
accent: "blue"
|
|
81
90
|
})
|
|
82
91
|
]
|
|
83
92
|
})] }),
|
|
84
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
110
|
+
cell: (e) => /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
102
111
|
className: "font-medium",
|
|
103
112
|
children: e.name
|
|
104
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
145
|
+
cell: (e) => /* @__PURE__ */ x("span", {
|
|
137
146
|
className: "font-medium",
|
|
138
|
-
children: e.value === void 0 ? "Not provided" :
|
|
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__ */
|
|
153
|
+
cell: (e) => /* @__PURE__ */ S("div", {
|
|
145
154
|
className: "flex gap-1",
|
|
146
155
|
children: [
|
|
147
|
-
e.fragile && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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:
|
|
167
|
-
isLoading:
|
|
168
|
-
error:
|
|
169
|
-
onRetry:
|
|
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:
|
|
186
|
+
searchQuery: F,
|
|
178
187
|
onSearchQueryChange: (e) => {
|
|
179
|
-
|
|
188
|
+
I(e), M(0);
|
|
180
189
|
},
|
|
181
|
-
onRowClick: (e) =>
|
|
190
|
+
onRowClick: (e) => G(`inventory/products/${e.id}`),
|
|
182
191
|
getRowId: (e) => e.id,
|
|
183
|
-
pageIndex:
|
|
184
|
-
pageSize:
|
|
185
|
-
onPageChange:
|
|
192
|
+
pageIndex: j,
|
|
193
|
+
pageSize: N,
|
|
194
|
+
onPageChange: M,
|
|
186
195
|
onPageSizeChange: (e) => {
|
|
187
|
-
|
|
196
|
+
P(e), M(0);
|
|
188
197
|
},
|
|
189
|
-
totalItems:
|
|
190
|
-
hasNextPage:
|
|
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 {
|
|
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 {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
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
|
|
26
|
+
var N = [{
|
|
26
27
|
value: "all",
|
|
27
28
|
label: "All statuses"
|
|
28
|
-
}, ...Object.entries(
|
|
29
|
+
}, ...Object.entries(x).map(([e, t]) => ({
|
|
29
30
|
value: e,
|
|
30
31
|
label: t
|
|
31
32
|
}))];
|
|
32
|
-
function
|
|
33
|
-
let { basePath:
|
|
34
|
-
limit:
|
|
35
|
-
offset:
|
|
36
|
-
search:
|
|
37
|
-
status:
|
|
38
|
-
}),
|
|
39
|
-
|
|
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__ */
|
|
42
|
+
return /* @__PURE__ */ A(v, {
|
|
42
43
|
title: "Vehicles",
|
|
43
44
|
subtitle: `${Q} vehicles in fleet`,
|
|
44
|
-
icon: /* @__PURE__ */
|
|
45
|
-
headerActions: /* @__PURE__ */
|
|
45
|
+
icon: /* @__PURE__ */ k(o, { size: 24 }),
|
|
46
|
+
headerActions: /* @__PURE__ */ k(j, {
|
|
46
47
|
primary: {
|
|
47
48
|
label: "Add Vehicle",
|
|
48
|
-
icon: /* @__PURE__ */
|
|
49
|
+
icon: /* @__PURE__ */ k(r, { size: 16 }),
|
|
49
50
|
onSelect: () => $("fleet/vehicles/new")
|
|
50
51
|
},
|
|
51
|
-
actions: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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__ */
|
|
63
|
-
icon: /* @__PURE__ */
|
|
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
|
|
67
|
-
state:
|
|
68
|
-
onDismiss:
|
|
75
|
+
/* @__PURE__ */ k(D, {
|
|
76
|
+
state: F,
|
|
77
|
+
onDismiss: L
|
|
69
78
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
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__ */
|
|
82
|
+
}), /* @__PURE__ */ A(b, {
|
|
74
83
|
columns: 4,
|
|
75
84
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ k(y, {
|
|
77
86
|
label: "Total vehicles",
|
|
78
87
|
value: Q,
|
|
79
|
-
icon: /* @__PURE__ */
|
|
88
|
+
icon: /* @__PURE__ */ k(o, { size: 20 }),
|
|
80
89
|
accent: "brand"
|
|
81
90
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ k(y, {
|
|
83
92
|
label: "Available now",
|
|
84
93
|
value: Z.vehiclesByStatus.available,
|
|
85
|
-
icon: /* @__PURE__ */
|
|
94
|
+
icon: /* @__PURE__ */ k(e, { size: 20 }),
|
|
86
95
|
accent: "success",
|
|
87
96
|
subtitle: "Ready to dispatch"
|
|
88
97
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ k(y, {
|
|
90
99
|
label: "On assignment",
|
|
91
100
|
value: Z.vehiclesByStatus.assigned,
|
|
92
|
-
icon: /* @__PURE__ */
|
|
101
|
+
icon: /* @__PURE__ */ k(a, { size: 20 }),
|
|
93
102
|
accent: "blue"
|
|
94
103
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ k(y, {
|
|
96
105
|
label: "In maintenance",
|
|
97
106
|
value: Z.vehiclesByStatus.maintenance,
|
|
98
|
-
icon: /* @__PURE__ */
|
|
107
|
+
icon: /* @__PURE__ */ k(c, { size: 20 }),
|
|
99
108
|
accent: "warning"
|
|
100
109
|
})
|
|
101
110
|
]
|
|
102
111
|
})] }),
|
|
103
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ k(m, { children: /* @__PURE__ */ k(h, {
|
|
104
113
|
className: "p-4",
|
|
105
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ A("div", {
|
|
106
115
|
className: "flex flex-wrap items-center gap-4",
|
|
107
116
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ A("div", {
|
|
109
118
|
className: "flex items-center gap-2",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ k(n, {
|
|
111
120
|
size: 16,
|
|
112
121
|
className: "text-text-secondary"
|
|
113
|
-
}), /* @__PURE__ */
|
|
122
|
+
}), /* @__PURE__ */ k("span", {
|
|
114
123
|
className: "text-sm font-medium",
|
|
115
124
|
children: "Filters:"
|
|
116
125
|
})]
|
|
117
126
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
value:
|
|
127
|
+
/* @__PURE__ */ A(ee, {
|
|
128
|
+
value: W,
|
|
120
129
|
onValueChange: (e) => {
|
|
121
|
-
|
|
130
|
+
G(e), z(0);
|
|
122
131
|
},
|
|
123
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ k(re, {
|
|
124
133
|
className: "w-[180px]",
|
|
125
|
-
children: /* @__PURE__ */
|
|
126
|
-
}), /* @__PURE__ */
|
|
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
|
-
|
|
140
|
+
se && /* @__PURE__ */ k(p, {
|
|
132
141
|
variant: "ghost",
|
|
133
142
|
size: "sm",
|
|
134
143
|
onClick: () => {
|
|
135
|
-
|
|
144
|
+
G("all"), U(""), z(0);
|
|
136
145
|
},
|
|
137
146
|
children: "Clear filters"
|
|
138
147
|
})
|
|
139
148
|
]
|
|
140
149
|
})
|
|
141
150
|
}) }),
|
|
142
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
197
|
+
cell: (e) => /* @__PURE__ */ A("div", {
|
|
189
198
|
className: "text-sm",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
208
|
+
cell: (e) => e.fuelLevel === void 0 ? "-" : /* @__PURE__ */ A("div", {
|
|
200
209
|
className: "flex items-center gap-2",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ k(g, {
|
|
202
211
|
value: e.fuelLevel,
|
|
203
212
|
className: "w-16 h-2"
|
|
204
|
-
}), /* @__PURE__ */
|
|
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:
|
|
219
|
-
isLoading:
|
|
220
|
-
error:
|
|
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:
|
|
238
|
+
searchQuery: H,
|
|
230
239
|
onSearchQueryChange: (e) => {
|
|
231
|
-
|
|
240
|
+
U(e), z(0);
|
|
232
241
|
},
|
|
233
242
|
onRowClick: (e) => $(`fleet/vehicles/${e.id}`),
|
|
234
243
|
getRowId: (e) => e.id,
|
|
235
|
-
pageIndex:
|
|
236
|
-
pageSize:
|
|
237
|
-
onPageChange:
|
|
244
|
+
pageIndex: R,
|
|
245
|
+
pageSize: B,
|
|
246
|
+
onPageChange: z,
|
|
238
247
|
onPageSizeChange: (e) => {
|
|
239
|
-
|
|
248
|
+
V(e), z(0);
|
|
240
249
|
},
|
|
241
|
-
totalItems:
|
|
242
|
-
hasNextPage:
|
|
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 {
|
|
260
|
+
export { P as default };
|