@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.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.
Files changed (63) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +209 -105
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/HomePage.js +4 -4
  4. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +1 -1
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +1 -1
  8. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/CartManagementPage.js +279 -333
  10. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/UserManagementPage.js +299 -372
  12. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +214 -214
  14. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  15. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +226 -230
  16. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  17. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +255 -256
  18. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  19. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +275 -278
  20. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +228 -446
  22. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  23. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +1 -1
  24. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  25. package/dist/kadaikodi/pages/common/SettingsPage.js +34 -46
  26. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  27. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +193 -447
  28. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  29. package/dist/kadaikodi/pages/customer/CartDetailPage.js +6 -6
  30. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  32. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +255 -215
  34. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/customer/FavoritesPage.js +141 -178
  36. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +155 -161
  38. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/customer/ReviewsPage.js +14 -140
  40. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +304 -458
  42. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  43. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +1 -1
  44. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  45. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +2 -2
  46. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +361 -361
  48. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  49. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +226 -220
  50. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +15 -15
  52. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  53. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +2 -2
  54. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  55. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +252 -253
  56. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  57. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +3 -3
  58. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  59. package/package.json +1 -1
  60. package/dist/kadaikodi/mocks/data.js +0 -1517
  61. package/dist/kadaikodi/mocks/data.js.map +0 -1
  62. package/dist/kadaikodi/mocks/users.js +0 -34
  63. package/dist/kadaikodi/mocks/users.js.map +0 -1
@@ -3,16 +3,17 @@ 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, formatDate as o } from "../../utils/formatters.js";
7
- import { useCallback as s, useEffect as c, useMemo as l, useState as u } from "react";
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
- import { useParams as P } from "react-router-dom";
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";
6
+ import { useUpdateWorkerTaskStatus as a, useWorkerTasks as o } from "../../hooks/useKadaikodiApi.js";
7
+ import { formatCurrency as s, formatDate as c } from "../../utils/formatters.js";
8
+ import { useEffect as ee, useMemo as l, useState as u } from "react";
9
+ 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 te, Timer as A, Truck as j, User as M } from "lucide-react";
10
+ import { useParams as N } from "react-router-dom";
11
+ import { jsx as P, jsxs as F } from "react/jsx-runtime";
12
+ import { EmphasisPanel as I, NextSteps as L, PagePurpose as R } from "@burdenoff/fe-libs/ui";
12
13
  //#region src/kadaikodi/pages/worker/TaskDetailsPage.tsx
13
- function B(e) {
14
+ function z(e) {
14
15
  switch (e) {
15
- case "delivery": return M;
16
+ case "delivery": return j;
16
17
  case "preparation": return g;
17
18
  case "inventory": return p;
18
19
  case "cleanup": return k;
@@ -21,16 +22,16 @@ function B(e) {
21
22
  default: return y;
22
23
  }
23
24
  }
24
- function V(e) {
25
+ function B(e) {
25
26
  switch (e) {
26
27
  case "urgent": return "bg-status-error-bg-subtle text-status-error-text";
27
28
  case "high": return "bg-status-warning-bg-subtle text-status-warning-text";
28
29
  case "medium": return "bg-status-warning-bg-subtle text-status-warning-text";
29
30
  case "low": return "bg-status-success-bg-subtle text-status-success-text";
30
- default: return "bg-secondary text-secondary-foreground";
31
+ default: return "bg-bg-sunken text-text-secondary";
31
32
  }
32
33
  }
33
- function H(e) {
34
+ function V(e) {
34
35
  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;
35
36
  return [
36
37
  {
@@ -53,100 +54,105 @@ function H(e) {
53
54
  }
54
55
  ];
55
56
  }
56
- function U(e) {
57
+ function H(e) {
57
58
  return new Date(e).toLocaleTimeString("en-IN", {
58
59
  hour: "numeric",
59
60
  minute: "2-digit",
60
61
  hour12: !0
61
62
  });
62
63
  }
64
+ function U(e) {
65
+ let t = e.deliveryAddress ? [
66
+ e.deliveryAddress.street,
67
+ e.deliveryAddress.area,
68
+ e.deliveryAddress.city,
69
+ e.deliveryAddress.pincode
70
+ ].filter(Boolean).join(", ") : "";
71
+ return {
72
+ id: e.id,
73
+ orderId: e.orderId,
74
+ cartId: e.cartId,
75
+ cartName: e.cartName,
76
+ type: e.type,
77
+ status: e.status,
78
+ priority: e.priority,
79
+ title: e.title ?? e.description ?? "Task",
80
+ description: e.description,
81
+ estimatedTime: e.estimatedTime ?? 0,
82
+ assignedBy: e.assignedBy ?? "",
83
+ assignedTime: e.assignedAt || (/* @__PURE__ */ new Date()).toISOString(),
84
+ dueTime: e.dueAt,
85
+ location: e.location,
86
+ earnings: e.earnings,
87
+ distance: e.distance,
88
+ customerInfo: {
89
+ name: e.customerName,
90
+ phone: e.customerPhone,
91
+ address: t
92
+ },
93
+ orderItems: [],
94
+ specialInstructions: e.notes ?? void 0,
95
+ notes: e.notes ?? ""
96
+ };
97
+ }
63
98
  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(() => {
66
- let e = {
67
- id: p || "TASK-001",
68
- orderId: "ORD-123",
69
- cartId: "cart-001",
70
- cartName: "South Indian Express",
71
- type: "delivery",
72
- status: "pending",
73
- priority: "high",
74
- title: "Deliver Order #ORD-123",
75
- description: "Deliver 2x Masala Dosa, 1x Filter Coffee to customer at Koramangala",
76
- estimatedTime: 25,
77
- assignedBy: "Cart Manager",
78
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 300 * 1e3)).toISOString(),
79
- dueTime: new Date(Date.now() + 1800 * 1e3).toISOString(),
80
- location: "Koramangala 5th Block",
81
- earnings: 95,
82
- distance: 3.5,
83
- customerInfo: {
84
- name: "Rahul Sharma",
85
- phone: "+91-98765-43210",
86
- address: "123, MG Road, Near Central Mall, Koramangala 5th Block, Bangalore - 560034"
87
- },
88
- orderItems: [{
89
- name: "Masala Dosa",
90
- quantity: 2,
91
- specialInstructions: "Extra spicy"
92
- }, {
93
- name: "Filter Coffee",
94
- quantity: 1,
95
- specialInstructions: "Less sugar"
96
- }],
97
- specialInstructions: "Please call before delivery. Customer prefers contactless delivery.",
98
- photos: ["https://images.unsplash.com/photo-1630384060421-cb20d0e0649d?w=400", "https://images.unsplash.com/photo-1572802419224-296b0aeee0d9?w=400"],
99
- notes: ""
100
- };
101
- k(e), K(e.notes || ""), W(!1);
102
- }, 600);
103
- }, [p]);
104
- c(() => {
105
- q();
106
- }, [q]);
107
- let J = () => {
108
- w && (k({
109
- ...w,
99
+ let { taskId: p } = N(), { navigateTo: g, currentUser: w } = e(), { data: k = [], isLoading: j } = o(w?.id ?? ""), W = a(), [G, K] = u(null), [q, J] = u("");
100
+ ee(() => {
101
+ let e = k.find((e) => e.id === p);
102
+ if (e) {
103
+ let t = U(e);
104
+ K(t), J(t.notes ?? "");
105
+ } else K(null);
106
+ }, [k, p]);
107
+ let Y = () => {
108
+ G && (K({
109
+ ...G,
110
110
  status: "in_progress"
111
- }), alert("Task started successfully"));
112
- }, Y = () => {
113
- w && (k({
114
- ...w,
115
- status: "completed"
116
- }), alert("Task completed successfully"));
111
+ }), W.mutate({
112
+ taskId: G.id,
113
+ status: "IN_PROGRESS"
114
+ }));
117
115
  }, X = () => {
118
- w?.customerInfo?.phone && (window.location.href = `tel:${w.customerInfo.phone.replace(/\s/g, "")}`);
116
+ G && (K({
117
+ ...G,
118
+ status: "completed"
119
+ }), W.mutate({
120
+ taskId: G.id,
121
+ status: "COMPLETED"
122
+ }));
119
123
  }, Z = () => {
120
- if (w?.customerInfo?.address) {
121
- let e = encodeURIComponent(w.customerInfo.address);
124
+ G?.customerInfo?.phone && (window.location.href = `tel:${G.customerInfo.phone.replace(/\s/g, "")}`);
125
+ }, Q = () => {
126
+ if (G?.customerInfo?.address) {
127
+ let e = encodeURIComponent(G.customerInfo.address);
122
128
  window.open(`https://maps.google.com?q=${e}`, "_blank");
123
129
  }
124
- }, Q = () => {
125
- w && (k({
126
- ...w,
127
- notes: G
130
+ }, ne = () => {
131
+ G && (K({
132
+ ...G,
133
+ notes: q
128
134
  }), alert("Notes saved successfully"));
129
- }, $ = l(() => w ? H(w) : [], [w]);
130
- if (M) return /* @__PURE__ */ F(n, {
135
+ }, $ = l(() => G ? V(G) : [], [G]);
136
+ if (j) return /* @__PURE__ */ P(n, {
131
137
  title: "Task Details",
132
- children: /* @__PURE__ */ F("div", {
138
+ children: /* @__PURE__ */ P("div", {
133
139
  className: "flex items-center justify-center py-24",
134
- children: /* @__PURE__ */ I("div", {
140
+ children: /* @__PURE__ */ F("div", {
135
141
  className: "text-center",
136
- children: [/* @__PURE__ */ F(x, { className: "h-10 w-10 animate-spin text-text-secondary mx-auto mb-4" }), /* @__PURE__ */ F("p", {
142
+ children: [/* @__PURE__ */ P(x, { className: "h-10 w-10 animate-spin text-text-secondary mx-auto mb-4" }), /* @__PURE__ */ P("p", {
137
143
  className: "text-sm text-text-secondary",
138
144
  children: "Loading task details..."
139
145
  })]
140
146
  })
141
147
  })
142
148
  });
143
- if (!w) return /* @__PURE__ */ F(n, {
149
+ if (!G) return /* @__PURE__ */ P(n, {
144
150
  title: "Task Not Found",
145
- children: /* @__PURE__ */ F(i, {
146
- icon: /* @__PURE__ */ F(y, { className: "h-12 w-12" }),
151
+ children: /* @__PURE__ */ P(i, {
152
+ icon: /* @__PURE__ */ P(y, { className: "h-12 w-12" }),
147
153
  title: "Task not found",
148
154
  description: `No task found with ID "${p}".`,
149
- action: /* @__PURE__ */ F("button", {
155
+ action: /* @__PURE__ */ P("button", {
150
156
  type: "button",
151
157
  onClick: () => g("/worker/orders"),
152
158
  className: "rounded-lg bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
@@ -154,24 +160,24 @@ function W() {
154
160
  })
155
161
  })
156
162
  });
157
- let ee = B(w.type);
158
- return /* @__PURE__ */ I(n, {
159
- title: /* @__PURE__ */ I("div", {
163
+ let re = z(G.type);
164
+ return /* @__PURE__ */ F(n, {
165
+ title: /* @__PURE__ */ F("div", {
160
166
  className: "flex items-center gap-3",
161
- children: [/* @__PURE__ */ F("button", {
167
+ children: [/* @__PURE__ */ P("button", {
162
168
  type: "button",
163
169
  onClick: () => g("/worker/orders"),
164
170
  className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
165
- children: /* @__PURE__ */ F(f, { className: "h-5 w-5" })
166
- }), /* @__PURE__ */ F("span", { children: "Task Details" })]
171
+ children: /* @__PURE__ */ P(f, { className: "h-5 w-5" })
172
+ }), /* @__PURE__ */ P("span", { children: "Task Details" })]
167
173
  }),
168
174
  description: "Manage and track your assigned task",
169
175
  children: [
170
- /* @__PURE__ */ F(z, {
176
+ /* @__PURE__ */ P(R, {
171
177
  className: "mb-6",
172
178
  children: "Everything you need to complete one assigned task, in order. Use this page to see exactly what to do, reach the customer, navigate to their location, jot down notes, and mark the task started and then completed as you go — so nothing gets missed and your completion stats stay strong."
173
179
  }),
174
- /* @__PURE__ */ F(R, {
180
+ /* @__PURE__ */ P(L, {
175
181
  storageKey: "kadaikodi-task-details",
176
182
  className: "mb-6",
177
183
  steps: [
@@ -179,336 +185,336 @@ function W() {
179
185
  id: "navigate",
180
186
  label: "Head to the location",
181
187
  description: "Open directions to the customer.",
182
- onClick: Z
188
+ onClick: Q
183
189
  },
184
190
  {
185
191
  id: "call",
186
192
  label: "Call the customer",
187
193
  description: "Confirm details before you start.",
188
- onClick: X
194
+ onClick: Z
189
195
  },
190
196
  {
191
197
  id: "start",
192
- label: w.status === "completed" ? "Task completed" : "Start & complete the task",
193
- description: w.status === "completed" ? "This task is done — nice work." : "Mark it started, then completed when finished.",
194
- onClick: w.status === "completed" ? Y : J,
195
- done: w.status === "completed"
198
+ label: G.status === "completed" ? "Task completed" : "Start & complete the task",
199
+ description: G.status === "completed" ? "This task is done — nice work." : "Mark it started, then completed when finished.",
200
+ onClick: G.status === "completed" ? X : Y,
201
+ done: G.status === "completed"
196
202
  }
197
203
  ]
198
204
  }),
199
- /* @__PURE__ */ I("div", {
205
+ /* @__PURE__ */ F("div", {
200
206
  className: "space-y-6",
201
- children: [/* @__PURE__ */ I(L, { children: [/* @__PURE__ */ I("div", {
207
+ children: [/* @__PURE__ */ F(I, { children: [/* @__PURE__ */ F("div", {
202
208
  className: "flex items-start justify-between mb-4",
203
- children: [/* @__PURE__ */ I("div", {
209
+ children: [/* @__PURE__ */ F("div", {
204
210
  className: "flex items-start gap-3",
205
- children: [/* @__PURE__ */ F("div", {
211
+ children: [/* @__PURE__ */ P("div", {
206
212
  className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
207
- children: /* @__PURE__ */ F(ee, { className: "h-5 w-5 text-text-secondary" })
208
- }), /* @__PURE__ */ I("div", { children: [
209
- /* @__PURE__ */ F("h2", {
213
+ children: /* @__PURE__ */ P(re, { className: "h-5 w-5 text-text-secondary" })
214
+ }), /* @__PURE__ */ F("div", { children: [
215
+ /* @__PURE__ */ P("h2", {
210
216
  className: "text-xl font-bold text-text-primary",
211
- children: w.title
217
+ children: G.title
212
218
  }),
213
- /* @__PURE__ */ F("p", {
219
+ /* @__PURE__ */ P("p", {
214
220
  className: "text-sm text-text-secondary mt-1",
215
- children: w.description
221
+ children: G.description
216
222
  }),
217
- /* @__PURE__ */ I("div", {
223
+ /* @__PURE__ */ F("div", {
218
224
  className: "flex flex-wrap items-center gap-2 mt-3",
219
225
  children: [
220
- /* @__PURE__ */ F("span", {
221
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium uppercase", V(w.priority)),
222
- children: w.priority
226
+ /* @__PURE__ */ P("span", {
227
+ className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium uppercase", B(G.priority)),
228
+ children: G.priority
223
229
  }),
224
- /* @__PURE__ */ F(r, { status: w.status }),
225
- /* @__PURE__ */ I("span", {
230
+ /* @__PURE__ */ P(r, { status: G.status }),
231
+ /* @__PURE__ */ F("span", {
226
232
  className: "text-xs text-text-secondary flex items-center gap-1",
227
233
  children: [
228
- /* @__PURE__ */ F(v, { className: "h-3 w-3" }),
229
- w.estimatedTime,
234
+ /* @__PURE__ */ P(v, { className: "h-3 w-3" }),
235
+ G.estimatedTime,
230
236
  " min"
231
237
  ]
232
238
  })
233
239
  ]
234
240
  })
235
241
  ] })]
236
- }), /* @__PURE__ */ I("div", {
242
+ }), /* @__PURE__ */ F("div", {
237
243
  className: "text-right shrink-0",
238
244
  children: [
239
- /* @__PURE__ */ F("p", {
245
+ /* @__PURE__ */ P("p", {
240
246
  className: "text-xs text-text-secondary",
241
247
  children: "Assigned by"
242
248
  }),
243
- /* @__PURE__ */ F("p", {
249
+ /* @__PURE__ */ P("p", {
244
250
  className: "text-sm font-medium text-text-primary",
245
- children: w.assignedBy
251
+ children: G.assignedBy
246
252
  }),
247
- /* @__PURE__ */ F("p", {
253
+ /* @__PURE__ */ P("p", {
248
254
  className: "text-xs text-text-secondary mt-1",
249
- children: U(w.assignedTime)
255
+ children: H(G.assignedTime)
250
256
  })
251
257
  ]
252
258
  })]
253
- }), w.dueTime && w.status !== "completed" && /* @__PURE__ */ F("div", {
259
+ }), G.dueTime && G.status !== "completed" && /* @__PURE__ */ P("div", {
254
260
  className: "rounded-md bg-status-warning-bg-subtle border border-status-warning-text/20 p-3",
255
- children: /* @__PURE__ */ I("div", {
261
+ children: /* @__PURE__ */ F("div", {
256
262
  className: "flex items-center gap-2",
257
- children: [/* @__PURE__ */ F(j, { className: "h-4 w-4 text-status-warning-text shrink-0" }), /* @__PURE__ */ I("span", {
263
+ children: [/* @__PURE__ */ P(A, { className: "h-4 w-4 text-status-warning-text shrink-0" }), /* @__PURE__ */ F("span", {
258
264
  className: "text-xs font-medium text-status-warning-text",
259
- children: ["Due by ", U(w.dueTime)]
265
+ children: ["Due by ", H(G.dueTime)]
260
266
  })]
261
267
  })
262
- })] }), /* @__PURE__ */ I("div", {
268
+ })] }), /* @__PURE__ */ F("div", {
263
269
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
264
- children: [/* @__PURE__ */ I("div", {
270
+ children: [/* @__PURE__ */ F("div", {
265
271
  className: "lg:col-span-2 space-y-6",
266
272
  children: [
267
- /* @__PURE__ */ I("div", {
273
+ /* @__PURE__ */ F("div", {
268
274
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
269
- children: [/* @__PURE__ */ F("h3", {
275
+ children: [/* @__PURE__ */ P("h3", {
270
276
  className: "text-base font-semibold text-text-primary mb-4",
271
277
  children: "Customer Information"
272
- }), /* @__PURE__ */ I("div", {
278
+ }), /* @__PURE__ */ F("div", {
273
279
  className: "grid grid-cols-1 md:grid-cols-2 gap-5",
274
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("div", {
280
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("div", {
275
281
  className: "space-y-3",
276
- children: /* @__PURE__ */ I("div", {
282
+ children: /* @__PURE__ */ F("div", {
277
283
  className: "flex items-center gap-3",
278
- children: [/* @__PURE__ */ F("div", {
284
+ children: [/* @__PURE__ */ P("div", {
279
285
  className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
280
- children: /* @__PURE__ */ F(N, { className: "h-5 w-5" })
281
- }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
286
+ children: /* @__PURE__ */ P(M, { className: "h-5 w-5" })
287
+ }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
282
288
  className: "text-sm font-medium text-text-primary",
283
- children: w.customerInfo.name
284
- }), /* @__PURE__ */ F("p", {
289
+ children: G.customerInfo.name
290
+ }), /* @__PURE__ */ P("p", {
285
291
  className: "text-xs text-text-secondary",
286
- children: w.customerInfo.phone
292
+ children: G.customerInfo.phone
287
293
  })] })]
288
294
  })
289
- }), /* @__PURE__ */ I("div", {
295
+ }), /* @__PURE__ */ F("div", {
290
296
  className: "flex gap-2 mt-4",
291
- children: [/* @__PURE__ */ I("button", {
297
+ children: [/* @__PURE__ */ F("button", {
292
298
  type: "button",
293
- onClick: X,
299
+ onClick: Z,
294
300
  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",
295
- children: [/* @__PURE__ */ F(T, { className: "h-3.5 w-3.5" }), "Call Customer"]
296
- }), /* @__PURE__ */ I("button", {
301
+ children: [/* @__PURE__ */ P(T, { className: "h-3.5 w-3.5" }), "Call Customer"]
302
+ }), /* @__PURE__ */ F("button", {
297
303
  type: "button",
298
- onClick: Z,
304
+ onClick: Q,
299
305
  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",
300
- children: [/* @__PURE__ */ F(C, { className: "h-3.5 w-3.5" }), "Navigate"]
306
+ children: [/* @__PURE__ */ P(C, { className: "h-3.5 w-3.5" }), "Navigate"]
301
307
  })]
302
- })] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
308
+ })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
303
309
  className: "text-xs text-text-secondary mb-2",
304
310
  children: "Delivery Address"
305
- }), /* @__PURE__ */ F("div", {
311
+ }), /* @__PURE__ */ P("div", {
306
312
  className: "rounded-md bg-bg-sunken/50 p-3",
307
- children: /* @__PURE__ */ I("p", {
313
+ children: /* @__PURE__ */ F("p", {
308
314
  className: "text-xs text-text-primary flex items-start gap-2",
309
- children: [/* @__PURE__ */ F(S, { className: "h-3.5 w-3.5 shrink-0 mt-0.5 text-text-secondary" }), w.customerInfo.address]
315
+ children: [/* @__PURE__ */ P(S, { className: "h-3.5 w-3.5 shrink-0 mt-0.5 text-text-secondary" }), G.customerInfo.address]
310
316
  })
311
317
  })] })]
312
318
  })]
313
319
  }),
314
- w.orderItems.length > 0 && /* @__PURE__ */ I("div", {
320
+ G.orderItems.length > 0 && /* @__PURE__ */ F("div", {
315
321
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
316
- children: [/* @__PURE__ */ F("h3", {
322
+ children: [/* @__PURE__ */ P("h3", {
317
323
  className: "text-base font-semibold text-text-primary mb-3",
318
324
  children: "Order Items"
319
- }), /* @__PURE__ */ F("div", {
325
+ }), /* @__PURE__ */ P("div", {
320
326
  className: "space-y-2",
321
- children: w.orderItems.map((e, t) => /* @__PURE__ */ F("div", {
327
+ children: G.orderItems.map((e, t) => /* @__PURE__ */ P("div", {
322
328
  className: "flex items-start justify-between p-3 rounded-md bg-bg-sunken/50",
323
- children: /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("p", {
329
+ children: /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ F("p", {
324
330
  className: "text-sm font-medium text-text-primary",
325
331
  children: [
326
332
  e.quantity,
327
333
  "x ",
328
334
  e.name
329
335
  ]
330
- }), e.specialInstructions && /* @__PURE__ */ I("p", {
336
+ }), e.specialInstructions && /* @__PURE__ */ F("p", {
331
337
  className: "text-xs text-text-secondary mt-0.5",
332
338
  children: ["Note: ", e.specialInstructions]
333
339
  })] })
334
340
  }, t))
335
341
  })]
336
342
  }),
337
- w.specialInstructions && /* @__PURE__ */ I("div", {
343
+ G.specialInstructions && /* @__PURE__ */ F("div", {
338
344
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
339
- children: [/* @__PURE__ */ F("h3", {
345
+ children: [/* @__PURE__ */ P("h3", {
340
346
  className: "text-base font-semibold text-text-primary mb-3",
341
347
  children: "Special Instructions"
342
- }), /* @__PURE__ */ F("div", {
348
+ }), /* @__PURE__ */ P("div", {
343
349
  className: "rounded-md bg-status-warning-bg-subtle border border-status-warning-text/20 p-4",
344
- children: /* @__PURE__ */ I("p", {
350
+ children: /* @__PURE__ */ F("p", {
345
351
  className: "text-sm text-status-warning-text flex items-start gap-2",
346
- children: [/* @__PURE__ */ F(d, { className: "h-4 w-4 shrink-0 mt-0.5 text-status-warning-text" }), w.specialInstructions]
352
+ children: [/* @__PURE__ */ P(d, { className: "h-4 w-4 shrink-0 mt-0.5 text-status-warning-text" }), G.specialInstructions]
347
353
  })
348
354
  })]
349
355
  }),
350
- w.photos && w.photos.length > 0 && /* @__PURE__ */ I("div", {
356
+ G.photos && G.photos.length > 0 && /* @__PURE__ */ F("div", {
351
357
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
352
- children: [/* @__PURE__ */ I("h3", {
358
+ children: [/* @__PURE__ */ F("h3", {
353
359
  className: "text-base font-semibold text-text-primary flex items-center gap-2 mb-3",
354
- children: [/* @__PURE__ */ F(m, { className: "h-4 w-4 text-text-secondary" }), "Reference Photos"]
355
- }), /* @__PURE__ */ F("div", {
360
+ children: [/* @__PURE__ */ P(m, { className: "h-4 w-4 text-text-secondary" }), "Reference Photos"]
361
+ }), /* @__PURE__ */ P("div", {
356
362
  className: "grid grid-cols-2 md:grid-cols-3 gap-3",
357
- children: w.photos.map((e, t) => /* @__PURE__ */ F("img", {
363
+ children: G.photos.map((e, t) => /* @__PURE__ */ P("img", {
358
364
  src: e,
359
365
  alt: `Reference ${t + 1}`,
360
366
  className: "w-full h-32 object-cover rounded-lg border border-border-subtle"
361
367
  }, t))
362
368
  })]
363
369
  }),
364
- /* @__PURE__ */ I("div", {
370
+ /* @__PURE__ */ F("div", {
365
371
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
366
372
  children: [
367
- /* @__PURE__ */ I("h3", {
373
+ /* @__PURE__ */ F("h3", {
368
374
  className: "text-base font-semibold text-text-primary flex items-center gap-2 mb-3",
369
- children: [/* @__PURE__ */ F(A, { className: "h-4 w-4 text-text-secondary" }), "Task Notes"]
375
+ children: [/* @__PURE__ */ P(te, { className: "h-4 w-4 text-text-secondary" }), "Task Notes"]
370
376
  }),
371
- /* @__PURE__ */ F("textarea", {
372
- value: G,
373
- onChange: (e) => K(e.target.value),
377
+ /* @__PURE__ */ P("textarea", {
378
+ value: q,
379
+ onChange: (e) => J(e.target.value),
374
380
  placeholder: "Add your notes about this task...",
375
381
  rows: 4,
376
382
  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-border-focus/40 resize-none"
377
383
  }),
378
- /* @__PURE__ */ I("button", {
384
+ /* @__PURE__ */ F("button", {
379
385
  type: "button",
380
- onClick: Q,
386
+ onClick: ne,
381
387
  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",
382
- children: [/* @__PURE__ */ F(D, { className: "h-3.5 w-3.5" }), "Save Notes"]
388
+ children: [/* @__PURE__ */ P(D, { className: "h-3.5 w-3.5" }), "Save Notes"]
383
389
  })
384
390
  ]
385
391
  })
386
392
  ]
387
- }), /* @__PURE__ */ I("div", {
393
+ }), /* @__PURE__ */ F("div", {
388
394
  className: "space-y-6",
389
395
  children: [
390
- /* @__PURE__ */ I("div", {
396
+ /* @__PURE__ */ F("div", {
391
397
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
392
- children: [/* @__PURE__ */ F("h3", {
398
+ children: [/* @__PURE__ */ P("h3", {
393
399
  className: "text-base font-semibold text-text-primary mb-3",
394
400
  children: "Task Details"
395
- }), /* @__PURE__ */ I("div", {
401
+ }), /* @__PURE__ */ F("div", {
396
402
  className: "space-y-3",
397
403
  children: [
398
- /* @__PURE__ */ I("div", {
404
+ /* @__PURE__ */ F("div", {
399
405
  className: "flex items-center gap-2",
400
- children: [/* @__PURE__ */ F(y, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
406
+ children: [/* @__PURE__ */ P(y, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
401
407
  className: "text-xs text-text-secondary",
402
408
  children: "Order ID"
403
- }), /* @__PURE__ */ F("p", {
409
+ }), /* @__PURE__ */ P("p", {
404
410
  className: "text-sm font-medium font-mono text-text-primary",
405
- children: w.orderId
411
+ children: G.orderId
406
412
  })] })]
407
413
  }),
408
- /* @__PURE__ */ I("div", {
414
+ /* @__PURE__ */ F("div", {
409
415
  className: "flex items-center gap-2",
410
- children: [/* @__PURE__ */ F(O, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
416
+ children: [/* @__PURE__ */ P(O, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
411
417
  className: "text-xs text-text-secondary",
412
418
  children: "Cart"
413
- }), /* @__PURE__ */ F("p", {
419
+ }), /* @__PURE__ */ P("p", {
414
420
  className: "text-sm font-medium text-text-primary",
415
- children: w.cartName
421
+ children: G.cartName
416
422
  })] })]
417
423
  }),
418
- /* @__PURE__ */ I("div", {
424
+ /* @__PURE__ */ F("div", {
419
425
  className: "flex items-center gap-2",
420
- children: [/* @__PURE__ */ F(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
426
+ children: [/* @__PURE__ */ P(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
421
427
  className: "text-xs text-text-secondary",
422
428
  children: "Due At"
423
- }), /* @__PURE__ */ F("p", {
429
+ }), /* @__PURE__ */ P("p", {
424
430
  className: "text-sm text-text-primary",
425
- children: o(w.dueTime)
431
+ children: c(G.dueTime)
426
432
  })] })]
427
433
  }),
428
- /* @__PURE__ */ I("div", {
434
+ /* @__PURE__ */ F("div", {
429
435
  className: "flex items-center gap-2",
430
- children: [/* @__PURE__ */ F(b, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
436
+ children: [/* @__PURE__ */ P(b, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
431
437
  className: "text-xs text-text-secondary",
432
438
  children: "Earnings"
433
- }), /* @__PURE__ */ F("p", {
439
+ }), /* @__PURE__ */ P("p", {
434
440
  className: "text-sm font-medium text-status-success-text",
435
- children: a(w.earnings, { minimumFractionDigits: 0 })
441
+ children: s(G.earnings, { minimumFractionDigits: 0 })
436
442
  })] })]
437
443
  }),
438
- w.distance != null && /* @__PURE__ */ I("div", {
444
+ G.distance != null && /* @__PURE__ */ F("div", {
439
445
  className: "flex items-center gap-2",
440
- children: [/* @__PURE__ */ F(C, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
446
+ children: [/* @__PURE__ */ P(C, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
441
447
  className: "text-xs text-text-secondary",
442
448
  children: "Distance"
443
- }), /* @__PURE__ */ I("p", {
449
+ }), /* @__PURE__ */ F("p", {
444
450
  className: "text-sm text-text-primary",
445
- children: [w.distance, " km"]
451
+ children: [G.distance, " km"]
446
452
  })] })]
447
453
  }),
448
- /* @__PURE__ */ I("div", {
454
+ /* @__PURE__ */ F("div", {
449
455
  className: "flex items-center gap-2",
450
- children: [/* @__PURE__ */ F(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
456
+ children: [/* @__PURE__ */ P(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
451
457
  className: "text-xs text-text-secondary",
452
458
  children: "Assigned At"
453
- }), /* @__PURE__ */ F("p", {
459
+ }), /* @__PURE__ */ P("p", {
454
460
  className: "text-sm text-text-primary",
455
- children: o(w.assignedTime)
461
+ children: c(G.assignedTime)
456
462
  })] })]
457
463
  })
458
464
  ]
459
465
  })]
460
466
  }),
461
- /* @__PURE__ */ I("div", {
467
+ /* @__PURE__ */ F("div", {
462
468
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
463
- children: [/* @__PURE__ */ F("h3", {
469
+ children: [/* @__PURE__ */ P("h3", {
464
470
  className: "text-base font-semibold text-text-primary mb-4",
465
471
  children: "Status Timeline"
466
- }), /* @__PURE__ */ F("div", {
472
+ }), /* @__PURE__ */ P("div", {
467
473
  className: "relative",
468
474
  children: $.map((e, n) => {
469
475
  let r = n === $.length - 1, i = e.completed ? h : _;
470
- return /* @__PURE__ */ I("div", {
476
+ return /* @__PURE__ */ F("div", {
471
477
  className: "flex gap-3",
472
- children: [/* @__PURE__ */ I("div", {
478
+ children: [/* @__PURE__ */ F("div", {
473
479
  className: "flex flex-col items-center",
474
- children: [/* @__PURE__ */ F("div", {
480
+ children: [/* @__PURE__ */ P("div", {
475
481
  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"),
476
- children: /* @__PURE__ */ F(i, { className: "h-3.5 w-3.5" })
477
- }), !r && /* @__PURE__ */ F("div", { className: t("w-0.5 flex-1 my-1", e.completed ? "bg-status-success-bg-subtle" : "bg-border") })]
478
- }), /* @__PURE__ */ I("div", {
482
+ children: /* @__PURE__ */ P(i, { className: "h-3.5 w-3.5" })
483
+ }), !r && /* @__PURE__ */ P("div", { className: t("w-0.5 flex-1 my-1", e.completed ? "bg-status-success-bg-subtle" : "bg-border") })]
484
+ }), /* @__PURE__ */ F("div", {
479
485
  className: t("pb-5", r && "pb-0"),
480
- children: [/* @__PURE__ */ F("p", {
486
+ children: [/* @__PURE__ */ P("p", {
481
487
  className: "text-sm font-medium text-text-primary",
482
488
  children: e.label
483
- }), /* @__PURE__ */ F("p", {
489
+ }), /* @__PURE__ */ P("p", {
484
490
  className: "mt-0.5 text-xs text-text-secondary",
485
- children: e.timestamp ? o(e.timestamp) : "Pending"
491
+ children: e.timestamp ? c(e.timestamp) : "Pending"
486
492
  })]
487
493
  })]
488
494
  }, e.status);
489
495
  })
490
496
  })]
491
497
  }),
492
- /* @__PURE__ */ I("div", {
498
+ /* @__PURE__ */ F("div", {
493
499
  className: "space-y-3",
494
500
  children: [
495
- w.status === "pending" && /* @__PURE__ */ I("button", {
501
+ G.status === "pending" && /* @__PURE__ */ F("button", {
496
502
  type: "button",
497
- onClick: J,
503
+ onClick: Y,
498
504
  className: "w-full inline-flex items-center justify-center gap-2 rounded-lg bg-[var(--color-accent-soft)] px-4 py-3 text-sm font-medium text-text-primary hover:bg-[var(--color-accent-soft)] transition-colors",
499
- children: [/* @__PURE__ */ F(E, { className: "h-4 w-4" }), "Start Task"]
505
+ children: [/* @__PURE__ */ P(E, { className: "h-4 w-4" }), "Start Task"]
500
506
  }),
501
- w.status === "in_progress" && /* @__PURE__ */ I("button", {
507
+ G.status === "in_progress" && /* @__PURE__ */ F("button", {
502
508
  type: "button",
503
- onClick: Y,
509
+ onClick: X,
504
510
  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",
505
- children: [/* @__PURE__ */ F(h, { className: "h-4 w-4" }), "Complete Task"]
511
+ children: [/* @__PURE__ */ P(h, { className: "h-4 w-4" }), "Complete Task"]
506
512
  }),
507
- /* @__PURE__ */ I("button", {
513
+ /* @__PURE__ */ F("button", {
508
514
  type: "button",
509
515
  onClick: () => g("/worker/orders"),
510
516
  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",
511
- children: [/* @__PURE__ */ F(f, { className: "h-4 w-4" }), "Back to Tasks"]
517
+ children: [/* @__PURE__ */ P(f, { className: "h-4 w-4" }), "Back to Tasks"]
512
518
  })
513
519
  ]
514
520
  })