@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.4

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