@burdenoff/microfe-movethewheels 2026.920.1 → 2026.920.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CustomerPicker.js +260 -0
- package/dist/components/ShippingQuoteResults.js +159 -106
- package/dist/hooks/useShippingCarriers.js +1 -1
- package/dist/movethewheels/components/CustomerPicker.d.ts +17 -0
- package/dist/movethewheels/hooks/useShippingCarriers.d.ts +17 -0
- package/dist/movethewheels/utils/navigation.d.ts +14 -0
- package/dist/pages/CreateOrderPage.js +221 -216
- package/dist/pages/CustomerDetailsPage.js +220 -220
- package/dist/pages/ShippingRatesPage.js +84 -16
- package/dist/utils/navigation.js +22 -1
- package/package.json +1 -1
- package/src/movethewheels/components/CustomerPicker.tsx +307 -0
- package/src/movethewheels/components/ShippingQuoteResults.tsx +62 -2
- package/src/movethewheels/components/maps/leaflet-setup.ts +8 -1
- package/src/movethewheels/hooks/useMultiModalShipments.ts +6 -1
- package/src/movethewheels/hooks/useShippingCarriers.ts +28 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +84 -31
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +15 -6
- package/src/movethewheels/pages/ShippingRatesPage.tsx +85 -0
- package/src/movethewheels/utils/navigation.ts +32 -0
|
@@ -5,116 +5,125 @@ import { Package as r } from "../node_modules/lucide-react/dist/esm/icons/packag
|
|
|
5
5
|
import { Plus as i } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
6
6
|
import { Save as a } from "../node_modules/lucide-react/dist/esm/icons/save.js";
|
|
7
7
|
import { Trash2 as o } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
|
|
8
|
-
import { Users as
|
|
9
|
-
import { joinPath as
|
|
10
|
-
import { useMoveTheWheels as
|
|
11
|
-
import { useOrder as
|
|
12
|
-
import { useCustomers as
|
|
13
|
-
import { Button as
|
|
14
|
-
import { EmptyState as
|
|
15
|
-
import { FormError as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
8
|
+
import { Users as ee } from "../node_modules/lucide-react/dist/esm/icons/users.js";
|
|
9
|
+
import { buildCustomerCreatePath as te, joinPath as s } from "../utils/navigation.js";
|
|
10
|
+
import { useMoveTheWheels as c } from "../providers/MoveTheWheelsProvider.js";
|
|
11
|
+
import { useOrder as l, useOrders as u } from "../hooks/useOrders.js";
|
|
12
|
+
import { useCustomer as ne, useCustomers as re } from "../hooks/useCustomers.js";
|
|
13
|
+
import { Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h, Input as g, Label as _, Select as v, SelectContent as ie, SelectItem as y, SelectTrigger as ae, SelectValue as oe, Separator as se, Textarea as ce } from "../components/ui.js";
|
|
14
|
+
import { EmptyState as le, PageLayout as ue } from "../components/PageLayout.js";
|
|
15
|
+
import { FormError as de } from "../components/FormError.js";
|
|
16
|
+
import { CustomerPicker as fe } from "../components/CustomerPicker.js";
|
|
17
|
+
import { useEffect as b, useState as x } from "react";
|
|
18
|
+
import { useParams as pe, useSearchParams as S } from "react-router";
|
|
19
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
20
|
+
import { EmphasisPanel as T, NextSteps as me, PagePurpose as he } from "@burdenoff/fe-libs/ui";
|
|
20
21
|
//#region src/movethewheels/pages/CreateOrderPage.tsx
|
|
21
|
-
function
|
|
22
|
+
function E(e) {
|
|
22
23
|
if (!e || Number.isNaN(e.getTime())) return "";
|
|
23
24
|
let t = (e) => String(e).padStart(2, "0");
|
|
24
25
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`;
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
let { orderId:
|
|
28
|
-
customerId:
|
|
29
|
-
priority:
|
|
27
|
+
function D() {
|
|
28
|
+
let { orderId: D } = pe(), [ge] = S(), O = ge.get("customerId")?.trim() || void 0, { basePath: k, navigate: A } = c(), { order: j } = l(D), { createOrder: M, updateOrder: N } = u(), { customers: P, createCustomer: F, isLoading: I, error: L, refetch: _e } = re({ limit: 100 }), { customer: R } = ne(O ?? j?.customerId), z = !!D && !!j, [B, V] = x(null), [H, U] = x({
|
|
29
|
+
customerId: O || j?.customerId || "",
|
|
30
|
+
priority: j?.priority || "normal",
|
|
30
31
|
pickupAddress: {
|
|
31
|
-
street:
|
|
32
|
-
city:
|
|
33
|
-
state:
|
|
34
|
-
postalCode:
|
|
35
|
-
country:
|
|
32
|
+
street: j?.pickupAddress.street || "",
|
|
33
|
+
city: j?.pickupAddress.city || "",
|
|
34
|
+
state: j?.pickupAddress.state || "",
|
|
35
|
+
postalCode: j?.pickupAddress.postalCode || "",
|
|
36
|
+
country: j?.pickupAddress.country || "USA"
|
|
36
37
|
},
|
|
37
38
|
deliveryAddress: {
|
|
38
|
-
street:
|
|
39
|
-
city:
|
|
40
|
-
state:
|
|
41
|
-
postalCode:
|
|
42
|
-
country:
|
|
39
|
+
street: j?.deliveryAddress.street || "",
|
|
40
|
+
city: j?.deliveryAddress.city || "",
|
|
41
|
+
state: j?.deliveryAddress.state || "",
|
|
42
|
+
postalCode: j?.deliveryAddress.postalCode || "",
|
|
43
|
+
country: j?.deliveryAddress.country || "USA"
|
|
43
44
|
},
|
|
44
|
-
items:
|
|
45
|
-
scheduledDelivery:
|
|
46
|
-
specialInstructions:
|
|
47
|
-
}), [
|
|
48
|
-
|
|
49
|
-
R &&
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
items: j?.items || [],
|
|
46
|
+
scheduledDelivery: E(j?.scheduledDelivery),
|
|
47
|
+
specialInstructions: j?.specialInstructions || ""
|
|
48
|
+
}), [W, G] = x(!1), [ve, K] = x(null);
|
|
49
|
+
b(() => {
|
|
50
|
+
R && (V((e) => e?.id === R.id ? e : R), U((e) => e.customerId ? e : {
|
|
51
|
+
...e,
|
|
52
|
+
customerId: R.id
|
|
53
|
+
}));
|
|
54
|
+
}, [R]), b(() => {
|
|
55
|
+
j && U({
|
|
56
|
+
customerId: j.customerId || "",
|
|
57
|
+
priority: j.priority || "normal",
|
|
52
58
|
pickupAddress: {
|
|
53
|
-
street:
|
|
54
|
-
city:
|
|
55
|
-
state:
|
|
56
|
-
postalCode:
|
|
57
|
-
country:
|
|
59
|
+
street: j.pickupAddress.street || "",
|
|
60
|
+
city: j.pickupAddress.city || "",
|
|
61
|
+
state: j.pickupAddress.state || "",
|
|
62
|
+
postalCode: j.pickupAddress.postalCode || "",
|
|
63
|
+
country: j.pickupAddress.country || "USA"
|
|
58
64
|
},
|
|
59
65
|
deliveryAddress: {
|
|
60
|
-
street:
|
|
61
|
-
city:
|
|
62
|
-
state:
|
|
63
|
-
postalCode:
|
|
64
|
-
country:
|
|
66
|
+
street: j.deliveryAddress.street || "",
|
|
67
|
+
city: j.deliveryAddress.city || "",
|
|
68
|
+
state: j.deliveryAddress.state || "",
|
|
69
|
+
postalCode: j.deliveryAddress.postalCode || "",
|
|
70
|
+
country: j.deliveryAddress.country || "USA"
|
|
65
71
|
},
|
|
66
|
-
items:
|
|
67
|
-
scheduledDelivery:
|
|
68
|
-
specialInstructions:
|
|
72
|
+
items: j.items || [],
|
|
73
|
+
scheduledDelivery: E(j.scheduledDelivery),
|
|
74
|
+
specialInstructions: j.specialInstructions || ""
|
|
69
75
|
});
|
|
70
|
-
}, [
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
}, [j]);
|
|
77
|
+
let q = () => {
|
|
78
|
+
if (A) {
|
|
79
|
+
if (!z && O) {
|
|
80
|
+
A(s(k, `customers/${O}`));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
A(s(k, "orders"));
|
|
84
|
+
}
|
|
85
|
+
}, J = () => B ?? P.find((e) => e.id === H.customerId), ye = () => !H.customerId || !J() ? L ? "Customers could not be loaded. Retry or create a customer before continuing." : "Select a customer for this order." : H.pickupAddress.street.trim() ? H.deliveryAddress.street.trim() ? H.items.length === 0 ? "Add at least one item to the order." : H.scheduledDelivery && Number.isNaN(Date.parse(H.scheduledDelivery)) ? "Enter a valid scheduled delivery date and time." : null : "Enter a delivery street address." : "Enter a pickup street address.", Y = async (e) => {
|
|
86
|
+
e.preventDefault(), K(null);
|
|
87
|
+
let t = ye();
|
|
79
88
|
if (t) {
|
|
80
|
-
|
|
89
|
+
K(t);
|
|
81
90
|
return;
|
|
82
91
|
}
|
|
83
|
-
let n =
|
|
92
|
+
let n = J();
|
|
84
93
|
if (!n) {
|
|
85
|
-
|
|
94
|
+
K(L ? "Customers could not be loaded. Retry or create a customer before continuing." : "Select a customer for this order.");
|
|
86
95
|
return;
|
|
87
96
|
}
|
|
88
|
-
|
|
97
|
+
G(!0);
|
|
89
98
|
try {
|
|
90
99
|
let e = {
|
|
91
|
-
customerId:
|
|
100
|
+
customerId: H.customerId,
|
|
92
101
|
customerInfo: {
|
|
93
102
|
name: n.name,
|
|
94
103
|
email: n.email,
|
|
95
104
|
phone: n.phone,
|
|
96
105
|
company: n.company
|
|
97
106
|
},
|
|
98
|
-
priority:
|
|
99
|
-
pickupAddress:
|
|
100
|
-
deliveryAddress:
|
|
101
|
-
items:
|
|
102
|
-
scheduledDelivery:
|
|
103
|
-
specialInstructions:
|
|
107
|
+
priority: H.priority,
|
|
108
|
+
pickupAddress: H.pickupAddress,
|
|
109
|
+
deliveryAddress: H.deliveryAddress,
|
|
110
|
+
items: H.items,
|
|
111
|
+
scheduledDelivery: H.scheduledDelivery ? new Date(H.scheduledDelivery) : null,
|
|
112
|
+
specialInstructions: H.specialInstructions
|
|
104
113
|
};
|
|
105
|
-
|
|
114
|
+
z && D ? (await N(D, e), A && A(s(k, `orders/${D}`))) : (await M(e), q());
|
|
106
115
|
} catch (e) {
|
|
107
|
-
|
|
116
|
+
K(e instanceof Error ? e.message : z ? "Could not update the order. Please try again." : "Could not create the order. Please try again.");
|
|
108
117
|
} finally {
|
|
109
|
-
|
|
118
|
+
G(!1);
|
|
110
119
|
}
|
|
111
120
|
}, X = (e, t) => {
|
|
112
|
-
|
|
121
|
+
U((n) => ({
|
|
113
122
|
...n,
|
|
114
123
|
[e]: t
|
|
115
124
|
}));
|
|
116
125
|
}, Z = (e, t, n) => {
|
|
117
|
-
|
|
126
|
+
U((r) => ({
|
|
118
127
|
...r,
|
|
119
128
|
[e]: {
|
|
120
129
|
...r[e],
|
|
@@ -122,7 +131,7 @@ function F() {
|
|
|
122
131
|
}
|
|
123
132
|
}));
|
|
124
133
|
}, Q = () => {
|
|
125
|
-
|
|
134
|
+
U((e) => ({
|
|
126
135
|
...e,
|
|
127
136
|
items: [...e.items, {
|
|
128
137
|
id: `item-${Date.now()}`,
|
|
@@ -140,13 +149,13 @@ function F() {
|
|
|
140
149
|
sku: ""
|
|
141
150
|
}]
|
|
142
151
|
}));
|
|
143
|
-
},
|
|
144
|
-
|
|
152
|
+
}, be = (e) => {
|
|
153
|
+
U((t) => ({
|
|
145
154
|
...t,
|
|
146
155
|
items: t.items.filter((t, n) => n !== e)
|
|
147
156
|
}));
|
|
148
157
|
}, $ = (e, t, n) => {
|
|
149
|
-
|
|
158
|
+
U((r) => ({
|
|
150
159
|
...r,
|
|
151
160
|
items: r.items.map((r, i) => i === e ? {
|
|
152
161
|
...r,
|
|
@@ -154,114 +163,110 @@ function F() {
|
|
|
154
163
|
} : r)
|
|
155
164
|
}));
|
|
156
165
|
};
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
title:
|
|
159
|
-
subtitle:
|
|
160
|
-
icon: /* @__PURE__ */
|
|
161
|
-
headerActions: /* @__PURE__ */
|
|
166
|
+
return /* @__PURE__ */ w(ue, {
|
|
167
|
+
title: z ? "Edit Order" : "Create Order",
|
|
168
|
+
subtitle: z ? `Editing ${j?.orderNumber}` : "Create a new delivery order",
|
|
169
|
+
icon: /* @__PURE__ */ C(r, { size: 24 }),
|
|
170
|
+
headerActions: /* @__PURE__ */ w("div", {
|
|
162
171
|
className: "flex gap-2",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ w(d, {
|
|
164
173
|
variant: "outline",
|
|
165
|
-
onClick:
|
|
166
|
-
children: [/* @__PURE__ */
|
|
167
|
-
}), /* @__PURE__ */
|
|
174
|
+
onClick: q,
|
|
175
|
+
children: [/* @__PURE__ */ C(e, { size: 16 }), "Cancel"]
|
|
176
|
+
}), /* @__PURE__ */ w(d, {
|
|
168
177
|
onClick: Y,
|
|
169
|
-
disabled:
|
|
170
|
-
children: [/* @__PURE__ */
|
|
178
|
+
disabled: W || I,
|
|
179
|
+
children: [/* @__PURE__ */ C(a, { size: 16 }), W ? "Saving..." : z ? "Save Changes" : "Create Order"]
|
|
171
180
|
})]
|
|
172
181
|
}),
|
|
173
182
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
icon: /* @__PURE__ */
|
|
176
|
-
children:
|
|
183
|
+
/* @__PURE__ */ C(he, {
|
|
184
|
+
icon: /* @__PURE__ */ C(r, { size: 18 }),
|
|
185
|
+
children: z ? "Update this delivery before it goes out — change the customer, addresses, items or handling notes, then save." : "Book a new delivery in a few steps: choose who it’s for, set pickup and drop-off addresses, list what’s being shipped, and add any handling notes. Once created it joins the orders pipeline ready to assign and track."
|
|
177
186
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ C(me, {
|
|
179
188
|
storageKey: "movethewheels-create-order",
|
|
180
189
|
steps: [
|
|
181
190
|
{
|
|
182
191
|
id: "customer",
|
|
183
192
|
label: "Pick the customer first",
|
|
184
193
|
description: "Their saved contact details auto-fill the order.",
|
|
185
|
-
icon: /* @__PURE__ */
|
|
186
|
-
done: !!
|
|
194
|
+
icon: /* @__PURE__ */ C(ee, { size: 16 }),
|
|
195
|
+
done: !!H.customerId,
|
|
187
196
|
onClick: () => document.getElementById("customer")?.focus()
|
|
188
197
|
},
|
|
189
198
|
{
|
|
190
199
|
id: "addresses",
|
|
191
200
|
label: "Set pickup & delivery addresses",
|
|
192
201
|
description: "Where the shipment is collected and dropped off.",
|
|
193
|
-
icon: /* @__PURE__ */
|
|
194
|
-
done: !!
|
|
202
|
+
icon: /* @__PURE__ */ C(n, { size: 16 }),
|
|
203
|
+
done: !!H.pickupAddress.street && !!H.deliveryAddress.street,
|
|
195
204
|
onClick: () => document.getElementById("pickupStreet")?.focus()
|
|
196
205
|
},
|
|
197
206
|
{
|
|
198
207
|
id: "items",
|
|
199
208
|
label: "Add the items to ship",
|
|
200
209
|
description: "List each product with its quantity and value.",
|
|
201
|
-
icon: /* @__PURE__ */
|
|
202
|
-
done:
|
|
210
|
+
icon: /* @__PURE__ */ C(r, { size: 16 }),
|
|
211
|
+
done: H.items.length > 0,
|
|
203
212
|
onClick: Q
|
|
204
213
|
}
|
|
205
214
|
]
|
|
206
215
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ w("form", {
|
|
208
217
|
onSubmit: Y,
|
|
209
218
|
className: "space-y-6",
|
|
210
219
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ C(de, { message: ve }),
|
|
221
|
+
/* @__PURE__ */ w(T, { children: [/* @__PURE__ */ C("h2", {
|
|
213
222
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
214
223
|
children: "Order Details"
|
|
215
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ C("div", {
|
|
216
225
|
className: "space-y-4",
|
|
217
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ w("div", {
|
|
218
227
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
]
|
|
238
|
-
}, e.id)) })]
|
|
239
|
-
})]
|
|
240
|
-
}), /* @__PURE__ */ A("div", {
|
|
228
|
+
children: [/* @__PURE__ */ C(fe, {
|
|
229
|
+
customers: P,
|
|
230
|
+
value: H.customerId,
|
|
231
|
+
onValueChange: (e) => {
|
|
232
|
+
e && (X("customerId", e), V(P.find((t) => t.id === e) ?? (B?.id === e ? B : null)), K(null));
|
|
233
|
+
},
|
|
234
|
+
onCreated: (e) => {
|
|
235
|
+
V(e), X("customerId", e.id), K(null);
|
|
236
|
+
},
|
|
237
|
+
createCustomer: F,
|
|
238
|
+
isLoading: I,
|
|
239
|
+
error: L,
|
|
240
|
+
onRetry: _e,
|
|
241
|
+
onOpenCustomers: () => {
|
|
242
|
+
A && A(s(k, te(z && D ? `orders/${D}/edit` : "orders/new")));
|
|
243
|
+
},
|
|
244
|
+
selectedCustomer: B
|
|
245
|
+
}), /* @__PURE__ */ w("div", {
|
|
241
246
|
className: "space-y-2",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ C(_, {
|
|
243
248
|
htmlFor: "priority",
|
|
244
249
|
children: "Priority"
|
|
245
|
-
}), /* @__PURE__ */
|
|
246
|
-
value:
|
|
250
|
+
}), /* @__PURE__ */ w(v, {
|
|
251
|
+
value: H.priority,
|
|
247
252
|
onValueChange: (e) => X("priority", e),
|
|
248
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ C(ae, {
|
|
249
254
|
id: "priority",
|
|
250
|
-
children: /* @__PURE__ */
|
|
251
|
-
}), /* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
255
|
+
children: /* @__PURE__ */ C(oe, {})
|
|
256
|
+
}), /* @__PURE__ */ w(ie, { children: [
|
|
257
|
+
/* @__PURE__ */ C(y, {
|
|
253
258
|
value: "low",
|
|
254
259
|
children: "Low"
|
|
255
260
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ C(y, {
|
|
257
262
|
value: "normal",
|
|
258
263
|
children: "Normal"
|
|
259
264
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ C(y, {
|
|
261
266
|
value: "high",
|
|
262
267
|
children: "High"
|
|
263
268
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ C(y, {
|
|
265
270
|
value: "urgent",
|
|
266
271
|
children: "Urgent"
|
|
267
272
|
})
|
|
@@ -270,138 +275,138 @@ function F() {
|
|
|
270
275
|
})]
|
|
271
276
|
})
|
|
272
277
|
})] }),
|
|
273
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ w("div", {
|
|
274
279
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ w(f, { children: [/* @__PURE__ */ C(m, { children: /* @__PURE__ */ C(h, { children: "Pickup Address" }) }), /* @__PURE__ */ w(p, {
|
|
276
281
|
className: "space-y-4",
|
|
277
282
|
children: [
|
|
278
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ w("div", {
|
|
279
284
|
className: "space-y-2",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ C(_, {
|
|
281
286
|
htmlFor: "pickupStreet",
|
|
282
287
|
children: "Street Address"
|
|
283
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ C(g, {
|
|
284
289
|
id: "pickupStreet",
|
|
285
|
-
value:
|
|
290
|
+
value: H.pickupAddress.street,
|
|
286
291
|
onChange: (e) => Z("pickupAddress", "street", e.target.value),
|
|
287
292
|
placeholder: "123 Main St"
|
|
288
293
|
})]
|
|
289
294
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ w("div", {
|
|
291
296
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ w("div", {
|
|
293
298
|
className: "space-y-2",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ C(_, {
|
|
295
300
|
htmlFor: "pickupCity",
|
|
296
301
|
children: "City"
|
|
297
|
-
}), /* @__PURE__ */
|
|
302
|
+
}), /* @__PURE__ */ C(g, {
|
|
298
303
|
id: "pickupCity",
|
|
299
|
-
value:
|
|
304
|
+
value: H.pickupAddress.city,
|
|
300
305
|
onChange: (e) => Z("pickupAddress", "city", e.target.value),
|
|
301
306
|
placeholder: "San Francisco"
|
|
302
307
|
})]
|
|
303
|
-
}), /* @__PURE__ */
|
|
308
|
+
}), /* @__PURE__ */ w("div", {
|
|
304
309
|
className: "space-y-2",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ C(_, {
|
|
306
311
|
htmlFor: "pickupState",
|
|
307
312
|
children: "State"
|
|
308
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ C(g, {
|
|
309
314
|
id: "pickupState",
|
|
310
|
-
value:
|
|
315
|
+
value: H.pickupAddress.state,
|
|
311
316
|
onChange: (e) => Z("pickupAddress", "state", e.target.value),
|
|
312
317
|
placeholder: "CA"
|
|
313
318
|
})]
|
|
314
319
|
})]
|
|
315
320
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ w("div", {
|
|
317
322
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ w("div", {
|
|
319
324
|
className: "space-y-2",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ C(_, {
|
|
321
326
|
htmlFor: "pickupPostal",
|
|
322
327
|
children: "Postal Code"
|
|
323
|
-
}), /* @__PURE__ */
|
|
328
|
+
}), /* @__PURE__ */ C(g, {
|
|
324
329
|
id: "pickupPostal",
|
|
325
|
-
value:
|
|
330
|
+
value: H.pickupAddress.postalCode,
|
|
326
331
|
onChange: (e) => Z("pickupAddress", "postalCode", e.target.value),
|
|
327
332
|
placeholder: "94103"
|
|
328
333
|
})]
|
|
329
|
-
}), /* @__PURE__ */
|
|
334
|
+
}), /* @__PURE__ */ w("div", {
|
|
330
335
|
className: "space-y-2",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
336
|
+
children: [/* @__PURE__ */ C(_, {
|
|
332
337
|
htmlFor: "pickupCountry",
|
|
333
338
|
children: "Country"
|
|
334
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ C(g, {
|
|
335
340
|
id: "pickupCountry",
|
|
336
|
-
value:
|
|
341
|
+
value: H.pickupAddress.country,
|
|
337
342
|
onChange: (e) => Z("pickupAddress", "country", e.target.value),
|
|
338
343
|
placeholder: "USA"
|
|
339
344
|
})]
|
|
340
345
|
})]
|
|
341
346
|
})
|
|
342
347
|
]
|
|
343
|
-
})] }), /* @__PURE__ */
|
|
348
|
+
})] }), /* @__PURE__ */ w(f, { children: [/* @__PURE__ */ C(m, { children: /* @__PURE__ */ C(h, { children: "Delivery Address" }) }), /* @__PURE__ */ w(p, {
|
|
344
349
|
className: "space-y-4",
|
|
345
350
|
children: [
|
|
346
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ w("div", {
|
|
347
352
|
className: "space-y-2",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ C(_, {
|
|
349
354
|
htmlFor: "deliveryStreet",
|
|
350
355
|
children: "Street Address"
|
|
351
|
-
}), /* @__PURE__ */
|
|
356
|
+
}), /* @__PURE__ */ C(g, {
|
|
352
357
|
id: "deliveryStreet",
|
|
353
|
-
value:
|
|
358
|
+
value: H.deliveryAddress.street,
|
|
354
359
|
onChange: (e) => Z("deliveryAddress", "street", e.target.value),
|
|
355
360
|
placeholder: "456 Oak Ave"
|
|
356
361
|
})]
|
|
357
362
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ w("div", {
|
|
359
364
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
360
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ w("div", {
|
|
361
366
|
className: "space-y-2",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ C(_, {
|
|
363
368
|
htmlFor: "deliveryCity",
|
|
364
369
|
children: "City"
|
|
365
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ C(g, {
|
|
366
371
|
id: "deliveryCity",
|
|
367
|
-
value:
|
|
372
|
+
value: H.deliveryAddress.city,
|
|
368
373
|
onChange: (e) => Z("deliveryAddress", "city", e.target.value),
|
|
369
374
|
placeholder: "Los Angeles"
|
|
370
375
|
})]
|
|
371
|
-
}), /* @__PURE__ */
|
|
376
|
+
}), /* @__PURE__ */ w("div", {
|
|
372
377
|
className: "space-y-2",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ C(_, {
|
|
374
379
|
htmlFor: "deliveryState",
|
|
375
380
|
children: "State"
|
|
376
|
-
}), /* @__PURE__ */
|
|
381
|
+
}), /* @__PURE__ */ C(g, {
|
|
377
382
|
id: "deliveryState",
|
|
378
|
-
value:
|
|
383
|
+
value: H.deliveryAddress.state,
|
|
379
384
|
onChange: (e) => Z("deliveryAddress", "state", e.target.value),
|
|
380
385
|
placeholder: "CA"
|
|
381
386
|
})]
|
|
382
387
|
})]
|
|
383
388
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ w("div", {
|
|
385
390
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
386
|
-
children: [/* @__PURE__ */
|
|
391
|
+
children: [/* @__PURE__ */ w("div", {
|
|
387
392
|
className: "space-y-2",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ C(_, {
|
|
389
394
|
htmlFor: "deliveryPostal",
|
|
390
395
|
children: "Postal Code"
|
|
391
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ C(g, {
|
|
392
397
|
id: "deliveryPostal",
|
|
393
|
-
value:
|
|
398
|
+
value: H.deliveryAddress.postalCode,
|
|
394
399
|
onChange: (e) => Z("deliveryAddress", "postalCode", e.target.value),
|
|
395
400
|
placeholder: "90210"
|
|
396
401
|
})]
|
|
397
|
-
}), /* @__PURE__ */
|
|
402
|
+
}), /* @__PURE__ */ w("div", {
|
|
398
403
|
className: "space-y-2",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ C(_, {
|
|
400
405
|
htmlFor: "deliveryCountry",
|
|
401
406
|
children: "Country"
|
|
402
|
-
}), /* @__PURE__ */
|
|
407
|
+
}), /* @__PURE__ */ C(g, {
|
|
403
408
|
id: "deliveryCountry",
|
|
404
|
-
value:
|
|
409
|
+
value: H.deliveryAddress.country,
|
|
405
410
|
onChange: (e) => Z("deliveryAddress", "country", e.target.value),
|
|
406
411
|
placeholder: "USA"
|
|
407
412
|
})]
|
|
@@ -410,61 +415,61 @@ function F() {
|
|
|
410
415
|
]
|
|
411
416
|
})] })]
|
|
412
417
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ w(f, { children: [/* @__PURE__ */ w(m, {
|
|
414
419
|
className: "flex flex-row items-center justify-between",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ C(h, { children: "Order Items" }), /* @__PURE__ */ w(d, {
|
|
416
421
|
type: "button",
|
|
417
422
|
variant: "outline",
|
|
418
423
|
size: "sm",
|
|
419
424
|
onClick: Q,
|
|
420
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ C(i, { size: 16 }), "Add Item"]
|
|
421
426
|
})]
|
|
422
|
-
}), /* @__PURE__ */
|
|
427
|
+
}), /* @__PURE__ */ C(p, { children: H.items.length === 0 ? /* @__PURE__ */ C(le, {
|
|
423
428
|
illustration: "empty-files",
|
|
424
429
|
title: "No items added yet",
|
|
425
430
|
description: "Add the products this order will ship — each with a name, SKU, quantity and value.",
|
|
426
|
-
action: /* @__PURE__ */
|
|
431
|
+
action: /* @__PURE__ */ w(d, {
|
|
427
432
|
type: "button",
|
|
428
433
|
variant: "outline",
|
|
429
434
|
onClick: Q,
|
|
430
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ C(i, {
|
|
431
436
|
size: 16,
|
|
432
437
|
className: "mr-1.5"
|
|
433
438
|
}), "Add your first item"]
|
|
434
439
|
})
|
|
435
|
-
}) : /* @__PURE__ */
|
|
440
|
+
}) : /* @__PURE__ */ C("div", {
|
|
436
441
|
className: "space-y-4",
|
|
437
|
-
children:
|
|
442
|
+
children: H.items.map((e, t) => /* @__PURE__ */ w("div", { children: [t > 0 && /* @__PURE__ */ C(se, { className: "my-4" }), /* @__PURE__ */ w("div", {
|
|
438
443
|
className: "grid grid-cols-1 md:grid-cols-7 gap-4",
|
|
439
444
|
children: [
|
|
440
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ w("div", {
|
|
441
446
|
className: "md:col-span-2 space-y-2",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ C(_, { children: "Item Name" }), /* @__PURE__ */ C(g, {
|
|
443
448
|
value: e.name,
|
|
444
449
|
onChange: (e) => $(t, "name", e.target.value),
|
|
445
450
|
placeholder: "Product name"
|
|
446
451
|
})]
|
|
447
452
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ w("div", {
|
|
449
454
|
className: "space-y-2",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ C(_, { children: "SKU" }), /* @__PURE__ */ C(g, {
|
|
451
456
|
value: e.sku,
|
|
452
457
|
onChange: (e) => $(t, "sku", e.target.value),
|
|
453
458
|
placeholder: "SKU-001"
|
|
454
459
|
})]
|
|
455
460
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ w("div", {
|
|
457
462
|
className: "space-y-2",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ C(_, { children: "Quantity" }), /* @__PURE__ */ C(g, {
|
|
459
464
|
type: "number",
|
|
460
465
|
min: "1",
|
|
461
466
|
value: e.quantity,
|
|
462
467
|
onChange: (e) => $(t, "quantity", parseInt(e.target.value) || 1)
|
|
463
468
|
})]
|
|
464
469
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ w("div", {
|
|
466
471
|
className: "space-y-2",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
472
|
+
children: [/* @__PURE__ */ C(_, { children: "Weight (kg)" }), /* @__PURE__ */ C(g, {
|
|
468
473
|
type: "number",
|
|
469
474
|
min: "0",
|
|
470
475
|
step: "0.1",
|
|
@@ -472,9 +477,9 @@ function F() {
|
|
|
472
477
|
onChange: (e) => $(t, "weight", parseFloat(e.target.value) || 0)
|
|
473
478
|
})]
|
|
474
479
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ w("div", {
|
|
476
481
|
className: "space-y-2",
|
|
477
|
-
children: [/* @__PURE__ */
|
|
482
|
+
children: [/* @__PURE__ */ C(_, { children: "Value ($)" }), /* @__PURE__ */ C(g, {
|
|
478
483
|
type: "number",
|
|
479
484
|
min: "0",
|
|
480
485
|
step: "0.01",
|
|
@@ -482,52 +487,52 @@ function F() {
|
|
|
482
487
|
onChange: (e) => $(t, "value", parseFloat(e.target.value) || 0)
|
|
483
488
|
})]
|
|
484
489
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ C("div", {
|
|
486
491
|
className: "flex items-end",
|
|
487
|
-
children: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ C(d, {
|
|
488
493
|
type: "button",
|
|
489
494
|
variant: "ghost",
|
|
490
495
|
size: "icon",
|
|
491
496
|
className: "text-status-error-text",
|
|
492
|
-
onClick: () =>
|
|
493
|
-
children: /* @__PURE__ */
|
|
497
|
+
onClick: () => be(t),
|
|
498
|
+
children: /* @__PURE__ */ C(o, { size: 16 })
|
|
494
499
|
})
|
|
495
500
|
})
|
|
496
501
|
]
|
|
497
502
|
})] }, e.id))
|
|
498
503
|
}) })] }),
|
|
499
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ w(f, { children: [/* @__PURE__ */ C(m, { children: /* @__PURE__ */ C(h, { children: "Scheduling & Handling" }) }), /* @__PURE__ */ C(p, { children: /* @__PURE__ */ w("div", {
|
|
500
505
|
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
501
|
-
children: [/* @__PURE__ */
|
|
506
|
+
children: [/* @__PURE__ */ w("div", {
|
|
502
507
|
className: "space-y-2",
|
|
503
508
|
children: [
|
|
504
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ w(_, {
|
|
505
510
|
htmlFor: "scheduledDelivery",
|
|
506
511
|
className: "flex items-center gap-1.5",
|
|
507
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ C(t, {
|
|
508
513
|
size: 14,
|
|
509
514
|
className: "text-text-secondary"
|
|
510
515
|
}), "Scheduled Delivery"]
|
|
511
516
|
}),
|
|
512
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ C(g, {
|
|
513
518
|
id: "scheduledDelivery",
|
|
514
519
|
type: "datetime-local",
|
|
515
|
-
value:
|
|
520
|
+
value: H.scheduledDelivery,
|
|
516
521
|
onChange: (e) => X("scheduledDelivery", e.target.value)
|
|
517
522
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ C("p", {
|
|
519
524
|
className: "text-xs text-text-secondary",
|
|
520
525
|
children: "The delivery window promised to the customer. Leave blank to dispatch as soon as a driver is free."
|
|
521
526
|
})
|
|
522
527
|
]
|
|
523
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ w("div", {
|
|
524
529
|
className: "md:col-span-2 space-y-2",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ C(_, {
|
|
526
531
|
htmlFor: "specialInstructions",
|
|
527
532
|
children: "Special Instructions"
|
|
528
|
-
}), /* @__PURE__ */
|
|
533
|
+
}), /* @__PURE__ */ C(ce, {
|
|
529
534
|
id: "specialInstructions",
|
|
530
|
-
value:
|
|
535
|
+
value: H.specialInstructions,
|
|
531
536
|
onChange: (e) => X("specialInstructions", e.target.value),
|
|
532
537
|
placeholder: "Any special handling or delivery instructions...",
|
|
533
538
|
rows: 4
|
|
@@ -540,4 +545,4 @@ function F() {
|
|
|
540
545
|
});
|
|
541
546
|
}
|
|
542
547
|
//#endregion
|
|
543
|
-
export {
|
|
548
|
+
export { D as default };
|