@burdenoff/microfe-movethewheels 2026.924.2 → 2026.925.2
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/OrderItemRow.js +195 -109
- package/dist/components/StatusBadge.js +31 -31
- package/dist/constants/index.js +11 -3
- package/dist/generated/wspace-operations.d.ts +7 -0
- package/dist/hooks/useFleet.js +85 -76
- package/dist/hooks/useOrders.js +8 -4
- package/dist/hooks/useTracking.js +127 -66
- package/dist/movethewheels/components/OrderItemRow.d.ts +1 -2
- package/dist/movethewheels/components/StatusBadge.d.ts +3 -1
- package/dist/movethewheels/constants/index.d.ts +1 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +41 -1
- package/dist/movethewheels/hooks/useOrders.d.ts +1 -0
- package/dist/movethewheels/hooks/useTracking.d.ts +2 -2
- package/dist/movethewheels/types/index.d.ts +17 -39
- package/dist/node_modules/lucide-react/dist/esm/icons/sticky-note.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/user-x.js +30 -0
- package/dist/pages/CreateOrderPage.js +597 -420
- package/dist/pages/DriverDetailsPage.js +702 -421
- package/dist/pages/DriversPage.js +106 -117
- package/dist/pages/FleetPage.js +4 -10
- package/dist/pages/OrderDetailsPage.js +290 -262
- package/dist/pages/OrdersListPage.js +4 -0
- package/dist/pages/RouteDetailsPage.js +264 -252
- package/dist/pages/TrackingPage.js +205 -195
- package/dist/pages/VehicleDetailsPage.js +403 -243
- package/dist/utils/mapMarkers.js +2 -1
- package/package.json +1 -1
- package/src/generated/wspace-operations.ts +10 -3
- package/src/movethewheels/components/OrderItemRow.tsx +162 -99
- package/src/movethewheels/components/StatusBadge.tsx +11 -2
- package/src/movethewheels/constants/index.ts +13 -0
- package/src/movethewheels/hooks/useFleet.ts +163 -44
- package/src/movethewheels/hooks/useOrders.ts +17 -3
- package/src/movethewheels/hooks/useTracking.ts +208 -27
- package/src/movethewheels/pages/CreateOrderPage.tsx +372 -263
- package/src/movethewheels/pages/DriverDetailsPage.tsx +516 -156
- package/src/movethewheels/pages/DriversPage.tsx +28 -11
- package/src/movethewheels/pages/FleetPage.tsx +7 -10
- package/src/movethewheels/pages/OrderDetailsPage.tsx +67 -30
- package/src/movethewheels/pages/OrdersListPage.tsx +1 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +15 -7
- package/src/movethewheels/pages/TrackingPage.tsx +44 -14
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +137 -15
- package/src/movethewheels/types/index.ts +17 -38
- package/src/movethewheels/utils/mapMarkers.ts +1 -0
- package/src/operations/wspace/movethewheels/queries/dashboard.graphql +5 -0
- package/src/operations/wspace/movethewheels/queries/logistics.graphql +2 -2
|
@@ -1,124 +1,210 @@
|
|
|
1
1
|
import { Trash2 as e } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
|
|
2
2
|
import { useProduct as t, useProductStockLevels as n } from "../hooks/useInventory.js";
|
|
3
|
-
import { Button as r, Input as i, Label as a
|
|
4
|
-
import { EntityCombobox as
|
|
5
|
-
import { Fragment as
|
|
3
|
+
import { Button as r, Input as i, Label as a } from "./ui.js";
|
|
4
|
+
import { EntityCombobox as o } from "./EntityCombobox.js";
|
|
5
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
6
|
//#region src/movethewheels/components/OrderItemRow.tsx
|
|
7
|
-
function
|
|
7
|
+
function u(e, t) {
|
|
8
8
|
return e <= 0 ? "No stock recorded for this item." : t.length === 1 ? `${e.toLocaleString()} available at ${t[0].warehouseName}` : `${e.toLocaleString()} available across ${t.length} warehouses`;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
let { product:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
function d({ item: d, index: f, products: p, productsLoading: m, onUpdate: h, onRemove: g }) {
|
|
11
|
+
let { product: _, isLoading: v } = t(d.productId || void 0), { levels: y, totalAvailable: b, isLoading: x } = n(d.productId || void 0), S = d.dimensions ?? {
|
|
12
|
+
length: 0,
|
|
13
|
+
width: 0,
|
|
14
|
+
height: 0,
|
|
15
|
+
unit: "cm"
|
|
16
|
+
}, C = (e) => {
|
|
17
|
+
if (!e) {
|
|
18
|
+
h(f, "productId", "");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
let t = p.find((t) => t.id === e);
|
|
22
|
+
t && (h(f, "productId", t.id), h(f, "name", t.name), h(f, "sku", t.sku), h(f, "weight", t.weight), h(f, "value", t.value), h(f, "dimensions", t.dimensions));
|
|
23
|
+
}, w = (e, t) => {
|
|
24
|
+
h(f, "dimensions", {
|
|
25
|
+
...S,
|
|
26
|
+
[e]: Number.parseFloat(t) || 0
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ l("div", {
|
|
30
|
+
className: "rounded-card border border-border-subtle bg-bg-surface p-4 shadow-elevation-1 sm:p-5",
|
|
31
|
+
"aria-labelledby": `order-item-${d.id}-title`,
|
|
32
|
+
children: [/* @__PURE__ */ l("div", {
|
|
33
|
+
className: "mb-4 flex items-start justify-between gap-4",
|
|
34
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("h3", {
|
|
35
|
+
id: `order-item-${d.id}-title`,
|
|
36
|
+
className: "text-sm font-semibold text-text-primary",
|
|
37
|
+
children: ["Item ", f + 1]
|
|
38
|
+
}), /* @__PURE__ */ c("p", {
|
|
39
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
40
|
+
children: "Select a catalog item to prefill details, or enter a one-off shipment manually."
|
|
41
|
+
})] }), /* @__PURE__ */ c(r, {
|
|
42
|
+
type: "button",
|
|
43
|
+
variant: "ghost",
|
|
44
|
+
size: "icon",
|
|
45
|
+
className: "shrink-0 text-status-error-text",
|
|
46
|
+
onClick: () => g(f),
|
|
47
|
+
"aria-label": `Remove item ${f + 1}`,
|
|
48
|
+
title: `Remove item ${f + 1}`,
|
|
49
|
+
children: /* @__PURE__ */ c(e, {
|
|
50
|
+
size: 16,
|
|
51
|
+
"aria-hidden": "true"
|
|
52
|
+
})
|
|
53
|
+
})]
|
|
54
|
+
}), /* @__PURE__ */ l("div", {
|
|
55
|
+
className: "space-y-4",
|
|
16
56
|
children: [
|
|
17
|
-
/* @__PURE__ */ l(
|
|
18
|
-
|
|
19
|
-
children:
|
|
57
|
+
/* @__PURE__ */ l("div", {
|
|
58
|
+
className: "rounded-card border border-border-subtle bg-bg-sunken/40 p-3 sm:p-4",
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ c(a, {
|
|
61
|
+
htmlFor: `item-product-${d.id}`,
|
|
62
|
+
children: "Catalog item (optional)"
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ c(o, {
|
|
65
|
+
id: `item-product-${d.id}`,
|
|
66
|
+
value: d.productId,
|
|
67
|
+
onChange: C,
|
|
68
|
+
options: p,
|
|
69
|
+
loading: m,
|
|
70
|
+
getId: (e) => e.id,
|
|
71
|
+
getLabel: (e) => `${e.name} (${e.sku})`,
|
|
72
|
+
renderOption: (e) => /* @__PURE__ */ l(s, { children: [
|
|
73
|
+
e.name,
|
|
74
|
+
" ",
|
|
75
|
+
/* @__PURE__ */ l("span", {
|
|
76
|
+
className: "text-text-tertiary",
|
|
77
|
+
children: [
|
|
78
|
+
"(",
|
|
79
|
+
e.sku,
|
|
80
|
+
")"
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
] }),
|
|
84
|
+
selectedOption: _,
|
|
85
|
+
selectedLoading: v,
|
|
86
|
+
placeholder: "Pick from your product catalog",
|
|
87
|
+
emptyText: "No products found.",
|
|
88
|
+
noneLabel: "Enter details manually"
|
|
89
|
+
}),
|
|
90
|
+
d.productId && !x && /* @__PURE__ */ c("p", {
|
|
91
|
+
className: "mt-2 text-xs text-text-secondary",
|
|
92
|
+
role: "status",
|
|
93
|
+
children: u(b, y)
|
|
94
|
+
})
|
|
95
|
+
]
|
|
20
96
|
}),
|
|
21
|
-
/* @__PURE__ */ l(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
97
|
+
/* @__PURE__ */ l("div", {
|
|
98
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-12",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ l("div", {
|
|
101
|
+
className: "space-y-2 lg:col-span-4",
|
|
102
|
+
children: [/* @__PURE__ */ c(a, {
|
|
103
|
+
htmlFor: `item-name-${d.id}`,
|
|
104
|
+
children: "Item name"
|
|
105
|
+
}), /* @__PURE__ */ c(i, {
|
|
106
|
+
id: `item-name-${d.id}`,
|
|
107
|
+
value: d.name,
|
|
108
|
+
onChange: (e) => h(f, "name", e.target.value),
|
|
109
|
+
placeholder: "Product name"
|
|
110
|
+
})]
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ l("div", {
|
|
113
|
+
className: "space-y-2 lg:col-span-3",
|
|
114
|
+
children: [/* @__PURE__ */ c(a, {
|
|
115
|
+
htmlFor: `item-sku-${d.id}`,
|
|
116
|
+
children: "SKU"
|
|
117
|
+
}), /* @__PURE__ */ c(i, {
|
|
118
|
+
id: `item-sku-${d.id}`,
|
|
119
|
+
value: d.sku,
|
|
120
|
+
onChange: (e) => h(f, "sku", e.target.value),
|
|
121
|
+
placeholder: "SKU-001"
|
|
122
|
+
})]
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ l("div", {
|
|
125
|
+
className: "space-y-2 lg:col-span-2",
|
|
126
|
+
children: [/* @__PURE__ */ c(a, {
|
|
127
|
+
htmlFor: `item-quantity-${d.id}`,
|
|
128
|
+
children: "Quantity"
|
|
129
|
+
}), /* @__PURE__ */ c(i, {
|
|
130
|
+
id: `item-quantity-${d.id}`,
|
|
131
|
+
type: "number",
|
|
132
|
+
min: "1",
|
|
133
|
+
value: d.quantity,
|
|
134
|
+
onChange: (e) => h(f, "quantity", parseInt(e.target.value, 10) || 1)
|
|
135
|
+
})]
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ l("div", {
|
|
138
|
+
className: "space-y-2 lg:col-span-2",
|
|
139
|
+
children: [/* @__PURE__ */ c(a, {
|
|
140
|
+
htmlFor: `item-weight-${d.id}`,
|
|
141
|
+
children: "Weight (kg)"
|
|
142
|
+
}), /* @__PURE__ */ c(i, {
|
|
143
|
+
id: `item-weight-${d.id}`,
|
|
144
|
+
type: "number",
|
|
145
|
+
min: "0",
|
|
146
|
+
step: "0.1",
|
|
147
|
+
value: d.weight,
|
|
148
|
+
onChange: (e) => h(f, "weight", parseFloat(e.target.value) || 0)
|
|
149
|
+
})]
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ l("div", {
|
|
152
|
+
className: "space-y-2 lg:col-span-1",
|
|
153
|
+
children: [/* @__PURE__ */ c(a, {
|
|
154
|
+
htmlFor: `item-value-${d.id}`,
|
|
155
|
+
children: "Value ($)"
|
|
156
|
+
}), /* @__PURE__ */ c(i, {
|
|
157
|
+
id: `item-value-${d.id}`,
|
|
158
|
+
type: "number",
|
|
159
|
+
min: "0",
|
|
160
|
+
step: "0.01",
|
|
161
|
+
value: d.value,
|
|
162
|
+
onChange: (e) => h(f, "value", parseFloat(e.target.value) || 0)
|
|
163
|
+
})]
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ l("fieldset", {
|
|
168
|
+
className: "rounded-card border border-border-subtle bg-bg-sunken/40 p-3 sm:p-4",
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ l("legend", {
|
|
171
|
+
className: "px-1 text-xs font-medium text-text-secondary",
|
|
41
172
|
children: [
|
|
42
|
-
"(",
|
|
43
|
-
|
|
173
|
+
"Dimensions (",
|
|
174
|
+
S.unit,
|
|
44
175
|
")"
|
|
45
176
|
]
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ c("div", {
|
|
179
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
180
|
+
children: [
|
|
181
|
+
"length",
|
|
182
|
+
"width",
|
|
183
|
+
"height"
|
|
184
|
+
].map((e) => /* @__PURE__ */ l("div", {
|
|
185
|
+
className: "space-y-2",
|
|
186
|
+
children: [/* @__PURE__ */ c(a, {
|
|
187
|
+
htmlFor: `item-${e}-${d.id}`,
|
|
188
|
+
children: e.charAt(0).toUpperCase() + e.slice(1)
|
|
189
|
+
}), /* @__PURE__ */ c(i, {
|
|
190
|
+
id: `item-${e}-${d.id}`,
|
|
191
|
+
type: "number",
|
|
192
|
+
min: "0",
|
|
193
|
+
step: "0.1",
|
|
194
|
+
value: S[e],
|
|
195
|
+
onChange: (t) => w(e, t.target.value)
|
|
196
|
+
})]
|
|
197
|
+
}, e))
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ c("p", {
|
|
200
|
+
className: "mt-2 text-xs text-text-secondary",
|
|
201
|
+
children: "Catalog selections prefill these measurements, and you can adjust them for this order."
|
|
46
202
|
})
|
|
47
|
-
]
|
|
48
|
-
selectedOption: y,
|
|
49
|
-
selectedLoading: b,
|
|
50
|
-
placeholder: "Pick from your product catalog",
|
|
51
|
-
emptyText: "No products found.",
|
|
52
|
-
noneLabel: "Enter details manually"
|
|
53
|
-
}),
|
|
54
|
-
f.productId && !C && /* @__PURE__ */ l("p", {
|
|
55
|
-
className: "text-xs text-text-secondary",
|
|
56
|
-
children: d(S, x)
|
|
57
|
-
})
|
|
58
|
-
]
|
|
59
|
-
}),
|
|
60
|
-
/* @__PURE__ */ u("div", {
|
|
61
|
-
className: "grid grid-cols-1 gap-4 md:grid-cols-7",
|
|
62
|
-
children: [
|
|
63
|
-
/* @__PURE__ */ u("div", {
|
|
64
|
-
className: "space-y-2 md:col-span-2",
|
|
65
|
-
children: [/* @__PURE__ */ l(a, { children: "Item Name" }), /* @__PURE__ */ l(i, {
|
|
66
|
-
value: f.name,
|
|
67
|
-
onChange: (e) => _(p, "name", e.target.value),
|
|
68
|
-
placeholder: "Product name"
|
|
69
|
-
})]
|
|
70
|
-
}),
|
|
71
|
-
/* @__PURE__ */ u("div", {
|
|
72
|
-
className: "space-y-2",
|
|
73
|
-
children: [/* @__PURE__ */ l(a, { children: "SKU" }), /* @__PURE__ */ l(i, {
|
|
74
|
-
value: f.sku,
|
|
75
|
-
onChange: (e) => _(p, "sku", e.target.value),
|
|
76
|
-
placeholder: "SKU-001"
|
|
77
|
-
})]
|
|
78
|
-
}),
|
|
79
|
-
/* @__PURE__ */ u("div", {
|
|
80
|
-
className: "space-y-2",
|
|
81
|
-
children: [/* @__PURE__ */ l(a, { children: "Quantity" }), /* @__PURE__ */ l(i, {
|
|
82
|
-
type: "number",
|
|
83
|
-
min: "1",
|
|
84
|
-
value: f.quantity,
|
|
85
|
-
onChange: (e) => _(p, "quantity", parseInt(e.target.value) || 1)
|
|
86
|
-
})]
|
|
87
|
-
}),
|
|
88
|
-
/* @__PURE__ */ u("div", {
|
|
89
|
-
className: "space-y-2",
|
|
90
|
-
children: [/* @__PURE__ */ l(a, { children: "Weight (kg)" }), /* @__PURE__ */ l(i, {
|
|
91
|
-
type: "number",
|
|
92
|
-
min: "0",
|
|
93
|
-
step: "0.1",
|
|
94
|
-
value: f.weight,
|
|
95
|
-
onChange: (e) => _(p, "weight", parseFloat(e.target.value) || 0)
|
|
96
|
-
})]
|
|
97
|
-
}),
|
|
98
|
-
/* @__PURE__ */ u("div", {
|
|
99
|
-
className: "space-y-2",
|
|
100
|
-
children: [/* @__PURE__ */ l(a, { children: "Value ($)" }), /* @__PURE__ */ l(i, {
|
|
101
|
-
type: "number",
|
|
102
|
-
min: "0",
|
|
103
|
-
step: "0.01",
|
|
104
|
-
value: f.value,
|
|
105
|
-
onChange: (e) => _(p, "value", parseFloat(e.target.value) || 0)
|
|
106
|
-
})]
|
|
107
|
-
}),
|
|
108
|
-
/* @__PURE__ */ l("div", {
|
|
109
|
-
className: "flex items-end",
|
|
110
|
-
children: /* @__PURE__ */ l(r, {
|
|
111
|
-
type: "button",
|
|
112
|
-
variant: "ghost",
|
|
113
|
-
size: "icon",
|
|
114
|
-
className: "text-status-error-text",
|
|
115
|
-
onClick: () => v(p),
|
|
116
|
-
children: /* @__PURE__ */ l(e, { size: 16 })
|
|
117
|
-
})
|
|
203
|
+
]
|
|
118
204
|
})
|
|
119
205
|
]
|
|
120
|
-
})
|
|
121
|
-
|
|
206
|
+
})]
|
|
207
|
+
});
|
|
122
208
|
}
|
|
123
209
|
//#endregion
|
|
124
|
-
export {
|
|
210
|
+
export { d as OrderItemRow };
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
2
|
import { Badge as t } from "./ui.js";
|
|
3
|
-
import { DRIVER_STATUS_COLORS as n,
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { DRIVER_STATUS_COLORS as n, DRIVER_STATUS_LABELS as r, ORDER_STATUS_COLORS as i, PRIORITY_COLORS as a, VEHICLE_STATUS_COLORS as o } from "../constants/index.js";
|
|
4
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
5
|
//#region src/movethewheels/components/StatusBadge.tsx
|
|
6
|
-
var
|
|
6
|
+
var l = {
|
|
7
7
|
sm: "text-xs px-2 py-0.5",
|
|
8
8
|
md: "text-sm px-2.5 py-1",
|
|
9
9
|
lg: "text-base px-3 py-1.5"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
let
|
|
11
|
+
function u({ status: a, type: u = "custom", customColors: d, label: f, size: p = "md", showDot: m = !0, className: h }) {
|
|
12
|
+
let g = d, _ = {
|
|
13
13
|
bg: "bg-bg-sunken",
|
|
14
14
|
text: "text-text-secondary"
|
|
15
15
|
};
|
|
16
|
-
if (!
|
|
16
|
+
if (!g) switch (u) {
|
|
17
17
|
case "order":
|
|
18
|
-
|
|
18
|
+
g = i[a] || _;
|
|
19
19
|
break;
|
|
20
20
|
case "vehicle":
|
|
21
|
-
|
|
21
|
+
g = o[a] || _;
|
|
22
22
|
break;
|
|
23
23
|
case "driver":
|
|
24
|
-
|
|
24
|
+
g = n[a] || _;
|
|
25
25
|
break;
|
|
26
|
-
default:
|
|
26
|
+
default: g = _;
|
|
27
27
|
}
|
|
28
|
-
let
|
|
29
|
-
return /* @__PURE__ */
|
|
28
|
+
let v = f ?? (u === "driver" ? r[a] : void 0) ?? a.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
29
|
+
return /* @__PURE__ */ c(t, {
|
|
30
30
|
variant: "outline",
|
|
31
|
-
className: e("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border-0 font-medium capitalize", "ring-1 ring-inset ring-border-seam/60",
|
|
32
|
-
children: [
|
|
31
|
+
className: e("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border-0 font-medium capitalize", "ring-1 ring-inset ring-border-seam/60", g.bg, g.text, l[p], h),
|
|
32
|
+
children: [m && /* @__PURE__ */ s("span", {
|
|
33
33
|
"aria-hidden": "true",
|
|
34
|
-
className: e("h-1.5 w-1.5 flex-shrink-0 rounded-full motion-safe:animate-vc-glow-pulse",
|
|
35
|
-
}),
|
|
34
|
+
className: e("h-1.5 w-1.5 flex-shrink-0 rounded-full motion-safe:animate-vc-glow-pulse", g.text.replace("text-", "bg-"))
|
|
35
|
+
}), v]
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
let
|
|
40
|
-
return /* @__PURE__ */
|
|
38
|
+
function d({ priority: n, size: r = "md", className: i }) {
|
|
39
|
+
let o = a[n];
|
|
40
|
+
return /* @__PURE__ */ s(t, {
|
|
41
41
|
variant: "outline",
|
|
42
|
-
className: e("rounded-full font-medium capitalize border-0 whitespace-nowrap ring-1 ring-inset ring-border-seam/60",
|
|
42
|
+
className: e("rounded-full font-medium capitalize border-0 whitespace-nowrap ring-1 ring-inset ring-border-seam/60", o.bg, o.text, l[r], i),
|
|
43
43
|
children: n
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function f({ type: n, size: r = "md", className: i }) {
|
|
47
47
|
let a = {
|
|
48
48
|
b2b: {
|
|
49
49
|
bg: "bg-status-info-bg-subtle",
|
|
@@ -54,13 +54,13 @@ function d({ type: n, size: r = "md", className: i }) {
|
|
|
54
54
|
text: "text-status-success-text"
|
|
55
55
|
}
|
|
56
56
|
}[n];
|
|
57
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ s(t, {
|
|
58
58
|
variant: "outline",
|
|
59
|
-
className: e("rounded-full font-medium uppercase border-0 whitespace-nowrap ring-1 ring-inset ring-border-seam/60", a.bg, a.text,
|
|
59
|
+
className: e("rounded-full font-medium uppercase border-0 whitespace-nowrap ring-1 ring-inset ring-border-seam/60", a.bg, a.text, l[r], i),
|
|
60
60
|
children: n
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function p({ status: n, size: r = "md", className: i }) {
|
|
64
64
|
let a = {
|
|
65
65
|
pending: {
|
|
66
66
|
bg: "bg-status-warning-bg-subtle",
|
|
@@ -79,17 +79,17 @@ function f({ status: n, size: r = "md", className: i }) {
|
|
|
79
79
|
text: "text-text-secondary"
|
|
80
80
|
}
|
|
81
81
|
}[n];
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ s(t, {
|
|
83
83
|
variant: "outline",
|
|
84
|
-
className: e("rounded-full font-medium capitalize border-0 whitespace-nowrap ring-1 ring-inset ring-border-seam/60", a.bg, a.text,
|
|
84
|
+
className: e("rounded-full font-medium capitalize border-0 whitespace-nowrap ring-1 ring-inset ring-border-seam/60", a.bg, a.text, l[r], i),
|
|
85
85
|
children: n
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return /* @__PURE__ */
|
|
88
|
+
function m({ type: n, size: r = "md", className: i }) {
|
|
89
|
+
return /* @__PURE__ */ c(t, {
|
|
90
90
|
variant: "outline",
|
|
91
|
-
className: e("rounded-full font-medium capitalize whitespace-nowrap inline-flex items-center ring-1 ring-inset ring-border-seam/60",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
91
|
+
className: e("rounded-full font-medium capitalize whitespace-nowrap inline-flex items-center ring-1 ring-inset ring-border-seam/60", l[r], i),
|
|
92
|
+
children: [/* @__PURE__ */ s("span", {
|
|
93
93
|
className: "mr-1",
|
|
94
94
|
children: {
|
|
95
95
|
van: "🚐",
|
|
@@ -102,4 +102,4 @@ function p({ type: n, size: r = "md", className: i }) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
|
-
export {
|
|
105
|
+
export { p as PaymentStatusBadge, d as PriorityBadge, u as StatusBadge, f as TypeBadge, m as VehicleTypeBadge };
|
package/dist/constants/index.js
CHANGED
|
@@ -26,6 +26,7 @@ var e = {
|
|
|
26
26
|
in_transit: r,
|
|
27
27
|
out_for_delivery: t,
|
|
28
28
|
delivered: e,
|
|
29
|
+
returned: t,
|
|
29
30
|
cancelled: n,
|
|
30
31
|
failed: n
|
|
31
32
|
}, o = {
|
|
@@ -37,17 +38,24 @@ var e = {
|
|
|
37
38
|
available: e,
|
|
38
39
|
busy: r,
|
|
39
40
|
offline: i,
|
|
40
|
-
on_break: t
|
|
41
|
+
on_break: t,
|
|
42
|
+
inactive: n
|
|
41
43
|
}, c = {
|
|
44
|
+
available: "Available",
|
|
45
|
+
busy: "On Delivery",
|
|
46
|
+
offline: "Off Duty",
|
|
47
|
+
on_break: "On Break",
|
|
48
|
+
inactive: "Inactive"
|
|
49
|
+
}, l = {
|
|
42
50
|
low: i,
|
|
43
51
|
normal: r,
|
|
44
52
|
high: t,
|
|
45
53
|
urgent: n
|
|
46
|
-
},
|
|
54
|
+
}, u = {
|
|
47
55
|
planned: r,
|
|
48
56
|
in_progress: t,
|
|
49
57
|
completed: e,
|
|
50
58
|
cancelled: n
|
|
51
59
|
};
|
|
52
60
|
//#endregion
|
|
53
|
-
export { s as DRIVER_STATUS_COLORS, a as ORDER_STATUS_COLORS,
|
|
61
|
+
export { s as DRIVER_STATUS_COLORS, c as DRIVER_STATUS_LABELS, a as ORDER_STATUS_COLORS, l as PRIORITY_COLORS, u as ROUTE_STATUS_COLORS, o as VEHICLE_STATUS_COLORS };
|
|
@@ -873,10 +873,15 @@ export type GetMovethewheelsDashboardQuery = {
|
|
|
873
873
|
__typename?: 'MtwDeliveryJobStats';
|
|
874
874
|
total: number;
|
|
875
875
|
pending: number;
|
|
876
|
+
confirmed: number;
|
|
877
|
+
assigned: number;
|
|
878
|
+
pickedUp: number;
|
|
876
879
|
inTransit: number;
|
|
880
|
+
outForDelivery: number;
|
|
877
881
|
delivered: number;
|
|
878
882
|
cancelled: number;
|
|
879
883
|
failed: number;
|
|
884
|
+
returned: number;
|
|
880
885
|
};
|
|
881
886
|
fleetStats: {
|
|
882
887
|
__typename?: 'MtwFleetStats';
|
|
@@ -1386,6 +1391,7 @@ export type GetShipmentQuery = {
|
|
|
1386
1391
|
};
|
|
1387
1392
|
export type GetDeliveryJobTrackingQueryVariables = Types.Exact<{
|
|
1388
1393
|
deliveryJobId: Types.Scalars['ID']['input'];
|
|
1394
|
+
pagination?: Types.InputMaybe<Types.PaginationInput>;
|
|
1389
1395
|
}>;
|
|
1390
1396
|
export type GetDeliveryJobTrackingQuery = {
|
|
1391
1397
|
__typename?: 'Query';
|
|
@@ -2943,6 +2949,7 @@ export declare const GetDeliveryJobTrackingDocument: Apollo.DocumentNode;
|
|
|
2943
2949
|
* const { data, loading, error } = useGetDeliveryJobTrackingQuery({
|
|
2944
2950
|
* variables: {
|
|
2945
2951
|
* deliveryJobId: // value for 'deliveryJobId'
|
|
2952
|
+
* pagination: // value for 'pagination'
|
|
2946
2953
|
* },
|
|
2947
2954
|
* });
|
|
2948
2955
|
*/
|