@burdenoff/microfe-movethewheels 2026.828.1 → 2026.830.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/MoveTheWheelsRoot.js +86 -83
- package/dist/MoveTheWheelsRoutes.js +107 -104
- package/dist/hooks/index.js +1 -0
- package/dist/index.js +38 -37
- package/dist/movethewheels/hooks/index.d.ts +1 -0
- package/dist/movethewheels/shared/hooks/useTr.d.ts +16 -0
- package/dist/pages/AIAssistantPage.js +45 -43
- package/dist/pages/DashboardPage.js +6 -6
- package/dist/pages/FleetPage.js +7 -7
- package/dist/pages/InventoryPage.js +6 -6
- package/dist/pages/OrdersListPage.js +5 -5
- package/dist/pages/SettingsPage.js +175 -154
- package/dist/pages/TrackingPage.js +5 -5
- package/dist/shared/hooks/useTr.js +12 -0
- package/package.json +1 -1
- package/src/movethewheels/MoveTheWheelsRoot.tsx +28 -24
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +7 -2
- package/src/movethewheels/hooks/index.ts +3 -0
- package/src/movethewheels/pages/AIAssistantPage.tsx +53 -32
- package/src/movethewheels/pages/SettingsPage.tsx +172 -70
- package/src/movethewheels/shared/hooks/useTr.ts +37 -0
|
@@ -5,49 +5,16 @@ import { Settings as r } from "../node_modules/lucide-react/dist/esm/icons/setti
|
|
|
5
5
|
import { Shield as i } from "../node_modules/lucide-react/dist/esm/icons/shield.js";
|
|
6
6
|
import { User as a } from "../node_modules/lucide-react/dist/esm/icons/user.js";
|
|
7
7
|
import { Webhook as o } from "../node_modules/lucide-react/dist/esm/icons/webhook.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { useTr as s } from "../shared/hooks/useTr.js";
|
|
9
|
+
import { useModuleSettings as c } from "../hooks/useSettings.js";
|
|
10
|
+
import "../hooks/index.js";
|
|
11
|
+
import { Button as l, Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m, Input as h, Label as g, Select as _, SelectContent as v, SelectItem as y, SelectTrigger as b, SelectValue as x, Switch as S, Tabs as C, TabsContent as w, TabsList as T, TabsTrigger as E } from "../components/ui.js";
|
|
12
|
+
import { PageLayout as D } from "../components/PageLayout.js";
|
|
13
|
+
import { useEffect as O, useMemo as k, useState as A } from "react";
|
|
14
|
+
import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
15
|
+
import { EmphasisPanel as N, NextSteps as P, PagePurpose as F } from "@burdenoff/fe-libs/ui";
|
|
14
16
|
//#region src/movethewheels/pages/SettingsPage.tsx
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
key: "googleMaps",
|
|
18
|
-
name: "Google Maps"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
key: "stripe",
|
|
22
|
-
name: "Stripe"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
key: "twilio",
|
|
26
|
-
name: "Twilio"
|
|
27
|
-
}
|
|
28
|
-
], I = [
|
|
29
|
-
{
|
|
30
|
-
key: "orderUpdates",
|
|
31
|
-
label: "Order updates",
|
|
32
|
-
desc: "Receive notifications for order status changes"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: "deliveryAlerts",
|
|
36
|
-
label: "Delivery alerts",
|
|
37
|
-
desc: "Get notified about delivery issues"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
key: "systemNotifications",
|
|
41
|
-
label: "System notifications",
|
|
42
|
-
desc: "Important system updates and maintenance"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
key: "weeklyReports",
|
|
46
|
-
label: "Weekly reports",
|
|
47
|
-
desc: "Receive weekly performance summary"
|
|
48
|
-
}
|
|
49
|
-
];
|
|
50
|
-
function L(e) {
|
|
17
|
+
function I(e) {
|
|
51
18
|
let t = e.company ?? {}, n = e.localization ?? {}, r = e.notifications ?? {}, i = e.security ?? {}, a = e.integrations ?? {};
|
|
52
19
|
return {
|
|
53
20
|
company: {
|
|
@@ -71,30 +38,64 @@ function L(e) {
|
|
|
71
38
|
integrations: a
|
|
72
39
|
};
|
|
73
40
|
}
|
|
74
|
-
function
|
|
75
|
-
let { preferences: R, isLoading: z, isSaving: B, error: V, savePreferences: H } =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
41
|
+
function L() {
|
|
42
|
+
let L = s(), { preferences: R, isLoading: z, isSaving: B, error: V, savePreferences: H } = c(), [U, W] = A("general"), [G, K] = A(() => I({})), [q, J] = A(!1), Y = k(() => [
|
|
43
|
+
{
|
|
44
|
+
key: "googleMaps",
|
|
45
|
+
name: L("movethewheels.settings.integrations.googleMaps", "Google Maps")
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: "stripe",
|
|
49
|
+
name: L("movethewheels.settings.integrations.stripe", "Stripe")
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: "twilio",
|
|
53
|
+
name: L("movethewheels.settings.integrations.twilio", "Twilio")
|
|
54
|
+
}
|
|
55
|
+
], [L]), X = k(() => [
|
|
56
|
+
{
|
|
57
|
+
key: "orderUpdates",
|
|
58
|
+
label: L("movethewheels.settings.notifications.orderUpdates.label", "Order updates"),
|
|
59
|
+
desc: L("movethewheels.settings.notifications.orderUpdates.desc", "Receive notifications for order status changes")
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: "deliveryAlerts",
|
|
63
|
+
label: L("movethewheels.settings.notifications.deliveryAlerts.label", "Delivery alerts"),
|
|
64
|
+
desc: L("movethewheels.settings.notifications.deliveryAlerts.desc", "Get notified about delivery issues")
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: "systemNotifications",
|
|
68
|
+
label: L("movethewheels.settings.notifications.systemNotifications.label", "System notifications"),
|
|
69
|
+
desc: L("movethewheels.settings.notifications.systemNotifications.desc", "Important system updates and maintenance")
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: "weeklyReports",
|
|
73
|
+
label: L("movethewheels.settings.notifications.weeklyReports.label", "Weekly reports"),
|
|
74
|
+
desc: L("movethewheels.settings.notifications.weeklyReports.desc", "Receive weekly performance summary")
|
|
75
|
+
}
|
|
76
|
+
], [L]), Z = k(() => I(R), [R]);
|
|
77
|
+
O(() => {
|
|
78
|
+
K(Z);
|
|
79
|
+
}, [Z]);
|
|
80
|
+
let Q = (e) => K((t) => ({
|
|
80
81
|
...t,
|
|
81
82
|
company: {
|
|
82
83
|
...t.company,
|
|
83
84
|
...e
|
|
84
85
|
}
|
|
85
|
-
})),
|
|
86
|
+
})), $ = (e) => K((t) => ({
|
|
86
87
|
...t,
|
|
87
88
|
localization: {
|
|
88
89
|
...t.localization,
|
|
89
90
|
...e
|
|
90
91
|
}
|
|
91
|
-
})),
|
|
92
|
+
})), ee = (e, t) => K((n) => ({
|
|
92
93
|
...n,
|
|
93
94
|
notifications: {
|
|
94
95
|
...n.notifications,
|
|
95
96
|
[e]: t
|
|
96
97
|
}
|
|
97
|
-
})),
|
|
98
|
+
})), te = async () => {
|
|
98
99
|
J(!1);
|
|
99
100
|
try {
|
|
100
101
|
await H({
|
|
@@ -106,177 +107,197 @@ function R() {
|
|
|
106
107
|
}), J(!0);
|
|
107
108
|
} catch {}
|
|
108
109
|
};
|
|
109
|
-
return /* @__PURE__ */
|
|
110
|
-
title: "Settings",
|
|
111
|
-
subtitle: "Manage your account and preferences",
|
|
112
|
-
icon: /* @__PURE__ */
|
|
110
|
+
return /* @__PURE__ */ M(D, {
|
|
111
|
+
title: L("movethewheels.settings.title", "Settings"),
|
|
112
|
+
subtitle: L("movethewheels.settings.subtitle", "Manage your account and preferences"),
|
|
113
|
+
icon: /* @__PURE__ */ j(r, { size: 24 }),
|
|
113
114
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
icon: /* @__PURE__ */
|
|
116
|
-
children: "Configure how MoveTheWheels works for your business — company details and localization, which notifications you receive, account security, and the integrations (maps, payments, messaging) that power deliveries. Set these once so the rest of the app behaves the way you expect."
|
|
115
|
+
/* @__PURE__ */ j(F, {
|
|
116
|
+
icon: /* @__PURE__ */ j(r, { size: 18 }),
|
|
117
|
+
children: L("movethewheels.settings.purpose", "Configure how MoveTheWheels works for your business — company details and localization, which notifications you receive, account security, and the integrations (maps, payments, messaging) that power deliveries. Set these once so the rest of the app behaves the way you expect.")
|
|
117
118
|
}),
|
|
118
|
-
(q || V) && /* @__PURE__ */
|
|
119
|
+
(q || V) && /* @__PURE__ */ j("div", {
|
|
119
120
|
role: "status",
|
|
120
121
|
className: `rounded-lg p-3 text-sm ${V ? "bg-status-error-bg-subtle text-status-error-text" : "bg-status-success-bg-subtle text-status-success-text"}`,
|
|
121
|
-
children: V ? V.message : "Settings saved."
|
|
122
|
+
children: V ? V.message : L("movethewheels.settings.saved", "Settings saved.")
|
|
122
123
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ j(P, {
|
|
124
125
|
storageKey: "movethewheels-settings",
|
|
125
126
|
steps: [
|
|
126
127
|
{
|
|
127
128
|
id: "company",
|
|
128
|
-
label: "Confirm company details & localization",
|
|
129
|
-
description: "Set your name, contact info, timezone, currency and language.",
|
|
130
|
-
icon: /* @__PURE__ */
|
|
129
|
+
label: L("movethewheels.settings.nextSteps.company.label", "Confirm company details & localization"),
|
|
130
|
+
description: L("movethewheels.settings.nextSteps.company.description", "Set your name, contact info, timezone, currency and language."),
|
|
131
|
+
icon: /* @__PURE__ */ j(a, { size: 16 }),
|
|
131
132
|
onClick: () => W("general")
|
|
132
133
|
},
|
|
133
134
|
{
|
|
134
135
|
id: "notifications",
|
|
135
|
-
label: "Choose your notifications",
|
|
136
|
-
description: "Decide which order, delivery and report emails you receive.",
|
|
137
|
-
icon: /* @__PURE__ */
|
|
136
|
+
label: L("movethewheels.settings.nextSteps.notifications.label", "Choose your notifications"),
|
|
137
|
+
description: L("movethewheels.settings.nextSteps.notifications.description", "Decide which order, delivery and report emails you receive."),
|
|
138
|
+
icon: /* @__PURE__ */ j(e, { size: 16 }),
|
|
138
139
|
onClick: () => W("notifications")
|
|
139
140
|
},
|
|
140
141
|
{
|
|
141
142
|
id: "security",
|
|
142
|
-
label: "Secure your account",
|
|
143
|
-
description: "Enable two-factor authentication for an extra layer of security.",
|
|
144
|
-
icon: /* @__PURE__ */
|
|
143
|
+
label: L("movethewheels.settings.nextSteps.security.label", "Secure your account"),
|
|
144
|
+
description: L("movethewheels.settings.nextSteps.security.description", "Enable two-factor authentication for an extra layer of security."),
|
|
145
|
+
icon: /* @__PURE__ */ j(i, { size: 16 }),
|
|
145
146
|
onClick: () => W("security")
|
|
146
147
|
},
|
|
147
148
|
{
|
|
148
149
|
id: "integrations",
|
|
149
|
-
label: "Connect your tools",
|
|
150
|
-
description: "Link maps, payments and messaging providers.",
|
|
151
|
-
icon: /* @__PURE__ */
|
|
150
|
+
label: L("movethewheels.settings.nextSteps.integrations.label", "Connect your tools"),
|
|
151
|
+
description: L("movethewheels.settings.nextSteps.integrations.description", "Link maps, payments and messaging providers."),
|
|
152
|
+
icon: /* @__PURE__ */ j(o, { size: 16 }),
|
|
152
153
|
onClick: () => W("integrations")
|
|
153
154
|
}
|
|
154
155
|
]
|
|
155
156
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ M(C, {
|
|
157
158
|
value: U,
|
|
158
159
|
onValueChange: W,
|
|
159
160
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ M(T, {
|
|
161
162
|
className: "mb-6",
|
|
162
163
|
children: [
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ M(E, {
|
|
164
165
|
value: "general",
|
|
165
|
-
children: [
|
|
166
|
+
children: [
|
|
167
|
+
/* @__PURE__ */ j(a, { size: 16 }),
|
|
168
|
+
" ",
|
|
169
|
+
L("movethewheels.settings.tabs.general", "General")
|
|
170
|
+
]
|
|
166
171
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ M(E, {
|
|
168
173
|
value: "notifications",
|
|
169
|
-
children: [
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ j(e, { size: 16 }),
|
|
176
|
+
" ",
|
|
177
|
+
L("movethewheels.settings.tabs.notifications", "Notifications")
|
|
178
|
+
]
|
|
170
179
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ M(E, {
|
|
172
181
|
value: "security",
|
|
173
|
-
children: [
|
|
182
|
+
children: [
|
|
183
|
+
/* @__PURE__ */ j(i, { size: 16 }),
|
|
184
|
+
" ",
|
|
185
|
+
L("movethewheels.settings.tabs.security", "Security")
|
|
186
|
+
]
|
|
174
187
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ M(E, {
|
|
176
189
|
value: "integrations",
|
|
177
|
-
children: [
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ j(o, { size: 16 }),
|
|
192
|
+
" ",
|
|
193
|
+
L("movethewheels.settings.tabs.integrations", "Integrations")
|
|
194
|
+
]
|
|
178
195
|
})
|
|
179
196
|
]
|
|
180
197
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ M(w, {
|
|
182
199
|
value: "general",
|
|
183
200
|
className: "space-y-6",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ M(N, { children: [
|
|
202
|
+
/* @__PURE__ */ j("h2", {
|
|
186
203
|
className: "text-base font-semibold text-text-primary",
|
|
187
|
-
children: "Company Information"
|
|
204
|
+
children: L("movethewheels.settings.company.title", "Company Information")
|
|
188
205
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ j("p", {
|
|
190
207
|
className: "text-sm text-text-secondary mb-4",
|
|
191
|
-
children: "Basic company details"
|
|
208
|
+
children: L("movethewheels.settings.company.basicDetails", "Basic company details")
|
|
192
209
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ M("div", {
|
|
194
211
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
195
212
|
children: [
|
|
196
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(g, { children: L("movethewheels.settings.company.name", "Company Name") }), /* @__PURE__ */ j(h, {
|
|
197
214
|
value: G.company.name,
|
|
198
|
-
placeholder: "Your company name",
|
|
215
|
+
placeholder: L("movethewheels.settings.company.placeholders.name", "Your company name"),
|
|
199
216
|
disabled: z,
|
|
200
|
-
onChange: (e) =>
|
|
217
|
+
onChange: (e) => Q({ name: e.target.value })
|
|
201
218
|
})] }),
|
|
202
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(g, { children: L("movethewheels.settings.company.email", "Contact Email") }), /* @__PURE__ */ j(h, {
|
|
203
220
|
type: "email",
|
|
204
221
|
value: G.company.email,
|
|
205
|
-
placeholder: "contact@example.com",
|
|
222
|
+
placeholder: L("movethewheels.settings.company.placeholders.email", "contact@example.com"),
|
|
206
223
|
disabled: z,
|
|
207
|
-
onChange: (e) =>
|
|
224
|
+
onChange: (e) => Q({ email: e.target.value })
|
|
208
225
|
})] }),
|
|
209
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(g, { children: L("movethewheels.settings.company.phone", "Phone") }), /* @__PURE__ */ j(h, {
|
|
210
227
|
value: G.company.phone,
|
|
211
|
-
placeholder: "+1-555-0100",
|
|
228
|
+
placeholder: L("movethewheels.settings.company.placeholders.phone", "+1-555-0100"),
|
|
212
229
|
disabled: z,
|
|
213
|
-
onChange: (e) =>
|
|
230
|
+
onChange: (e) => Q({ phone: e.target.value })
|
|
214
231
|
})] }),
|
|
215
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(g, { children: L("movethewheels.settings.company.website", "Website") }), /* @__PURE__ */ j(h, {
|
|
216
233
|
value: G.company.website,
|
|
217
|
-
placeholder: "https://example.com",
|
|
234
|
+
placeholder: L("movethewheels.settings.company.placeholders.website", "https://example.com"),
|
|
218
235
|
disabled: z,
|
|
219
|
-
onChange: (e) =>
|
|
236
|
+
onChange: (e) => Q({ website: e.target.value })
|
|
220
237
|
})] })
|
|
221
238
|
]
|
|
222
239
|
})
|
|
223
|
-
] }), /* @__PURE__ */
|
|
240
|
+
] }), /* @__PURE__ */ M(u, { children: [/* @__PURE__ */ j(p, { children: /* @__PURE__ */ M(m, {
|
|
224
241
|
className: "flex items-center gap-2",
|
|
225
|
-
children: [
|
|
226
|
-
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ j(t, { size: 18 }),
|
|
244
|
+
" ",
|
|
245
|
+
L("movethewheels.settings.localization.title", "Localization")
|
|
246
|
+
]
|
|
247
|
+
}) }), /* @__PURE__ */ j(d, {
|
|
227
248
|
className: "space-y-4",
|
|
228
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ M("div", {
|
|
229
250
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
230
251
|
children: [
|
|
231
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(g, { children: L("movethewheels.settings.localization.timezone", "Timezone") }), /* @__PURE__ */ M(_, {
|
|
232
253
|
value: G.localization.timezone,
|
|
233
|
-
onValueChange: (e) =>
|
|
234
|
-
children: [/* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
254
|
+
onValueChange: (e) => $({ timezone: e }),
|
|
255
|
+
children: [/* @__PURE__ */ j(b, { children: /* @__PURE__ */ j(x, {}) }), /* @__PURE__ */ M(v, { children: [
|
|
256
|
+
/* @__PURE__ */ j(y, {
|
|
236
257
|
value: "pst",
|
|
237
258
|
children: "Pacific Time (PST)"
|
|
238
259
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ j(y, {
|
|
240
261
|
value: "est",
|
|
241
262
|
children: "Eastern Time (EST)"
|
|
242
263
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ j(y, {
|
|
244
265
|
value: "utc",
|
|
245
266
|
children: "UTC"
|
|
246
267
|
})
|
|
247
268
|
] })]
|
|
248
269
|
})] }),
|
|
249
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(g, { children: L("movethewheels.settings.localization.currency", "Currency") }), /* @__PURE__ */ M(_, {
|
|
250
271
|
value: G.localization.currency,
|
|
251
|
-
onValueChange: (e) =>
|
|
252
|
-
children: [/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
272
|
+
onValueChange: (e) => $({ currency: e }),
|
|
273
|
+
children: [/* @__PURE__ */ j(b, { children: /* @__PURE__ */ j(x, {}) }), /* @__PURE__ */ M(v, { children: [
|
|
274
|
+
/* @__PURE__ */ j(y, {
|
|
254
275
|
value: "usd",
|
|
255
276
|
children: "USD ($)"
|
|
256
277
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ j(y, {
|
|
258
279
|
value: "eur",
|
|
259
280
|
children: "EUR (€)"
|
|
260
281
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ j(y, {
|
|
262
283
|
value: "gbp",
|
|
263
284
|
children: "GBP (£)"
|
|
264
285
|
})
|
|
265
286
|
] })]
|
|
266
287
|
})] }),
|
|
267
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(g, { children: L("movethewheels.settings.localization.language", "Language") }), /* @__PURE__ */ M(_, {
|
|
268
289
|
value: G.localization.language,
|
|
269
|
-
onValueChange: (e) =>
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
290
|
+
onValueChange: (e) => $({ language: e }),
|
|
291
|
+
children: [/* @__PURE__ */ j(b, { children: /* @__PURE__ */ j(x, {}) }), /* @__PURE__ */ M(v, { children: [
|
|
292
|
+
/* @__PURE__ */ j(y, {
|
|
272
293
|
value: "en",
|
|
273
294
|
children: "English"
|
|
274
295
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ j(y, {
|
|
276
297
|
value: "es",
|
|
277
298
|
children: "Spanish"
|
|
278
299
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ j(y, {
|
|
280
301
|
value: "fr",
|
|
281
302
|
children: "French"
|
|
282
303
|
})
|
|
@@ -286,66 +307,66 @@ function R() {
|
|
|
286
307
|
})
|
|
287
308
|
})] })]
|
|
288
309
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ j(w, {
|
|
290
311
|
value: "notifications",
|
|
291
312
|
className: "space-y-6",
|
|
292
|
-
children: /* @__PURE__ */
|
|
313
|
+
children: /* @__PURE__ */ M(u, { children: [/* @__PURE__ */ j(p, { children: /* @__PURE__ */ j(m, { children: L("movethewheels.settings.notifications.title", "Email Notifications") }) }), /* @__PURE__ */ j(d, {
|
|
293
314
|
className: "space-y-4",
|
|
294
|
-
children:
|
|
315
|
+
children: X.map((e) => /* @__PURE__ */ M("div", {
|
|
295
316
|
className: "flex items-center justify-between",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("p", {
|
|
297
318
|
className: "font-medium",
|
|
298
319
|
children: e.label
|
|
299
|
-
}), /* @__PURE__ */
|
|
320
|
+
}), /* @__PURE__ */ j("p", {
|
|
300
321
|
className: "text-sm text-text-secondary",
|
|
301
322
|
children: e.desc
|
|
302
|
-
})] }), /* @__PURE__ */
|
|
323
|
+
})] }), /* @__PURE__ */ j(S, {
|
|
303
324
|
checked: G.notifications[e.key],
|
|
304
325
|
disabled: z,
|
|
305
|
-
onCheckedChange: (t) =>
|
|
326
|
+
onCheckedChange: (t) => ee(e.key, t)
|
|
306
327
|
})]
|
|
307
328
|
}, e.key))
|
|
308
329
|
})] })
|
|
309
330
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ M(w, {
|
|
311
332
|
value: "security",
|
|
312
333
|
className: "space-y-6",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ j(u, { children: /* @__PURE__ */ M(p, { children: [/* @__PURE__ */ j(m, { children: L("movethewheels.settings.security.password.title", "Password") }), /* @__PURE__ */ j(f, { children: L("movethewheels.settings.security.password.description", "Your password and sign-in credentials are managed centrally by your workspace identity provider — update them from your account security settings, not here.") })] }) }), /* @__PURE__ */ M(u, { children: [/* @__PURE__ */ M(p, { children: [/* @__PURE__ */ j(m, { children: L("movethewheels.settings.security.twoFactor.title", "Two-Factor Authentication") }), /* @__PURE__ */ j(f, { children: L("movethewheels.settings.security.twoFactor.description", "Add an extra layer of security") })] }), /* @__PURE__ */ j(d, { children: /* @__PURE__ */ M("div", {
|
|
314
335
|
className: "flex items-center justify-between",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
316
|
-
"Status:",
|
|
336
|
+
children: [/* @__PURE__ */ M("p", { children: [
|
|
337
|
+
L("movethewheels.settings.security.twoFactor.status", "Status:"),
|
|
317
338
|
" ",
|
|
318
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ j("span", {
|
|
319
340
|
className: `font-medium ${G.twoFactorEnabled ? "text-status-success-text" : "text-status-warning-text"}`,
|
|
320
|
-
children: G.twoFactorEnabled ? "Enabled" : "Disabled"
|
|
341
|
+
children: G.twoFactorEnabled ? L("movethewheels.settings.security.twoFactor.enabled", "Enabled") : L("movethewheels.settings.security.twoFactor.disabled", "Disabled")
|
|
321
342
|
})
|
|
322
|
-
] }), /* @__PURE__ */
|
|
343
|
+
] }), /* @__PURE__ */ j(l, {
|
|
323
344
|
variant: "outline",
|
|
324
345
|
disabled: B,
|
|
325
346
|
onClick: () => K((e) => ({
|
|
326
347
|
...e,
|
|
327
348
|
twoFactorEnabled: !e.twoFactorEnabled
|
|
328
349
|
})),
|
|
329
|
-
children: G.twoFactorEnabled ? "Disable 2FA" : "Enable 2FA"
|
|
350
|
+
children: G.twoFactorEnabled ? L("movethewheels.settings.security.twoFactor.disable", "Disable 2FA") : L("movethewheels.settings.security.twoFactor.enable", "Enable 2FA")
|
|
330
351
|
})]
|
|
331
352
|
}) })] })]
|
|
332
353
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ j(w, {
|
|
334
355
|
value: "integrations",
|
|
335
356
|
className: "space-y-6",
|
|
336
|
-
children: /* @__PURE__ */
|
|
357
|
+
children: /* @__PURE__ */ M(u, { children: [/* @__PURE__ */ M(p, { children: [/* @__PURE__ */ j(m, { children: L("movethewheels.settings.integrations.title", "Connected Services") }), /* @__PURE__ */ j(f, { children: L("movethewheels.settings.integrations.description", "Connect the providers that power maps, payments and messaging.") })] }), /* @__PURE__ */ j(d, {
|
|
337
358
|
className: "space-y-3",
|
|
338
|
-
children:
|
|
359
|
+
children: Y.map((e) => {
|
|
339
360
|
let t = G.integrations[e.key] === !0;
|
|
340
|
-
return /* @__PURE__ */
|
|
361
|
+
return /* @__PURE__ */ M("div", {
|
|
341
362
|
className: "flex items-center justify-between p-3 border rounded-lg",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("span", {
|
|
343
364
|
className: "font-medium",
|
|
344
365
|
children: e.name
|
|
345
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ j("p", {
|
|
346
367
|
className: "text-sm text-text-secondary",
|
|
347
|
-
children: t ? "Connected" : "Not configured"
|
|
348
|
-
})] }), /* @__PURE__ */
|
|
368
|
+
children: t ? L("movethewheels.settings.integrations.connected", "Connected") : L("movethewheels.settings.integrations.notConfigured", "Not configured")
|
|
369
|
+
})] }), /* @__PURE__ */ j(l, {
|
|
349
370
|
variant: t ? "outline" : "default",
|
|
350
371
|
size: "sm",
|
|
351
372
|
disabled: B,
|
|
@@ -356,7 +377,7 @@ function R() {
|
|
|
356
377
|
[e.key]: !t
|
|
357
378
|
}
|
|
358
379
|
})),
|
|
359
|
-
children: t ? "Disconnect" : "Connect"
|
|
380
|
+
children: t ? L("movethewheels.settings.integrations.disconnect", "Disconnect") : L("movethewheels.settings.integrations.connect", "Connect")
|
|
360
381
|
})]
|
|
361
382
|
}, e.key);
|
|
362
383
|
})
|
|
@@ -364,15 +385,15 @@ function R() {
|
|
|
364
385
|
})
|
|
365
386
|
]
|
|
366
387
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ j("div", {
|
|
368
389
|
className: "flex justify-end",
|
|
369
|
-
children: /* @__PURE__ */
|
|
370
|
-
onClick: () => void
|
|
390
|
+
children: /* @__PURE__ */ M(l, {
|
|
391
|
+
onClick: () => void te(),
|
|
371
392
|
disabled: B || z,
|
|
372
393
|
children: [
|
|
373
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ j(n, { size: 16 }),
|
|
374
395
|
" ",
|
|
375
|
-
B ? "Saving…" : "Save Changes"
|
|
396
|
+
B ? L("movethewheels.settings.saving", "Saving…") : L("movethewheels.settings.saveChanges", "Save Changes")
|
|
376
397
|
]
|
|
377
398
|
})
|
|
378
399
|
})
|
|
@@ -380,4 +401,4 @@ function R() {
|
|
|
380
401
|
});
|
|
381
402
|
}
|
|
382
403
|
//#endregion
|
|
383
|
-
export {
|
|
404
|
+
export { L as default };
|
|
@@ -19,11 +19,11 @@ import { ProofOfDeliveryCard as C } from "../components/ProofOfDeliveryCard.js";
|
|
|
19
19
|
import { useMemo as w, useState as T } from "react";
|
|
20
20
|
import { useSearchParams as E } from "react-router";
|
|
21
21
|
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
23
|
+
import { EmphasisPanel as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
|
|
24
24
|
//#region src/movethewheels/pages/TrackingPage.tsx
|
|
25
25
|
function M() {
|
|
26
|
-
let { t: M } =
|
|
26
|
+
let { t: M } = k(), N = (e, t) => {
|
|
27
27
|
let n = M(e);
|
|
28
28
|
return n === e ? t : n;
|
|
29
29
|
}, { basePath: P, navigate: F } = c(), [I] = E(), L = I.get("order") || "", [R, z] = T(L), [B, V] = T(L), { tracking: H, order: U, isLoading: W, error: G } = l(B || void 0), K = (e) => {
|
|
@@ -67,7 +67,7 @@ function M() {
|
|
|
67
67
|
children: [/* @__PURE__ */ D(r, { size: 16 }), N("movethewheels.tracking.actions.liveMapView", "Live Map View")]
|
|
68
68
|
}),
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */ D(
|
|
70
|
+
/* @__PURE__ */ D(j, {
|
|
71
71
|
icon: /* @__PURE__ */ D(r, { size: 18 }),
|
|
72
72
|
children: N("movethewheels.tracking.purpose", "Look up any single shipment by its tracking number or order ID to see exactly where it is, its progress through pickup and delivery, the current location and any alerts — the same view you can share with a customer.")
|
|
73
73
|
}),
|
|
@@ -118,7 +118,7 @@ function M() {
|
|
|
118
118
|
children: [/* @__PURE__ */ O("div", {
|
|
119
119
|
className: "lg:col-span-2 space-y-6",
|
|
120
120
|
children: [
|
|
121
|
-
/* @__PURE__ */ O(
|
|
121
|
+
/* @__PURE__ */ O(A, { children: [/* @__PURE__ */ O("div", {
|
|
122
122
|
className: "flex items-center justify-between mb-4",
|
|
123
123
|
children: [/* @__PURE__ */ O("h2", {
|
|
124
124
|
className: "flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useCallback as e } from "react";
|
|
2
|
+
import { useI18n as t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
|
+
//#region src/movethewheels/shared/hooks/useTr.ts
|
|
4
|
+
function n() {
|
|
5
|
+
let { t: n } = t();
|
|
6
|
+
return e((e, t, r) => {
|
|
7
|
+
let i = n(e), a = i === e ? t : i;
|
|
8
|
+
return r ? Object.entries(r).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${t}\\}\\}`, "g"), String(n)), a) : a;
|
|
9
|
+
}, [n]);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as useTr };
|
package/package.json
CHANGED