@burdenoff/microfe-movethewheels 2026.923.1 → 2026.924.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/CustomerPicker.js +94 -101
- package/dist/components/EntityCombobox.js +105 -0
- package/dist/components/ui.js +2 -2
- package/dist/hooks/useFleet.js +53 -49
- package/dist/index.js +22 -22
- package/dist/movethewheels/components/CustomerPicker.d.ts +3 -2
- package/dist/movethewheels/components/EntityCombobox.d.ts +40 -0
- package/dist/movethewheels/components/ui.d.ts +1 -1
- package/dist/movethewheels/hooks/useFleet.d.ts +4 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js +11 -0
- package/dist/pages/CreateOrderPage.js +175 -169
- package/dist/pages/OrderDetailsPage.js +291 -294
- package/dist/pages/RouteDetailsPage.js +298 -296
- package/package.json +1 -1
- package/src/movethewheels/components/CustomerPicker.tsx +26 -36
- package/src/movethewheels/components/EntityCombobox.tsx +237 -0
- package/src/movethewheels/components/ui.tsx +9 -0
- package/src/movethewheels/hooks/useFleet.ts +10 -4
- package/src/movethewheels/pages/CreateOrderPage.tsx +39 -19
- package/src/movethewheels/pages/OrderDetailsPage.tsx +61 -60
- package/src/movethewheels/pages/RouteDetailsPage.tsx +53 -53
|
@@ -17,22 +17,23 @@ import { User as se } from "../node_modules/lucide-react/dist/esm/icons/user.js"
|
|
|
17
17
|
import { joinPath as c } from "../utils/navigation.js";
|
|
18
18
|
import { useMoveTheWheels as ce } from "../providers/MoveTheWheelsProvider.js";
|
|
19
19
|
import { useOrder as le, useOrders as ue } from "../hooks/useOrders.js";
|
|
20
|
-
import {
|
|
21
|
-
import { Badge as
|
|
22
|
-
import { ErrorState as
|
|
23
|
-
import { PaymentStatusBadge as
|
|
24
|
-
import { FormError as
|
|
25
|
-
import { Notice as
|
|
26
|
-
import { formatAddress as
|
|
27
|
-
import { DocumentsCard as
|
|
28
|
-
import { useDebouncedValue as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
20
|
+
import { useDriver as de, useDrivers as fe, useVehicle as pe, useVehicles as me } from "../hooks/useFleet.js";
|
|
21
|
+
import { Badge as l, Button as u, Card as d, CardContent as f, CardHeader as p, CardTitle as m, Input as he, Label as h, Separator as g, Table as ge, TableBody as _e, TableCell as _, TableHead as v, TableHeader as ve, TableRow as y } from "../components/ui.js";
|
|
22
|
+
import { ErrorState as ye, LoadingState as be, PageLayout as xe } from "../components/PageLayout.js";
|
|
23
|
+
import { PaymentStatusBadge as Se, PriorityBadge as Ce, StatusBadge as b } from "../components/StatusBadge.js";
|
|
24
|
+
import { FormError as we } from "../components/FormError.js";
|
|
25
|
+
import { Notice as Te, useNotice as Ee } from "../components/Notice.js";
|
|
26
|
+
import { formatAddress as x, formatCurrency as S, formatDate as C } from "../utils/formatters.js";
|
|
27
|
+
import { DocumentsCard as De } from "../components/DocumentsCard.js";
|
|
28
|
+
import { useDebouncedValue as Oe } from "../hooks/useDebouncedValue.js";
|
|
29
|
+
import { EntityCombobox as w } from "../components/EntityCombobox.js";
|
|
30
|
+
import { ProofOfDeliveryCard as ke } from "../components/ProofOfDeliveryCard.js";
|
|
31
|
+
import { useEffect as T, useState as E } from "react";
|
|
32
|
+
import { useParams as Ae } from "react-router";
|
|
33
|
+
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
34
|
+
import { EmphasisPanel as je, NextSteps as Me, PagePurpose as Ne } from "@burdenoff/fe-libs/ui";
|
|
34
35
|
//#region src/movethewheels/pages/OrderDetailsPage.tsx
|
|
35
|
-
var
|
|
36
|
+
var A = [
|
|
36
37
|
"pending",
|
|
37
38
|
"confirmed",
|
|
38
39
|
"assigned",
|
|
@@ -40,7 +41,7 @@ var M = [
|
|
|
40
41
|
"in_transit",
|
|
41
42
|
"out_for_delivery",
|
|
42
43
|
"delivered"
|
|
43
|
-
],
|
|
44
|
+
], j = {
|
|
44
45
|
pending: "Pending",
|
|
45
46
|
confirmed: "Confirmed",
|
|
46
47
|
assigned: "Assigned",
|
|
@@ -51,375 +52,371 @@ var M = [
|
|
|
51
52
|
cancelled: "Cancelled",
|
|
52
53
|
failed: "Failed"
|
|
53
54
|
};
|
|
54
|
-
function
|
|
55
|
-
let t =
|
|
56
|
-
return t === -1 || t >=
|
|
55
|
+
function Pe(e) {
|
|
56
|
+
let t = A.indexOf(e);
|
|
57
|
+
return t === -1 || t >= A.length - 1 ? null : A[t + 1];
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
let { orderId:
|
|
59
|
+
function M() {
|
|
60
|
+
let { orderId: A } = Ae(), { basePath: M, navigate: N } = ce(), { order: P, isLoading: Fe, error: Ie, refetch: F } = le(A), { updateOrder: Le, updateOrderStatus: Re } = ue(), [I, ze] = E(""), [L, R] = E(""), [z, B] = E(""), [V, H] = E(!1), [U, W] = E(!1), [G, K] = E(null), q = Oe(I), { vehicles: J, isLoading: Y } = me({
|
|
60
61
|
limit: 20,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
}), { drivers: Q, isLoading: Re } = l({
|
|
62
|
+
search: q || void 0,
|
|
63
|
+
driverId: z || void 0
|
|
64
|
+
}), { drivers: X, isLoading: Z } = fe({
|
|
66
65
|
limit: 20,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}), { message: ze, notify: Be } = Ce(), Ve = X.filter((e) => e.status === "available" || e.id === I?.vehicleId), He = Q.filter((e) => e.status === "available" || e.id === I?.driverId);
|
|
72
|
-
De(() => {
|
|
73
|
-
!Re && V && !Q.some((e) => e.id === V) && H("");
|
|
74
|
-
}, [
|
|
75
|
-
Q,
|
|
76
|
-
Re,
|
|
77
|
-
V
|
|
78
|
-
]), De(() => {
|
|
66
|
+
search: q || void 0,
|
|
67
|
+
vehicleId: L || void 0
|
|
68
|
+
}), { vehicle: Be, isLoading: Ve } = pe(L || void 0), { driver: He, isLoading: Ue } = de(z || void 0), { message: We, notify: Ge } = Ee(), Ke = J.filter((e) => e.status === "available" || e.id === P?.vehicleId), qe = X.filter((e) => e.status === "available" || e.id === P?.driverId);
|
|
69
|
+
T(() => {
|
|
79
70
|
!Z && z && !X.some((e) => e.id === z) && B("");
|
|
80
71
|
}, [
|
|
81
|
-
z,
|
|
82
72
|
X,
|
|
83
|
-
Z
|
|
73
|
+
Z,
|
|
74
|
+
z
|
|
75
|
+
]), T(() => {
|
|
76
|
+
!Y && L && !J.some((e) => e.id === L) && R("");
|
|
77
|
+
}, [
|
|
78
|
+
L,
|
|
79
|
+
J,
|
|
80
|
+
Y
|
|
84
81
|
]);
|
|
85
|
-
let
|
|
86
|
-
if (!
|
|
87
|
-
|
|
82
|
+
let Je = async () => {
|
|
83
|
+
if (!A || !L && !z) {
|
|
84
|
+
K("Pick a vehicle and/or a driver to assign.");
|
|
88
85
|
return;
|
|
89
86
|
}
|
|
90
|
-
|
|
87
|
+
H(!0), K(null);
|
|
91
88
|
try {
|
|
92
|
-
await
|
|
93
|
-
vehicleId:
|
|
94
|
-
driverId:
|
|
95
|
-
}),
|
|
89
|
+
await Le(A, {
|
|
90
|
+
vehicleId: L || void 0,
|
|
91
|
+
driverId: z || void 0
|
|
92
|
+
}), Ge("Assignment updated."), R(""), B(""), F();
|
|
96
93
|
} catch (e) {
|
|
97
|
-
|
|
94
|
+
K(e instanceof Error ? e.message : "Failed to update assignment.");
|
|
98
95
|
} finally {
|
|
99
|
-
|
|
96
|
+
H(!1);
|
|
100
97
|
}
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
103
|
-
|
|
98
|
+
}, Q = async (e, t) => {
|
|
99
|
+
if (A) {
|
|
100
|
+
W(!0), K(null);
|
|
104
101
|
try {
|
|
105
|
-
await
|
|
102
|
+
await Re(A, e), Ge(t), F();
|
|
106
103
|
} catch (e) {
|
|
107
|
-
|
|
104
|
+
K(e instanceof Error ? e.message : "Failed to update status.");
|
|
108
105
|
} finally {
|
|
109
|
-
|
|
106
|
+
W(!1);
|
|
110
107
|
}
|
|
111
108
|
}
|
|
112
109
|
}, $ = (e) => {
|
|
113
|
-
|
|
110
|
+
N && N(c(M, e));
|
|
114
111
|
};
|
|
115
|
-
return
|
|
112
|
+
return Fe ? /* @__PURE__ */ O(be, { message: "Loading order details..." }) : Ie || !P ? /* @__PURE__ */ O(ye, {
|
|
116
113
|
title: "Order not found",
|
|
117
114
|
message: "The order you're looking for doesn't exist or has been removed.",
|
|
118
|
-
onRetry:
|
|
119
|
-
}) : /* @__PURE__ */
|
|
120
|
-
title:
|
|
121
|
-
subtitle: `Created ${
|
|
122
|
-
icon: /* @__PURE__ */
|
|
123
|
-
headerActions: /* @__PURE__ */
|
|
115
|
+
onRetry: F
|
|
116
|
+
}) : /* @__PURE__ */ k(xe, {
|
|
117
|
+
title: P.orderNumber,
|
|
118
|
+
subtitle: `Created ${C(P.createdAt, "full")}`,
|
|
119
|
+
icon: /* @__PURE__ */ O(i, { size: 24 }),
|
|
120
|
+
headerActions: /* @__PURE__ */ k("div", {
|
|
124
121
|
className: "flex gap-2",
|
|
125
122
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ k(u, {
|
|
127
124
|
variant: "outline",
|
|
128
125
|
onClick: () => {
|
|
129
|
-
|
|
126
|
+
N && N(c(M, "orders"));
|
|
130
127
|
},
|
|
131
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ O(e, { size: 16 }), "Back"]
|
|
132
129
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ k(u, {
|
|
134
131
|
variant: "outline",
|
|
135
132
|
onClick: () => window.print(),
|
|
136
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ O(a, { size: 16 }), "Print"]
|
|
137
134
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
onClick: () => $(`orders/${
|
|
140
|
-
children: [/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ k(u, {
|
|
136
|
+
onClick: () => $(`orders/${A}/edit`),
|
|
137
|
+
children: [/* @__PURE__ */ O(o, { size: 16 }), "Edit"]
|
|
141
138
|
})
|
|
142
139
|
]
|
|
143
140
|
}),
|
|
144
|
-
headerContent: /* @__PURE__ */
|
|
141
|
+
headerContent: /* @__PURE__ */ k("div", {
|
|
145
142
|
className: "flex flex-wrap gap-2",
|
|
146
143
|
children: [
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
status:
|
|
144
|
+
/* @__PURE__ */ O(b, {
|
|
145
|
+
status: P.status,
|
|
149
146
|
type: "order"
|
|
150
147
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ O(Ce, { priority: P.priority }),
|
|
149
|
+
/* @__PURE__ */ O(Se, { status: P.pricing.paymentStatus })
|
|
153
150
|
]
|
|
154
151
|
}),
|
|
155
152
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
icon: /* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ O(Ne, {
|
|
154
|
+
icon: /* @__PURE__ */ O(i, { size: 18 }),
|
|
158
155
|
children: "Everything about this one delivery in a single place — who it's for, where it's going, what's inside, the running cost and the full status history. Use this page to review the order, hand it to a driver, print the docket, or jump into live tracking."
|
|
159
156
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ O(Me, {
|
|
161
158
|
storageKey: "movethewheels-order-details",
|
|
162
159
|
steps: [
|
|
163
160
|
{
|
|
164
161
|
id: "track",
|
|
165
162
|
label: "Track this order live",
|
|
166
163
|
description: "See where the shipment is right now on the map.",
|
|
167
|
-
icon: /* @__PURE__ */
|
|
168
|
-
onClick: () => $(`tracking?order=${
|
|
164
|
+
icon: /* @__PURE__ */ O(r, { size: 16 }),
|
|
165
|
+
onClick: () => $(`tracking?order=${P.id}`)
|
|
169
166
|
},
|
|
170
167
|
{
|
|
171
168
|
id: "edit",
|
|
172
169
|
label: "Edit order details",
|
|
173
170
|
description: "Update items, addresses or instructions before dispatch.",
|
|
174
|
-
icon: /* @__PURE__ */
|
|
175
|
-
onClick: () => $(`orders/${
|
|
171
|
+
icon: /* @__PURE__ */ O(o, { size: 16 }),
|
|
172
|
+
onClick: () => $(`orders/${A}/edit`)
|
|
176
173
|
},
|
|
177
174
|
{
|
|
178
175
|
id: "print",
|
|
179
176
|
label: "Print the delivery docket",
|
|
180
177
|
description: "Generate a printable copy for the driver or warehouse.",
|
|
181
|
-
icon: /* @__PURE__ */
|
|
178
|
+
icon: /* @__PURE__ */ O(a, { size: 16 }),
|
|
182
179
|
onClick: () => window.print()
|
|
183
180
|
}
|
|
184
181
|
]
|
|
185
182
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ k("div", {
|
|
187
184
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ k("div", {
|
|
189
186
|
className: "lg:col-span-2 space-y-6",
|
|
190
187
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
192
189
|
className: "flex items-center gap-2",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
-
}) }), /* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ O(se, { size: 18 }), "Customer Information"]
|
|
191
|
+
}) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ k("div", {
|
|
195
192
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ k("div", { children: [
|
|
194
|
+
/* @__PURE__ */ O("h4", {
|
|
198
195
|
className: "font-medium mb-2",
|
|
199
|
-
children:
|
|
196
|
+
children: P.customerInfo.name
|
|
200
197
|
}),
|
|
201
|
-
|
|
198
|
+
P.customerInfo.company && /* @__PURE__ */ O("p", {
|
|
202
199
|
className: "text-sm text-text-secondary mb-2",
|
|
203
|
-
children:
|
|
200
|
+
children: P.customerInfo.company
|
|
204
201
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ k("div", {
|
|
206
203
|
className: "space-y-1 text-sm",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ k("p", {
|
|
208
205
|
className: "flex items-center gap-2",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ O(ie, {
|
|
210
207
|
size: 14,
|
|
211
208
|
className: "text-text-secondary"
|
|
212
|
-
}),
|
|
213
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), P.customerInfo.email]
|
|
210
|
+
}), /* @__PURE__ */ k("p", {
|
|
214
211
|
className: "flex items-center gap-2",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ O(ae, {
|
|
216
213
|
size: 14,
|
|
217
214
|
className: "text-text-secondary"
|
|
218
|
-
}),
|
|
215
|
+
}), P.customerInfo.phone]
|
|
219
216
|
})]
|
|
220
217
|
})
|
|
221
|
-
] }), /* @__PURE__ */
|
|
218
|
+
] }), /* @__PURE__ */ k("div", { children: [P.customerInfo.preferredDeliveryTime && /* @__PURE__ */ k("div", {
|
|
222
219
|
className: "mb-2",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ O("p", {
|
|
224
221
|
className: "text-sm text-text-secondary",
|
|
225
222
|
children: "Preferred Delivery Time"
|
|
226
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ O("p", {
|
|
227
224
|
className: "text-sm",
|
|
228
|
-
children:
|
|
225
|
+
children: P.customerInfo.preferredDeliveryTime
|
|
229
226
|
})]
|
|
230
|
-
}),
|
|
227
|
+
}), P.customerInfo.deliveryInstructions && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
231
228
|
className: "text-sm text-text-secondary",
|
|
232
229
|
children: "Delivery Instructions"
|
|
233
|
-
}), /* @__PURE__ */
|
|
230
|
+
}), /* @__PURE__ */ O("p", {
|
|
234
231
|
className: "text-sm",
|
|
235
|
-
children:
|
|
232
|
+
children: P.customerInfo.deliveryInstructions
|
|
236
233
|
})] })] })]
|
|
237
234
|
}) })] }),
|
|
238
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
239
236
|
className: "flex items-center gap-2",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
241
|
-
}) }), /* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ O(r, { size: 18 }), "Addresses"]
|
|
238
|
+
}) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ k("div", {
|
|
242
239
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ k("div", { children: [
|
|
241
|
+
/* @__PURE__ */ O("h4", {
|
|
245
242
|
className: "font-medium mb-2 flex items-center gap-2",
|
|
246
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ O(l, {
|
|
247
244
|
variant: "outline",
|
|
248
245
|
children: "Pickup"
|
|
249
246
|
})
|
|
250
247
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ O("p", {
|
|
252
249
|
className: "text-sm",
|
|
253
|
-
children:
|
|
250
|
+
children: x(P.pickupAddress)
|
|
254
251
|
}),
|
|
255
|
-
|
|
252
|
+
P.scheduledPickup && /* @__PURE__ */ k("p", {
|
|
256
253
|
className: "text-sm text-text-secondary mt-2",
|
|
257
|
-
children: ["Scheduled: ",
|
|
254
|
+
children: ["Scheduled: ", C(P.scheduledPickup, "full")]
|
|
258
255
|
}),
|
|
259
|
-
|
|
256
|
+
P.actualPickup && /* @__PURE__ */ k("p", {
|
|
260
257
|
className: "text-sm text-status-success-text mt-1",
|
|
261
258
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ O(n, {
|
|
263
260
|
size: 14,
|
|
264
261
|
className: "inline mr-1"
|
|
265
262
|
}),
|
|
266
263
|
"Picked up: ",
|
|
267
|
-
|
|
264
|
+
C(P.actualPickup, "full")
|
|
268
265
|
]
|
|
269
266
|
})
|
|
270
|
-
] }), /* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
267
|
+
] }), /* @__PURE__ */ k("div", { children: [
|
|
268
|
+
/* @__PURE__ */ O("h4", {
|
|
272
269
|
className: "font-medium mb-2 flex items-center gap-2",
|
|
273
|
-
children: /* @__PURE__ */
|
|
270
|
+
children: /* @__PURE__ */ O(l, {
|
|
274
271
|
variant: "outline",
|
|
275
272
|
children: "Delivery"
|
|
276
273
|
})
|
|
277
274
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ O("p", {
|
|
279
276
|
className: "text-sm",
|
|
280
|
-
children:
|
|
277
|
+
children: x(P.deliveryAddress)
|
|
281
278
|
}),
|
|
282
|
-
|
|
279
|
+
P.scheduledDelivery && /* @__PURE__ */ k("p", {
|
|
283
280
|
className: "text-sm text-text-secondary mt-2",
|
|
284
|
-
children: ["Scheduled: ",
|
|
281
|
+
children: ["Scheduled: ", C(P.scheduledDelivery, "full")]
|
|
285
282
|
}),
|
|
286
|
-
|
|
283
|
+
P.actualDelivery && /* @__PURE__ */ k("p", {
|
|
287
284
|
className: "text-sm text-status-success-text mt-1",
|
|
288
285
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ O(n, {
|
|
290
287
|
size: 14,
|
|
291
288
|
className: "inline mr-1"
|
|
292
289
|
}),
|
|
293
290
|
"Delivered: ",
|
|
294
|
-
|
|
291
|
+
C(P.actualDelivery, "full")
|
|
295
292
|
]
|
|
296
293
|
})
|
|
297
294
|
] })]
|
|
298
295
|
}) })] }),
|
|
299
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
300
297
|
className: "flex items-center gap-2",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
302
|
-
}) }), /* @__PURE__ */
|
|
298
|
+
children: [/* @__PURE__ */ O(s, { size: 18 }), "Saved Route"]
|
|
299
|
+
}) }), /* @__PURE__ */ O(f, { children: P.route ? /* @__PURE__ */ k("div", {
|
|
303
300
|
className: "space-y-3",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ k("div", {
|
|
305
302
|
className: "flex items-center justify-between gap-3",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
307
304
|
className: "font-medium",
|
|
308
|
-
children:
|
|
309
|
-
}), /* @__PURE__ */
|
|
305
|
+
children: P.route.name
|
|
306
|
+
}), /* @__PURE__ */ k("p", {
|
|
310
307
|
className: "text-sm text-text-secondary",
|
|
311
308
|
children: [
|
|
312
|
-
|
|
309
|
+
P.route.stops.length,
|
|
313
310
|
" stops ·",
|
|
314
311
|
" ",
|
|
315
|
-
|
|
312
|
+
P.route.status.replace("_", " ").toLowerCase()
|
|
316
313
|
]
|
|
317
|
-
})] }), /* @__PURE__ */
|
|
314
|
+
})] }), /* @__PURE__ */ O(l, {
|
|
318
315
|
variant: "outline",
|
|
319
316
|
children: "Reusable route"
|
|
320
317
|
})]
|
|
321
|
-
}), /* @__PURE__ */
|
|
318
|
+
}), /* @__PURE__ */ O("div", {
|
|
322
319
|
className: "space-y-2",
|
|
323
|
-
children:
|
|
320
|
+
children: P.route.stops.map((e, t) => /* @__PURE__ */ k("div", {
|
|
324
321
|
className: "flex items-start gap-2 text-sm",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ k("span", {
|
|
326
323
|
className: "text-text-secondary",
|
|
327
324
|
children: [t + 1, "."]
|
|
328
|
-
}), /* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
325
|
+
}), /* @__PURE__ */ k("span", { children: [
|
|
326
|
+
/* @__PURE__ */ O("span", {
|
|
330
327
|
className: "font-medium capitalize",
|
|
331
328
|
children: e.type
|
|
332
329
|
}),
|
|
333
330
|
" ·",
|
|
334
331
|
" ",
|
|
335
|
-
|
|
332
|
+
x(e.address)
|
|
336
333
|
] })]
|
|
337
334
|
}, e.id))
|
|
338
335
|
})]
|
|
339
|
-
}) : /* @__PURE__ */
|
|
336
|
+
}) : /* @__PURE__ */ O("p", {
|
|
340
337
|
className: "text-sm text-text-secondary",
|
|
341
338
|
children: "No saved route was selected for this order."
|
|
342
339
|
}) })] }),
|
|
343
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
344
341
|
className: "flex items-center gap-2",
|
|
345
342
|
children: [
|
|
346
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ O(i, { size: 18 }),
|
|
347
344
|
"Order Items (",
|
|
348
|
-
|
|
345
|
+
P.items.length,
|
|
349
346
|
")"
|
|
350
347
|
]
|
|
351
|
-
}) }), /* @__PURE__ */
|
|
348
|
+
}) }), /* @__PURE__ */ O(f, {
|
|
352
349
|
className: "p-0",
|
|
353
|
-
children: /* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
/* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ k(ge, { children: [/* @__PURE__ */ O(ve, { children: /* @__PURE__ */ k(y, { children: [
|
|
351
|
+
/* @__PURE__ */ O(v, { children: "Item" }),
|
|
352
|
+
/* @__PURE__ */ O(v, { children: "SKU" }),
|
|
353
|
+
/* @__PURE__ */ O(v, {
|
|
357
354
|
className: "text-center",
|
|
358
355
|
children: "Qty"
|
|
359
356
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ O(v, {
|
|
361
358
|
className: "text-right",
|
|
362
359
|
children: "Unit Price"
|
|
363
360
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ O(v, {
|
|
365
362
|
className: "text-right",
|
|
366
363
|
children: "Total"
|
|
367
364
|
})
|
|
368
|
-
] }) }), /* @__PURE__ */
|
|
369
|
-
/* @__PURE__ */
|
|
365
|
+
] }) }), /* @__PURE__ */ O(_e, { children: P.items.map((e) => /* @__PURE__ */ k(y, { children: [
|
|
366
|
+
/* @__PURE__ */ O(_, { children: /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
370
367
|
className: "font-medium",
|
|
371
368
|
children: e.name
|
|
372
|
-
}), e.description && /* @__PURE__ */
|
|
369
|
+
}), e.description && /* @__PURE__ */ O("p", {
|
|
373
370
|
className: "text-sm text-text-secondary",
|
|
374
371
|
children: e.description
|
|
375
372
|
})] }) }),
|
|
376
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ O(_, {
|
|
377
374
|
className: "font-mono text-sm",
|
|
378
375
|
children: e.sku
|
|
379
376
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ O(_, {
|
|
381
378
|
className: "text-center",
|
|
382
379
|
children: e.quantity
|
|
383
380
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ O(_, {
|
|
385
382
|
className: "text-right",
|
|
386
|
-
children:
|
|
383
|
+
children: S(e.value)
|
|
387
384
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ O(_, {
|
|
389
386
|
className: "text-right font-medium",
|
|
390
|
-
children:
|
|
387
|
+
children: S(e.value * e.quantity)
|
|
391
388
|
})
|
|
392
389
|
] }, e.id)) })] })
|
|
393
390
|
})] }),
|
|
394
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
395
392
|
className: "flex items-center gap-2",
|
|
396
|
-
children: [/* @__PURE__ */
|
|
397
|
-
}) }), /* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ O(te, { size: 18 }), "Order Timeline"]
|
|
394
|
+
}) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O("div", {
|
|
398
395
|
className: "relative",
|
|
399
|
-
children:
|
|
396
|
+
children: P.timeline.map((e, t) => /* @__PURE__ */ k("div", {
|
|
400
397
|
className: "flex gap-4 pb-6 last:pb-0",
|
|
401
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ k("div", {
|
|
402
399
|
className: "relative",
|
|
403
|
-
children: [/* @__PURE__ */
|
|
404
|
-
}), /* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ O("div", { className: "w-3 h-3 rounded-full bg-action-primary-bg mt-1.5" }), t < P.timeline.length - 1 && /* @__PURE__ */ O("div", { className: "absolute top-4 left-1.5 w-px h-full -ml-px bg-border" })]
|
|
401
|
+
}), /* @__PURE__ */ k("div", {
|
|
405
402
|
className: "flex-1",
|
|
406
403
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ k("div", {
|
|
408
405
|
className: "flex items-center gap-2 mb-1",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ O(b, {
|
|
410
407
|
status: e.status,
|
|
411
408
|
type: "order",
|
|
412
409
|
size: "sm"
|
|
413
|
-
}), /* @__PURE__ */
|
|
410
|
+
}), /* @__PURE__ */ O("span", {
|
|
414
411
|
className: "text-sm text-text-secondary",
|
|
415
|
-
children:
|
|
412
|
+
children: C(e.timestamp, "full")
|
|
416
413
|
})]
|
|
417
414
|
}),
|
|
418
|
-
e.notes && /* @__PURE__ */
|
|
415
|
+
e.notes && /* @__PURE__ */ O("p", {
|
|
419
416
|
className: "text-sm",
|
|
420
417
|
children: e.notes
|
|
421
418
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ k("p", {
|
|
423
420
|
className: "text-xs text-text-secondary",
|
|
424
421
|
children: ["by ", e.performedBy]
|
|
425
422
|
})
|
|
@@ -428,214 +425,214 @@ function P() {
|
|
|
428
425
|
}, t))
|
|
429
426
|
}) })] })
|
|
430
427
|
]
|
|
431
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ k("div", {
|
|
432
429
|
className: "space-y-6",
|
|
433
430
|
children: [
|
|
434
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ k(je, { children: [/* @__PURE__ */ k("h2", {
|
|
435
432
|
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
437
|
-
}), /* @__PURE__ */
|
|
433
|
+
children: [/* @__PURE__ */ O(ne, { size: 18 }), "Order Summary"]
|
|
434
|
+
}), /* @__PURE__ */ k("div", {
|
|
438
435
|
className: "space-y-3",
|
|
439
436
|
children: [
|
|
440
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ k("div", {
|
|
441
438
|
className: "flex justify-between text-sm",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ O("span", {
|
|
443
440
|
className: "text-text-secondary",
|
|
444
441
|
children: "Subtotal"
|
|
445
|
-
}), /* @__PURE__ */
|
|
442
|
+
}), /* @__PURE__ */ O("span", { children: S(P.pricing.subtotal) })]
|
|
446
443
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ k("div", {
|
|
448
445
|
className: "flex justify-between text-sm",
|
|
449
|
-
children: [/* @__PURE__ */
|
|
446
|
+
children: [/* @__PURE__ */ O("span", {
|
|
450
447
|
className: "text-text-secondary",
|
|
451
448
|
children: "Delivery"
|
|
452
|
-
}), /* @__PURE__ */
|
|
449
|
+
}), /* @__PURE__ */ O("span", { children: S(P.pricing.fees.delivery) })]
|
|
453
450
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ k("div", {
|
|
455
452
|
className: "flex justify-between text-sm",
|
|
456
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ O("span", {
|
|
457
454
|
className: "text-text-secondary",
|
|
458
455
|
children: "Handling"
|
|
459
|
-
}), /* @__PURE__ */
|
|
456
|
+
}), /* @__PURE__ */ O("span", { children: S(P.pricing.fees.handling) })]
|
|
460
457
|
}),
|
|
461
|
-
|
|
458
|
+
P.pricing.fees.insurance && /* @__PURE__ */ k("div", {
|
|
462
459
|
className: "flex justify-between text-sm",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ O("span", {
|
|
464
461
|
className: "text-text-secondary",
|
|
465
462
|
children: "Insurance"
|
|
466
|
-
}), /* @__PURE__ */
|
|
463
|
+
}), /* @__PURE__ */ O("span", { children: S(P.pricing.fees.insurance) })]
|
|
467
464
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ k("div", {
|
|
469
466
|
className: "flex justify-between text-sm",
|
|
470
|
-
children: [/* @__PURE__ */
|
|
467
|
+
children: [/* @__PURE__ */ O("span", {
|
|
471
468
|
className: "text-text-secondary",
|
|
472
469
|
children: "Taxes"
|
|
473
|
-
}), /* @__PURE__ */
|
|
470
|
+
}), /* @__PURE__ */ O("span", { children: S(P.pricing.taxes) })]
|
|
474
471
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ O(g, {}),
|
|
473
|
+
/* @__PURE__ */ k("div", {
|
|
477
474
|
className: "flex justify-between font-medium",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ O("span", { children: "Total" }), /* @__PURE__ */ O("span", {
|
|
479
476
|
className: "text-lg",
|
|
480
|
-
children:
|
|
477
|
+
children: S(P.pricing.total)
|
|
481
478
|
})]
|
|
482
479
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ k("div", {
|
|
484
481
|
className: "pt-2",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
482
|
+
children: [/* @__PURE__ */ O("p", {
|
|
486
483
|
className: "text-sm text-text-secondary",
|
|
487
484
|
children: "Payment Method"
|
|
488
|
-
}), /* @__PURE__ */
|
|
485
|
+
}), /* @__PURE__ */ O("p", {
|
|
489
486
|
className: "text-sm capitalize",
|
|
490
|
-
children:
|
|
487
|
+
children: P.pricing.paymentMethod.replace("_", " ")
|
|
491
488
|
})]
|
|
492
489
|
})
|
|
493
490
|
]
|
|
494
491
|
})] }),
|
|
495
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
496
493
|
className: "flex items-center gap-2",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
498
|
-
}) }), /* @__PURE__ */
|
|
494
|
+
children: [/* @__PURE__ */ O(s, { size: 18 }), "Assignment"]
|
|
495
|
+
}) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ k("div", {
|
|
499
496
|
className: "space-y-4",
|
|
500
497
|
children: [
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
/* @__PURE__ */
|
|
498
|
+
G && /* @__PURE__ */ O(we, { message: G }),
|
|
499
|
+
We && /* @__PURE__ */ O(Te, { message: We }),
|
|
500
|
+
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
504
501
|
className: "text-sm text-text-secondary",
|
|
505
502
|
children: "Tracking Number"
|
|
506
|
-
}), /* @__PURE__ */
|
|
503
|
+
}), /* @__PURE__ */ O("p", {
|
|
507
504
|
className: "text-sm font-mono",
|
|
508
|
-
children:
|
|
505
|
+
children: P.trackingNumber || "—"
|
|
509
506
|
})] }),
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ O(g, {}),
|
|
508
|
+
/* @__PURE__ */ k("div", {
|
|
512
509
|
className: "space-y-3",
|
|
513
510
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ k("div", {
|
|
515
512
|
className: "space-y-1.5",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: [/* @__PURE__ */ O(h, {
|
|
517
514
|
htmlFor: "assign-fleet-search",
|
|
518
515
|
children: "Search fleet"
|
|
519
|
-
}), /* @__PURE__ */
|
|
516
|
+
}), /* @__PURE__ */ O(he, {
|
|
520
517
|
id: "assign-fleet-search",
|
|
521
|
-
value:
|
|
522
|
-
onChange: (e) =>
|
|
518
|
+
value: I,
|
|
519
|
+
onChange: (e) => ze(e.target.value),
|
|
523
520
|
placeholder: "Vehicle number, driver name or ID"
|
|
524
521
|
})]
|
|
525
522
|
}),
|
|
526
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ k("div", {
|
|
527
524
|
className: "space-y-1.5",
|
|
528
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ O(h, {
|
|
529
526
|
htmlFor: "assign-vehicle",
|
|
530
527
|
children: "Vehicle"
|
|
531
|
-
}), /* @__PURE__ */
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
528
|
+
}), /* @__PURE__ */ O(w, {
|
|
529
|
+
id: "assign-vehicle",
|
|
530
|
+
value: L,
|
|
531
|
+
onChange: R,
|
|
532
|
+
options: Ke,
|
|
533
|
+
loading: Y,
|
|
534
|
+
getId: (e) => e.id,
|
|
535
|
+
getLabel: (e) => `${e.vehicleNumber} (${e.type})`,
|
|
536
|
+
renderOption: (e) => /* @__PURE__ */ k(D, { children: [
|
|
537
|
+
e.vehicleNumber,
|
|
538
|
+
" (",
|
|
539
|
+
e.type,
|
|
540
|
+
")"
|
|
541
|
+
] }),
|
|
542
|
+
selectedOption: Be,
|
|
543
|
+
selectedLoading: Ve,
|
|
544
|
+
required: !0,
|
|
545
|
+
placeholder: P.vehicleId ? `Current: ${P.vehicleId}` : "Select a vehicle",
|
|
546
|
+
emptyText: "No available vehicles."
|
|
550
547
|
})]
|
|
551
548
|
}),
|
|
552
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ k("div", {
|
|
553
550
|
className: "space-y-1.5",
|
|
554
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ O(h, {
|
|
555
552
|
htmlFor: "assign-driver",
|
|
556
553
|
children: "Driver"
|
|
557
|
-
}), /* @__PURE__ */
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
554
|
+
}), /* @__PURE__ */ O(w, {
|
|
555
|
+
id: "assign-driver",
|
|
556
|
+
value: z,
|
|
557
|
+
onChange: B,
|
|
558
|
+
options: qe,
|
|
559
|
+
loading: Z,
|
|
560
|
+
getId: (e) => e.id,
|
|
561
|
+
getLabel: (e) => `${e.fullName} (${e.employeeId})`,
|
|
562
|
+
renderOption: (e) => /* @__PURE__ */ k(D, { children: [
|
|
563
|
+
e.fullName,
|
|
564
|
+
" (",
|
|
565
|
+
e.employeeId,
|
|
566
|
+
")"
|
|
567
|
+
] }),
|
|
568
|
+
selectedOption: He,
|
|
569
|
+
selectedLoading: Ue,
|
|
570
|
+
required: !0,
|
|
571
|
+
placeholder: P.driverId ? `Current: ${P.driverId}` : "Select a driver",
|
|
572
|
+
emptyText: "No available drivers."
|
|
576
573
|
})]
|
|
577
574
|
}),
|
|
578
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ k(u, {
|
|
579
576
|
className: "w-full",
|
|
580
|
-
onClick:
|
|
581
|
-
disabled:
|
|
582
|
-
children: [/* @__PURE__ */
|
|
577
|
+
onClick: Je,
|
|
578
|
+
disabled: V || !L && !z,
|
|
579
|
+
children: [/* @__PURE__ */ O(oe, { size: 16 }), V ? "Assigning…" : "Assign driver & vehicle"]
|
|
583
580
|
})
|
|
584
581
|
]
|
|
585
582
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
587
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ O(g, {}),
|
|
584
|
+
/* @__PURE__ */ k("div", {
|
|
588
585
|
className: "space-y-2",
|
|
589
586
|
children: [
|
|
590
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ k("p", {
|
|
591
588
|
className: "text-sm text-text-secondary",
|
|
592
589
|
children: [
|
|
593
590
|
"Current status:",
|
|
594
591
|
" ",
|
|
595
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ O("span", {
|
|
596
593
|
className: "font-medium",
|
|
597
|
-
children:
|
|
594
|
+
children: j[P.status]
|
|
598
595
|
})
|
|
599
596
|
]
|
|
600
597
|
}),
|
|
601
598
|
(() => {
|
|
602
|
-
let e =
|
|
603
|
-
return e ? /* @__PURE__ */
|
|
599
|
+
let e = Pe(P.status);
|
|
600
|
+
return e ? /* @__PURE__ */ k(u, {
|
|
604
601
|
variant: "outline",
|
|
605
602
|
className: "w-full",
|
|
606
|
-
onClick: () =>
|
|
607
|
-
disabled:
|
|
608
|
-
children: [/* @__PURE__ */
|
|
603
|
+
onClick: () => Q(e, `Order advanced to ${j[e]}.`),
|
|
604
|
+
disabled: U,
|
|
605
|
+
children: [/* @__PURE__ */ O(t, { size: 16 }), U ? "Updating…" : `Advance to ${j[e]}`]
|
|
609
606
|
}) : null;
|
|
610
607
|
})(),
|
|
611
|
-
|
|
608
|
+
P.status !== "cancelled" && P.status !== "delivered" && /* @__PURE__ */ k(u, {
|
|
612
609
|
variant: "outline",
|
|
613
610
|
className: "w-full text-status-error-text",
|
|
614
|
-
onClick: () =>
|
|
615
|
-
disabled:
|
|
616
|
-
children: [/* @__PURE__ */
|
|
611
|
+
onClick: () => Q("cancelled", "Order cancelled."),
|
|
612
|
+
disabled: U,
|
|
613
|
+
children: [/* @__PURE__ */ O(ee, { size: 16 }), "Cancel order"]
|
|
617
614
|
})
|
|
618
615
|
]
|
|
619
616
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ k(u, {
|
|
621
618
|
variant: "outline",
|
|
622
619
|
className: "w-full",
|
|
623
|
-
onClick: () => $(`tracking?order=${
|
|
624
|
-
children: [/* @__PURE__ */
|
|
620
|
+
onClick: () => $(`tracking?order=${P.id}`),
|
|
621
|
+
children: [/* @__PURE__ */ O(r, { size: 16 }), "Track Order"]
|
|
625
622
|
})
|
|
626
623
|
]
|
|
627
624
|
}) })] }),
|
|
628
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ O(De, {
|
|
629
626
|
entityType: "order",
|
|
630
|
-
entityId:
|
|
627
|
+
entityId: P.id
|
|
631
628
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
-
|
|
629
|
+
/* @__PURE__ */ O(ke, { deliveryJobId: P.id }),
|
|
630
|
+
P.specialInstructions && /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
634
631
|
className: "flex items-center gap-2",
|
|
635
|
-
children: [/* @__PURE__ */
|
|
636
|
-
}) }), /* @__PURE__ */
|
|
632
|
+
children: [/* @__PURE__ */ O(re, { size: 18 }), "Special Instructions"]
|
|
633
|
+
}) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O("p", {
|
|
637
634
|
className: "text-sm",
|
|
638
|
-
children:
|
|
635
|
+
children: P.specialInstructions
|
|
639
636
|
}) })] })
|
|
640
637
|
]
|
|
641
638
|
})]
|
|
@@ -644,4 +641,4 @@ function P() {
|
|
|
644
641
|
});
|
|
645
642
|
}
|
|
646
643
|
//#endregion
|
|
647
|
-
export {
|
|
644
|
+
export { M as default };
|