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