@burdenoff/microfe-subscriberbot 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/subscriberbot/components/EmptyState.js +17 -10
- package/dist/subscriberbot/components/EmptyState.js.map +1 -1
- package/dist/subscriberbot/components/InvestmentCard.js +23 -22
- package/dist/subscriberbot/components/InvestmentCard.js.map +1 -1
- package/dist/subscriberbot/components/MetricsCard.js +15 -12
- package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
- package/dist/subscriberbot/components/PageLayout.js +27 -15
- package/dist/subscriberbot/components/PageLayout.js.map +1 -1
- package/dist/subscriberbot/components/RatingDisplay.js +3 -3
- package/dist/subscriberbot/components/RatingDisplay.js.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.js +25 -13
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
- package/dist/subscriberbot/pages/HomePage.js +72 -63
- package/dist/subscriberbot/pages/HomePage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +106 -100
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminDashboard.js +125 -85
- package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +51 -45
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +246 -241
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js +131 -129
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +247 -242
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/CartManagementPage.js +307 -302
- package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/UserManagementPage.js +308 -303
- package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +89 -84
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +269 -264
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +269 -227
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +191 -186
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +168 -166
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +344 -347
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +270 -272
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +294 -289
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/HelpSupportPage.js +156 -158
- package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js +94 -87
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/SettingsPage.js +749 -740
- package/dist/subscriberbot/pages/common/SettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +357 -324
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CartDetailPage.js +281 -247
- package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +106 -98
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CheckoutPage.js +235 -238
- package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js +426 -390
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +488 -479
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +522 -512
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/FavoritesPage.js +73 -66
- package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +75 -67
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +82 -76
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +100 -93
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/ReviewsPage.js +97 -90
- package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +86 -79
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +330 -293
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +269 -261
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +97 -91
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js +354 -322
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +118 -111
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +75 -69
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +435 -430
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +328 -289
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js +135 -103
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +120 -114
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +125 -120
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +354 -344
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -7,8 +7,9 @@ import { formatCurrency as a } from "../../utils/formatters.js";
|
|
|
7
7
|
import { useCallback as o, useEffect as s, useState as c } from "react";
|
|
8
8
|
import { AlertTriangle as l, ArrowRight as u, CheckCircle2 as d, ChefHat as f, ClipboardList as p, CreditCard as m, Loader2 as h, MapPin as g, Navigation as _, Package as v, Phone as y, PlayCircle as b, ShoppingBag as x, Star as S, Truck as C } from "lucide-react";
|
|
9
9
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
10
|
+
import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
|
|
10
11
|
//#region src/subscriberbot/pages/worker/WorkerOrdersPage.tsx
|
|
11
|
-
var
|
|
12
|
+
var O = [
|
|
12
13
|
{
|
|
13
14
|
id: "task-001",
|
|
14
15
|
orderId: "ORD-2024-001",
|
|
@@ -124,26 +125,26 @@ var E = [
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
];
|
|
127
|
-
function
|
|
128
|
+
function k(e) {
|
|
128
129
|
let t = /* @__PURE__ */ new Date(), n = new Date(e), r = Math.floor((n.getTime() - t.getTime()) / (1e3 * 60));
|
|
129
130
|
return r < 0 ? "Overdue" : r < 60 ? `${r} min` : `${Math.floor(r / 60)}h ${r % 60}m`;
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
+
function A(e) {
|
|
132
133
|
switch (e) {
|
|
133
134
|
case "delivery": return {
|
|
134
135
|
icon: C,
|
|
135
136
|
label: "Delivery",
|
|
136
|
-
style: "bg-purple-
|
|
137
|
+
style: "bg-accent-purple-subtle text-accent-purple"
|
|
137
138
|
};
|
|
138
139
|
case "pickup": return {
|
|
139
140
|
icon: x,
|
|
140
141
|
label: "Pickup",
|
|
141
|
-
style: "bg-
|
|
142
|
+
style: "bg-status-info-bg/20 text-status-info-text"
|
|
142
143
|
};
|
|
143
144
|
case "preparation": return {
|
|
144
145
|
icon: f,
|
|
145
146
|
label: "Preparation",
|
|
146
|
-
style: "bg-
|
|
147
|
+
style: "bg-status-success-bg/20 text-status-success-text"
|
|
147
148
|
};
|
|
148
149
|
default: return {
|
|
149
150
|
icon: v,
|
|
@@ -152,44 +153,44 @@ function O(e) {
|
|
|
152
153
|
};
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
+
function j(e) {
|
|
156
157
|
switch (e) {
|
|
157
|
-
case "urgent": return "bg-
|
|
158
|
-
case "high": return "bg-
|
|
159
|
-
case "medium": return "bg-
|
|
160
|
-
case "low": return "bg-
|
|
158
|
+
case "urgent": return "bg-status-error-bg/20 text-status-error-text";
|
|
159
|
+
case "high": return "bg-status-warning-bg/20 text-status-warning-text";
|
|
160
|
+
case "medium": return "bg-status-warning-bg/20 text-status-warning-text";
|
|
161
|
+
case "low": return "bg-status-success-bg/20 text-status-success-text";
|
|
161
162
|
default: return "bg-secondary text-secondary-foreground";
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
|
-
var
|
|
165
|
-
let { navigateTo: f } = e(), [
|
|
165
|
+
var M = () => {
|
|
166
|
+
let { navigateTo: f } = e(), [x, C] = c(!0), [M, N] = c([]), [P, F] = c(null), [I, L] = c({
|
|
166
167
|
status: "",
|
|
167
168
|
type: "",
|
|
168
169
|
priority: "",
|
|
169
170
|
sortBy: "priority"
|
|
170
|
-
}), [
|
|
171
|
+
}), [R, z] = c({
|
|
171
172
|
totalTasks: 0,
|
|
172
173
|
completedToday: 0,
|
|
173
174
|
pendingTasks: 0,
|
|
174
175
|
averageTime: 0,
|
|
175
176
|
earnings: 0,
|
|
176
177
|
rating: 4.8
|
|
177
|
-
}), [,
|
|
178
|
+
}), [, B] = c(0);
|
|
178
179
|
s(() => {
|
|
179
|
-
let e = setInterval(() =>
|
|
180
|
+
let e = setInterval(() => B((e) => e + 1), 6e4);
|
|
180
181
|
return () => clearInterval(e);
|
|
181
182
|
}, []);
|
|
182
|
-
let
|
|
183
|
-
|
|
184
|
-
let e = [...
|
|
185
|
-
|
|
183
|
+
let V = o(() => {
|
|
184
|
+
C(!0), setTimeout(() => {
|
|
185
|
+
let e = [...O];
|
|
186
|
+
I.status && (e = e.filter((e) => e.status === I.status)), I.type && (e = e.filter((e) => e.type === I.type)), I.priority && (e = e.filter((e) => e.priority === I.priority));
|
|
186
187
|
let t = {
|
|
187
188
|
urgent: 0,
|
|
188
189
|
high: 1,
|
|
189
190
|
medium: 2,
|
|
190
191
|
low: 3
|
|
191
192
|
};
|
|
192
|
-
switch (
|
|
193
|
+
switch (I.sortBy) {
|
|
193
194
|
case "priority":
|
|
194
195
|
e.sort((e, n) => (t[e.priority] ?? 4) - (t[n.priority] ?? 4));
|
|
195
196
|
break;
|
|
@@ -200,39 +201,39 @@ var A = () => {
|
|
|
200
201
|
e.sort((e, t) => (e.distance ?? 999) - (t.distance ?? 999));
|
|
201
202
|
break;
|
|
202
203
|
}
|
|
203
|
-
|
|
204
|
+
N(e), F(O.find((e) => e.status === "in_progress") ?? null), z({
|
|
204
205
|
totalTasks: 45,
|
|
205
206
|
completedToday: 12,
|
|
206
207
|
pendingTasks: 3,
|
|
207
208
|
averageTime: 22,
|
|
208
209
|
earnings: 2450,
|
|
209
210
|
rating: 4.8
|
|
210
|
-
}),
|
|
211
|
+
}), C(!1);
|
|
211
212
|
}, 600);
|
|
212
|
-
}, [
|
|
213
|
+
}, [I]);
|
|
213
214
|
s(() => {
|
|
214
|
-
|
|
215
|
-
}, [
|
|
216
|
-
let
|
|
217
|
-
|
|
215
|
+
V();
|
|
216
|
+
}, [V]);
|
|
217
|
+
let H = (e, t) => {
|
|
218
|
+
L((n) => ({
|
|
218
219
|
...n,
|
|
219
220
|
[e]: t
|
|
220
221
|
}));
|
|
221
|
-
}, B = (e) => {
|
|
222
|
-
let t = E.find((t) => t.id === e);
|
|
223
|
-
t && (t.status = "in_progress", M(t), R());
|
|
224
|
-
}, V = (e) => {
|
|
225
|
-
let t = E.find((t) => t.id === e);
|
|
226
|
-
t && (t.status = "completed"), M(null), R(), alert("Task completed successfully");
|
|
227
|
-
}, H = (e) => {
|
|
228
|
-
window.location.href = `tel:${e.replace(/\s/g, "")}`;
|
|
229
222
|
}, U = (e) => {
|
|
223
|
+
let t = O.find((t) => t.id === e);
|
|
224
|
+
t && (t.status = "in_progress", F(t), V());
|
|
225
|
+
}, W = (e) => {
|
|
226
|
+
let t = O.find((t) => t.id === e);
|
|
227
|
+
t && (t.status = "completed"), F(null), V(), alert("Task completed successfully");
|
|
228
|
+
}, G = (e) => {
|
|
229
|
+
window.location.href = `tel:${e.replace(/\s/g, "")}`;
|
|
230
|
+
}, K = (e) => {
|
|
230
231
|
if (e.address) {
|
|
231
232
|
let t = encodeURIComponent(`${e.address.addressLine1}, ${e.address.city}`);
|
|
232
233
|
window.open(`https://maps.google.com?q=${t}`, "_blank");
|
|
233
234
|
}
|
|
234
235
|
};
|
|
235
|
-
return
|
|
236
|
+
return x ? /* @__PURE__ */ w(n, {
|
|
236
237
|
title: "My Orders",
|
|
237
238
|
description: "Manage your assigned orders",
|
|
238
239
|
children: /* @__PURE__ */ w("div", {
|
|
@@ -251,78 +252,82 @@ var A = () => {
|
|
|
251
252
|
children: /* @__PURE__ */ T("div", {
|
|
252
253
|
className: "space-y-6",
|
|
253
254
|
children: [
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ w(D, {
|
|
256
|
+
icon: /* @__PURE__ */ w(v, { className: "h-4 w-4" }),
|
|
257
|
+
children: "Every order assigned to you in one queue. Pick up new tasks, update their status as you work, and mark them done to log your earnings. The stats up top show today's progress — tasks completed, time per order, earnings and your rating — so you always know how your shift is going."
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ T(E, {
|
|
255
260
|
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
|
|
256
261
|
children: [
|
|
257
262
|
/* @__PURE__ */ T("div", {
|
|
258
|
-
className: "rounded-lg border border-border-
|
|
263
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
259
264
|
children: [/* @__PURE__ */ w("p", {
|
|
260
265
|
className: "text-xs text-text-secondary",
|
|
261
266
|
children: "Today's Tasks"
|
|
262
267
|
}), /* @__PURE__ */ w("p", {
|
|
263
268
|
className: "text-2xl font-bold text-text-primary",
|
|
264
|
-
children:
|
|
269
|
+
children: R.totalTasks
|
|
265
270
|
})]
|
|
266
271
|
}),
|
|
267
272
|
/* @__PURE__ */ T("div", {
|
|
268
|
-
className: "rounded-lg border border-
|
|
273
|
+
className: "rounded-lg border border-status-success-border/20 bg-status-success-bg/5 p-4 shadow-sm",
|
|
269
274
|
children: [/* @__PURE__ */ w("p", {
|
|
270
|
-
className: "text-xs text-
|
|
275
|
+
className: "text-xs text-status-success-text",
|
|
271
276
|
children: "Completed"
|
|
272
277
|
}), /* @__PURE__ */ w("p", {
|
|
273
|
-
className: "text-2xl font-bold text-
|
|
274
|
-
children:
|
|
278
|
+
className: "text-2xl font-bold text-status-success-text",
|
|
279
|
+
children: R.completedToday
|
|
275
280
|
})]
|
|
276
281
|
}),
|
|
277
282
|
/* @__PURE__ */ T("div", {
|
|
278
|
-
className: "rounded-lg border border-
|
|
283
|
+
className: "rounded-lg border border-status-warning-border/20 bg-status-warning-bg/5 p-4 shadow-sm",
|
|
279
284
|
children: [/* @__PURE__ */ w("p", {
|
|
280
|
-
className: "text-xs text-
|
|
285
|
+
className: "text-xs text-status-warning-text",
|
|
281
286
|
children: "Pending"
|
|
282
287
|
}), /* @__PURE__ */ w("p", {
|
|
283
|
-
className: "text-2xl font-bold text-
|
|
284
|
-
children:
|
|
288
|
+
className: "text-2xl font-bold text-status-warning-text",
|
|
289
|
+
children: R.pendingTasks
|
|
285
290
|
})]
|
|
286
291
|
}),
|
|
287
292
|
/* @__PURE__ */ T("div", {
|
|
288
|
-
className: "rounded-lg border border-border-
|
|
293
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
289
294
|
children: [/* @__PURE__ */ w("p", {
|
|
290
295
|
className: "text-xs text-text-secondary",
|
|
291
296
|
children: "Avg Time"
|
|
292
297
|
}), /* @__PURE__ */ T("p", {
|
|
293
298
|
className: "text-2xl font-bold text-text-primary",
|
|
294
|
-
children: [
|
|
299
|
+
children: [R.averageTime, " min"]
|
|
295
300
|
})]
|
|
296
301
|
}),
|
|
297
302
|
/* @__PURE__ */ T("div", {
|
|
298
|
-
className: "rounded-lg border border-border-
|
|
303
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
299
304
|
children: [/* @__PURE__ */ w("p", {
|
|
300
305
|
className: "text-xs text-text-secondary",
|
|
301
306
|
children: "Today's Earnings"
|
|
302
307
|
}), /* @__PURE__ */ w("p", {
|
|
303
308
|
className: "text-2xl font-bold text-text-primary",
|
|
304
|
-
children: a(
|
|
309
|
+
children: a(R.earnings, { minimumFractionDigits: 0 })
|
|
305
310
|
})]
|
|
306
311
|
}),
|
|
307
312
|
/* @__PURE__ */ T("div", {
|
|
308
|
-
className: "rounded-lg border border-border-
|
|
313
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
309
314
|
children: [/* @__PURE__ */ w("p", {
|
|
310
315
|
className: "text-xs text-text-secondary",
|
|
311
316
|
children: "Rating"
|
|
312
317
|
}), /* @__PURE__ */ T("p", {
|
|
313
318
|
className: "text-2xl font-bold text-text-primary flex items-center gap-1",
|
|
314
|
-
children: [/* @__PURE__ */ w(S, { className: "h-4 w-4 fill-
|
|
319
|
+
children: [/* @__PURE__ */ w(S, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), R.rating]
|
|
315
320
|
})]
|
|
316
321
|
})
|
|
317
322
|
]
|
|
318
323
|
}),
|
|
319
|
-
|
|
320
|
-
className: "rounded-lg border-2 border-
|
|
324
|
+
P && /* @__PURE__ */ T("div", {
|
|
325
|
+
className: "rounded-lg border-2 border-status-info-border/30 bg-status-info-bg/5 p-5",
|
|
321
326
|
children: [/* @__PURE__ */ w("h2", {
|
|
322
|
-
className: "text-base font-semibold text-
|
|
327
|
+
className: "text-base font-semibold text-status-info-text mb-4",
|
|
323
328
|
children: "Current Task"
|
|
324
329
|
}), /* @__PURE__ */ T("div", {
|
|
325
|
-
className: "rounded-lg border border-border-
|
|
330
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
326
331
|
children: [/* @__PURE__ */ T("div", {
|
|
327
332
|
className: "flex items-center justify-between mb-4",
|
|
328
333
|
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
|
|
@@ -330,35 +335,35 @@ var A = () => {
|
|
|
330
335
|
children: [
|
|
331
336
|
/* @__PURE__ */ T("h3", {
|
|
332
337
|
className: "text-sm font-semibold text-text-primary",
|
|
333
|
-
children: ["Order #",
|
|
338
|
+
children: ["Order #", P.orderId]
|
|
334
339
|
}),
|
|
335
340
|
(() => {
|
|
336
|
-
let e =
|
|
341
|
+
let e = A(P.type), n = e.icon;
|
|
337
342
|
return /* @__PURE__ */ T("span", {
|
|
338
343
|
className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium", e.style),
|
|
339
344
|
children: [/* @__PURE__ */ w(n, { className: "h-3 w-3" }), e.label]
|
|
340
345
|
});
|
|
341
346
|
})(),
|
|
342
347
|
/* @__PURE__ */ w("span", {
|
|
343
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize",
|
|
344
|
-
children:
|
|
348
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", j(P.priority)),
|
|
349
|
+
children: P.priority
|
|
345
350
|
})
|
|
346
351
|
]
|
|
347
352
|
}), /* @__PURE__ */ w("p", {
|
|
348
353
|
className: "text-xs text-text-secondary mt-1",
|
|
349
|
-
children:
|
|
354
|
+
children: P.cartName
|
|
350
355
|
})] }), /* @__PURE__ */ T("div", {
|
|
351
356
|
className: "text-right",
|
|
352
357
|
children: [/* @__PURE__ */ w("p", {
|
|
353
|
-
className: "text-xl font-bold text-
|
|
354
|
-
children:
|
|
358
|
+
className: "text-xl font-bold text-status-info-text",
|
|
359
|
+
children: k(P.estimatedTime)
|
|
355
360
|
}), /* @__PURE__ */ w("p", {
|
|
356
361
|
className: "text-xs text-text-secondary",
|
|
357
362
|
children: "Time remaining"
|
|
358
363
|
})]
|
|
359
364
|
})]
|
|
360
365
|
}), /* @__PURE__ */ T("div", {
|
|
361
|
-
className: "border-t border-border-
|
|
366
|
+
className: "border-t border-border-seam pt-4",
|
|
362
367
|
children: [
|
|
363
368
|
/* @__PURE__ */ T("div", {
|
|
364
369
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
@@ -369,14 +374,14 @@ var A = () => {
|
|
|
369
374
|
}),
|
|
370
375
|
/* @__PURE__ */ w("p", {
|
|
371
376
|
className: "text-sm font-medium text-text-primary",
|
|
372
|
-
children:
|
|
377
|
+
children: P.customerName
|
|
373
378
|
}),
|
|
374
|
-
|
|
379
|
+
P.address && /* @__PURE__ */ T("p", {
|
|
375
380
|
className: "text-xs text-text-secondary mt-1",
|
|
376
381
|
children: [
|
|
377
|
-
|
|
382
|
+
P.address.addressLine1,
|
|
378
383
|
", ",
|
|
379
|
-
|
|
384
|
+
P.address.city
|
|
380
385
|
]
|
|
381
386
|
})
|
|
382
387
|
] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
@@ -384,7 +389,7 @@ var A = () => {
|
|
|
384
389
|
children: "Items"
|
|
385
390
|
}), /* @__PURE__ */ w("div", {
|
|
386
391
|
className: "space-y-0.5",
|
|
387
|
-
children:
|
|
392
|
+
children: P.items.map((e, t) => /* @__PURE__ */ T("p", {
|
|
388
393
|
className: "text-xs text-text-primary",
|
|
389
394
|
children: [
|
|
390
395
|
e.quantity,
|
|
@@ -394,14 +399,14 @@ var A = () => {
|
|
|
394
399
|
}, t))
|
|
395
400
|
})] })]
|
|
396
401
|
}),
|
|
397
|
-
|
|
398
|
-
className: "mt-3 p-3 rounded-md bg-
|
|
402
|
+
P.specialInstructions && /* @__PURE__ */ T("div", {
|
|
403
|
+
className: "mt-3 p-3 rounded-md bg-status-warning-bg/10 border border-status-warning-border/20",
|
|
399
404
|
children: [/* @__PURE__ */ T("p", {
|
|
400
|
-
className: "text-xs font-medium text-
|
|
405
|
+
className: "text-xs font-medium text-status-warning-text flex items-center gap-1",
|
|
401
406
|
children: [/* @__PURE__ */ w(l, { className: "h-3 w-3" }), "Special Instructions:"]
|
|
402
407
|
}), /* @__PURE__ */ w("p", {
|
|
403
|
-
className: "text-xs text-
|
|
404
|
-
children:
|
|
408
|
+
className: "text-xs text-status-warning-text mt-0.5",
|
|
409
|
+
children: P.specialInstructions
|
|
405
410
|
})]
|
|
406
411
|
}),
|
|
407
412
|
/* @__PURE__ */ T("div", {
|
|
@@ -409,20 +414,20 @@ var A = () => {
|
|
|
409
414
|
children: [
|
|
410
415
|
/* @__PURE__ */ T("button", {
|
|
411
416
|
type: "button",
|
|
412
|
-
onClick: () =>
|
|
417
|
+
onClick: () => G(P.customerPhone),
|
|
413
418
|
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",
|
|
414
419
|
children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Call Customer"]
|
|
415
420
|
}),
|
|
416
|
-
|
|
421
|
+
P.type === "delivery" && P.address && /* @__PURE__ */ T("button", {
|
|
417
422
|
type: "button",
|
|
418
|
-
onClick: () =>
|
|
423
|
+
onClick: () => K(P),
|
|
419
424
|
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",
|
|
420
425
|
children: [/* @__PURE__ */ w(_, { className: "h-3.5 w-3.5" }), "Navigate"]
|
|
421
426
|
}),
|
|
422
427
|
/* @__PURE__ */ T("button", {
|
|
423
428
|
type: "button",
|
|
424
|
-
onClick: () =>
|
|
425
|
-
className: "ml-auto inline-flex items-center gap-1.5 rounded-md bg-
|
|
429
|
+
onClick: () => W(P.id),
|
|
430
|
+
className: "ml-auto inline-flex items-center gap-1.5 rounded-md bg-status-success-bg/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg/20 transition-colors",
|
|
426
431
|
children: [/* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), "Complete Task"]
|
|
427
432
|
})
|
|
428
433
|
]
|
|
@@ -432,14 +437,14 @@ var A = () => {
|
|
|
432
437
|
})]
|
|
433
438
|
}),
|
|
434
439
|
/* @__PURE__ */ w("div", {
|
|
435
|
-
className: "rounded-lg border border-border-
|
|
440
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
436
441
|
children: /* @__PURE__ */ T("div", {
|
|
437
442
|
className: "grid grid-cols-1 md:grid-cols-4 gap-3",
|
|
438
443
|
children: [
|
|
439
444
|
/* @__PURE__ */ T("select", {
|
|
440
|
-
value:
|
|
441
|
-
onChange: (e) =>
|
|
442
|
-
className: "w-full rounded-md border border-border-
|
|
445
|
+
value: I.status,
|
|
446
|
+
onChange: (e) => H("status", e.target.value),
|
|
447
|
+
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-status-info-border/40",
|
|
443
448
|
children: [
|
|
444
449
|
/* @__PURE__ */ w("option", {
|
|
445
450
|
value: "",
|
|
@@ -460,9 +465,9 @@ var A = () => {
|
|
|
460
465
|
]
|
|
461
466
|
}),
|
|
462
467
|
/* @__PURE__ */ T("select", {
|
|
463
|
-
value:
|
|
464
|
-
onChange: (e) =>
|
|
465
|
-
className: "w-full rounded-md border border-border-
|
|
468
|
+
value: I.type,
|
|
469
|
+
onChange: (e) => H("type", e.target.value),
|
|
470
|
+
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-status-info-border/40",
|
|
466
471
|
children: [
|
|
467
472
|
/* @__PURE__ */ w("option", {
|
|
468
473
|
value: "",
|
|
@@ -483,9 +488,9 @@ var A = () => {
|
|
|
483
488
|
]
|
|
484
489
|
}),
|
|
485
490
|
/* @__PURE__ */ T("select", {
|
|
486
|
-
value:
|
|
487
|
-
onChange: (e) =>
|
|
488
|
-
className: "w-full rounded-md border border-border-
|
|
491
|
+
value: I.priority,
|
|
492
|
+
onChange: (e) => H("priority", e.target.value),
|
|
493
|
+
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-status-info-border/40",
|
|
489
494
|
children: [
|
|
490
495
|
/* @__PURE__ */ w("option", {
|
|
491
496
|
value: "",
|
|
@@ -510,9 +515,9 @@ var A = () => {
|
|
|
510
515
|
]
|
|
511
516
|
}),
|
|
512
517
|
/* @__PURE__ */ T("select", {
|
|
513
|
-
value:
|
|
514
|
-
onChange: (e) =>
|
|
515
|
-
className: "w-full rounded-md border border-border-
|
|
518
|
+
value: I.sortBy,
|
|
519
|
+
onChange: (e) => H("sortBy", e.target.value),
|
|
520
|
+
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-status-info-border/40",
|
|
516
521
|
children: [
|
|
517
522
|
/* @__PURE__ */ w("option", {
|
|
518
523
|
value: "priority",
|
|
@@ -531,16 +536,17 @@ var A = () => {
|
|
|
531
536
|
]
|
|
532
537
|
})
|
|
533
538
|
}),
|
|
534
|
-
|
|
539
|
+
M.length === 0 ? /* @__PURE__ */ w(i, {
|
|
540
|
+
illustration: "empty-data",
|
|
535
541
|
icon: /* @__PURE__ */ w(p, { className: "h-12 w-12" }),
|
|
536
542
|
title: "No tasks available",
|
|
537
543
|
description: "Check back later for new tasks"
|
|
538
544
|
}) : /* @__PURE__ */ w("div", {
|
|
539
545
|
className: "space-y-3",
|
|
540
|
-
children:
|
|
541
|
-
let n =
|
|
546
|
+
children: M.map((e) => {
|
|
547
|
+
let n = A(e.type), i = n.icon;
|
|
542
548
|
return /* @__PURE__ */ T("div", {
|
|
543
|
-
className: "rounded-lg border border-border-
|
|
549
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm hover:shadow-md transition-shadow",
|
|
544
550
|
children: [
|
|
545
551
|
/* @__PURE__ */ T("div", {
|
|
546
552
|
className: "flex items-center justify-between mb-3",
|
|
@@ -556,7 +562,7 @@ var A = () => {
|
|
|
556
562
|
children: [/* @__PURE__ */ w(i, { className: "h-3 w-3" }), n.label]
|
|
557
563
|
}),
|
|
558
564
|
/* @__PURE__ */ w("span", {
|
|
559
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize",
|
|
565
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", j(e.priority)),
|
|
560
566
|
children: e.priority
|
|
561
567
|
})
|
|
562
568
|
]
|
|
@@ -573,7 +579,7 @@ var A = () => {
|
|
|
573
579
|
className: "text-lg font-bold text-text-primary",
|
|
574
580
|
children: a(e.payment.amount, { minimumFractionDigits: 0 })
|
|
575
581
|
}), /* @__PURE__ */ w("p", {
|
|
576
|
-
className: t("text-xs", e.payment.status === "completed" ? "text-
|
|
582
|
+
className: t("text-xs", e.payment.status === "completed" ? "text-status-success-text" : "text-status-warning-text"),
|
|
577
583
|
children: /* @__PURE__ */ T("span", {
|
|
578
584
|
className: "flex items-center gap-1 justify-end",
|
|
579
585
|
children: [/* @__PURE__ */ w(m, { className: "h-3 w-3" }), e.payment.status === "completed" ? "Paid" : "COD"]
|
|
@@ -607,24 +613,24 @@ var A = () => {
|
|
|
607
613
|
className: "text-xs text-text-secondary",
|
|
608
614
|
children: "Time"
|
|
609
615
|
}), /* @__PURE__ */ w("p", {
|
|
610
|
-
className: t("text-xs font-medium",
|
|
611
|
-
children:
|
|
616
|
+
className: t("text-xs font-medium", k(e.estimatedTime) === "Overdue" ? "text-status-error-text" : "text-text-primary"),
|
|
617
|
+
children: k(e.estimatedTime)
|
|
612
618
|
})] })
|
|
613
619
|
]
|
|
614
620
|
}),
|
|
615
621
|
e.status === "pending" && /* @__PURE__ */ T("div", {
|
|
616
|
-
className: "flex items-center flex-wrap gap-2 border-t border-border-
|
|
622
|
+
className: "flex items-center flex-wrap gap-2 border-t border-border-seam pt-3",
|
|
617
623
|
children: [
|
|
618
624
|
/* @__PURE__ */ T("button", {
|
|
619
625
|
type: "button",
|
|
620
|
-
onClick: () =>
|
|
621
|
-
disabled:
|
|
622
|
-
className: t("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",
|
|
623
|
-
children: [/* @__PURE__ */ w(b, { className: "h-3.5 w-3.5" }),
|
|
626
|
+
onClick: () => U(e.id),
|
|
627
|
+
disabled: P !== null,
|
|
628
|
+
className: t("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", P === null ? "bg-status-info-bg/10 text-status-info-text hover:bg-status-info-bg/20" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
|
|
629
|
+
children: [/* @__PURE__ */ w(b, { className: "h-3.5 w-3.5" }), P ? "Complete current first" : "Start Task"]
|
|
624
630
|
}),
|
|
625
631
|
/* @__PURE__ */ T("button", {
|
|
626
632
|
type: "button",
|
|
627
|
-
onClick: () =>
|
|
633
|
+
onClick: () => G(e.customerPhone),
|
|
628
634
|
className: "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",
|
|
629
635
|
children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Call"]
|
|
630
636
|
}),
|
|
@@ -638,12 +644,12 @@ var A = () => {
|
|
|
638
644
|
})
|
|
639
645
|
]
|
|
640
646
|
}),
|
|
641
|
-
e.status === "in_progress" && e.id !==
|
|
642
|
-
className: "flex items-center gap-2 border-t border-border-
|
|
647
|
+
e.status === "in_progress" && e.id !== P?.id && /* @__PURE__ */ T("div", {
|
|
648
|
+
className: "flex items-center gap-2 border-t border-border-seam pt-3",
|
|
643
649
|
children: [/* @__PURE__ */ T("button", {
|
|
644
650
|
type: "button",
|
|
645
|
-
onClick: () =>
|
|
646
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-
|
|
651
|
+
onClick: () => W(e.id),
|
|
652
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg/20 transition-colors",
|
|
647
653
|
children: [/* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), "Complete"]
|
|
648
654
|
}), /* @__PURE__ */ T("button", {
|
|
649
655
|
type: "button",
|
|
@@ -653,7 +659,7 @@ var A = () => {
|
|
|
653
659
|
})]
|
|
654
660
|
}),
|
|
655
661
|
e.status === "completed" && /* @__PURE__ */ T("div", {
|
|
656
|
-
className: "flex items-center gap-2 border-t border-border-
|
|
662
|
+
className: "flex items-center gap-2 border-t border-border-seam pt-3",
|
|
657
663
|
children: [/* @__PURE__ */ w(r, { status: "completed" }), /* @__PURE__ */ T("button", {
|
|
658
664
|
type: "button",
|
|
659
665
|
onClick: () => f(`/worker/task/${e.id}`),
|
|
@@ -670,6 +676,6 @@ var A = () => {
|
|
|
670
676
|
});
|
|
671
677
|
};
|
|
672
678
|
//#endregion
|
|
673
|
-
export {
|
|
679
|
+
export { M as WorkerOrdersPage };
|
|
674
680
|
|
|
675
681
|
//# sourceMappingURL=WorkerOrdersPage.js.map
|