@burdenoff/microfe-kadaikodi 2026.704.1 → 2026.704.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.
Files changed (76) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +77 -26
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
  4. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
  8. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  10. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  12. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  18. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  19. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  20. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +323 -422
  22. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -383
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  26. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  32. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  34. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  36. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  38. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  39. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  41. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  42. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  43. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  48. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  51. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  52. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  53. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  54. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +232 -343
  55. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  56. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  57. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +127 -294
  59. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  60. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +204 -290
  61. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  63. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +399 -487
  65. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  66. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +13 -13
  67. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +192 -296
  69. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  70. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +245 -397
  71. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +85 -117
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  74. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +177 -395
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  76. package/package.json +1 -1
@@ -3,157 +3,45 @@ import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { StatusBadge as r } from "../../components/StatusBadge.js";
5
5
  import { EmptyState as i } from "../../components/EmptyState.js";
6
- import { formatCurrency as a } from "../../utils/formatters.js";
7
- import { useCallback as o, useEffect as s, useState as c } from "react";
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
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
10
- import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
6
+ import { useUpdateWorkerTaskStatus as a, useWorkerStats as o, useWorkerTasks as s } from "../../hooks/useKadaikodiApi.js";
7
+ import { formatCurrency as c } from "../../utils/formatters.js";
8
+ import { useEffect as l, useMemo as u, useState as d } from "react";
9
+ import { AlertTriangle as f, ArrowRight as p, CheckCircle2 as m, ClipboardList as h, IndianRupee as g, Loader2 as _, MapPin as v, Navigation as y, Package as b, Phone as x, PlayCircle as S, ShoppingBag as C, Star as w, Truck as T } from "lucide-react";
10
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
11
+ import { EmphasisPanel as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
11
12
  //#region src/kadaikodi/pages/worker/WorkerOrdersPage.tsx
12
- var O = [
13
- {
14
- id: "task-001",
15
- orderId: "ORD-2024-001",
16
- cartId: "cart-001",
17
- cartName: "South Indian Express",
18
- type: "delivery",
19
- status: "pending",
20
- priority: "high",
21
- customerName: "Rahul Sharma",
22
- customerPhone: "+91-98765-43210",
23
- items: [{
24
- name: "Masala Dosa",
25
- quantity: 2
26
- }, {
27
- name: "Filter Coffee",
28
- quantity: 2
29
- }],
30
- address: {
31
- addressLine1: "123, MG Road",
32
- addressLine2: "Near Central Mall",
33
- landmark: "Opposite SBI Bank",
34
- city: "Bangalore",
35
- pincode: "560001"
36
- },
37
- estimatedTime: new Date(Date.now() + 1800 * 1e3).toISOString(),
38
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 300 * 1e3)).toISOString(),
39
- distance: 3.5,
40
- specialInstructions: "Please call before delivery",
41
- payment: {
42
- method: "Cash",
43
- amount: 295,
44
- status: "pending"
45
- }
46
- },
47
- {
48
- id: "task-002",
49
- orderId: "ORD-2024-002",
50
- cartId: "cart-001",
51
- cartName: "South Indian Express",
52
- type: "pickup",
53
- status: "in_progress",
54
- priority: "medium",
55
- customerName: "Priya Patel",
56
- customerPhone: "+91-98765-43211",
57
- items: [{
58
- name: "Idli Sambar",
59
- quantity: 3
60
- }],
61
- estimatedTime: new Date(Date.now() + 900 * 1e3).toISOString(),
62
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 600 * 1e3)).toISOString(),
63
- specialInstructions: "",
64
- payment: {
65
- method: "Online",
66
- amount: 198,
67
- status: "completed"
68
- }
69
- },
70
- {
71
- id: "task-003",
72
- orderId: "ORD-2024-003",
73
- cartId: "cart-002",
74
- cartName: "Chaat Corner",
75
- type: "preparation",
76
- status: "pending",
77
- priority: "urgent",
78
- customerName: "Amit Kumar",
79
- customerPhone: "+91-98765-43212",
80
- items: [{
81
- name: "Pani Puri",
82
- quantity: 2
83
- }, {
84
- name: "Bhel Puri",
85
- quantity: 1
86
- }],
87
- estimatedTime: new Date(Date.now() + 1200 * 1e3).toISOString(),
88
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 120 * 1e3)).toISOString(),
89
- specialInstructions: "Extra spicy",
90
- payment: {
91
- method: "UPI",
92
- amount: 150,
93
- status: "completed"
94
- }
95
- },
96
- {
97
- id: "task-004",
98
- orderId: "ORD-2024-004",
99
- cartId: "cart-003",
100
- cartName: "Biryani Pot",
101
- type: "delivery",
102
- status: "completed",
103
- priority: "medium",
104
- customerName: "Deepa Nair",
105
- customerPhone: "+91-98765-43213",
106
- items: [{
107
- name: "Chicken Biryani",
108
- quantity: 1
109
- }, {
110
- name: "Raita",
111
- quantity: 1
112
- }],
113
- address: {
114
- addressLine1: "456, Brigade Road",
115
- city: "Bangalore",
116
- pincode: "560025"
117
- },
118
- estimatedTime: (/* @__PURE__ */ new Date(Date.now() - 1800 * 1e3)).toISOString(),
119
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 5400 * 1e3)).toISOString(),
120
- distance: 2.1,
121
- payment: {
122
- method: "Online",
123
- amount: 340,
124
- status: "completed"
125
- }
126
- }
127
- ];
128
- function k(e) {
129
- let t = /* @__PURE__ */ new Date(), n = new Date(e), r = Math.floor((n.getTime() - t.getTime()) / (1e3 * 60));
130
- return r < 0 ? "Overdue" : r < 60 ? `${r} min` : `${Math.floor(r / 60)}h ${r % 60}m`;
131
- }
132
13
  function A(e) {
14
+ if (!e) return null;
15
+ let t = new Date(e);
16
+ if (Number.isNaN(t.getTime())) return null;
17
+ let n = Math.floor((t.getTime() - Date.now()) / (1e3 * 60));
18
+ return n < 0 ? "Overdue" : n < 60 ? `${n} min` : `${Math.floor(n / 60)}h ${n % 60}m`;
19
+ }
20
+ function j(e) {
133
21
  switch (e) {
134
22
  case "delivery": return {
135
- icon: C,
23
+ icon: T,
136
24
  label: "Delivery",
137
25
  style: "bg-accent-purple-subtle text-text-primary"
138
26
  };
139
27
  case "pickup": return {
140
- icon: x,
28
+ icon: C,
141
29
  label: "Pickup",
142
30
  style: "bg-[var(--color-accent-soft)] text-text-primary"
143
31
  };
144
- case "preparation": return {
145
- icon: f,
146
- label: "Preparation",
32
+ case "service": return {
33
+ icon: b,
34
+ label: "Service",
147
35
  style: "bg-status-success-bg-subtle text-status-success-text"
148
36
  };
149
37
  default: return {
150
- icon: v,
38
+ icon: b,
151
39
  label: e,
152
40
  style: "bg-bg-sunken text-text-secondary"
153
41
  };
154
42
  }
155
43
  }
156
- function j(e) {
44
+ function M(e) {
157
45
  switch (e) {
158
46
  case "urgent": return "bg-status-error-bg-subtle text-status-error-text";
159
47
  case "high": return "bg-status-warning-bg-subtle text-status-warning-text";
@@ -162,275 +50,244 @@ function j(e) {
162
50
  default: return "bg-bg-sunken text-text-secondary";
163
51
  }
164
52
  }
165
- var M = () => {
166
- let { navigateTo: f } = e(), [v, x] = c(!0), [C, M] = c([]), [N, P] = c(null), [F, I] = c({
53
+ function N(e) {
54
+ if (!e.deliveryAddress) return "";
55
+ let t = e.deliveryAddress;
56
+ return [
57
+ t.street,
58
+ t.area,
59
+ t.city,
60
+ t.pincode
61
+ ].filter(Boolean).join(", ");
62
+ }
63
+ var P = {
64
+ urgent: 0,
65
+ high: 1,
66
+ medium: 2,
67
+ low: 3
68
+ }, F = () => {
69
+ let { navigateTo: b, currentUser: C } = e(), T = C?.id ?? "", { data: F = [], isLoading: I } = s(T), { data: L, isLoading: R } = o(T), z = a(), [B, V] = d({
167
70
  status: "",
168
71
  type: "",
169
72
  priority: "",
170
73
  sortBy: "priority"
171
- }), [L, R] = c({
172
- totalTasks: 0,
173
- completedToday: 0,
174
- pendingTasks: 0,
175
- averageTime: 0,
176
- earnings: 0,
177
- rating: 4.8
178
- }), [, z] = c(0);
179
- s(() => {
180
- let e = setInterval(() => z((e) => e + 1), 6e4);
74
+ }), [, H] = d(0);
75
+ l(() => {
76
+ let e = setInterval(() => H((e) => e + 1), 6e4);
181
77
  return () => clearInterval(e);
182
78
  }, []);
183
- let B = o(() => {
184
- x(!0), setTimeout(() => {
185
- let e = [...O];
186
- F.status && (e = e.filter((e) => e.status === F.status)), F.type && (e = e.filter((e) => e.type === F.type)), F.priority && (e = e.filter((e) => e.priority === F.priority));
187
- let t = {
188
- urgent: 0,
189
- high: 1,
190
- medium: 2,
191
- low: 3
192
- };
193
- switch (F.sortBy) {
194
- case "priority":
195
- e.sort((e, n) => (t[e.priority] ?? 4) - (t[n.priority] ?? 4));
196
- break;
197
- case "time":
198
- e.sort((e, t) => new Date(e.estimatedTime).getTime() - new Date(t.estimatedTime).getTime());
199
- break;
200
- case "distance":
201
- e.sort((e, t) => (e.distance ?? 999) - (t.distance ?? 999));
202
- break;
203
- }
204
- M(e), P(O.find((e) => e.status === "in_progress") ?? null), R({
205
- totalTasks: 45,
206
- completedToday: 12,
207
- pendingTasks: 3,
208
- averageTime: 22,
209
- earnings: 2450,
210
- rating: 4.8
211
- }), x(!1);
212
- }, 600);
213
- }, [F]);
214
- s(() => {
215
- B();
216
- }, [B]);
217
- let V = (e, t) => {
218
- I((n) => ({
79
+ let U = u(() => F.find((e) => e.status === "in_progress") ?? null, [F]), W = u(() => {
80
+ let e = [...F];
81
+ switch (B.status && (e = e.filter((e) => e.status === B.status)), B.type && (e = e.filter((e) => e.type === B.type)), B.priority && (e = e.filter((e) => e.priority === B.priority)), B.sortBy) {
82
+ case "priority":
83
+ e.sort((e, t) => (P[e.priority] ?? 4) - (P[t.priority] ?? 4));
84
+ break;
85
+ case "time":
86
+ e.sort((e, t) => new Date(e.dueAt).getTime() - new Date(t.dueAt).getTime());
87
+ break;
88
+ case "distance":
89
+ e.sort((e, t) => (e.distance ?? 999) - (t.distance ?? 999));
90
+ break;
91
+ }
92
+ return e;
93
+ }, [F, B]), G = u(() => F.filter((e) => e.status === "completed").length, [F]), K = u(() => F.filter((e) => e.status === "pending").length, [F]), q = (e, t) => {
94
+ V((n) => ({
219
95
  ...n,
220
96
  [e]: t
221
97
  }));
222
- }, H = (e) => {
223
- let t = O.find((t) => t.id === e);
224
- t && (t.status = "in_progress", P(t), B());
225
- }, U = (e) => {
226
- let t = O.find((t) => t.id === e);
227
- t && (t.status = "completed"), P(null), B(), alert("Task completed successfully");
228
- }, W = (e) => {
229
- window.location.href = `tel:${e.replace(/\s/g, "")}`;
230
- }, G = (e) => {
231
- if (e.address) {
232
- let t = encodeURIComponent(`${e.address.addressLine1}, ${e.address.city}`);
233
- window.open(`https://maps.google.com?q=${t}`, "_blank");
234
- }
98
+ }, J = (e) => {
99
+ z.mutate({
100
+ taskId: e,
101
+ status: "IN_PROGRESS"
102
+ });
103
+ }, Y = (e) => {
104
+ z.mutate({
105
+ taskId: e,
106
+ status: "COMPLETED"
107
+ });
108
+ }, X = (e) => {
109
+ e && (window.location.href = `tel:${e.replace(/\s/g, "")}`);
110
+ }, Z = (e) => {
111
+ let t = N(e);
112
+ t && window.open(`https://maps.google.com?q=${encodeURIComponent(t)}`, "_blank");
235
113
  };
236
- return v ? /* @__PURE__ */ w(n, {
114
+ return I || R ? /* @__PURE__ */ E(n, {
237
115
  title: "My Orders",
238
116
  description: "Manage your assigned orders",
239
- children: /* @__PURE__ */ w("div", {
117
+ children: /* @__PURE__ */ E("div", {
240
118
  className: "flex items-center justify-center py-24",
241
- children: /* @__PURE__ */ T("div", {
119
+ children: /* @__PURE__ */ D("div", {
242
120
  className: "text-center",
243
- children: [/* @__PURE__ */ w(h, { className: "h-10 w-10 animate-spin text-text-secondary mx-auto mb-4" }), /* @__PURE__ */ w("p", {
121
+ children: [/* @__PURE__ */ E(_, { className: "h-10 w-10 animate-spin text-text-secondary mx-auto mb-4" }), /* @__PURE__ */ E("p", {
244
122
  className: "text-sm text-text-secondary",
245
123
  children: "Loading tasks..."
246
124
  })]
247
125
  })
248
126
  })
249
- }) : /* @__PURE__ */ T(n, {
127
+ }) : /* @__PURE__ */ D(n, {
250
128
  title: "My Orders",
251
129
  description: "Manage your assigned orders",
252
- children: [/* @__PURE__ */ w(D, {
130
+ children: [/* @__PURE__ */ E(k, {
253
131
  className: "mb-6",
254
- children: "Your work for the day, task by task. Use this page to see what's assigned to you, focus on your current task, and move jobs from pending to completed — while keeping an eye on your hours, earnings and rating. Open any task for full details and customer info so you can get it done right."
255
- }), /* @__PURE__ */ T("div", {
132
+ children: "Your work for the day, task by task. Use this page to see what's assigned to you, focus on your current task, and move jobs from pending to completed — while keeping an eye on your tasks, earnings and rating. Open any task for full details and customer info so you can get it done right."
133
+ }), /* @__PURE__ */ D("div", {
256
134
  className: "space-y-6",
257
135
  children: [
258
- /* @__PURE__ */ T(E, { children: [/* @__PURE__ */ w("h2", {
136
+ /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("h2", {
259
137
  className: "mb-4 text-base font-semibold text-text-primary",
260
138
  children: "Today at a Glance"
261
- }), /* @__PURE__ */ T("div", {
262
- className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
139
+ }), /* @__PURE__ */ D("div", {
140
+ className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3",
263
141
  children: [
264
- /* @__PURE__ */ T("div", {
142
+ /* @__PURE__ */ D("div", {
265
143
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
266
- children: [/* @__PURE__ */ w("p", {
144
+ children: [/* @__PURE__ */ E("p", {
267
145
  className: "text-xs text-text-secondary",
268
146
  children: "Today's Tasks"
269
- }), /* @__PURE__ */ w("p", {
147
+ }), /* @__PURE__ */ E("p", {
270
148
  className: "text-2xl font-bold text-text-primary",
271
- children: L.totalTasks
149
+ children: L?.todayTasks ?? 0
272
150
  })]
273
151
  }),
274
- /* @__PURE__ */ T("div", {
152
+ /* @__PURE__ */ D("div", {
275
153
  className: "rounded-lg border border-status-success-text/20 bg-status-success-bg-subtle p-4 shadow-sm",
276
- children: [/* @__PURE__ */ w("p", {
154
+ children: [/* @__PURE__ */ E("p", {
277
155
  className: "text-xs text-status-success-text",
278
156
  children: "Completed"
279
- }), /* @__PURE__ */ w("p", {
157
+ }), /* @__PURE__ */ E("p", {
280
158
  className: "text-2xl font-bold text-status-success-text",
281
- children: L.completedToday
159
+ children: G
282
160
  })]
283
161
  }),
284
- /* @__PURE__ */ T("div", {
162
+ /* @__PURE__ */ D("div", {
285
163
  className: "rounded-lg border border-status-warning-text/20 bg-status-warning-bg-subtle p-4 shadow-sm",
286
- children: [/* @__PURE__ */ w("p", {
164
+ children: [/* @__PURE__ */ E("p", {
287
165
  className: "text-xs text-status-warning-text",
288
166
  children: "Pending"
289
- }), /* @__PURE__ */ w("p", {
167
+ }), /* @__PURE__ */ E("p", {
290
168
  className: "text-2xl font-bold text-status-warning-text",
291
- children: L.pendingTasks
169
+ children: K
292
170
  })]
293
171
  }),
294
- /* @__PURE__ */ T("div", {
172
+ /* @__PURE__ */ D("div", {
295
173
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
296
- children: [/* @__PURE__ */ w("p", {
297
- className: "text-xs text-text-secondary",
298
- children: "Avg Time"
299
- }), /* @__PURE__ */ T("p", {
300
- className: "text-2xl font-bold text-text-primary",
301
- children: [L.averageTime, " min"]
302
- })]
303
- }),
304
- /* @__PURE__ */ T("div", {
305
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
306
- children: [/* @__PURE__ */ w("p", {
174
+ children: [/* @__PURE__ */ E("p", {
307
175
  className: "text-xs text-text-secondary",
308
176
  children: "Today's Earnings"
309
- }), /* @__PURE__ */ w("p", {
177
+ }), /* @__PURE__ */ E("p", {
310
178
  className: "text-2xl font-bold text-text-primary",
311
- children: a(L.earnings, { minimumFractionDigits: 0 })
179
+ children: c(L?.todayEarnings ?? 0, { minimumFractionDigits: 0 })
312
180
  })]
313
181
  }),
314
- /* @__PURE__ */ T("div", {
182
+ /* @__PURE__ */ D("div", {
315
183
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
316
- children: [/* @__PURE__ */ w("p", {
184
+ children: [/* @__PURE__ */ E("p", {
317
185
  className: "text-xs text-text-secondary",
318
186
  children: "Rating"
319
- }), /* @__PURE__ */ T("p", {
187
+ }), /* @__PURE__ */ D("p", {
320
188
  className: "text-2xl font-bold text-text-primary flex items-center gap-1",
321
- children: [/* @__PURE__ */ w(S, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), L.rating]
189
+ children: [/* @__PURE__ */ E(w, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), L?.averageRating ?? 0]
322
190
  })]
323
191
  })
324
192
  ]
325
193
  })] }),
326
- N && /* @__PURE__ */ T("div", {
194
+ U && /* @__PURE__ */ D("div", {
327
195
  className: "rounded-lg border-2 border-border-focus/30 bg-[var(--color-accent-soft)] p-5",
328
- children: [/* @__PURE__ */ w("h2", {
196
+ children: [/* @__PURE__ */ E("h2", {
329
197
  className: "text-base font-semibold text-text-primary mb-4",
330
198
  children: "Current Task"
331
- }), /* @__PURE__ */ T("div", {
199
+ }), /* @__PURE__ */ D("div", {
332
200
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
333
- children: [/* @__PURE__ */ T("div", {
201
+ children: [/* @__PURE__ */ D("div", {
334
202
  className: "flex items-center justify-between mb-4",
335
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
203
+ children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
336
204
  className: "flex items-center gap-2 flex-wrap",
337
205
  children: [
338
- /* @__PURE__ */ T("h3", {
206
+ /* @__PURE__ */ E("h3", {
339
207
  className: "text-sm font-semibold text-text-primary",
340
- children: ["Order #", N.orderId]
208
+ children: U.orderId ? `Order #${U.orderId}` : U.cartName
341
209
  }),
342
210
  (() => {
343
- let e = A(N.type), n = e.icon;
344
- return /* @__PURE__ */ T("span", {
211
+ let e = j(U.type), n = e.icon;
212
+ return /* @__PURE__ */ D("span", {
345
213
  className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium", e.style),
346
- children: [/* @__PURE__ */ w(n, { className: "h-3 w-3" }), e.label]
214
+ children: [/* @__PURE__ */ E(n, { className: "h-3 w-3" }), e.label]
347
215
  });
348
216
  })(),
349
- /* @__PURE__ */ w("span", {
350
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", j(N.priority)),
351
- children: N.priority
217
+ /* @__PURE__ */ E("span", {
218
+ className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", M(U.priority)),
219
+ children: U.priority
352
220
  })
353
221
  ]
354
- }), /* @__PURE__ */ w("p", {
222
+ }), /* @__PURE__ */ E("p", {
355
223
  className: "text-xs text-text-secondary mt-1",
356
- children: N.cartName
357
- })] }), /* @__PURE__ */ T("div", {
224
+ children: U.cartName
225
+ })] }), A(U.dueAt) && /* @__PURE__ */ D("div", {
358
226
  className: "text-right",
359
- children: [/* @__PURE__ */ w("p", {
227
+ children: [/* @__PURE__ */ E("p", {
360
228
  className: "text-xl font-bold text-text-primary",
361
- children: k(N.estimatedTime)
362
- }), /* @__PURE__ */ w("p", {
229
+ children: A(U.dueAt)
230
+ }), /* @__PURE__ */ E("p", {
363
231
  className: "text-xs text-text-secondary",
364
232
  children: "Time remaining"
365
233
  })]
366
234
  })]
367
- }), /* @__PURE__ */ T("div", {
235
+ }), /* @__PURE__ */ D("div", {
368
236
  className: "border-t border-border-subtle pt-4",
369
237
  children: [
370
- /* @__PURE__ */ T("div", {
238
+ /* @__PURE__ */ D("div", {
371
239
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
372
- children: [/* @__PURE__ */ T("div", { children: [
373
- /* @__PURE__ */ w("p", {
240
+ children: [/* @__PURE__ */ D("div", { children: [
241
+ /* @__PURE__ */ E("p", {
374
242
  className: "text-xs font-medium text-text-secondary",
375
243
  children: "Customer"
376
244
  }),
377
- /* @__PURE__ */ w("p", {
245
+ /* @__PURE__ */ E("p", {
378
246
  className: "text-sm font-medium text-text-primary",
379
- children: N.customerName
247
+ children: U.customerName || "—"
380
248
  }),
381
- N.address && /* @__PURE__ */ T("p", {
249
+ N(U) && /* @__PURE__ */ E("p", {
382
250
  className: "text-xs text-text-secondary mt-1",
383
- children: [
384
- N.address.addressLine1,
385
- ", ",
386
- N.address.city
387
- ]
251
+ children: N(U)
388
252
  })
389
- ] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
253
+ ] }), U.description && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
390
254
  className: "text-xs font-medium text-text-secondary",
391
- children: "Items"
392
- }), /* @__PURE__ */ w("div", {
393
- className: "space-y-0.5",
394
- children: N.items.map((e, t) => /* @__PURE__ */ T("p", {
395
- className: "text-xs text-text-primary",
396
- children: [
397
- e.quantity,
398
- "x ",
399
- e.name
400
- ]
401
- }, t))
255
+ children: "Task"
256
+ }), /* @__PURE__ */ E("p", {
257
+ className: "text-xs text-text-primary",
258
+ children: U.description
402
259
  })] })]
403
260
  }),
404
- N.specialInstructions && /* @__PURE__ */ T("div", {
261
+ U.notes && /* @__PURE__ */ D("div", {
405
262
  className: "mt-3 p-3 rounded-md bg-status-warning-bg-subtle border border-status-warning-text/20",
406
- children: [/* @__PURE__ */ T("p", {
263
+ children: [/* @__PURE__ */ D("p", {
407
264
  className: "text-xs font-medium text-status-warning-text flex items-center gap-1",
408
- children: [/* @__PURE__ */ w(l, { className: "h-3 w-3" }), "Special Instructions:"]
409
- }), /* @__PURE__ */ w("p", {
265
+ children: [/* @__PURE__ */ E(f, { className: "h-3 w-3" }), "Notes:"]
266
+ }), /* @__PURE__ */ E("p", {
410
267
  className: "text-xs text-status-warning-text mt-0.5",
411
- children: N.specialInstructions
268
+ children: U.notes
412
269
  })]
413
270
  }),
414
- /* @__PURE__ */ T("div", {
271
+ /* @__PURE__ */ D("div", {
415
272
  className: "flex flex-wrap gap-2 mt-4",
416
273
  children: [
417
- /* @__PURE__ */ T("button", {
274
+ U.customerPhone && /* @__PURE__ */ D("button", {
418
275
  type: "button",
419
- onClick: () => W(N.customerPhone),
276
+ onClick: () => X(U.customerPhone),
420
277
  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",
421
- children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Call Customer"]
278
+ children: [/* @__PURE__ */ E(x, { className: "h-3.5 w-3.5" }), "Call Customer"]
422
279
  }),
423
- N.type === "delivery" && N.address && /* @__PURE__ */ T("button", {
280
+ U.type === "delivery" && N(U) && /* @__PURE__ */ D("button", {
424
281
  type: "button",
425
- onClick: () => G(N),
282
+ onClick: () => Z(U),
426
283
  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",
427
- children: [/* @__PURE__ */ w(_, { className: "h-3.5 w-3.5" }), "Navigate"]
284
+ children: [/* @__PURE__ */ E(y, { className: "h-3.5 w-3.5" }), "Navigate"]
428
285
  }),
429
- /* @__PURE__ */ T("button", {
286
+ /* @__PURE__ */ D("button", {
430
287
  type: "button",
431
- onClick: () => U(N.id),
288
+ onClick: () => Y(U.id),
432
289
  className: "ml-auto inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
433
- children: [/* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), "Complete Task"]
290
+ children: [/* @__PURE__ */ E(m, { className: "h-3.5 w-3.5" }), "Complete Task"]
434
291
  })
435
292
  ]
436
293
  })
@@ -438,98 +295,98 @@ var M = () => {
438
295
  })]
439
296
  })]
440
297
  }),
441
- /* @__PURE__ */ w("div", {
298
+ /* @__PURE__ */ E("div", {
442
299
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
443
- children: /* @__PURE__ */ T("div", {
300
+ children: /* @__PURE__ */ D("div", {
444
301
  className: "grid grid-cols-1 md:grid-cols-4 gap-3",
445
302
  children: [
446
- /* @__PURE__ */ T("select", {
447
- value: F.status,
448
- onChange: (e) => V("status", e.target.value),
303
+ /* @__PURE__ */ D("select", {
304
+ value: B.status,
305
+ onChange: (e) => q("status", e.target.value),
449
306
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-border-focus/40",
450
307
  children: [
451
- /* @__PURE__ */ w("option", {
308
+ /* @__PURE__ */ E("option", {
452
309
  value: "",
453
310
  children: "All Tasks"
454
311
  }),
455
- /* @__PURE__ */ w("option", {
312
+ /* @__PURE__ */ E("option", {
456
313
  value: "pending",
457
314
  children: "Pending Tasks"
458
315
  }),
459
- /* @__PURE__ */ w("option", {
316
+ /* @__PURE__ */ E("option", {
460
317
  value: "in_progress",
461
318
  children: "In Progress"
462
319
  }),
463
- /* @__PURE__ */ w("option", {
320
+ /* @__PURE__ */ E("option", {
464
321
  value: "completed",
465
322
  children: "Completed"
466
323
  })
467
324
  ]
468
325
  }),
469
- /* @__PURE__ */ T("select", {
470
- value: F.type,
471
- onChange: (e) => V("type", e.target.value),
326
+ /* @__PURE__ */ D("select", {
327
+ value: B.type,
328
+ onChange: (e) => q("type", e.target.value),
472
329
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-border-focus/40",
473
330
  children: [
474
- /* @__PURE__ */ w("option", {
331
+ /* @__PURE__ */ E("option", {
475
332
  value: "",
476
333
  children: "All Types"
477
334
  }),
478
- /* @__PURE__ */ w("option", {
335
+ /* @__PURE__ */ E("option", {
479
336
  value: "delivery",
480
337
  children: "Delivery"
481
338
  }),
482
- /* @__PURE__ */ w("option", {
339
+ /* @__PURE__ */ E("option", {
483
340
  value: "pickup",
484
341
  children: "Pickup"
485
342
  }),
486
- /* @__PURE__ */ w("option", {
487
- value: "preparation",
488
- children: "Preparation"
343
+ /* @__PURE__ */ E("option", {
344
+ value: "service",
345
+ children: "Service"
489
346
  })
490
347
  ]
491
348
  }),
492
- /* @__PURE__ */ T("select", {
493
- value: F.priority,
494
- onChange: (e) => V("priority", e.target.value),
349
+ /* @__PURE__ */ D("select", {
350
+ value: B.priority,
351
+ onChange: (e) => q("priority", e.target.value),
495
352
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-border-focus/40",
496
353
  children: [
497
- /* @__PURE__ */ w("option", {
354
+ /* @__PURE__ */ E("option", {
498
355
  value: "",
499
356
  children: "All Priorities"
500
357
  }),
501
- /* @__PURE__ */ w("option", {
358
+ /* @__PURE__ */ E("option", {
502
359
  value: "urgent",
503
360
  children: "Urgent"
504
361
  }),
505
- /* @__PURE__ */ w("option", {
362
+ /* @__PURE__ */ E("option", {
506
363
  value: "high",
507
364
  children: "High"
508
365
  }),
509
- /* @__PURE__ */ w("option", {
366
+ /* @__PURE__ */ E("option", {
510
367
  value: "medium",
511
368
  children: "Medium"
512
369
  }),
513
- /* @__PURE__ */ w("option", {
370
+ /* @__PURE__ */ E("option", {
514
371
  value: "low",
515
372
  children: "Low"
516
373
  })
517
374
  ]
518
375
  }),
519
- /* @__PURE__ */ T("select", {
520
- value: F.sortBy,
521
- onChange: (e) => V("sortBy", e.target.value),
376
+ /* @__PURE__ */ D("select", {
377
+ value: B.sortBy,
378
+ onChange: (e) => q("sortBy", e.target.value),
522
379
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-border-focus/40",
523
380
  children: [
524
- /* @__PURE__ */ w("option", {
381
+ /* @__PURE__ */ E("option", {
525
382
  value: "priority",
526
383
  children: "Sort by Priority"
527
384
  }),
528
- /* @__PURE__ */ w("option", {
385
+ /* @__PURE__ */ E("option", {
529
386
  value: "time",
530
387
  children: "Sort by Time"
531
388
  }),
532
- /* @__PURE__ */ w("option", {
389
+ /* @__PURE__ */ E("option", {
533
390
  value: "distance",
534
391
  children: "Sort by Distance"
535
392
  })
@@ -538,134 +395,125 @@ var M = () => {
538
395
  ]
539
396
  })
540
397
  }),
541
- C.length === 0 ? /* @__PURE__ */ w(i, {
542
- icon: /* @__PURE__ */ w(p, { className: "h-12 w-12" }),
543
- title: "No tasks available",
544
- description: "Check back later for new tasks"
545
- }) : /* @__PURE__ */ w("div", {
398
+ W.length === 0 ? /* @__PURE__ */ E(i, {
399
+ icon: /* @__PURE__ */ E(h, { className: "h-12 w-12" }),
400
+ title: "No tasks assigned",
401
+ description: "You have no tasks matching this view. New assignments will appear here."
402
+ }) : /* @__PURE__ */ E("div", {
546
403
  className: "space-y-3",
547
- children: C.map((e) => {
548
- let n = A(e.type), i = n.icon;
549
- return /* @__PURE__ */ T("div", {
404
+ children: W.map((e) => {
405
+ let n = j(e.type), i = n.icon, a = A(e.dueAt), o = N(e);
406
+ return /* @__PURE__ */ D("div", {
550
407
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm hover:shadow-md transition-shadow",
551
408
  children: [
552
- /* @__PURE__ */ T("div", {
409
+ /* @__PURE__ */ D("div", {
553
410
  className: "flex items-center justify-between mb-3",
554
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
411
+ children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
555
412
  className: "flex items-center gap-2 flex-wrap",
556
413
  children: [
557
- /* @__PURE__ */ T("h3", {
414
+ /* @__PURE__ */ E("h3", {
558
415
  className: "text-sm font-semibold text-text-primary",
559
- children: ["Order #", e.orderId]
416
+ children: e.orderId ? `Order #${e.orderId}` : e.cartName
560
417
  }),
561
- /* @__PURE__ */ T("span", {
418
+ /* @__PURE__ */ D("span", {
562
419
  className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium", n.style),
563
- children: [/* @__PURE__ */ w(i, { className: "h-3 w-3" }), n.label]
420
+ children: [/* @__PURE__ */ E(i, { className: "h-3 w-3" }), n.label]
564
421
  }),
565
- /* @__PURE__ */ w("span", {
566
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", j(e.priority)),
422
+ /* @__PURE__ */ E("span", {
423
+ className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", M(e.priority)),
567
424
  children: e.priority
568
425
  })
569
426
  ]
570
- }), /* @__PURE__ */ T("p", {
427
+ }), /* @__PURE__ */ D("p", {
571
428
  className: "text-xs text-text-secondary mt-1",
572
- children: [
573
- e.cartName,
574
- " · ",
575
- e.customerName
576
- ]
577
- })] }), /* @__PURE__ */ T("div", {
429
+ children: [e.cartName, e.customerName ? ` · ${e.customerName}` : ""]
430
+ })] }), e.earnings > 0 && /* @__PURE__ */ D("div", {
578
431
  className: "text-right",
579
- children: [/* @__PURE__ */ w("p", {
580
- className: "text-lg font-bold text-text-primary",
581
- children: a(e.payment.amount, { minimumFractionDigits: 0 })
582
- }), /* @__PURE__ */ w("p", {
583
- className: t("text-xs", e.payment.status === "completed" ? "text-status-success-text" : "text-status-warning-text"),
584
- children: /* @__PURE__ */ T("span", {
585
- className: "flex items-center gap-1 justify-end",
586
- children: [/* @__PURE__ */ w(m, { className: "h-3 w-3" }), e.payment.status === "completed" ? "Paid" : "COD"]
587
- })
432
+ children: [/* @__PURE__ */ D("p", {
433
+ className: "text-lg font-bold text-text-primary flex items-center gap-0.5 justify-end",
434
+ children: [/* @__PURE__ */ E(g, { className: "h-4 w-4" }), c(e.earnings, {
435
+ minimumFractionDigits: 0,
436
+ style: "decimal"
437
+ })]
438
+ }), /* @__PURE__ */ E("p", {
439
+ className: "text-xs text-text-secondary",
440
+ children: "Earnings"
588
441
  })]
589
442
  })]
590
443
  }),
591
- /* @__PURE__ */ T("div", {
444
+ /* @__PURE__ */ D("div", {
592
445
  className: "grid grid-cols-1 md:grid-cols-3 gap-3 mb-3 text-sm",
593
446
  children: [
594
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
447
+ e.description && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
595
448
  className: "text-xs text-text-secondary",
596
- children: "Items"
597
- }), /* @__PURE__ */ w("div", {
598
- className: "text-xs text-text-primary",
599
- children: e.items.map((t, n) => /* @__PURE__ */ T("span", { children: [
600
- t.quantity,
601
- "x ",
602
- t.name,
603
- n < e.items.length - 1 && ", "
604
- ] }, n))
449
+ children: "Task"
450
+ }), /* @__PURE__ */ E("p", {
451
+ className: "text-xs text-text-primary line-clamp-2",
452
+ children: e.description
605
453
  })] }),
606
- e.address && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
454
+ o && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
607
455
  className: "text-xs text-text-secondary",
608
456
  children: "Delivery Address"
609
- }), /* @__PURE__ */ w("p", {
457
+ }), /* @__PURE__ */ E("p", {
610
458
  className: "text-xs text-text-primary",
611
- children: e.address.addressLine1
459
+ children: o
612
460
  })] }),
613
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
461
+ a && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
614
462
  className: "text-xs text-text-secondary",
615
463
  children: "Time"
616
- }), /* @__PURE__ */ w("p", {
617
- className: t("text-xs font-medium", k(e.estimatedTime) === "Overdue" ? "text-status-error-text" : "text-text-primary"),
618
- children: k(e.estimatedTime)
464
+ }), /* @__PURE__ */ E("p", {
465
+ className: t("text-xs font-medium", a === "Overdue" ? "text-status-error-text" : "text-text-primary"),
466
+ children: a
619
467
  })] })
620
468
  ]
621
469
  }),
622
- e.status === "pending" && /* @__PURE__ */ T("div", {
470
+ e.status === "pending" && /* @__PURE__ */ D("div", {
623
471
  className: "flex items-center flex-wrap gap-2 border-t border-border-subtle pt-3",
624
472
  children: [
625
- /* @__PURE__ */ T("button", {
473
+ /* @__PURE__ */ D("button", {
626
474
  type: "button",
627
- onClick: () => H(e.id),
628
- disabled: N !== null,
629
- className: t("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", N === null ? "bg-[var(--color-accent-soft)] text-text-primary hover:bg-[var(--color-accent-soft)]" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
630
- children: [/* @__PURE__ */ w(b, { className: "h-3.5 w-3.5" }), N ? "Complete current first" : "Start Task"]
475
+ onClick: () => J(e.id),
476
+ disabled: U !== null,
477
+ className: t("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", U === null ? "bg-[var(--color-accent-soft)] text-text-primary hover:bg-[var(--color-accent-soft)]" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
478
+ children: [/* @__PURE__ */ E(S, { className: "h-3.5 w-3.5" }), U ? "Complete current first" : "Start Task"]
631
479
  }),
632
- /* @__PURE__ */ T("button", {
480
+ e.customerPhone && /* @__PURE__ */ D("button", {
633
481
  type: "button",
634
- onClick: () => W(e.customerPhone),
482
+ onClick: () => X(e.customerPhone),
635
483
  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",
636
- children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Call"]
484
+ children: [/* @__PURE__ */ E(x, { className: "h-3.5 w-3.5" }), "Call"]
637
485
  }),
638
- e.type === "delivery" && e.distance != null && /* @__PURE__ */ T("span", {
486
+ e.type === "delivery" && e.distance != null && /* @__PURE__ */ D("span", {
639
487
  className: "ml-auto text-xs text-text-secondary flex items-center gap-1",
640
488
  children: [
641
- /* @__PURE__ */ w(g, { className: "h-3 w-3" }),
489
+ /* @__PURE__ */ E(v, { className: "h-3 w-3" }),
642
490
  e.distance,
643
491
  " km away"
644
492
  ]
645
493
  })
646
494
  ]
647
495
  }),
648
- e.status === "in_progress" && e.id !== N?.id && /* @__PURE__ */ T("div", {
496
+ e.status === "in_progress" && e.id !== U?.id && /* @__PURE__ */ D("div", {
649
497
  className: "flex items-center gap-2 border-t border-border-subtle pt-3",
650
- children: [/* @__PURE__ */ T("button", {
498
+ children: [/* @__PURE__ */ D("button", {
651
499
  type: "button",
652
- onClick: () => U(e.id),
500
+ onClick: () => Y(e.id),
653
501
  className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
654
- children: [/* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), "Complete"]
655
- }), /* @__PURE__ */ T("button", {
502
+ children: [/* @__PURE__ */ E(m, { className: "h-3.5 w-3.5" }), "Complete"]
503
+ }), /* @__PURE__ */ D("button", {
656
504
  type: "button",
657
- onClick: () => f(`/worker/task/${e.id}`),
505
+ onClick: () => b(`/worker/task/${e.id}`),
658
506
  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",
659
- children: ["Details", /* @__PURE__ */ w(u, { className: "h-3.5 w-3.5" })]
507
+ children: ["Details", /* @__PURE__ */ E(p, { className: "h-3.5 w-3.5" })]
660
508
  })]
661
509
  }),
662
- e.status === "completed" && /* @__PURE__ */ T("div", {
510
+ e.status === "completed" && /* @__PURE__ */ D("div", {
663
511
  className: "flex items-center gap-2 border-t border-border-subtle pt-3",
664
- children: [/* @__PURE__ */ w(r, { status: "completed" }), /* @__PURE__ */ T("button", {
512
+ children: [/* @__PURE__ */ E(r, { status: "completed" }), /* @__PURE__ */ D("button", {
665
513
  type: "button",
666
- onClick: () => f(`/worker/task/${e.id}`),
514
+ onClick: () => b(`/worker/task/${e.id}`),
667
515
  className: "ml-auto 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",
668
- children: ["Details", /* @__PURE__ */ w(u, { className: "h-3.5 w-3.5" })]
516
+ children: ["Details", /* @__PURE__ */ E(p, { className: "h-3.5 w-3.5" })]
669
517
  })]
670
518
  })
671
519
  ]
@@ -677,6 +525,6 @@ var M = () => {
677
525
  });
678
526
  };
679
527
  //#endregion
680
- export { M as WorkerOrdersPage };
528
+ export { F as WorkerOrdersPage };
681
529
 
682
530
  //# sourceMappingURL=WorkerOrdersPage.js.map