@burdenoff/microfe-movethewheels 2026.920.2 → 2026.921.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.
- package/dist/components/CarbonFootprintPanel.js +1 -1
- package/dist/components/CustomerPicker.js +271 -0
- package/dist/components/DataTable.js +140 -139
- package/dist/components/DocumentsCard.js +14 -8
- package/dist/generated/wspace-types.d.ts +1043 -5
- package/dist/hooks/useAnalytics.js +21 -1
- package/dist/hooks/useCustomers.js +94 -78
- package/dist/hooks/useDebouncedValue.js +11 -0
- package/dist/hooks/useEntityDocuments.js +28 -18
- package/dist/hooks/useEpod.js +24 -17
- package/dist/hooks/useFleet.js +146 -125
- package/dist/hooks/useInventory.js +255 -186
- package/dist/hooks/useMultiModalShipments.js +35 -27
- package/dist/hooks/useOrders.js +73 -73
- package/dist/hooks/useRoutes.js +97 -75
- package/dist/hooks/useTracking.js +100 -88
- package/dist/movethewheels/components/CustomerPicker.d.ts +19 -0
- package/dist/movethewheels/components/DataTable.d.ts +5 -1
- package/dist/movethewheels/hooks/useCustomers.d.ts +0 -1
- package/dist/movethewheels/hooks/useDebouncedValue.d.ts +1 -0
- package/dist/movethewheels/hooks/useEntityDocuments.d.ts +2 -0
- package/dist/movethewheels/hooks/useEpod.d.ts +6 -1
- package/dist/movethewheels/hooks/useFleet.d.ts +49 -5
- package/dist/movethewheels/hooks/useInventory.d.ts +24 -17
- package/dist/movethewheels/hooks/useMultiModalShipments.d.ts +6 -1
- package/dist/movethewheels/hooks/useOrders.d.ts +33 -5
- package/dist/movethewheels/hooks/useRoutes.d.ts +2 -1
- package/dist/movethewheels/hooks/useTracking.d.ts +12 -11
- package/dist/movethewheels/types/index.d.ts +7 -5
- package/dist/movethewheels/utils/navigation.d.ts +14 -0
- package/dist/pages/CreateOrderPage.js +228 -217
- package/dist/pages/CustomerDetailsPage.js +220 -220
- package/dist/pages/CustomersPage.js +61 -54
- package/dist/pages/DeliveryCapturePage.js +131 -109
- package/dist/pages/DriversPage.js +100 -92
- package/dist/pages/InventoryPage.js +239 -236
- package/dist/pages/MultiModalShipmentPage.js +163 -130
- package/dist/pages/OrderDetailsPage.js +224 -208
- package/dist/pages/OrdersListPage.js +66 -60
- package/dist/pages/ProductDetailsPage.js +241 -200
- package/dist/pages/ProductsPage.js +59 -52
- package/dist/pages/RouteDetailsPage.js +343 -321
- package/dist/pages/RoutesPage.js +55 -48
- package/dist/pages/VehiclesPage.js +63 -56
- package/dist/pages/WarehousesPage.js +60 -53
- package/dist/utils/navigation.js +22 -1
- package/package.json +1 -1
- package/src/generated/wspace-types.ts +1188 -5
- package/src/movethewheels/components/CarbonFootprintPanel.tsx +0 -1
- package/src/movethewheels/components/CustomerPicker.tsx +321 -0
- package/src/movethewheels/components/DataTable.tsx +34 -18
- package/src/movethewheels/components/DocumentsCard.tsx +6 -1
- package/src/movethewheels/components/maps/leaflet-setup.ts +1 -8
- package/src/movethewheels/hooks/useAnalytics.ts +27 -0
- package/src/movethewheels/hooks/useCustomers.ts +64 -24
- package/src/movethewheels/hooks/useDebouncedValue.ts +12 -0
- package/src/movethewheels/hooks/useEntityDocuments.ts +43 -25
- package/src/movethewheels/hooks/useEpod.ts +14 -7
- package/src/movethewheels/hooks/useFleet.ts +58 -37
- package/src/movethewheels/hooks/useFleetIntelligence.ts +1 -4
- package/src/movethewheels/hooks/useInventory.ts +211 -90
- package/src/movethewheels/hooks/useMultiModalShipments.ts +15 -11
- package/src/movethewheels/hooks/useOrders.ts +13 -14
- package/src/movethewheels/hooks/useRoutes.ts +80 -23
- package/src/movethewheels/hooks/useTracking.ts +130 -98
- package/src/movethewheels/pages/CreateOrderPage.tsx +92 -31
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +15 -6
- package/src/movethewheels/pages/CustomersPage.tsx +11 -1
- package/src/movethewheels/pages/DeliveryCapturePage.tsx +31 -1
- package/src/movethewheels/pages/DriversPage.tsx +24 -12
- package/src/movethewheels/pages/InventoryPage.tsx +57 -32
- package/src/movethewheels/pages/MultiModalShipmentPage.tsx +52 -3
- package/src/movethewheels/pages/OrderDetailsPage.tsx +17 -1
- package/src/movethewheels/pages/OrdersListPage.tsx +20 -3
- package/src/movethewheels/pages/ProductDetailsPage.tsx +52 -3
- package/src/movethewheels/pages/ProductsPage.tsx +11 -1
- package/src/movethewheels/pages/RouteDetailsPage.tsx +35 -5
- package/src/movethewheels/pages/RoutesPage.tsx +11 -1
- package/src/movethewheels/pages/VehiclesPage.tsx +19 -2
- package/src/movethewheels/pages/WarehousesPage.tsx +11 -1
- package/src/movethewheels/types/index.ts +7 -5
- package/src/movethewheels/utils/navigation.ts +32 -0
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { Coffee as e } from "../node_modules/lucide-react/dist/esm/icons/coffee.js";
|
|
2
2
|
import { Download as t } from "../node_modules/lucide-react/dist/esm/icons/download.js";
|
|
3
3
|
import { Filter as n } from "../node_modules/lucide-react/dist/esm/icons/filter.js";
|
|
4
|
-
import { Plus as
|
|
5
|
-
import { RefreshCw as
|
|
6
|
-
import { Star as
|
|
7
|
-
import { Truck as
|
|
8
|
-
import { UserCheck as
|
|
9
|
-
import { UserMinus as
|
|
10
|
-
import { Users as
|
|
11
|
-
import { joinPath as
|
|
12
|
-
import { useMoveTheWheels as
|
|
13
|
-
import { useDriverStatusCounts as
|
|
14
|
-
import { Avatar as
|
|
15
|
-
import { PageLayout as
|
|
16
|
-
import { MetricCard as
|
|
17
|
-
import { StatusBadge as
|
|
18
|
-
import { DataTable as
|
|
19
|
-
import { formatDate as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
4
|
+
import { Plus as ee } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
5
|
+
import { RefreshCw as r } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
|
|
6
|
+
import { Star as i } from "../node_modules/lucide-react/dist/esm/icons/star.js";
|
|
7
|
+
import { Truck as te } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
|
|
8
|
+
import { UserCheck as a } from "../node_modules/lucide-react/dist/esm/icons/user-check.js";
|
|
9
|
+
import { UserMinus as o } from "../node_modules/lucide-react/dist/esm/icons/user-minus.js";
|
|
10
|
+
import { Users as s } from "../node_modules/lucide-react/dist/esm/icons/users.js";
|
|
11
|
+
import { joinPath as ne } from "../utils/navigation.js";
|
|
12
|
+
import { useMoveTheWheels as re } from "../providers/MoveTheWheelsProvider.js";
|
|
13
|
+
import { useDriverStatusCounts as c, useDrivers as l, useFleetStats as u, useVehicles as d } from "../hooks/useFleet.js";
|
|
14
|
+
import { Avatar as f, AvatarFallback as p, Button as m, Card as h, CardContent as g, Select as _, SelectContent as v, SelectItem as y, SelectTrigger as b, SelectValue as x } from "../components/ui.js";
|
|
15
|
+
import { PageLayout as S } from "../components/PageLayout.js";
|
|
16
|
+
import { MetricCard as C, MetricGrid as ie } from "../components/MetricCard.js";
|
|
17
|
+
import { StatusBadge as ae } from "../components/StatusBadge.js";
|
|
18
|
+
import { DataTable as oe } from "../components/DataTable.js";
|
|
19
|
+
import { formatDate as w } from "../utils/formatters.js";
|
|
20
|
+
import { useDebouncedValue as se } from "../hooks/useDebouncedValue.js";
|
|
21
|
+
import { useMemo as T, 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";
|
|
23
24
|
//#region src/movethewheels/pages/DriversPage.tsx
|
|
24
|
-
var
|
|
25
|
+
var j = [
|
|
25
26
|
{
|
|
26
27
|
value: "all",
|
|
27
28
|
label: "All statuses"
|
|
@@ -43,137 +44,139 @@ var N = [
|
|
|
43
44
|
label: "Off duty"
|
|
44
45
|
}
|
|
45
46
|
];
|
|
46
|
-
function
|
|
47
|
-
let { basePath:
|
|
48
|
-
limit:
|
|
49
|
-
offset:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
function M() {
|
|
48
|
+
let { basePath: M, navigate: N } = re(), [P, F] = E(0), [I, L] = E(25), [R, z] = E(""), B = se(R), [V, H] = E("all"), [U, W] = E("all"), { drivers: G, totalDrivers: K, hasMore: ce, isLoading: le, error: ue, refetch: q } = l({
|
|
49
|
+
limit: I,
|
|
50
|
+
offset: P * I,
|
|
51
|
+
search: B || void 0,
|
|
52
|
+
status: V === "all" ? void 0 : V,
|
|
53
|
+
licenseClass: U === "all" ? void 0 : U
|
|
54
|
+
}), { stats: J } = u(), { counts: Y } = c(), { vehicles: X } = d({ limit: 100 }), de = T(() => new Map(X.map((e) => [e.id, e.vehicleNumber])), [X]), Z = J.totalDrivers, fe = T(() => Array.from(new Set(G.map((e) => e.licenseType).filter(Boolean))).sort((e, t) => e.localeCompare(t)), [G]), Q = V !== "all" || U !== "all" || R.length > 0, $ = (e) => N?.(ne(M, e));
|
|
55
|
+
return /* @__PURE__ */ O(S, {
|
|
53
56
|
title: "Drivers",
|
|
54
57
|
subtitle: `${Z} drivers`,
|
|
55
|
-
icon: /* @__PURE__ */
|
|
56
|
-
headerActions: /* @__PURE__ */ k
|
|
58
|
+
icon: /* @__PURE__ */ D(s, { size: 24 }),
|
|
59
|
+
headerActions: /* @__PURE__ */ D(k, {
|
|
57
60
|
primary: {
|
|
58
61
|
label: "Add Driver",
|
|
59
|
-
icon: /* @__PURE__ */
|
|
62
|
+
icon: /* @__PURE__ */ D(ee, { size: 16 }),
|
|
60
63
|
onSelect: () => $("fleet/drivers/new")
|
|
61
64
|
},
|
|
62
65
|
actions: [{
|
|
63
66
|
label: "Refresh",
|
|
64
|
-
icon: /* @__PURE__ */
|
|
67
|
+
icon: /* @__PURE__ */ D(r, { size: 16 }),
|
|
65
68
|
onSelect: () => q()
|
|
66
69
|
}, {
|
|
67
70
|
label: "Export",
|
|
68
|
-
icon: /* @__PURE__ */
|
|
71
|
+
icon: /* @__PURE__ */ D(t, { size: 16 }),
|
|
69
72
|
onSelect: () => $("import-export")
|
|
70
73
|
}]
|
|
71
74
|
}),
|
|
72
75
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
icon: /* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ D(A, {
|
|
77
|
+
icon: /* @__PURE__ */ D(s, { size: 18 }),
|
|
75
78
|
children: "Your delivery workforce. Track each driver's availability, rating, licence status, contact number and the vehicle they are on — open a driver to review their record before assigning them to an order or route."
|
|
76
79
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
78
81
|
className: "mb-3 text-sm font-medium text-text-secondary",
|
|
79
82
|
children: "Workforce at a glance"
|
|
80
|
-
}), /* @__PURE__ */
|
|
83
|
+
}), /* @__PURE__ */ O(ie, {
|
|
81
84
|
columns: 4,
|
|
82
85
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ D(C, {
|
|
84
87
|
label: "On duty",
|
|
85
88
|
value: J.driversByStatus.available + J.driversByStatus.busy,
|
|
86
|
-
icon: /* @__PURE__ */
|
|
89
|
+
icon: /* @__PURE__ */ D(a, { size: 20 }),
|
|
87
90
|
accent: "success",
|
|
88
91
|
subtitle: "Available or delivering"
|
|
89
92
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ D(C, {
|
|
91
94
|
label: "On break",
|
|
92
95
|
value: Y.onBreak,
|
|
93
|
-
icon: /* @__PURE__ */
|
|
96
|
+
icon: /* @__PURE__ */ D(e, { size: 20 }),
|
|
94
97
|
accent: "warning",
|
|
95
98
|
subtitle: "Back on shift shortly"
|
|
96
99
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ D(C, {
|
|
98
101
|
label: "Off duty",
|
|
99
102
|
value: Y.offDuty,
|
|
100
|
-
icon: /* @__PURE__ */
|
|
103
|
+
icon: /* @__PURE__ */ D(o, { size: 20 }),
|
|
101
104
|
accent: "neutral",
|
|
102
105
|
subtitle: Y.inactive > 0 ? `${Y.inactive} inactive` : void 0
|
|
103
106
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ D(C, {
|
|
105
108
|
label: "Avg rating",
|
|
106
109
|
value: J.avgDriverRating > 0 ? J.avgDriverRating.toFixed(1) : "—",
|
|
107
|
-
icon: /* @__PURE__ */
|
|
110
|
+
icon: /* @__PURE__ */ D(i, { size: 20 }),
|
|
108
111
|
accent: "brand",
|
|
109
112
|
subtitle: `${Z} drivers`
|
|
110
113
|
})
|
|
111
114
|
]
|
|
112
115
|
})] }),
|
|
113
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ D(h, { children: /* @__PURE__ */ D(g, {
|
|
114
117
|
className: "p-4",
|
|
115
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ O("div", {
|
|
116
119
|
className: "flex flex-wrap items-center gap-4",
|
|
117
120
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ O("div", {
|
|
119
122
|
className: "flex items-center gap-2",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ D(n, {
|
|
121
124
|
size: 16,
|
|
122
125
|
className: "text-text-secondary"
|
|
123
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ D("span", {
|
|
124
127
|
className: "text-sm font-medium",
|
|
125
128
|
children: "Filters:"
|
|
126
129
|
})]
|
|
127
130
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
value:
|
|
131
|
+
/* @__PURE__ */ O(_, {
|
|
132
|
+
value: V,
|
|
130
133
|
onValueChange: (e) => {
|
|
131
|
-
|
|
134
|
+
H(e), F(0);
|
|
132
135
|
},
|
|
133
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ D(b, {
|
|
134
137
|
className: "w-[180px]",
|
|
135
|
-
children: /* @__PURE__ */
|
|
136
|
-
}), /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ D(x, { placeholder: "Status" })
|
|
139
|
+
}), /* @__PURE__ */ D(v, { children: j.map((e) => /* @__PURE__ */ D(y, {
|
|
137
140
|
value: e.value,
|
|
138
141
|
children: e.label
|
|
139
142
|
}, e.value)) })]
|
|
140
143
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
value:
|
|
143
|
-
onValueChange:
|
|
144
|
-
children: [/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ O(_, {
|
|
145
|
+
value: U,
|
|
146
|
+
onValueChange: W,
|
|
147
|
+
children: [/* @__PURE__ */ D(b, {
|
|
145
148
|
className: "w-[180px]",
|
|
146
|
-
children: /* @__PURE__ */
|
|
147
|
-
}), /* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ D(x, { placeholder: "License class" })
|
|
150
|
+
}), /* @__PURE__ */ O(v, { children: [/* @__PURE__ */ D(y, {
|
|
148
151
|
value: "all",
|
|
149
152
|
children: "All licence classes"
|
|
150
|
-
}),
|
|
153
|
+
}), fe.map((e) => /* @__PURE__ */ D(y, {
|
|
151
154
|
value: e,
|
|
152
155
|
children: e
|
|
153
156
|
}, e))] })]
|
|
154
157
|
}),
|
|
155
|
-
Q && /* @__PURE__ */
|
|
158
|
+
Q && /* @__PURE__ */ D(m, {
|
|
156
159
|
variant: "ghost",
|
|
157
160
|
size: "sm",
|
|
158
161
|
onClick: () => {
|
|
159
|
-
|
|
162
|
+
H("all"), W("all"), z(""), F(0);
|
|
160
163
|
},
|
|
161
164
|
children: "Clear filters"
|
|
162
165
|
})
|
|
163
166
|
]
|
|
164
167
|
})
|
|
165
168
|
}) }),
|
|
166
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ D(oe, {
|
|
167
170
|
columns: [
|
|
168
171
|
{
|
|
169
172
|
id: "driver",
|
|
170
173
|
header: "Driver",
|
|
171
|
-
cell: (e) => /* @__PURE__ */
|
|
174
|
+
cell: (e) => /* @__PURE__ */ O("div", {
|
|
172
175
|
className: "flex items-center gap-3",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(p, { children: e.fullName.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
174
177
|
className: "font-medium",
|
|
175
178
|
children: e.fullName
|
|
176
|
-
}), /* @__PURE__ */
|
|
179
|
+
}), /* @__PURE__ */ D("p", {
|
|
177
180
|
className: "text-sm text-text-secondary",
|
|
178
181
|
children: e.employeeId
|
|
179
182
|
})] })]
|
|
@@ -184,7 +187,7 @@ function P() {
|
|
|
184
187
|
header: "Status",
|
|
185
188
|
accessorKey: "status",
|
|
186
189
|
sortable: !0,
|
|
187
|
-
cell: (e) => /* @__PURE__ */
|
|
190
|
+
cell: (e) => /* @__PURE__ */ D(ae, {
|
|
188
191
|
status: e.status,
|
|
189
192
|
type: "driver"
|
|
190
193
|
})
|
|
@@ -192,11 +195,11 @@ function P() {
|
|
|
192
195
|
{
|
|
193
196
|
id: "license",
|
|
194
197
|
header: "License",
|
|
195
|
-
cell: (e) => /* @__PURE__ */
|
|
198
|
+
cell: (e) => /* @__PURE__ */ O("div", {
|
|
196
199
|
className: "text-sm",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ D("p", { children: e.licenseType }), /* @__PURE__ */ O("p", {
|
|
198
201
|
className: "text-text-secondary",
|
|
199
|
-
children: ["Exp: ",
|
|
202
|
+
children: ["Exp: ", w(e.licenseExpiry, "short")]
|
|
200
203
|
})]
|
|
201
204
|
})
|
|
202
205
|
},
|
|
@@ -204,12 +207,12 @@ function P() {
|
|
|
204
207
|
id: "phone",
|
|
205
208
|
header: "Phone",
|
|
206
209
|
accessorKey: "phone",
|
|
207
|
-
cell: (e) => e.phone ? /* @__PURE__ */
|
|
210
|
+
cell: (e) => e.phone ? /* @__PURE__ */ D("a", {
|
|
208
211
|
href: `tel:${e.phone}`,
|
|
209
212
|
className: "text-sm hover:underline",
|
|
210
213
|
onClick: (e) => e.stopPropagation(),
|
|
211
214
|
children: e.phone
|
|
212
|
-
}) : /* @__PURE__ */
|
|
215
|
+
}) : /* @__PURE__ */ D("span", {
|
|
213
216
|
className: "text-sm text-text-secondary",
|
|
214
217
|
children: "—"
|
|
215
218
|
})
|
|
@@ -217,16 +220,16 @@ function P() {
|
|
|
217
220
|
{
|
|
218
221
|
id: "rating",
|
|
219
222
|
header: "Rating",
|
|
220
|
-
cell: (e) => e.ratings.overall > 0 ? /* @__PURE__ */
|
|
223
|
+
cell: (e) => e.ratings.overall > 0 ? /* @__PURE__ */ O("div", {
|
|
221
224
|
className: "flex items-center gap-1",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ D(i, {
|
|
223
226
|
size: 14,
|
|
224
227
|
className: "text-status-warning-text fill-current"
|
|
225
|
-
}), /* @__PURE__ */
|
|
228
|
+
}), /* @__PURE__ */ D("span", {
|
|
226
229
|
className: "font-medium",
|
|
227
230
|
children: e.ratings.overall.toFixed(1)
|
|
228
231
|
})]
|
|
229
|
-
}) : /* @__PURE__ */
|
|
232
|
+
}) : /* @__PURE__ */ D("span", {
|
|
230
233
|
className: "text-sm text-text-secondary",
|
|
231
234
|
children: "Not rated"
|
|
232
235
|
})
|
|
@@ -235,14 +238,14 @@ function P() {
|
|
|
235
238
|
id: "vehicle",
|
|
236
239
|
header: "Assigned vehicle",
|
|
237
240
|
cell: (e) => {
|
|
238
|
-
if (!e.assignedVehicle) return /* @__PURE__ */
|
|
241
|
+
if (!e.assignedVehicle) return /* @__PURE__ */ D("span", {
|
|
239
242
|
className: "text-sm text-text-secondary",
|
|
240
243
|
children: "Unassigned"
|
|
241
244
|
});
|
|
242
|
-
let t =
|
|
243
|
-
return /* @__PURE__ */
|
|
245
|
+
let t = de.get(e.assignedVehicle);
|
|
246
|
+
return /* @__PURE__ */ O("span", {
|
|
244
247
|
className: "inline-flex items-center gap-1.5 text-sm font-medium",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ D(te, {
|
|
246
249
|
size: 14,
|
|
247
250
|
className: "text-text-secondary"
|
|
248
251
|
}), t ?? "Assigned"]
|
|
@@ -254,25 +257,30 @@ function P() {
|
|
|
254
257
|
header: "Join Date",
|
|
255
258
|
accessorKey: "joinDate",
|
|
256
259
|
sortable: !0,
|
|
257
|
-
cell: (e) =>
|
|
260
|
+
cell: (e) => w(e.joinDate, "short")
|
|
258
261
|
}
|
|
259
262
|
],
|
|
260
|
-
data:
|
|
261
|
-
isLoading:
|
|
262
|
-
error:
|
|
263
|
+
data: G,
|
|
264
|
+
isLoading: le,
|
|
265
|
+
error: ue,
|
|
263
266
|
onRetry: q,
|
|
264
267
|
searchable: !0,
|
|
265
268
|
searchPlaceholder: "Search drivers...",
|
|
266
269
|
searchFields: ["fullName", "employeeId"],
|
|
270
|
+
searchQuery: R,
|
|
271
|
+
onSearchQueryChange: (e) => {
|
|
272
|
+
z(e), F(0);
|
|
273
|
+
},
|
|
267
274
|
onRowClick: (e) => $(`fleet/drivers/${e.id}`),
|
|
268
275
|
getRowId: (e) => e.id,
|
|
269
|
-
pageIndex:
|
|
270
|
-
pageSize:
|
|
271
|
-
onPageChange:
|
|
276
|
+
pageIndex: P,
|
|
277
|
+
pageSize: I,
|
|
278
|
+
onPageChange: F,
|
|
272
279
|
onPageSizeChange: (e) => {
|
|
273
|
-
|
|
280
|
+
L(e), F(0);
|
|
274
281
|
},
|
|
275
|
-
totalItems:
|
|
282
|
+
totalItems: K,
|
|
283
|
+
hasNextPage: ce,
|
|
276
284
|
emptyIllustration: "empty-people",
|
|
277
285
|
emptyTitle: Q ? "No drivers match these filters" : "No drivers yet",
|
|
278
286
|
emptyDescription: Q ? "Clear the status or licence-class filter to see the rest of the roster." : "Add drivers to start assigning deliveries and routes."
|
|
@@ -281,4 +289,4 @@ function P() {
|
|
|
281
289
|
});
|
|
282
290
|
}
|
|
283
291
|
//#endregion
|
|
284
|
-
export {
|
|
292
|
+
export { M as default };
|