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