@burdenoff/microfe-movethewheels 2026.1031.5 → 2026.1101.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/MoveTheWheelsRoot.js +141 -133
- package/dist/MoveTheWheelsRoutes.js +29 -25
- package/dist/hooks/useCarrierIntegrations.js +141 -0
- package/dist/movethewheels/hooks/useCarrierIntegrations.d.ts +39 -0
- package/dist/movethewheels/pages/FinancePage.d.ts +3 -1
- package/dist/movethewheels/pages/IntegrationsPage.d.ts +6 -0
- package/dist/movethewheels/utils/carrierIntegrations.d.ts +88 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-check.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pause.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/play.js +8 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/receipt.js +18 -0
- package/dist/pages/FinancePage.js +99 -71
- package/dist/pages/IntegrationsPage.js +616 -0
- package/dist/pages/SettingsPage.js +168 -150
- package/dist/utils/carrierIntegrations.js +105 -0
- package/package.json +3 -2
- package/src/movethewheels/MoveTheWheelsRoot.tsx +8 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
- package/src/movethewheels/components/UpcomingDemandPanel.tsx +1 -3
- package/src/movethewheels/hooks/useCarrierIntegrations.ts +221 -0
- package/src/movethewheels/pages/FinancePage.tsx +33 -3
- package/src/movethewheels/pages/IntegrationsPage.tsx +752 -0
- package/src/movethewheels/pages/SettingsPage.tsx +19 -3
- package/src/movethewheels/utils/carrierIntegrations.ts +252 -0
|
@@ -2,36 +2,37 @@ import { Bell as e } from "../node_modules/lucide-react/dist/esm/icons/bell.js";
|
|
|
2
2
|
import { Building2 as t } from "../node_modules/lucide-react/dist/esm/icons/building-2.js";
|
|
3
3
|
import { ExternalLink as n } from "../node_modules/lucide-react/dist/esm/icons/external-link.js";
|
|
4
4
|
import { KeyRound as r } from "../node_modules/lucide-react/dist/esm/icons/key-round.js";
|
|
5
|
-
import { LoaderCircle as
|
|
6
|
-
import { Plug as
|
|
7
|
-
import { RotateCcw as
|
|
5
|
+
import { LoaderCircle as i } from "../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
6
|
+
import { Plug as a } from "../node_modules/lucide-react/dist/esm/icons/plug.js";
|
|
7
|
+
import { RotateCcw as ee } from "../node_modules/lucide-react/dist/esm/icons/rotate-ccw.js";
|
|
8
8
|
import { Save as te } from "../node_modules/lucide-react/dist/esm/icons/save.js";
|
|
9
9
|
import { Settings as o } from "../node_modules/lucide-react/dist/esm/icons/settings.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
10
|
+
import { joinPath as s } from "../utils/navigation.js";
|
|
11
|
+
import { useMoveTheWheels as c } from "../providers/MoveTheWheelsProvider.js";
|
|
12
|
+
import { formatCurrency as ne, formatDateTime as l, formatDistance as re, formatWeight as ie } from "../utils/formatters.js";
|
|
13
|
+
import { DISTANCE_UNIT_OPTIONS as u, ORDER_PRIORITY_OPTIONS as d, WEIGHT_UNIT_OPTIONS as f, browserTimeZone as ae, changedSettings as oe, currencyLabel as se, currencyOptions as ce, deliveryWindowError as le, timeZoneOptions as ue } from "../utils/moduleSettings.js";
|
|
14
|
+
import { useModuleSettings as de } from "../providers/ModuleSettingsProvider.js";
|
|
15
|
+
import { Badge as fe, Button as p, Card as m, CardContent as h, CardDescription as g, CardHeader as _, CardTitle as v, Input as y, Label as b, Select as x, SelectContent as S, SelectItem as C, SelectTrigger as w, SelectValue as T, Skeleton as E } from "../components/ui.js";
|
|
16
|
+
import { PageLayout as pe } from "../components/PageLayout.js";
|
|
17
|
+
import { FormError as D } from "../components/FormError.js";
|
|
18
|
+
import { Notice as me, useNotice as he } from "../components/Notice.js";
|
|
19
|
+
import { useEffect as O, useMemo as k, useState as A } from "react";
|
|
20
|
+
import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
21
|
+
import { EmphasisPanel as N, PagePurpose as P } from "@burdenoff/fe-libs/ui";
|
|
22
|
+
import { PermissionProvider as F, usePermissions as I } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
22
23
|
//#region src/movethewheels/pages/SettingsPage.tsx
|
|
23
|
-
var
|
|
24
|
-
function
|
|
24
|
+
var L = "__viewer_local__";
|
|
25
|
+
function R(e) {
|
|
25
26
|
return {
|
|
26
27
|
defaultCurrency: e.defaultCurrency,
|
|
27
28
|
distanceUnit: e.distanceUnit,
|
|
28
29
|
weightUnit: e.weightUnit,
|
|
29
|
-
timezone: e.timezone ??
|
|
30
|
+
timezone: e.timezone ?? L,
|
|
30
31
|
defaultOrderPriority: e.defaultOrderPriority,
|
|
31
32
|
defaultDeliveryWindowHours: String(e.defaultDeliveryWindowHours)
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
|
-
var
|
|
35
|
+
var ge = [
|
|
35
36
|
{
|
|
36
37
|
id: "company",
|
|
37
38
|
title: "Company profile",
|
|
@@ -55,196 +56,196 @@ var me = [
|
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
id: "integrations",
|
|
58
|
-
title: "
|
|
59
|
-
description: "
|
|
59
|
+
title: "Platform integrations",
|
|
60
|
+
description: "ERP, messaging and app connections shared across products",
|
|
60
61
|
path: "/integrations/overview",
|
|
61
|
-
icon:
|
|
62
|
+
icon: a
|
|
62
63
|
}
|
|
63
64
|
];
|
|
64
|
-
function
|
|
65
|
-
let { workspaceId: e } =
|
|
66
|
-
return /* @__PURE__ */
|
|
65
|
+
function z() {
|
|
66
|
+
let { workspaceId: e } = c();
|
|
67
|
+
return /* @__PURE__ */ j(F, {
|
|
67
68
|
scopeId: e ?? null,
|
|
68
69
|
gateway: "workspace",
|
|
69
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ j(B, {})
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
-
let { navigate: e,
|
|
74
|
-
|
|
75
|
-
W(z
|
|
76
|
-
}, [
|
|
77
|
-
let J = !!(
|
|
73
|
+
function B() {
|
|
74
|
+
let { navigate: e, basePath: t, workspaceId: r, currentUser: F } = c(), { settings: z, isLoaded: B, error: V, save: _e, reload: ve } = de(), H = I(), [U, W] = A(() => R(z)), [G, K] = A(!1), [ye, q] = A(null), { message: be, notify: xe } = he();
|
|
75
|
+
O(() => {
|
|
76
|
+
W(R(z));
|
|
77
|
+
}, [z]);
|
|
78
|
+
let J = !!(r && F?.id && H.scopeId === r && !H.isLoading && !H.error) && !H.isSuperAdmin && !H.hasPermission("mtw-settings:update"), Y = le(U.defaultDeliveryWindowHours), X = k(() => oe(z, {
|
|
78
79
|
defaultCurrency: U.defaultCurrency,
|
|
79
80
|
distanceUnit: U.distanceUnit,
|
|
80
81
|
weightUnit: U.weightUnit,
|
|
81
|
-
timezone: U.timezone ===
|
|
82
|
+
timezone: U.timezone === L ? null : U.timezone,
|
|
82
83
|
defaultOrderPriority: U.defaultOrderPriority,
|
|
83
84
|
defaultDeliveryWindowHours: Y ? void 0 : Number(U.defaultDeliveryWindowHours)
|
|
84
85
|
}), [
|
|
85
|
-
|
|
86
|
+
z,
|
|
86
87
|
U,
|
|
87
88
|
Y
|
|
88
|
-
]), Z = Object.keys(X).length > 0, Q =
|
|
89
|
+
]), Z = Object.keys(X).length > 0, Q = B && !J && !G && Z && !Y, Se = k(() => ce(U.defaultCurrency), [U.defaultCurrency]), Ce = k(() => ue(z.timezone), [z.timezone]), we = k(() => ae(), []), $ = (e, t) => {
|
|
89
90
|
q(null), W((n) => ({
|
|
90
91
|
...n,
|
|
91
92
|
[e]: t
|
|
92
93
|
}));
|
|
93
|
-
},
|
|
94
|
+
}, Te = async (e) => {
|
|
94
95
|
if (e.preventDefault(), Q) {
|
|
95
96
|
K(!0), q(null);
|
|
96
97
|
try {
|
|
97
|
-
await
|
|
98
|
+
await _e(X), xe("Settings saved. MoveTheWheels now uses these defaults everywhere.");
|
|
98
99
|
} catch (e) {
|
|
99
100
|
q(e instanceof Error ? e.message : "Could not save the settings");
|
|
100
101
|
} finally {
|
|
101
102
|
K(!1);
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
|
-
},
|
|
105
|
-
return /* @__PURE__ */
|
|
105
|
+
}, Ee = /* @__PURE__ */ new Date("2026-03-14T15:30:00Z");
|
|
106
|
+
return /* @__PURE__ */ M(pe, {
|
|
106
107
|
title: "Settings",
|
|
107
108
|
subtitle: "Workspace defaults for currency, units, time zone and new orders",
|
|
108
|
-
icon: /* @__PURE__ */
|
|
109
|
+
icon: /* @__PURE__ */ j(o, { size: 24 }),
|
|
109
110
|
maxWidth: "xl",
|
|
110
111
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
icon: /* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ j(P, {
|
|
113
|
+
icon: /* @__PURE__ */ j(o, { size: 18 }),
|
|
113
114
|
children: "Set how MoveTheWheels shows money, distances, weights and times for everyone in this workspace, and what new orders start with. Changes apply to every MoveTheWheels screen as soon as you save."
|
|
114
115
|
}),
|
|
115
|
-
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
116
|
+
V && /* @__PURE__ */ j(D, { message: `Could not load this workspace's settings (${V.message}). Showing the platform defaults.` }),
|
|
117
|
+
/* @__PURE__ */ j(me, { message: be }),
|
|
118
|
+
/* @__PURE__ */ M("div", {
|
|
118
119
|
className: "grid grid-cols-1 gap-6 xl:grid-cols-3",
|
|
119
|
-
children: [/* @__PURE__ */ N
|
|
120
|
+
children: [/* @__PURE__ */ M(N, {
|
|
120
121
|
className: "space-y-6 xl:col-span-2",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ M("div", {
|
|
122
123
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ j("h2", {
|
|
124
125
|
className: "text-base font-semibold text-text-primary",
|
|
125
126
|
children: "Operational defaults"
|
|
126
|
-
}),
|
|
127
|
-
variant:
|
|
128
|
-
children:
|
|
127
|
+
}), B && /* @__PURE__ */ j(fe, {
|
|
128
|
+
variant: z.isCustomized ? "default" : "outline",
|
|
129
|
+
children: z.isCustomized ? "Customized for this workspace" : "Platform defaults"
|
|
129
130
|
})]
|
|
130
|
-
}),
|
|
131
|
+
}), B ? /* @__PURE__ */ M("form", {
|
|
131
132
|
className: "space-y-6",
|
|
132
|
-
onSubmit: (e) => void
|
|
133
|
+
onSubmit: (e) => void Te(e),
|
|
133
134
|
"aria-label": "MoveTheWheels settings",
|
|
134
135
|
children: [
|
|
135
|
-
J && /* @__PURE__ */
|
|
136
|
+
J && /* @__PURE__ */ j("p", {
|
|
136
137
|
className: "rounded-lg border border-border-default bg-surface-secondary px-4 py-3 text-sm text-text-secondary",
|
|
137
138
|
children: "You can view these settings. Ask a workspace admin or the Logistics Director to change them."
|
|
138
139
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ M("fieldset", {
|
|
140
141
|
className: "space-y-4",
|
|
141
142
|
disabled: J || G,
|
|
142
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ j("legend", {
|
|
143
144
|
className: "text-sm font-semibold text-text-primary",
|
|
144
145
|
children: "Display"
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ M("div", {
|
|
146
147
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
147
148
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ M("div", {
|
|
149
150
|
className: "min-w-0 space-y-2",
|
|
150
151
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ j(b, {
|
|
152
153
|
htmlFor: "mtw-settings-currency",
|
|
153
154
|
children: "Default currency"
|
|
154
155
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ M(x, {
|
|
156
157
|
value: U.defaultCurrency,
|
|
157
158
|
onValueChange: (e) => $("defaultCurrency", e),
|
|
158
159
|
disabled: J || G,
|
|
159
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ j(w, {
|
|
160
161
|
id: "mtw-settings-currency",
|
|
161
162
|
"aria-label": "Default currency",
|
|
162
|
-
children: /* @__PURE__ */
|
|
163
|
-
}), /* @__PURE__ */
|
|
163
|
+
children: /* @__PURE__ */ j(T, {})
|
|
164
|
+
}), /* @__PURE__ */ j(S, {
|
|
164
165
|
className: "max-h-72",
|
|
165
|
-
children:
|
|
166
|
+
children: Se.map((e) => /* @__PURE__ */ j(C, {
|
|
166
167
|
value: e,
|
|
167
|
-
children:
|
|
168
|
+
children: se(e)
|
|
168
169
|
}, e))
|
|
169
170
|
})]
|
|
170
171
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ j("p", {
|
|
172
173
|
className: "text-xs text-text-secondary",
|
|
173
174
|
children: "Used for order totals, revenue and costs that have no currency of their own."
|
|
174
175
|
})
|
|
175
176
|
]
|
|
176
177
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ M("div", {
|
|
178
179
|
className: "min-w-0 space-y-2",
|
|
179
180
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ j(b, {
|
|
181
182
|
htmlFor: "mtw-settings-timezone",
|
|
182
183
|
children: "Time zone"
|
|
183
184
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ M(x, {
|
|
185
186
|
value: U.timezone,
|
|
186
187
|
onValueChange: (e) => $("timezone", e),
|
|
187
188
|
disabled: J || G,
|
|
188
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ j(w, {
|
|
189
190
|
id: "mtw-settings-timezone",
|
|
190
191
|
"aria-label": "Time zone",
|
|
191
|
-
children: /* @__PURE__ */
|
|
192
|
-
}), /* @__PURE__ */
|
|
192
|
+
children: /* @__PURE__ */ j(T, {})
|
|
193
|
+
}), /* @__PURE__ */ M(S, {
|
|
193
194
|
className: "max-h-72",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
195
|
-
value:
|
|
196
|
-
children: `Each viewer's local time (yours: ${
|
|
197
|
-
}),
|
|
195
|
+
children: [/* @__PURE__ */ j(C, {
|
|
196
|
+
value: L,
|
|
197
|
+
children: `Each viewer's local time (yours: ${we})`
|
|
198
|
+
}), Ce.map((e) => /* @__PURE__ */ j(C, {
|
|
198
199
|
value: e,
|
|
199
200
|
children: e.replace(/_/g, " ")
|
|
200
201
|
}, e))]
|
|
201
202
|
})]
|
|
202
203
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ j("p", {
|
|
204
205
|
className: "text-xs text-text-secondary",
|
|
205
206
|
children: "Dates and times on every MoveTheWheels screen are shown in this zone."
|
|
206
207
|
})
|
|
207
208
|
]
|
|
208
209
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ M("div", {
|
|
210
211
|
className: "min-w-0 space-y-2",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ j(b, {
|
|
212
213
|
htmlFor: "mtw-settings-distance",
|
|
213
214
|
children: "Distance unit"
|
|
214
|
-
}), /* @__PURE__ */
|
|
215
|
+
}), /* @__PURE__ */ M(x, {
|
|
215
216
|
value: U.distanceUnit,
|
|
216
217
|
onValueChange: (e) => {
|
|
217
218
|
let t = u.find((t) => t.value === e);
|
|
218
219
|
t && $("distanceUnit", t.value);
|
|
219
220
|
},
|
|
220
221
|
disabled: J || G,
|
|
221
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ j(w, {
|
|
222
223
|
id: "mtw-settings-distance",
|
|
223
224
|
"aria-label": "Distance unit",
|
|
224
|
-
children: /* @__PURE__ */
|
|
225
|
-
}), /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ j(T, {})
|
|
226
|
+
}), /* @__PURE__ */ j(S, { children: u.map((e) => /* @__PURE__ */ j(C, {
|
|
226
227
|
value: e.value,
|
|
227
228
|
children: e.label
|
|
228
229
|
}, e.value)) })]
|
|
229
230
|
})]
|
|
230
231
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ M("div", {
|
|
232
233
|
className: "min-w-0 space-y-2",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ j(b, {
|
|
234
235
|
htmlFor: "mtw-settings-weight",
|
|
235
236
|
children: "Weight unit"
|
|
236
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ M(x, {
|
|
237
238
|
value: U.weightUnit,
|
|
238
239
|
onValueChange: (e) => {
|
|
239
240
|
let t = f.find((t) => t.value === e);
|
|
240
241
|
t && $("weightUnit", t.value);
|
|
241
242
|
},
|
|
242
243
|
disabled: J || G,
|
|
243
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ j(w, {
|
|
244
245
|
id: "mtw-settings-weight",
|
|
245
246
|
"aria-label": "Weight unit",
|
|
246
|
-
children: /* @__PURE__ */
|
|
247
|
-
}), /* @__PURE__ */
|
|
247
|
+
children: /* @__PURE__ */ j(T, {})
|
|
248
|
+
}), /* @__PURE__ */ j(S, { children: f.map((e) => /* @__PURE__ */ j(C, {
|
|
248
249
|
value: e.value,
|
|
249
250
|
children: e.label
|
|
250
251
|
}, e.value)) })]
|
|
@@ -253,50 +254,50 @@ function V() {
|
|
|
253
254
|
]
|
|
254
255
|
})]
|
|
255
256
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ M("fieldset", {
|
|
257
258
|
className: "space-y-4",
|
|
258
259
|
disabled: J || G,
|
|
259
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ j("legend", {
|
|
260
261
|
className: "text-sm font-semibold text-text-primary",
|
|
261
262
|
children: "New orders"
|
|
262
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ M("div", {
|
|
263
264
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ M("div", {
|
|
265
266
|
className: "min-w-0 space-y-2",
|
|
266
267
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ j(b, {
|
|
268
269
|
htmlFor: "mtw-settings-priority",
|
|
269
270
|
children: "Default priority"
|
|
270
271
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ M(x, {
|
|
272
273
|
value: U.defaultOrderPriority,
|
|
273
274
|
onValueChange: (e) => {
|
|
274
275
|
let t = d.find((t) => t.value === e);
|
|
275
276
|
t && $("defaultOrderPriority", t.value);
|
|
276
277
|
},
|
|
277
278
|
disabled: J || G,
|
|
278
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ j(w, {
|
|
279
280
|
id: "mtw-settings-priority",
|
|
280
281
|
"aria-label": "Default priority",
|
|
281
|
-
children: /* @__PURE__ */
|
|
282
|
-
}), /* @__PURE__ */
|
|
282
|
+
children: /* @__PURE__ */ j(T, {})
|
|
283
|
+
}), /* @__PURE__ */ j(S, { children: d.map((e) => /* @__PURE__ */ j(C, {
|
|
283
284
|
value: e.value,
|
|
284
285
|
children: e.label
|
|
285
286
|
}, e.value)) })]
|
|
286
287
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ j("p", {
|
|
288
289
|
className: "text-xs text-text-secondary",
|
|
289
290
|
children: "New orders start with this priority."
|
|
290
291
|
})
|
|
291
292
|
]
|
|
292
|
-
}), /* @__PURE__ */
|
|
293
|
+
}), /* @__PURE__ */ M("div", {
|
|
293
294
|
className: "min-w-0 space-y-2",
|
|
294
295
|
children: [
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ j(b, {
|
|
296
297
|
htmlFor: "mtw-settings-window",
|
|
297
298
|
children: "Default delivery window (hours)"
|
|
298
299
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ j(y, {
|
|
300
301
|
id: "mtw-settings-window",
|
|
301
302
|
type: "number",
|
|
302
303
|
inputMode: "numeric",
|
|
@@ -308,7 +309,7 @@ function V() {
|
|
|
308
309
|
"aria-describedby": "mtw-settings-window-help",
|
|
309
310
|
onChange: (e) => $("defaultDeliveryWindowHours", e.target.value)
|
|
310
311
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ j("p", {
|
|
312
313
|
id: "mtw-settings-window-help",
|
|
313
314
|
className: Y ? "text-xs text-status-error-text" : "text-xs text-text-secondary",
|
|
314
315
|
children: Y ?? "The order form suggests a scheduled delivery this many hours ahead."
|
|
@@ -317,138 +318,155 @@ function V() {
|
|
|
317
318
|
})]
|
|
318
319
|
})]
|
|
319
320
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ j(D, { message: ye }),
|
|
322
|
+
/* @__PURE__ */ M("div", {
|
|
322
323
|
className: "flex flex-wrap items-center justify-end gap-3",
|
|
323
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ M(p, {
|
|
324
325
|
type: "button",
|
|
325
326
|
variant: "outline",
|
|
326
327
|
disabled: !Z || G,
|
|
327
328
|
onClick: () => {
|
|
328
|
-
q(null), W(z
|
|
329
|
+
q(null), W(R(z));
|
|
329
330
|
},
|
|
330
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ j(ee, {
|
|
331
332
|
size: 16,
|
|
332
333
|
className: "mr-2"
|
|
333
334
|
}), " Discard changes"]
|
|
334
|
-
}), /* @__PURE__ */
|
|
335
|
+
}), /* @__PURE__ */ M(p, {
|
|
335
336
|
type: "submit",
|
|
336
337
|
disabled: !Q,
|
|
337
|
-
children: [G ? /* @__PURE__ */
|
|
338
|
+
children: [G ? /* @__PURE__ */ j(i, {
|
|
338
339
|
size: 16,
|
|
339
340
|
className: "mr-2 animate-spin"
|
|
340
|
-
}) : /* @__PURE__ */
|
|
341
|
+
}) : /* @__PURE__ */ j(te, {
|
|
341
342
|
size: 16,
|
|
342
343
|
className: "mr-2"
|
|
343
344
|
}), "Save settings"]
|
|
344
345
|
})]
|
|
345
346
|
})
|
|
346
347
|
]
|
|
347
|
-
}) : /* @__PURE__ */
|
|
348
|
+
}) : /* @__PURE__ */ M("div", {
|
|
348
349
|
className: "space-y-4",
|
|
349
350
|
"aria-busy": "true",
|
|
350
351
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ j(E, { className: "h-10 w-full" }),
|
|
353
|
+
/* @__PURE__ */ j(E, { className: "h-10 w-full" }),
|
|
354
|
+
/* @__PURE__ */ j(E, { className: "h-10 w-full" })
|
|
354
355
|
]
|
|
355
356
|
})]
|
|
356
|
-
}), /* @__PURE__ */
|
|
357
|
+
}), /* @__PURE__ */ M("div", {
|
|
357
358
|
className: "space-y-6",
|
|
358
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ M(m, { children: [/* @__PURE__ */ M(_, { children: [/* @__PURE__ */ j(v, {
|
|
359
360
|
className: "text-base",
|
|
360
361
|
children: "How it looks now"
|
|
361
|
-
}), /* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
362
|
+
}), /* @__PURE__ */ j(g, { children: "Examples using the saved settings." })] }), /* @__PURE__ */ M(h, { children: [
|
|
363
|
+
/* @__PURE__ */ M("dl", {
|
|
363
364
|
className: "space-y-2 text-sm",
|
|
364
365
|
"data-testid": "mtw-settings-preview",
|
|
365
366
|
children: [
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ M("div", {
|
|
367
368
|
className: "flex justify-between gap-4",
|
|
368
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ j("dt", {
|
|
369
370
|
className: "text-text-secondary",
|
|
370
371
|
children: "Amount"
|
|
371
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ j("dd", {
|
|
372
373
|
className: "font-medium text-text-primary",
|
|
373
|
-
children:
|
|
374
|
+
children: ne(1234.5)
|
|
374
375
|
})]
|
|
375
376
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ M("div", {
|
|
377
378
|
className: "flex justify-between gap-4",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
379
|
+
children: [/* @__PURE__ */ j("dt", {
|
|
379
380
|
className: "text-text-secondary",
|
|
380
381
|
children: "Distance"
|
|
381
|
-
}), /* @__PURE__ */
|
|
382
|
+
}), /* @__PURE__ */ j("dd", {
|
|
382
383
|
className: "font-medium text-text-primary",
|
|
383
|
-
children:
|
|
384
|
+
children: re(42.2)
|
|
384
385
|
})]
|
|
385
386
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ M("div", {
|
|
387
388
|
className: "flex justify-between gap-4",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ j("dt", {
|
|
389
390
|
className: "text-text-secondary",
|
|
390
391
|
children: "Weight"
|
|
391
|
-
}), /* @__PURE__ */
|
|
392
|
+
}), /* @__PURE__ */ j("dd", {
|
|
392
393
|
className: "font-medium text-text-primary",
|
|
393
|
-
children:
|
|
394
|
+
children: ie(750)
|
|
394
395
|
})]
|
|
395
396
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ M("div", {
|
|
397
398
|
className: "flex justify-between gap-4",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
399
|
+
children: [/* @__PURE__ */ j("dt", {
|
|
399
400
|
className: "text-text-secondary",
|
|
400
401
|
children: "Date and time"
|
|
401
|
-
}), /* @__PURE__ */
|
|
402
|
+
}), /* @__PURE__ */ j("dd", {
|
|
402
403
|
className: "text-right font-medium text-text-primary",
|
|
403
|
-
children: l(
|
|
404
|
+
children: l(Ee)
|
|
404
405
|
})]
|
|
405
406
|
})
|
|
406
407
|
]
|
|
407
408
|
}),
|
|
408
|
-
|
|
409
|
+
z.updatedAt && /* @__PURE__ */ M("p", {
|
|
409
410
|
className: "mt-4 text-xs text-text-secondary",
|
|
410
|
-
children: ["Last saved ", l(
|
|
411
|
+
children: ["Last saved ", l(z.updatedAt)]
|
|
411
412
|
}),
|
|
412
|
-
|
|
413
|
+
V && /* @__PURE__ */ j(p, {
|
|
413
414
|
variant: "outline",
|
|
414
415
|
size: "sm",
|
|
415
416
|
className: "mt-4",
|
|
416
|
-
onClick:
|
|
417
|
+
onClick: ve,
|
|
417
418
|
children: "Try loading again"
|
|
418
419
|
})
|
|
419
|
-
] })] }), /* @__PURE__ */
|
|
420
|
+
] })] }), /* @__PURE__ */ M(m, { children: [/* @__PURE__ */ M(_, { children: [/* @__PURE__ */ j(v, {
|
|
420
421
|
className: "text-base",
|
|
421
422
|
children: "Other settings"
|
|
422
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ j(g, { children: "These are managed by the platform for every product." })] }), /* @__PURE__ */ M(h, {
|
|
423
424
|
className: "space-y-2",
|
|
424
|
-
children:
|
|
425
|
+
children: [/* @__PURE__ */ M("button", {
|
|
426
|
+
type: "button",
|
|
427
|
+
className: "flex w-full items-start gap-3 rounded-lg border border-border-default px-3 py-2 text-left transition-colors hover:bg-surface-secondary",
|
|
428
|
+
onClick: () => e(s(t, "integrations")),
|
|
429
|
+
children: [/* @__PURE__ */ j(a, {
|
|
430
|
+
size: 18,
|
|
431
|
+
className: "mt-0.5 shrink-0 text-text-secondary"
|
|
432
|
+
}), /* @__PURE__ */ M("span", {
|
|
433
|
+
className: "min-w-0 flex-1",
|
|
434
|
+
children: [/* @__PURE__ */ j("span", {
|
|
435
|
+
className: "block text-sm font-medium text-text-primary",
|
|
436
|
+
children: "Tracking integrations"
|
|
437
|
+
}), /* @__PURE__ */ j("span", {
|
|
438
|
+
className: "block text-xs text-text-secondary",
|
|
439
|
+
children: "Carrier, ELD and GPS feeds that update shipments automatically"
|
|
440
|
+
})]
|
|
441
|
+
})]
|
|
442
|
+
}), ge.map((t) => {
|
|
425
443
|
let r = t.icon;
|
|
426
|
-
return /* @__PURE__ */
|
|
444
|
+
return /* @__PURE__ */ M("button", {
|
|
427
445
|
type: "button",
|
|
428
446
|
className: "flex w-full items-start gap-3 rounded-lg border border-border-default px-3 py-2 text-left transition-colors hover:bg-surface-secondary",
|
|
429
447
|
onClick: () => e(t.path),
|
|
430
448
|
children: [
|
|
431
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ j(r, {
|
|
432
450
|
size: 18,
|
|
433
451
|
className: "mt-0.5 shrink-0 text-text-secondary"
|
|
434
452
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ M("span", {
|
|
436
454
|
className: "min-w-0 flex-1",
|
|
437
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ j("span", {
|
|
438
456
|
className: "block text-sm font-medium text-text-primary",
|
|
439
457
|
children: t.title
|
|
440
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ j("span", {
|
|
441
459
|
className: "block text-xs text-text-secondary",
|
|
442
460
|
children: t.description
|
|
443
461
|
})]
|
|
444
462
|
}),
|
|
445
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ j(n, {
|
|
446
464
|
size: 14,
|
|
447
465
|
className: "mt-1 shrink-0 text-text-tertiary"
|
|
448
466
|
})
|
|
449
467
|
]
|
|
450
468
|
}, t.id);
|
|
451
|
-
})
|
|
469
|
+
})]
|
|
452
470
|
})] })]
|
|
453
471
|
})]
|
|
454
472
|
})
|
|
@@ -456,4 +474,4 @@ function V() {
|
|
|
456
474
|
});
|
|
457
475
|
}
|
|
458
476
|
//#endregion
|
|
459
|
-
export {
|
|
477
|
+
export { z as default };
|