@burdenoff/microfe-labsofscience 2026.624.1 → 2026.626.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/labsofscience/components/EmptyState.js +18 -11
- package/dist/labsofscience/components/EmptyState.js.map +1 -1
- package/dist/labsofscience/components/InvestmentCard.js +26 -24
- package/dist/labsofscience/components/InvestmentCard.js.map +1 -1
- package/dist/labsofscience/components/MetricsCard.js +19 -13
- package/dist/labsofscience/components/MetricsCard.js.map +1 -1
- package/dist/labsofscience/components/PageLayout.js +23 -15
- package/dist/labsofscience/components/PageLayout.js.map +1 -1
- package/dist/labsofscience/components/RatingDisplay.js +1 -1
- package/dist/labsofscience/components/RatingDisplay.js.map +1 -1
- package/dist/labsofscience/components/StatusBadge.js +34 -15
- package/dist/labsofscience/components/StatusBadge.js.map +1 -1
- package/dist/labsofscience/pages/HomePage.js +242 -223
- package/dist/labsofscience/pages/HomePage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js +107 -101
- package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminDashboard.js +118 -85
- package/dist/labsofscience/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminFinancialPage.js +51 -45
- package/dist/labsofscience/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminOrdersPage.js +245 -240
- package/dist/labsofscience/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminProfilePage.js +131 -129
- package/dist/labsofscience/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminSettingsPage.js +493 -491
- package/dist/labsofscience/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/CartManagementPage.js +163 -158
- package/dist/labsofscience/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/UserManagementPage.js +307 -302
- package/dist/labsofscience/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js +89 -84
- package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js +187 -182
- package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js +119 -88
- package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js +149 -144
- package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js +151 -146
- package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js +344 -346
- package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js +269 -271
- package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js +293 -287
- package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/common/HelpSupportPage.js +344 -345
- package/dist/labsofscience/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/labsofscience/pages/common/NotificationCenterPage.js +94 -87
- package/dist/labsofscience/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/labsofscience/pages/common/SettingsPage.js +748 -739
- package/dist/labsofscience/pages/common/SettingsPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/BookingDetailsPage.js +400 -356
- package/dist/labsofscience/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/CartDetailPage.js +281 -248
- package/dist/labsofscience/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/CartDiscoveryPage.js +178 -166
- package/dist/labsofscience/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/CheckoutPage.js +236 -238
- package/dist/labsofscience/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/CustomerDashboard.js +425 -390
- package/dist/labsofscience/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/labsofscience/pages/customer/CustomerProfilePage.js +528 -491
- package/dist/labsofscience/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js +522 -512
- package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/FavoritesPage.js +73 -66
- package/dist/labsofscience/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/OrderHistoryPage.js +74 -67
- package/dist/labsofscience/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/OrderTrackingPage.js +311 -274
- package/dist/labsofscience/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/PaymentMethodsPage.js +100 -93
- package/dist/labsofscience/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/ReviewsPage.js +96 -89
- package/dist/labsofscience/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/SavedAddressesPage.js +85 -78
- package/dist/labsofscience/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js +135 -103
- package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js +267 -260
- package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js +97 -91
- package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorDashboard.js +346 -310
- package/dist/labsofscience/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js +118 -111
- package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js +75 -69
- package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorProfilePage.js +434 -429
- package/dist/labsofscience/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/worker/TaskDetailsPage.js +364 -323
- package/dist/labsofscience/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/labsofscience/pages/worker/WorkerDashboard.js +132 -101
- package/dist/labsofscience/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/labsofscience/pages/worker/WorkerOrdersPage.js +114 -108
- package/dist/labsofscience/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/labsofscience/pages/worker/WorkerProfilePage.js +124 -119
- package/dist/labsofscience/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/worker/WorkerSchedulePage.js +354 -344
- package/dist/labsofscience/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -8,8 +8,9 @@ import { useCallback as s, useEffect as c, useMemo as l, useState as u } from "r
|
|
|
8
8
|
import { AlertTriangle as d, ArrowLeft as f, Boxes as p, Camera as m, CheckCircle2 as h, ChefHat as g, Circle as _, Clock as v, FileText as y, IndianRupee as b, Loader2 as x, MapPin as S, Navigation as C, Package as w, Phone as T, PlayCircle as E, Save as D, ShoppingBag as O, Sparkles as k, StickyNote as A, Timer as j, Truck as M, User as N } from "lucide-react";
|
|
9
9
|
import { useParams as P } from "react-router-dom";
|
|
10
10
|
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
11
|
+
import { EmphasisPanel as L, NextSteps as R, PagePurpose as z } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
//#region src/labsofscience/pages/worker/TaskDetailsPage.tsx
|
|
12
|
-
function
|
|
13
|
+
function B(e) {
|
|
13
14
|
switch (e) {
|
|
14
15
|
case "delivery": return M;
|
|
15
16
|
case "preparation": return g;
|
|
@@ -20,16 +21,16 @@ function L(e) {
|
|
|
20
21
|
default: return y;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function V(e) {
|
|
24
25
|
switch (e) {
|
|
25
|
-
case "urgent": return "bg-
|
|
26
|
-
case "high": return "bg-
|
|
27
|
-
case "medium": return "bg-
|
|
28
|
-
case "low": return "bg-
|
|
26
|
+
case "urgent": return "bg-status-error-bg-subtle text-status-error-text";
|
|
27
|
+
case "high": return "bg-status-warning-bg-subtle text-status-warning-text";
|
|
28
|
+
case "medium": return "bg-status-warning-bg-subtle text-status-warning-text";
|
|
29
|
+
case "low": return "bg-status-success-bg-subtle text-status-success-text";
|
|
29
30
|
default: return "bg-secondary text-secondary-foreground";
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function H(e) {
|
|
33
34
|
let t = e.assignedTime, n = e.status === "in_progress" || e.status === "completed" ? new Date(new Date(t).getTime() + 15 * 6e4).toISOString() : null, r = e.status === "completed" ? (/* @__PURE__ */ new Date()).toISOString() : null;
|
|
34
35
|
return [
|
|
35
36
|
{
|
|
@@ -52,16 +53,16 @@ function z(e) {
|
|
|
52
53
|
}
|
|
53
54
|
];
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function U(e) {
|
|
56
57
|
return new Date(e).toLocaleTimeString("en-IN", {
|
|
57
58
|
hour: "numeric",
|
|
58
59
|
minute: "2-digit",
|
|
59
60
|
hour12: !0
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
-
let { taskId: p } = P(), { navigateTo: g } = e(), [w, k] = u(null), [M,
|
|
64
|
-
|
|
63
|
+
function W() {
|
|
64
|
+
let { taskId: p } = P(), { navigateTo: g } = e(), [w, k] = u(null), [M, W] = u(!0), [G, K] = u(""), q = s(() => {
|
|
65
|
+
W(!0), setTimeout(() => {
|
|
65
66
|
let e = {
|
|
66
67
|
id: p || "TASK-001",
|
|
67
68
|
orderId: "ORD-123",
|
|
@@ -97,35 +98,35 @@ function V() {
|
|
|
97
98
|
photos: ["https://images.unsplash.com/photo-1630384060421-cb20d0e0649d?w=400", "https://images.unsplash.com/photo-1572802419224-296b0aeee0d9?w=400"],
|
|
98
99
|
notes: ""
|
|
99
100
|
};
|
|
100
|
-
k(e),
|
|
101
|
+
k(e), K(e.notes || ""), W(!1);
|
|
101
102
|
}, 600);
|
|
102
103
|
}, [p]);
|
|
103
104
|
c(() => {
|
|
104
|
-
|
|
105
|
-
}, [
|
|
106
|
-
let
|
|
105
|
+
q();
|
|
106
|
+
}, [q]);
|
|
107
|
+
let J = () => {
|
|
107
108
|
w && (k({
|
|
108
109
|
...w,
|
|
109
110
|
status: "in_progress"
|
|
110
111
|
}), alert("Task started successfully"));
|
|
111
|
-
},
|
|
112
|
+
}, Y = () => {
|
|
112
113
|
w && (k({
|
|
113
114
|
...w,
|
|
114
115
|
status: "completed"
|
|
115
116
|
}), alert("Task completed successfully"));
|
|
116
|
-
},
|
|
117
|
+
}, X = () => {
|
|
117
118
|
w?.customerInfo?.phone && (window.location.href = `tel:${w.customerInfo.phone.replace(/\s/g, "")}`);
|
|
118
|
-
},
|
|
119
|
+
}, Z = () => {
|
|
119
120
|
if (w?.customerInfo?.address) {
|
|
120
121
|
let e = encodeURIComponent(w.customerInfo.address);
|
|
121
122
|
window.open(`https://maps.google.com?q=${e}`, "_blank");
|
|
122
123
|
}
|
|
123
|
-
},
|
|
124
|
+
}, Q = () => {
|
|
124
125
|
w && (k({
|
|
125
126
|
...w,
|
|
126
|
-
notes:
|
|
127
|
+
notes: G
|
|
127
128
|
}), alert("Notes saved successfully"));
|
|
128
|
-
},
|
|
129
|
+
}, $ = l(() => w ? H(w) : [], [w]);
|
|
129
130
|
if (M) return /* @__PURE__ */ F(n, {
|
|
130
131
|
title: "Task Details",
|
|
131
132
|
children: /* @__PURE__ */ F("div", {
|
|
@@ -142,6 +143,7 @@ function V() {
|
|
|
142
143
|
if (!w) return /* @__PURE__ */ F(n, {
|
|
143
144
|
title: "Task Not Found",
|
|
144
145
|
children: /* @__PURE__ */ F(i, {
|
|
146
|
+
illustration: "empty-files",
|
|
145
147
|
icon: /* @__PURE__ */ F(y, { className: "h-12 w-12" }),
|
|
146
148
|
title: "Task not found",
|
|
147
149
|
description: `No task found with ID "${p}".`,
|
|
@@ -153,7 +155,7 @@ function V() {
|
|
|
153
155
|
})
|
|
154
156
|
})
|
|
155
157
|
});
|
|
156
|
-
let
|
|
158
|
+
let ee = B(w.type);
|
|
157
159
|
return /* @__PURE__ */ F(n, {
|
|
158
160
|
title: /* @__PURE__ */ I("div", {
|
|
159
161
|
className: "flex items-center gap-3",
|
|
@@ -167,330 +169,369 @@ function V() {
|
|
|
167
169
|
description: "Manage and track your assigned task",
|
|
168
170
|
children: /* @__PURE__ */ I("div", {
|
|
169
171
|
className: "space-y-6",
|
|
170
|
-
children: [
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ F(z, {
|
|
174
|
+
icon: /* @__PURE__ */ F(C, { className: "h-4 w-4" }),
|
|
175
|
+
children: "Everything you need to carry out one job. See what's being asked, who the customer is and where to go, then start the task, navigate to the location, call the customer and mark it complete — keep notes as you go so nothing slips through the cracks."
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ F(R, {
|
|
178
|
+
storageKey: "labsofscience-task-details",
|
|
179
|
+
steps: [
|
|
180
|
+
...w.status === "pending" ? [{
|
|
181
|
+
id: "start",
|
|
182
|
+
label: "Start this task",
|
|
183
|
+
description: "Mark the task in progress when you begin.",
|
|
184
|
+
icon: /* @__PURE__ */ F(h, { className: "h-4 w-4" }),
|
|
185
|
+
onClick: J
|
|
186
|
+
}] : w.status === "in_progress" ? [{
|
|
187
|
+
id: "complete",
|
|
188
|
+
label: "Mark task complete",
|
|
189
|
+
description: "Close out the job once you’re done.",
|
|
190
|
+
icon: /* @__PURE__ */ F(h, { className: "h-4 w-4" }),
|
|
191
|
+
onClick: Y
|
|
192
|
+
}] : [],
|
|
193
|
+
{
|
|
194
|
+
id: "navigate",
|
|
195
|
+
label: "Navigate to the customer",
|
|
196
|
+
description: "Open directions to the service location.",
|
|
197
|
+
icon: /* @__PURE__ */ F(C, { className: "h-4 w-4" }),
|
|
198
|
+
onClick: Z
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: "call",
|
|
202
|
+
label: "Call the customer",
|
|
203
|
+
description: "Confirm details or give an arrival update.",
|
|
204
|
+
icon: /* @__PURE__ */ F(T, { className: "h-4 w-4" }),
|
|
205
|
+
onClick: X
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ I(L, {
|
|
210
|
+
className: "p-6",
|
|
211
|
+
children: [/* @__PURE__ */ I("div", {
|
|
212
|
+
className: "flex items-start justify-between mb-4",
|
|
213
|
+
children: [/* @__PURE__ */ I("div", {
|
|
214
|
+
className: "flex items-start gap-3",
|
|
215
|
+
children: [/* @__PURE__ */ F("div", {
|
|
216
|
+
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
217
|
+
children: /* @__PURE__ */ F(ee, { className: "h-5 w-5 text-text-secondary" })
|
|
218
|
+
}), /* @__PURE__ */ I("div", { children: [
|
|
219
|
+
/* @__PURE__ */ F("h2", {
|
|
220
|
+
className: "text-xl font-bold text-text-primary",
|
|
221
|
+
children: w.title
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ F("p", {
|
|
224
|
+
className: "text-sm text-text-secondary mt-1",
|
|
225
|
+
children: w.description
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ I("div", {
|
|
228
|
+
className: "flex flex-wrap items-center gap-2 mt-3",
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ F("span", {
|
|
231
|
+
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium uppercase", V(w.priority)),
|
|
232
|
+
children: w.priority
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ F(r, { status: w.status }),
|
|
235
|
+
/* @__PURE__ */ I("span", {
|
|
236
|
+
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ F(v, { className: "h-3 w-3" }),
|
|
239
|
+
w.estimatedTime,
|
|
240
|
+
" min"
|
|
241
|
+
]
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
})
|
|
245
|
+
] })]
|
|
246
|
+
}), /* @__PURE__ */ I("div", {
|
|
247
|
+
className: "text-right shrink-0",
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ F("p", {
|
|
250
|
+
className: "text-xs text-text-secondary",
|
|
251
|
+
children: "Assigned by"
|
|
252
|
+
}),
|
|
253
|
+
/* @__PURE__ */ F("p", {
|
|
254
|
+
className: "text-sm font-medium text-text-primary",
|
|
255
|
+
children: w.assignedBy
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ F("p", {
|
|
258
|
+
className: "text-xs text-text-secondary mt-1",
|
|
259
|
+
children: U(w.assignedTime)
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
})]
|
|
263
|
+
}), w.dueTime && w.status !== "completed" && /* @__PURE__ */ F("div", {
|
|
264
|
+
className: "rounded-md bg-status-warning-bg-subtle border border-status-warning-border p-3",
|
|
265
|
+
children: /* @__PURE__ */ I("div", {
|
|
266
|
+
className: "flex items-center gap-2",
|
|
267
|
+
children: [/* @__PURE__ */ F(j, { className: "h-4 w-4 text-status-warning-text shrink-0" }), /* @__PURE__ */ I("span", {
|
|
268
|
+
className: "text-xs font-medium text-status-warning-text",
|
|
269
|
+
children: ["Due by ", U(w.dueTime)]
|
|
270
|
+
})]
|
|
271
|
+
})
|
|
272
|
+
})]
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ I("div", {
|
|
275
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
174
276
|
children: [/* @__PURE__ */ I("div", {
|
|
175
|
-
className: "
|
|
176
|
-
children: [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
277
|
+
className: "lg:col-span-2 space-y-6",
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ I("div", {
|
|
280
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-6",
|
|
281
|
+
children: [/* @__PURE__ */ F("h3", {
|
|
282
|
+
className: "text-base font-semibold text-text-primary mb-4",
|
|
283
|
+
children: "Customer Information"
|
|
284
|
+
}), /* @__PURE__ */ I("div", {
|
|
285
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-5",
|
|
286
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
287
|
+
className: "space-y-3",
|
|
288
|
+
children: /* @__PURE__ */ I("div", {
|
|
289
|
+
className: "flex items-center gap-3",
|
|
290
|
+
children: [/* @__PURE__ */ F("div", {
|
|
291
|
+
className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
|
|
292
|
+
children: /* @__PURE__ */ F(N, { className: "h-5 w-5" })
|
|
293
|
+
}), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
294
|
+
className: "text-sm font-medium text-text-primary",
|
|
295
|
+
children: w.customerInfo.name
|
|
296
|
+
}), /* @__PURE__ */ F("p", {
|
|
297
|
+
className: "text-xs text-text-secondary",
|
|
298
|
+
children: w.customerInfo.phone
|
|
299
|
+
})] })]
|
|
300
|
+
})
|
|
301
|
+
}), /* @__PURE__ */ I("div", {
|
|
302
|
+
className: "flex gap-2 mt-4",
|
|
303
|
+
children: [/* @__PURE__ */ I("button", {
|
|
304
|
+
type: "button",
|
|
305
|
+
onClick: X,
|
|
306
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
307
|
+
children: [/* @__PURE__ */ F(T, { className: "h-3.5 w-3.5" }), "Call Customer"]
|
|
308
|
+
}), /* @__PURE__ */ I("button", {
|
|
309
|
+
type: "button",
|
|
310
|
+
onClick: Z,
|
|
311
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
312
|
+
children: [/* @__PURE__ */ F(C, { className: "h-3.5 w-3.5" }), "Navigate"]
|
|
313
|
+
})]
|
|
314
|
+
})] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
315
|
+
className: "text-xs text-text-secondary mb-2",
|
|
316
|
+
children: "Delivery Address"
|
|
317
|
+
}), /* @__PURE__ */ F("div", {
|
|
318
|
+
className: "rounded-md bg-bg-sunken/50 p-3",
|
|
319
|
+
children: /* @__PURE__ */ I("p", {
|
|
320
|
+
className: "text-xs text-text-primary flex items-start gap-2",
|
|
321
|
+
children: [/* @__PURE__ */ F(S, { className: "h-3.5 w-3.5 shrink-0 mt-0.5 text-text-secondary" }), w.customerInfo.address]
|
|
322
|
+
})
|
|
323
|
+
})] })]
|
|
324
|
+
})]
|
|
325
|
+
}),
|
|
326
|
+
w.orderItems.length > 0 && /* @__PURE__ */ I("div", {
|
|
327
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-6",
|
|
328
|
+
children: [/* @__PURE__ */ F("h3", {
|
|
329
|
+
className: "text-base font-semibold text-text-primary mb-3",
|
|
330
|
+
children: "Order Items"
|
|
331
|
+
}), /* @__PURE__ */ F("div", {
|
|
332
|
+
className: "space-y-2",
|
|
333
|
+
children: w.orderItems.map((e, t) => /* @__PURE__ */ F("div", {
|
|
334
|
+
className: "flex items-start justify-between p-3 rounded-md bg-bg-sunken/50",
|
|
335
|
+
children: /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("p", {
|
|
336
|
+
className: "text-sm font-medium text-text-primary",
|
|
337
|
+
children: [
|
|
338
|
+
e.quantity,
|
|
339
|
+
"x ",
|
|
340
|
+
e.name
|
|
341
|
+
]
|
|
342
|
+
}), e.specialInstructions && /* @__PURE__ */ I("p", {
|
|
343
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
344
|
+
children: ["Note: ", e.specialInstructions]
|
|
345
|
+
})] })
|
|
346
|
+
}, t))
|
|
347
|
+
})]
|
|
183
348
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
className: "
|
|
186
|
-
children:
|
|
349
|
+
w.specialInstructions && /* @__PURE__ */ I("div", {
|
|
350
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-6",
|
|
351
|
+
children: [/* @__PURE__ */ F("h3", {
|
|
352
|
+
className: "text-base font-semibold text-text-primary mb-3",
|
|
353
|
+
children: "Special Instructions"
|
|
354
|
+
}), /* @__PURE__ */ F("div", {
|
|
355
|
+
className: "rounded-md bg-status-warning-bg-subtle border border-status-warning-border p-4",
|
|
356
|
+
children: /* @__PURE__ */ I("p", {
|
|
357
|
+
className: "text-sm text-status-warning-text flex items-start gap-2",
|
|
358
|
+
children: [/* @__PURE__ */ F(d, { className: "h-4 w-4 shrink-0 mt-0.5 text-status-warning-text" }), w.specialInstructions]
|
|
359
|
+
})
|
|
360
|
+
})]
|
|
361
|
+
}),
|
|
362
|
+
w.photos && w.photos.length > 0 && /* @__PURE__ */ I("div", {
|
|
363
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-6",
|
|
364
|
+
children: [/* @__PURE__ */ I("h3", {
|
|
365
|
+
className: "text-base font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
366
|
+
children: [/* @__PURE__ */ F(m, { className: "h-4 w-4 text-text-secondary" }), "Reference Photos"]
|
|
367
|
+
}), /* @__PURE__ */ F("div", {
|
|
368
|
+
className: "grid grid-cols-2 md:grid-cols-3 gap-3",
|
|
369
|
+
children: w.photos.map((e, t) => /* @__PURE__ */ F("img", {
|
|
370
|
+
src: e,
|
|
371
|
+
alt: `Reference ${t + 1}`,
|
|
372
|
+
className: "w-full h-32 object-cover rounded-lg border border-border-seam"
|
|
373
|
+
}, t))
|
|
374
|
+
})]
|
|
187
375
|
}),
|
|
188
376
|
/* @__PURE__ */ I("div", {
|
|
189
|
-
className: "
|
|
377
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-6",
|
|
190
378
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
className:
|
|
193
|
-
children: w
|
|
379
|
+
/* @__PURE__ */ I("h3", {
|
|
380
|
+
className: "text-base font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
381
|
+
children: [/* @__PURE__ */ F(A, { className: "h-4 w-4 text-text-secondary" }), "Task Notes"]
|
|
382
|
+
}),
|
|
383
|
+
/* @__PURE__ */ F("textarea", {
|
|
384
|
+
value: G,
|
|
385
|
+
onChange: (e) => K(e.target.value),
|
|
386
|
+
placeholder: "Add your notes about this task...",
|
|
387
|
+
rows: 4,
|
|
388
|
+
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-status-info-border resize-none"
|
|
194
389
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
w.estimatedTime,
|
|
201
|
-
" min"
|
|
202
|
-
]
|
|
390
|
+
/* @__PURE__ */ I("button", {
|
|
391
|
+
type: "button",
|
|
392
|
+
onClick: Q,
|
|
393
|
+
className: "mt-3 inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
394
|
+
children: [/* @__PURE__ */ F(D, { className: "h-3.5 w-3.5" }), "Save Notes"]
|
|
203
395
|
})
|
|
204
396
|
]
|
|
205
397
|
})
|
|
206
|
-
]
|
|
398
|
+
]
|
|
207
399
|
}), /* @__PURE__ */ I("div", {
|
|
208
|
-
className: "
|
|
400
|
+
className: "space-y-6",
|
|
209
401
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
className: "
|
|
212
|
-
children: "
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
className: "text-sm font-medium text-text-primary",
|
|
216
|
-
children: w.assignedBy
|
|
217
|
-
}),
|
|
218
|
-
/* @__PURE__ */ F("p", {
|
|
219
|
-
className: "text-xs text-text-secondary mt-1",
|
|
220
|
-
children: B(w.assignedTime)
|
|
221
|
-
})
|
|
222
|
-
]
|
|
223
|
-
})]
|
|
224
|
-
}), w.dueTime && w.status !== "completed" && /* @__PURE__ */ F("div", {
|
|
225
|
-
className: "rounded-md bg-yellow-500/10 border border-yellow-500/20 p-3",
|
|
226
|
-
children: /* @__PURE__ */ I("div", {
|
|
227
|
-
className: "flex items-center gap-2",
|
|
228
|
-
children: [/* @__PURE__ */ F(j, { className: "h-4 w-4 text-yellow-600 dark:text-yellow-400 shrink-0" }), /* @__PURE__ */ I("span", {
|
|
229
|
-
className: "text-xs font-medium text-yellow-600 dark:text-yellow-400",
|
|
230
|
-
children: ["Due by ", B(w.dueTime)]
|
|
231
|
-
})]
|
|
232
|
-
})
|
|
233
|
-
})]
|
|
234
|
-
}), /* @__PURE__ */ I("div", {
|
|
235
|
-
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
236
|
-
children: [/* @__PURE__ */ I("div", {
|
|
237
|
-
className: "lg:col-span-2 space-y-6",
|
|
238
|
-
children: [
|
|
239
|
-
/* @__PURE__ */ I("div", {
|
|
240
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
241
|
-
children: [/* @__PURE__ */ F("h3", {
|
|
242
|
-
className: "text-base font-semibold text-text-primary mb-4",
|
|
243
|
-
children: "Customer Information"
|
|
244
|
-
}), /* @__PURE__ */ I("div", {
|
|
245
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-5",
|
|
246
|
-
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
|
|
247
|
-
className: "space-y-3",
|
|
248
|
-
children: /* @__PURE__ */ I("div", {
|
|
249
|
-
className: "flex items-center gap-3",
|
|
250
|
-
children: [/* @__PURE__ */ F("div", {
|
|
251
|
-
className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
|
|
252
|
-
children: /* @__PURE__ */ F(N, { className: "h-5 w-5" })
|
|
253
|
-
}), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
254
|
-
className: "text-sm font-medium text-text-primary",
|
|
255
|
-
children: w.customerInfo.name
|
|
256
|
-
}), /* @__PURE__ */ F("p", {
|
|
257
|
-
className: "text-xs text-text-secondary",
|
|
258
|
-
children: w.customerInfo.phone
|
|
259
|
-
})] })]
|
|
260
|
-
})
|
|
402
|
+
/* @__PURE__ */ I("div", {
|
|
403
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-5",
|
|
404
|
+
children: [/* @__PURE__ */ F("h3", {
|
|
405
|
+
className: "text-base font-semibold text-text-primary mb-3",
|
|
406
|
+
children: "Task Details"
|
|
261
407
|
}), /* @__PURE__ */ I("div", {
|
|
262
|
-
className: "
|
|
263
|
-
children: [
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
408
|
+
className: "space-y-3",
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ I("div", {
|
|
411
|
+
className: "flex items-center gap-2",
|
|
412
|
+
children: [/* @__PURE__ */ F(y, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
413
|
+
className: "text-xs text-text-secondary",
|
|
414
|
+
children: "Order ID"
|
|
415
|
+
}), /* @__PURE__ */ F("p", {
|
|
416
|
+
className: "text-sm font-medium font-mono text-text-primary",
|
|
417
|
+
children: w.orderId
|
|
418
|
+
})] })]
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ I("div", {
|
|
421
|
+
className: "flex items-center gap-2",
|
|
422
|
+
children: [/* @__PURE__ */ F(O, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
423
|
+
className: "text-xs text-text-secondary",
|
|
424
|
+
children: "Cart"
|
|
425
|
+
}), /* @__PURE__ */ F("p", {
|
|
426
|
+
className: "text-sm font-medium text-text-primary",
|
|
427
|
+
children: w.cartName
|
|
428
|
+
})] })]
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ I("div", {
|
|
431
|
+
className: "flex items-center gap-2",
|
|
432
|
+
children: [/* @__PURE__ */ F(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
433
|
+
className: "text-xs text-text-secondary",
|
|
434
|
+
children: "Due At"
|
|
435
|
+
}), /* @__PURE__ */ F("p", {
|
|
436
|
+
className: "text-sm text-text-primary",
|
|
437
|
+
children: o(w.dueTime)
|
|
438
|
+
})] })]
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ I("div", {
|
|
441
|
+
className: "flex items-center gap-2",
|
|
442
|
+
children: [/* @__PURE__ */ F(b, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
443
|
+
className: "text-xs text-text-secondary",
|
|
444
|
+
children: "Earnings"
|
|
445
|
+
}), /* @__PURE__ */ F("p", {
|
|
446
|
+
className: "text-sm font-medium text-status-success-text",
|
|
447
|
+
children: a(w.earnings, { minimumFractionDigits: 0 })
|
|
448
|
+
})] })]
|
|
449
|
+
}),
|
|
450
|
+
w.distance != null && /* @__PURE__ */ I("div", {
|
|
451
|
+
className: "flex items-center gap-2",
|
|
452
|
+
children: [/* @__PURE__ */ F(C, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
453
|
+
className: "text-xs text-text-secondary",
|
|
454
|
+
children: "Distance"
|
|
455
|
+
}), /* @__PURE__ */ I("p", {
|
|
456
|
+
className: "text-sm text-text-primary",
|
|
457
|
+
children: [w.distance, " km"]
|
|
458
|
+
})] })]
|
|
459
|
+
}),
|
|
460
|
+
/* @__PURE__ */ I("div", {
|
|
461
|
+
className: "flex items-center gap-2",
|
|
462
|
+
children: [/* @__PURE__ */ F(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
463
|
+
className: "text-xs text-text-secondary",
|
|
464
|
+
children: "Assigned At"
|
|
465
|
+
}), /* @__PURE__ */ F("p", {
|
|
466
|
+
className: "text-sm text-text-primary",
|
|
467
|
+
children: o(w.assignedTime)
|
|
468
|
+
})] })]
|
|
469
|
+
})
|
|
470
|
+
]
|
|
471
|
+
})]
|
|
472
|
+
}),
|
|
473
|
+
/* @__PURE__ */ I("div", {
|
|
474
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-5",
|
|
475
|
+
children: [/* @__PURE__ */ F("h3", {
|
|
476
|
+
className: "text-base font-semibold text-text-primary mb-4",
|
|
477
|
+
children: "Status Timeline"
|
|
277
478
|
}), /* @__PURE__ */ F("div", {
|
|
278
|
-
className: "
|
|
279
|
-
children:
|
|
280
|
-
|
|
281
|
-
|
|
479
|
+
className: "relative",
|
|
480
|
+
children: $.map((e, n) => {
|
|
481
|
+
let r = n === $.length - 1, i = e.completed ? h : _;
|
|
482
|
+
return /* @__PURE__ */ I("div", {
|
|
483
|
+
className: "flex gap-3",
|
|
484
|
+
children: [/* @__PURE__ */ I("div", {
|
|
485
|
+
className: "flex flex-col items-center",
|
|
486
|
+
children: [/* @__PURE__ */ F("div", {
|
|
487
|
+
className: t("flex h-7 w-7 shrink-0 items-center justify-center rounded-full", e.completed ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-secondary"),
|
|
488
|
+
children: /* @__PURE__ */ F(i, { className: "h-3.5 w-3.5" })
|
|
489
|
+
}), !r && /* @__PURE__ */ F("div", { className: t("w-0.5 flex-1 my-1", e.completed ? "bg-status-success-bg-subtle" : "bg-border") })]
|
|
490
|
+
}), /* @__PURE__ */ I("div", {
|
|
491
|
+
className: t("pb-5", r && "pb-0"),
|
|
492
|
+
children: [/* @__PURE__ */ F("p", {
|
|
493
|
+
className: "text-sm font-medium text-text-primary",
|
|
494
|
+
children: e.label
|
|
495
|
+
}), /* @__PURE__ */ F("p", {
|
|
496
|
+
className: "mt-0.5 text-xs text-text-secondary",
|
|
497
|
+
children: e.timestamp ? o(e.timestamp) : "Pending"
|
|
498
|
+
})]
|
|
499
|
+
})]
|
|
500
|
+
}, e.status);
|
|
282
501
|
})
|
|
283
|
-
})]
|
|
284
|
-
})
|
|
285
|
-
|
|
286
|
-
w.orderItems.length > 0 && /* @__PURE__ */ I("div", {
|
|
287
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
288
|
-
children: [/* @__PURE__ */ F("h3", {
|
|
289
|
-
className: "text-base font-semibold text-text-primary mb-3",
|
|
290
|
-
children: "Order Items"
|
|
291
|
-
}), /* @__PURE__ */ F("div", {
|
|
292
|
-
className: "space-y-2",
|
|
293
|
-
children: w.orderItems.map((e, t) => /* @__PURE__ */ F("div", {
|
|
294
|
-
className: "flex items-start justify-between p-3 rounded-md bg-bg-sunken/50",
|
|
295
|
-
children: /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("p", {
|
|
296
|
-
className: "text-sm font-medium text-text-primary",
|
|
297
|
-
children: [
|
|
298
|
-
e.quantity,
|
|
299
|
-
"x ",
|
|
300
|
-
e.name
|
|
301
|
-
]
|
|
302
|
-
}), e.specialInstructions && /* @__PURE__ */ I("p", {
|
|
303
|
-
className: "text-xs text-text-secondary mt-0.5",
|
|
304
|
-
children: ["Note: ", e.specialInstructions]
|
|
305
|
-
})] })
|
|
306
|
-
}, t))
|
|
307
|
-
})]
|
|
308
|
-
}),
|
|
309
|
-
w.specialInstructions && /* @__PURE__ */ I("div", {
|
|
310
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
311
|
-
children: [/* @__PURE__ */ F("h3", {
|
|
312
|
-
className: "text-base font-semibold text-text-primary mb-3",
|
|
313
|
-
children: "Special Instructions"
|
|
314
|
-
}), /* @__PURE__ */ F("div", {
|
|
315
|
-
className: "rounded-md bg-yellow-500/10 border border-yellow-500/20 p-4",
|
|
316
|
-
children: /* @__PURE__ */ I("p", {
|
|
317
|
-
className: "text-sm text-yellow-700 dark:text-yellow-300 flex items-start gap-2",
|
|
318
|
-
children: [/* @__PURE__ */ F(d, { className: "h-4 w-4 shrink-0 mt-0.5 text-yellow-600 dark:text-yellow-400" }), w.specialInstructions]
|
|
319
|
-
})
|
|
320
|
-
})]
|
|
321
|
-
}),
|
|
322
|
-
w.photos && w.photos.length > 0 && /* @__PURE__ */ I("div", {
|
|
323
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
324
|
-
children: [/* @__PURE__ */ I("h3", {
|
|
325
|
-
className: "text-base font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
326
|
-
children: [/* @__PURE__ */ F(m, { className: "h-4 w-4 text-text-secondary" }), "Reference Photos"]
|
|
327
|
-
}), /* @__PURE__ */ F("div", {
|
|
328
|
-
className: "grid grid-cols-2 md:grid-cols-3 gap-3",
|
|
329
|
-
children: w.photos.map((e, t) => /* @__PURE__ */ F("img", {
|
|
330
|
-
src: e,
|
|
331
|
-
alt: `Reference ${t + 1}`,
|
|
332
|
-
className: "w-full h-32 object-cover rounded-lg border border-border-subtle"
|
|
333
|
-
}, t))
|
|
334
|
-
})]
|
|
335
|
-
}),
|
|
336
|
-
/* @__PURE__ */ I("div", {
|
|
337
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
338
|
-
children: [
|
|
339
|
-
/* @__PURE__ */ I("h3", {
|
|
340
|
-
className: "text-base font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
341
|
-
children: [/* @__PURE__ */ F(A, { className: "h-4 w-4 text-text-secondary" }), "Task Notes"]
|
|
342
|
-
}),
|
|
343
|
-
/* @__PURE__ */ F("textarea", {
|
|
344
|
-
value: H,
|
|
345
|
-
onChange: (e) => U(e.target.value),
|
|
346
|
-
placeholder: "Add your notes about this task...",
|
|
347
|
-
rows: 4,
|
|
348
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-blue-500/40 resize-none"
|
|
349
|
-
}),
|
|
350
|
-
/* @__PURE__ */ I("button", {
|
|
351
|
-
type: "button",
|
|
352
|
-
onClick: Y,
|
|
353
|
-
className: "mt-3 inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
354
|
-
children: [/* @__PURE__ */ F(D, { className: "h-3.5 w-3.5" }), "Save Notes"]
|
|
355
|
-
})
|
|
356
|
-
]
|
|
357
|
-
})
|
|
358
|
-
]
|
|
359
|
-
}), /* @__PURE__ */ I("div", {
|
|
360
|
-
className: "space-y-6",
|
|
361
|
-
children: [
|
|
362
|
-
/* @__PURE__ */ I("div", {
|
|
363
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
364
|
-
children: [/* @__PURE__ */ F("h3", {
|
|
365
|
-
className: "text-base font-semibold text-text-primary mb-3",
|
|
366
|
-
children: "Task Details"
|
|
367
|
-
}), /* @__PURE__ */ I("div", {
|
|
502
|
+
})]
|
|
503
|
+
}),
|
|
504
|
+
/* @__PURE__ */ I("div", {
|
|
368
505
|
className: "space-y-3",
|
|
369
506
|
children: [
|
|
370
|
-
/* @__PURE__ */ I("
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}), /* @__PURE__ */ F("p", {
|
|
376
|
-
className: "text-sm font-medium font-mono text-text-primary",
|
|
377
|
-
children: w.orderId
|
|
378
|
-
})] })]
|
|
379
|
-
}),
|
|
380
|
-
/* @__PURE__ */ I("div", {
|
|
381
|
-
className: "flex items-center gap-2",
|
|
382
|
-
children: [/* @__PURE__ */ F(O, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
383
|
-
className: "text-xs text-text-secondary",
|
|
384
|
-
children: "Cart"
|
|
385
|
-
}), /* @__PURE__ */ F("p", {
|
|
386
|
-
className: "text-sm font-medium text-text-primary",
|
|
387
|
-
children: w.cartName
|
|
388
|
-
})] })]
|
|
389
|
-
}),
|
|
390
|
-
/* @__PURE__ */ I("div", {
|
|
391
|
-
className: "flex items-center gap-2",
|
|
392
|
-
children: [/* @__PURE__ */ F(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
393
|
-
className: "text-xs text-text-secondary",
|
|
394
|
-
children: "Due At"
|
|
395
|
-
}), /* @__PURE__ */ F("p", {
|
|
396
|
-
className: "text-sm text-text-primary",
|
|
397
|
-
children: o(w.dueTime)
|
|
398
|
-
})] })]
|
|
399
|
-
}),
|
|
400
|
-
/* @__PURE__ */ I("div", {
|
|
401
|
-
className: "flex items-center gap-2",
|
|
402
|
-
children: [/* @__PURE__ */ F(b, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
403
|
-
className: "text-xs text-text-secondary",
|
|
404
|
-
children: "Earnings"
|
|
405
|
-
}), /* @__PURE__ */ F("p", {
|
|
406
|
-
className: "text-sm font-medium text-green-600 dark:text-green-400",
|
|
407
|
-
children: a(w.earnings, { minimumFractionDigits: 0 })
|
|
408
|
-
})] })]
|
|
507
|
+
w.status === "pending" && /* @__PURE__ */ I("button", {
|
|
508
|
+
type: "button",
|
|
509
|
+
onClick: J,
|
|
510
|
+
className: "w-full inline-flex items-center justify-center gap-2 rounded-lg bg-status-info-bg-subtle px-4 py-3 text-sm font-medium text-status-info-text hover:bg-status-info-bg-subtle transition-colors",
|
|
511
|
+
children: [/* @__PURE__ */ F(E, { className: "h-4 w-4" }), "Start Task"]
|
|
409
512
|
}),
|
|
410
|
-
w.
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}), /* @__PURE__ */ I("p", {
|
|
416
|
-
className: "text-sm text-text-primary",
|
|
417
|
-
children: [w.distance, " km"]
|
|
418
|
-
})] })]
|
|
513
|
+
w.status === "in_progress" && /* @__PURE__ */ I("button", {
|
|
514
|
+
type: "button",
|
|
515
|
+
onClick: Y,
|
|
516
|
+
className: "w-full inline-flex items-center justify-center gap-2 rounded-lg bg-status-success-bg-subtle px-4 py-3 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
|
|
517
|
+
children: [/* @__PURE__ */ F(h, { className: "h-4 w-4" }), "Complete Task"]
|
|
419
518
|
}),
|
|
420
|
-
/* @__PURE__ */ I("
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}), /* @__PURE__ */ F("p", {
|
|
426
|
-
className: "text-sm text-text-primary",
|
|
427
|
-
children: o(w.assignedTime)
|
|
428
|
-
})] })]
|
|
519
|
+
/* @__PURE__ */ I("button", {
|
|
520
|
+
type: "button",
|
|
521
|
+
onClick: () => g("/worker/orders"),
|
|
522
|
+
className: "w-full inline-flex items-center justify-center gap-2 rounded-lg bg-accent px-4 py-3 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
523
|
+
children: [/* @__PURE__ */ F(f, { className: "h-4 w-4" }), "Back to Tasks"]
|
|
429
524
|
})
|
|
430
525
|
]
|
|
431
|
-
})
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
className: "text-base font-semibold text-text-primary mb-4",
|
|
437
|
-
children: "Status Timeline"
|
|
438
|
-
}), /* @__PURE__ */ F("div", {
|
|
439
|
-
className: "relative",
|
|
440
|
-
children: X.map((e, n) => {
|
|
441
|
-
let r = n === X.length - 1, i = e.completed ? h : _;
|
|
442
|
-
return /* @__PURE__ */ I("div", {
|
|
443
|
-
className: "flex gap-3",
|
|
444
|
-
children: [/* @__PURE__ */ I("div", {
|
|
445
|
-
className: "flex flex-col items-center",
|
|
446
|
-
children: [/* @__PURE__ */ F("div", {
|
|
447
|
-
className: t("flex h-7 w-7 shrink-0 items-center justify-center rounded-full", e.completed ? "bg-green-500/10 text-green-600 dark:text-green-400" : "bg-bg-sunken text-text-secondary"),
|
|
448
|
-
children: /* @__PURE__ */ F(i, { className: "h-3.5 w-3.5" })
|
|
449
|
-
}), !r && /* @__PURE__ */ F("div", { className: t("w-0.5 flex-1 my-1", e.completed ? "bg-green-500/30" : "bg-border") })]
|
|
450
|
-
}), /* @__PURE__ */ I("div", {
|
|
451
|
-
className: t("pb-5", r && "pb-0"),
|
|
452
|
-
children: [/* @__PURE__ */ F("p", {
|
|
453
|
-
className: "text-sm font-medium text-text-primary",
|
|
454
|
-
children: e.label
|
|
455
|
-
}), /* @__PURE__ */ F("p", {
|
|
456
|
-
className: "mt-0.5 text-xs text-text-secondary",
|
|
457
|
-
children: e.timestamp ? o(e.timestamp) : "Pending"
|
|
458
|
-
})]
|
|
459
|
-
})]
|
|
460
|
-
}, e.status);
|
|
461
|
-
})
|
|
462
|
-
})]
|
|
463
|
-
}),
|
|
464
|
-
/* @__PURE__ */ I("div", {
|
|
465
|
-
className: "space-y-3",
|
|
466
|
-
children: [
|
|
467
|
-
w.status === "pending" && /* @__PURE__ */ I("button", {
|
|
468
|
-
type: "button",
|
|
469
|
-
onClick: G,
|
|
470
|
-
className: "w-full inline-flex items-center justify-center gap-2 rounded-lg bg-blue-500/10 px-4 py-3 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-500/20 transition-colors",
|
|
471
|
-
children: [/* @__PURE__ */ F(E, { className: "h-4 w-4" }), "Start Task"]
|
|
472
|
-
}),
|
|
473
|
-
w.status === "in_progress" && /* @__PURE__ */ I("button", {
|
|
474
|
-
type: "button",
|
|
475
|
-
onClick: K,
|
|
476
|
-
className: "w-full inline-flex items-center justify-center gap-2 rounded-lg bg-green-500/10 px-4 py-3 text-sm font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors",
|
|
477
|
-
children: [/* @__PURE__ */ F(h, { className: "h-4 w-4" }), "Complete Task"]
|
|
478
|
-
}),
|
|
479
|
-
/* @__PURE__ */ I("button", {
|
|
480
|
-
type: "button",
|
|
481
|
-
onClick: () => g("/worker/orders"),
|
|
482
|
-
className: "w-full inline-flex items-center justify-center gap-2 rounded-lg bg-accent px-4 py-3 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
483
|
-
children: [/* @__PURE__ */ F(f, { className: "h-4 w-4" }), "Back to Tasks"]
|
|
484
|
-
})
|
|
485
|
-
]
|
|
486
|
-
})
|
|
487
|
-
]
|
|
488
|
-
})]
|
|
489
|
-
})]
|
|
526
|
+
})
|
|
527
|
+
]
|
|
528
|
+
})]
|
|
529
|
+
})
|
|
530
|
+
]
|
|
490
531
|
})
|
|
491
532
|
});
|
|
492
533
|
}
|
|
493
534
|
//#endregion
|
|
494
|
-
export {
|
|
535
|
+
export { W as TaskDetailsPage };
|
|
495
536
|
|
|
496
537
|
//# sourceMappingURL=TaskDetailsPage.js.map
|