@burdenoff/microfe-kadaikodi 2026.1127.1 → 2026.1127.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.
@@ -4,16 +4,16 @@ import { EmptyState as n } from "../../components/EmptyState.js";
4
4
  import "../../components/viz/index.js";
5
5
  import { LiveTrackingMap as r } from "../../components/LiveTrackingMap.js";
6
6
  import { useKadaikodi as i } from "../../context/KadaikodiContext.js";
7
- import { useCreateReview as a, useOrder as ee } from "../../hooks/useKadaikodiApi.js";
8
- import { useKadaikodiStore as o } from "../../store/kadaikodiStore.js";
9
- import { useOrderTracking as te } from "../../hooks/useTrackingApi.js";
10
- import { Timeline as ne } from "../../components/viz/Timeline.js";
11
- import { cn as s } from "../../utils/cn.js";
12
- import { formatCurrency as c, formatDate as l, formatDistance as re, formatRelativeTime as u } from "../../utils/formatters.js";
13
- import { notifyOrderStatusChange as d } from "../../utils/orderStatusNotifier.js";
7
+ import { useCreateReview as ee, useOrder as te } from "../../hooks/useKadaikodiApi.js";
8
+ import { useKadaikodiStore as a } from "../../store/kadaikodiStore.js";
9
+ import { useOrderTracking as ne } from "../../hooks/useTrackingApi.js";
10
+ import { Timeline as re } from "../../components/viz/Timeline.js";
11
+ import { cn as o } from "../../utils/cn.js";
12
+ import { formatCurrency as s, formatDate as c, formatDistance as ie, formatRelativeTime as l } from "../../utils/formatters.js";
13
+ import { notifyOrderStatusChange as u } from "../../utils/orderStatusNotifier.js";
14
14
  import "../../store/index.js";
15
- import { useEffect as f, useRef as ie, useState as p } from "react";
16
- import { ArrowLeft as ae, CheckCircle2 as m, Clock as h, Loader2 as oe, MapPin as se, MessageCircle as g, Navigation as ce, Phone as _, ShoppingBag as v, Star as y, WifiOff as le, X as ue, XCircle as de } from "lucide-react";
15
+ import { useEffect as d, useRef as ae, useState as f } from "react";
16
+ import { ArrowLeft as oe, CheckCircle2 as p, Clock as m, Loader2 as se, MapPin as h, MessageCircle as g, Navigation as ce, Phone as _, ShoppingBag as v, Star as y, WifiOff as le, X as ue, XCircle as de } from "lucide-react";
17
17
  import { useParams as b } from "react-router";
18
18
  import { jsx as x, jsxs as S } from "react/jsx-runtime";
19
19
  import { GlassCard as fe, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
@@ -51,29 +51,32 @@ function me(e, t) {
51
51
  } : null;
52
52
  }
53
53
  function he(e, t, n) {
54
+ return t ? e.actualDeliveryTime ? `Delivered at ${c(e.actualDeliveryTime)}` : "Delivered" : n ? `Estimated arrival by ${c(n)}` : e.estimatedDeliveryTime ? `Estimated delivery by ${c(e.estimatedDeliveryTime)}` : "Estimated delivery time: TBD";
55
+ }
56
+ function ge(e, t, n) {
54
57
  if (e) {
55
- let t = u(e.recordedAt);
58
+ let t = l(e.recordedAt);
56
59
  return e.stale ? `Courier location last updated ${t}` : `Live courier location · updated ${t}`;
57
60
  }
58
61
  return t ? "Waiting for the delivery partner's location…" : n ? "" : "Live courier location is shared while your order is out for delivery.";
59
62
  }
60
63
  function E() {
61
- let { orderId: u } = b(), { navigateTo: E, currentUser: D } = i(), { data: O, isLoading: k, isError: A } = ee(u, { pollWhileActive: !0 }), { data: j } = te(u), M = a(), [N, P] = p(!1), [F, I] = p(5), [L, R] = p(""), [z, B] = p(null), V = (e) => {
64
+ let { orderId: l } = b(), { navigateTo: E, currentUser: D } = i(), { data: O, isLoading: k, isError: A } = te(l, { pollWhileActive: !0 }), { data: j } = ne(l), M = ee(), [N, P] = f(!1), [F, I] = f(5), [L, R] = f(""), [z, B] = f(null), V = (e) => {
62
65
  B(e), setTimeout(() => B(null), 3e3);
63
- }, H = o((e) => u ? e.lastKnownOrderStatus[u] : void 0), ge = o((e) => e.setLastKnownOrderStatus), U = ie(/* @__PURE__ */ new Set());
64
- f(() => {
65
- if (!O || !u) return;
66
- let e = H?.status, t = e !== void 0 && e !== O.status, n = `${u}:${O.status}`;
66
+ }, H = a((e) => l ? e.lastKnownOrderStatus[l] : void 0), _e = a((e) => e.setLastKnownOrderStatus), U = ae(/* @__PURE__ */ new Set());
67
+ d(() => {
68
+ if (!O || !l) return;
69
+ let e = H?.status, t = e !== void 0 && e !== O.status, n = `${l}:${O.status}`;
67
70
  if (t && !U.current.has(n)) {
68
71
  U.current.add(n);
69
72
  let e = w[O.status] ?? O.status;
70
- V(`Order status updated: ${e}`), d({
71
- orderId: u,
73
+ V(`Order status updated: ${e}`), u({
74
+ orderId: l,
72
75
  title: `${O.cartName} — ${e}`,
73
76
  body: T[O.status] ?? `Your order is now ${e.toLowerCase()}.`
74
77
  });
75
78
  }
76
- ge(u, {
79
+ _e(l, {
77
80
  status: O.status,
78
81
  orderNumber: O.id,
79
82
  cartName: O.cartName,
@@ -83,9 +86,9 @@ function E() {
83
86
  }, [
84
87
  O?.status,
85
88
  O?.id,
86
- u
89
+ l
87
90
  ]);
88
- let _e = () => {
91
+ let ve = () => {
89
92
  !O || !D?.id ? V("Please sign in to rate this order.") : M.mutate({
90
93
  providerId: O.cartId,
91
94
  orderId: O.id,
@@ -120,7 +123,7 @@ function E() {
120
123
  className: "text-xs text-status-warning-text/80 mt-0.5",
121
124
  children: [
122
125
  "Cached ",
123
- l(H.cachedAt),
126
+ c(H.cachedAt),
124
127
  ". Reconnect to see live updates."
125
128
  ]
126
129
  })] })]
@@ -137,7 +140,7 @@ function E() {
137
140
  })] }), /* @__PURE__ */ x(t, { status: H.status })]
138
141
  }), /* @__PURE__ */ S("p", {
139
142
  className: "mt-3 text-sm text-text-primary",
140
- children: ["Last known total: ", c(H.total, { minimumFractionDigits: 0 })]
143
+ children: ["Last known total: ", s(H.total, { minimumFractionDigits: 0 })]
141
144
  })]
142
145
  })]
143
146
  }) : /* @__PURE__ */ x(e, {
@@ -154,14 +157,14 @@ function E() {
154
157
  })
155
158
  })
156
159
  });
157
- let W = C.indexOf(O.status), G = O.status === "cancelled", K = O.status === "delivered", q = j?.active ? j : null, J = q?.etaMinutes ?? (O.estimatedDeliveryTime ? Math.max(0, Math.round((new Date(O.estimatedDeliveryTime).getTime() - Date.now()) / 6e4)) : null), Y = q?.location ?? null, X = j?.origin ?? null, Z = q?.destination ?? null, ve = !!(X || Z || Y), Q = me(j?.courier ?? null, O.assignedWorker), $ = Q?.phone?.replace(/\s/g, ""), ye = C.map((e, t) => {
160
+ let W = C.indexOf(O.status), G = O.status === "cancelled", K = O.status === "delivered", q = j?.active ? j : null, J = q?.etaMinutes ?? (O.estimatedDeliveryTime ? Math.max(0, Math.round((new Date(O.estimatedDeliveryTime).getTime() - Date.now()) / 6e4)) : null), Y = q?.location ?? null, X = j?.origin ?? null, Z = q?.destination ?? null, ye = !!(X || Z || Y), Q = me(j?.courier ?? null, O.assignedWorker), $ = Q?.phone?.replace(/\s/g, ""), be = C.map((e, t) => {
158
161
  let n = t < W ? "success" : t === W ? "accent" : "muted", r = t === W;
159
162
  return {
160
163
  id: e,
161
164
  title: w[e],
162
165
  tone: n,
163
166
  meta: /* @__PURE__ */ x("span", {
164
- className: s(r ? "text-text-primary" : void 0),
167
+ className: o(r ? "text-text-primary" : void 0),
165
168
  children: T[e]
166
169
  })
167
170
  };
@@ -173,7 +176,7 @@ function E() {
173
176
  type: "button",
174
177
  onClick: () => E("/customer/orders"),
175
178
  className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
176
- children: /* @__PURE__ */ x(ae, { className: "h-5 w-5" })
179
+ children: /* @__PURE__ */ x(oe, { className: "h-5 w-5" })
177
180
  }), /* @__PURE__ */ x("span", { children: "Track Order" })]
178
181
  }),
179
182
  actions: /* @__PURE__ */ x(t, { status: O.status }),
@@ -206,14 +209,14 @@ function E() {
206
209
  }),
207
210
  /* @__PURE__ */ x("p", {
208
211
  className: "text-xs text-text-secondary mt-0.5",
209
- children: l(O.orderDate)
212
+ children: c(O.orderDate)
210
213
  })
211
214
  ]
212
215
  }), /* @__PURE__ */ S("div", {
213
216
  className: "text-left sm:text-right",
214
217
  children: [/* @__PURE__ */ x("p", {
215
218
  className: "text-xl font-bold text-text-primary",
216
- children: c(O.total, { minimumFractionDigits: 0 })
219
+ children: s(O.total, { minimumFractionDigits: 0 })
217
220
  }), /* @__PURE__ */ x("p", {
218
221
  className: "text-xs text-text-secondary uppercase",
219
222
  children: O.paymentMethod
@@ -229,10 +232,10 @@ function E() {
229
232
  children: O.cancellationReason
230
233
  })] })]
231
234
  }) : /* @__PURE__ */ S("div", {
232
- className: s("mt-4 flex items-start gap-3 rounded-lg p-4 border", K ? "bg-status-success-bg-subtle border-status-success-text/20" : "bg-[var(--color-accent-soft)] border-border-focus/20"),
233
- children: [K ? /* @__PURE__ */ x(m, { className: "h-5 w-5 text-status-success-text mt-0.5 shrink-0" }) : /* @__PURE__ */ x(h, { className: "h-5 w-5 text-text-primary mt-0.5 shrink-0" }), /* @__PURE__ */ x("p", {
234
- className: s("text-sm font-medium", K ? "text-status-success-text" : "text-text-primary"),
235
- children: K ? `Delivered at ${l(O.actualDeliveryTime)}` : O.estimatedDeliveryTime ? `Estimated delivery by ${l(O.estimatedDeliveryTime)}` : "Estimated delivery time: TBD"
235
+ className: o("mt-4 flex items-start gap-3 rounded-lg p-4 border", K ? "bg-status-success-bg-subtle border-status-success-text/20" : "bg-[var(--color-accent-soft)] border-border-focus/20"),
236
+ children: [K ? /* @__PURE__ */ x(p, { className: "h-5 w-5 text-status-success-text mt-0.5 shrink-0" }) : /* @__PURE__ */ x(m, { className: "h-5 w-5 text-text-primary mt-0.5 shrink-0" }), /* @__PURE__ */ x("p", {
237
+ className: o("text-sm font-medium", K ? "text-status-success-text" : "text-text-primary"),
238
+ children: he(O, K, q?.etaAt ?? null)
236
239
  })]
237
240
  })]
238
241
  }),
@@ -246,10 +249,10 @@ function E() {
246
249
  children: "Order Status"
247
250
  }), !K && J != null && /* @__PURE__ */ S("span", {
248
251
  className: "inline-flex items-center gap-1.5 rounded-full bg-[var(--color-accent-soft)] px-3 py-1 text-sm font-semibold text-accent-primary",
249
- children: [/* @__PURE__ */ x(h, { className: "h-3.5 w-3.5" }), J === 0 ? "Arriving now" : `Arriving in ~${J} min`]
252
+ children: [/* @__PURE__ */ x(m, { className: "h-3.5 w-3.5" }), J === 0 ? "Arriving now" : `Arriving in ~${J} min`]
250
253
  })]
251
254
  }),
252
- ve ? /* @__PURE__ */ x(r, {
255
+ ye ? /* @__PURE__ */ x(r, {
253
256
  origin: X,
254
257
  destination: Z,
255
258
  courier: Y,
@@ -264,11 +267,11 @@ function E() {
264
267
  /* @__PURE__ */ S("div", {
265
268
  className: "mb-6 mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
266
269
  children: [/* @__PURE__ */ S("span", {
267
- className: s("inline-flex items-center gap-1", Y?.stale && "text-status-warning-text"),
268
- children: [Y && /* @__PURE__ */ x(ce, { className: "h-3 w-3" }), he(Y, !!q, K)]
269
- }), q?.distanceMeters != null && /* @__PURE__ */ S("span", { children: [re(q.distanceMeters / 1e3), " away"] })]
270
+ className: o("inline-flex items-center gap-1", Y?.stale && "text-status-warning-text"),
271
+ children: [Y && /* @__PURE__ */ x(ce, { className: "h-3 w-3" }), ge(Y, !!q, K)]
272
+ }), q?.distanceMeters != null && /* @__PURE__ */ S("span", { children: [ie(q.distanceMeters / 1e3), " away"] })]
270
273
  }),
271
- /* @__PURE__ */ x(ne, { items: ye })
274
+ /* @__PURE__ */ x(re, { items: be })
272
275
  ]
273
276
  }),
274
277
  /* @__PURE__ */ S("div", {
@@ -296,7 +299,7 @@ function E() {
296
299
  /* @__PURE__ */ S("p", {
297
300
  className: "text-xs text-text-secondary",
298
301
  children: [
299
- c(e.price, { minimumFractionDigits: 0 }),
302
+ s(e.price, { minimumFractionDigits: 0 }),
300
303
  " x ",
301
304
  e.quantity
302
305
  ]
@@ -304,7 +307,7 @@ function E() {
304
307
  ]
305
308
  }), /* @__PURE__ */ x("p", {
306
309
  className: "text-sm font-medium text-text-primary",
307
- children: c(e.price * e.quantity, { minimumFractionDigits: 0 })
310
+ children: s(e.price * e.quantity, { minimumFractionDigits: 0 })
308
311
  })]
309
312
  }, t))
310
313
  }),
@@ -313,23 +316,23 @@ function E() {
313
316
  children: [
314
317
  /* @__PURE__ */ S("div", {
315
318
  className: "flex justify-between text-text-secondary",
316
- children: [/* @__PURE__ */ x("span", { children: "Subtotal" }), /* @__PURE__ */ x("span", { children: c(O.subtotal, { minimumFractionDigits: 0 }) })]
319
+ children: [/* @__PURE__ */ x("span", { children: "Subtotal" }), /* @__PURE__ */ x("span", { children: s(O.subtotal, { minimumFractionDigits: 0 }) })]
317
320
  }),
318
321
  /* @__PURE__ */ S("div", {
319
322
  className: "flex justify-between text-text-secondary",
320
- children: [/* @__PURE__ */ x("span", { children: "Delivery Fee" }), /* @__PURE__ */ x("span", { children: O.deliveryFee === 0 ? "FREE" : c(O.deliveryFee, { minimumFractionDigits: 0 }) })]
323
+ children: [/* @__PURE__ */ x("span", { children: "Delivery Fee" }), /* @__PURE__ */ x("span", { children: O.deliveryFee === 0 ? "FREE" : s(O.deliveryFee, { minimumFractionDigits: 0 }) })]
321
324
  }),
322
325
  /* @__PURE__ */ S("div", {
323
326
  className: "flex justify-between text-text-secondary",
324
- children: [/* @__PURE__ */ x("span", { children: "Tax" }), /* @__PURE__ */ x("span", { children: c(O.taxes, { minimumFractionDigits: 0 }) })]
327
+ children: [/* @__PURE__ */ x("span", { children: "Tax" }), /* @__PURE__ */ x("span", { children: s(O.taxes, { minimumFractionDigits: 0 }) })]
325
328
  }),
326
329
  O.discount && O.discount > 0 && /* @__PURE__ */ S("div", {
327
330
  className: "flex justify-between text-status-success-text",
328
- children: [/* @__PURE__ */ x("span", { children: "Discount" }), /* @__PURE__ */ S("span", { children: ["-", c(O.discount, { minimumFractionDigits: 0 })] })]
331
+ children: [/* @__PURE__ */ x("span", { children: "Discount" }), /* @__PURE__ */ S("span", { children: ["-", s(O.discount, { minimumFractionDigits: 0 })] })]
329
332
  }),
330
333
  /* @__PURE__ */ S("div", {
331
334
  className: "flex justify-between font-semibold pt-2 border-t border-border-subtle text-text-primary",
332
- children: [/* @__PURE__ */ x("span", { children: "Total" }), /* @__PURE__ */ x("span", { children: c(O.total, { minimumFractionDigits: 0 }) })]
335
+ children: [/* @__PURE__ */ x("span", { children: "Total" }), /* @__PURE__ */ x("span", { children: s(O.total, { minimumFractionDigits: 0 }) })]
333
336
  })
334
337
  ]
335
338
  })
@@ -349,7 +352,7 @@ function E() {
349
352
  children: [
350
353
  /* @__PURE__ */ S("div", {
351
354
  className: "flex items-start gap-2",
352
- children: [/* @__PURE__ */ x(se, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("div", { children: [
355
+ children: [/* @__PURE__ */ x(h, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("div", { children: [
353
356
  /* @__PURE__ */ x("p", {
354
357
  className: "text-xs text-text-secondary",
355
358
  children: "Delivery Address"
@@ -481,7 +484,7 @@ function E() {
481
484
  }),
482
485
  z && /* @__PURE__ */ S("div", {
483
486
  className: "fixed bottom-4 left-1/2 z-50 -translate-x-1/2 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle px-4 py-3 shadow-lg flex items-center gap-2",
484
- children: [/* @__PURE__ */ x(m, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ x("p", {
487
+ children: [/* @__PURE__ */ x(p, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ x("p", {
485
488
  className: "text-sm text-status-success-text",
486
489
  children: z
487
490
  })]
@@ -523,7 +526,7 @@ function E() {
523
526
  onClick: () => I(e),
524
527
  className: "p-0.5",
525
528
  "aria-label": `${e} star${e > 1 ? "s" : ""}`,
526
- children: /* @__PURE__ */ x(y, { className: s("h-7 w-7", e <= F ? "fill-status-warning-text text-status-warning-text" : "fill-none text-text-secondary/40") })
529
+ children: /* @__PURE__ */ x(y, { className: o("h-7 w-7", e <= F ? "fill-status-warning-text text-status-warning-text" : "fill-none text-text-secondary/40") })
527
530
  }, e))
528
531
  })]
529
532
  }),
@@ -547,10 +550,10 @@ function E() {
547
550
  className: "flex items-center gap-3",
548
551
  children: [/* @__PURE__ */ S("button", {
549
552
  type: "button",
550
- onClick: _e,
553
+ onClick: ve,
551
554
  disabled: M.isPending,
552
- className: s("flex-1 inline-flex items-center justify-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity", M.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
553
- children: [M.isPending && /* @__PURE__ */ x(oe, { className: "h-4 w-4 animate-spin" }), "Submit Rating"]
555
+ className: o("flex-1 inline-flex items-center justify-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity", M.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
556
+ children: [M.isPending && /* @__PURE__ */ x(se, { className: "h-4 w-4 animate-spin" }), "Submit Rating"]
554
557
  }), /* @__PURE__ */ x("button", {
555
558
  type: "button",
556
559
  onClick: () => P(!1),
@@ -1 +1 @@
1
- {"version":3,"file":"OrderTrackingPage.js","names":["statusOrder","statusLabels","statusDescriptions","courierContact","live","assigned","liveLocationCaption","location","updated","formatRelativeTime","delivered","OrderTrackingPage","useParams","useKadaikodi","order","useOrder","orderId","tracking","useOrderTracking","createReview","useCreateReview","showRateModal","setShowRateModal","useState","rating","setRating","reviewText","setReviewText","statusMessage","setStatusMessage","showStatus","msg","cachedOrder","useKadaikodiStore","s","setLastKnownOrderStatus","hasNotifiedRef","useRef","previousStatus","changed","changeKey","label","notifyOrderStatusChange","handleSubmitRating","currentUser","isLoading","PageLayout","isError","WifiOff","formatDate","StatusBadge","formatCurrency","EmptyState","ShoppingBag","navigateTo","currentStatusIndex","isCancelled","isDelivered","liveTracking","etaMinutes","courierLocation","mapOrigin","mapDestination","hasMapPoints","courier","courierPhone","timelineItems","tone","i","isCurrent","stepStatus","cn","ArrowLeft","PagePurpose","GlassCard","XCircle","CheckCircle2","Clock","LiveTrackingMap","Navigation","formatDistance","Timeline","item","index","MapPin","Star","Phone","MessageCircle","X","star","Loader2"],"sources":["../../../../src/kadaikodi/pages/customer/OrderTrackingPage.tsx"],"sourcesContent":["/**\n * Order Tracking Page\n * @module kadaikodi/pages/customer\n *\n * Real-time order tracking with status timeline, delivery partner info,\n * price breakdown, Need Help sidebar, and rate order functionality.\n *\n * Live courier position, drop-off pin and ETA come from\n * `kadaikodiOrderTracking` (BOFF-3962), polled at the interval the service\n * returns, and are drawn on a real map (LiveTrackingMap).\n */\n\nimport { useEffect, useRef, useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n ArrowLeft,\n CheckCircle2,\n Clock,\n MapPin,\n Phone,\n Star,\n ShoppingBag,\n WifiOff,\n XCircle,\n MessageCircle,\n Loader2,\n Navigation,\n X,\n} from 'lucide-react';\nimport { GlassCard, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { EmptyState } from '../../components/EmptyState';\nimport { Timeline, type TimelineItem } from '../../components/viz';\nimport { LiveTrackingMap } from '../../components/LiveTrackingMap';\nimport { useKadaikodi } from '../../context/KadaikodiContext';\nimport { useOrder, useCreateReview } from '../../hooks/useKadaikodiApi';\nimport {\n useOrderTracking,\n type CourierLocation,\n type TrackingCourier,\n} from '../../hooks/useTrackingApi';\nimport { cn } from '../../utils/cn';\nimport {\n formatCurrency,\n formatDate,\n formatDistance,\n formatRelativeTime,\n} from '../../utils/formatters';\nimport { notifyOrderStatusChange } from '../../utils/orderStatusNotifier';\nimport { useKadaikodiStore } from '../../store';\nimport type { MockOrder, OrderStatus } from '../../types';\n\nconst statusOrder: OrderStatus[] = [\n 'pending',\n 'confirmed',\n 'preparing',\n 'ready',\n 'out_for_delivery',\n 'delivered',\n];\n\nconst statusLabels: Record<string, string> = {\n pending: 'Order Placed',\n confirmed: 'Confirmed',\n preparing: 'Preparing',\n ready: 'Ready',\n out_for_delivery: 'Out for Delivery',\n delivered: 'Delivered',\n};\n\nconst statusDescriptions: Record<string, string> = {\n pending: 'Your order has been received',\n confirmed: 'Cart has accepted your order',\n preparing: 'Your food is being prepared',\n ready: 'Order is ready for pickup/delivery',\n out_for_delivery: 'Your order is on the way',\n delivered: 'Order has been delivered',\n};\n\ninterface CourierContact {\n name: string;\n phone?: string;\n rating?: number;\n}\n\n/** Courier contact: the live tracking courier, else the order's assigned worker. */\nfunction courierContact(\n live: TrackingCourier | null,\n assigned: MockOrder['assignedWorker']\n): CourierContact | null {\n if (live) return { name: live.name, phone: live.phone ?? undefined };\n if (assigned) {\n return { name: assigned.name, phone: assigned.phone || undefined, rating: assigned.rating };\n }\n return null;\n}\n\n/** One line under the map describing what the live location shows. */\nfunction liveLocationCaption(\n location: CourierLocation | null,\n live: boolean,\n delivered: boolean\n): string {\n if (location) {\n const updated = formatRelativeTime(location.recordedAt);\n return location.stale\n ? `Courier location last updated ${updated}`\n : `Live courier location · updated ${updated}`;\n }\n if (live) return \"Waiting for the delivery partner's location…\";\n if (delivered) return '';\n return 'Live courier location is shared while your order is out for delivery.';\n}\n\nexport function OrderTrackingPage() {\n const { orderId } = useParams<{ orderId: string }>();\n const { navigateTo, currentUser } = useKadaikodi();\n const { data: order, isLoading, isError } = useOrder(orderId, { pollWhileActive: true });\n const { data: tracking } = useOrderTracking(orderId);\n const createReview = useCreateReview();\n const [showRateModal, setShowRateModal] = useState(false);\n const [rating, setRating] = useState(5);\n const [reviewText, setReviewText] = useState('');\n const [statusMessage, setStatusMessage] = useState<string | null>(null);\n\n const showStatus = (msg: string) => {\n setStatusMessage(msg);\n setTimeout(() => setStatusMessage(null), 3000);\n };\n\n // Offline-cached order status (BOFF-4301). `cachedOrder` is what OS-level\n // notifications and the offline fallback view below both key off; it\n // outlives an app kill/reload because it's persisted, unlike the\n // in-memory react-query cache `order` comes from.\n const cachedOrder = useKadaikodiStore((s) =>\n orderId ? s.lastKnownOrderStatus[orderId] : undefined\n );\n const setLastKnownOrderStatus = useKadaikodiStore((s) => s.setLastKnownOrderStatus);\n const hasNotifiedRef = useRef<Set<string>>(new Set());\n\n useEffect(() => {\n if (!order || !orderId) return;\n const previousStatus = cachedOrder?.status;\n const changed = previousStatus !== undefined && previousStatus !== order.status;\n // De-dupe within a single mount: React Query's polling can re-fire the\n // same status more than once before the store write is observed.\n const changeKey = `${orderId}:${order.status}`;\n if (changed && !hasNotifiedRef.current.has(changeKey)) {\n hasNotifiedRef.current.add(changeKey);\n const label = statusLabels[order.status] ?? order.status;\n showStatus(`Order status updated: ${label}`);\n void notifyOrderStatusChange({\n orderId,\n title: `${order.cartName} — ${label}`,\n body: statusDescriptions[order.status] ?? `Your order is now ${label.toLowerCase()}.`,\n });\n }\n setLastKnownOrderStatus(orderId, {\n status: order.status,\n orderNumber: order.id,\n cartName: order.cartName,\n total: order.total,\n cachedAt: new Date().toISOString(),\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only order.status changes should re-run this; cachedOrder/setLastKnownOrderStatus would otherwise loop against the write this effect itself performs.\n }, [order?.status, order?.id, orderId]);\n\n const handleSubmitRating = () => {\n if (!order || !currentUser?.id) {\n showStatus('Please sign in to rate this order.');\n return;\n }\n createReview.mutate(\n {\n providerId: order.cartId,\n orderId: order.id,\n customerId: currentUser.id,\n rating,\n review: reviewText.trim() || undefined,\n },\n {\n onSuccess: () => {\n setShowRateModal(false);\n setReviewText('');\n showStatus('Thanks! Your rating has been submitted.');\n },\n onError: () => showStatus('Could not submit your rating. Please try again.'),\n }\n );\n };\n\n if (isLoading) {\n return (\n <PageLayout title=\"Track Order\">\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading order details...</p>\n </div>\n </PageLayout>\n );\n }\n\n if (!order) {\n // BOFF-4301: the live fetch failed (most likely offline) but a\n // previous session cached this order's last-known status on-device —\n // show that instead of a bare \"not found\", which would be misleading\n // (the order does exist; we just can't reach the network right now).\n if (isError && cachedOrder) {\n return (\n <PageLayout title=\"Track Order\">\n <div className=\"mb-4 flex items-start gap-3 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4\">\n <WifiOff className=\"h-5 w-5 text-status-warning-text mt-0.5 shrink-0\" />\n <div>\n <p className=\"text-sm font-medium text-status-warning-text\">\n You&apos;re offline — showing the last known status\n </p>\n <p className=\"text-xs text-status-warning-text/80 mt-0.5\">\n Cached {formatDate(cachedOrder.cachedAt)}. Reconnect to see live updates.\n </p>\n </div>\n </div>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n Order #{cachedOrder.orderNumber}\n </h2>\n <p className=\"text-sm text-text-secondary\">{cachedOrder.cartName}</p>\n </div>\n <StatusBadge status={cachedOrder.status as OrderStatus} />\n </div>\n <p className=\"mt-3 text-sm text-text-primary\">\n Last known total: {formatCurrency(cachedOrder.total, { minimumFractionDigits: 0 })}\n </p>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout title=\"Order Not Found\">\n <EmptyState\n icon={<ShoppingBag className=\"h-12 w-12\" />}\n title=\"Order not found\"\n description={`The order you're looking for doesn't exist.`}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/orders')}\n className=\"rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n View All Orders\n </button>\n }\n />\n </PageLayout>\n );\n }\n\n const currentStatusIndex = statusOrder.indexOf(order.status);\n const isCancelled = order.status === 'cancelled';\n const isDelivered = order.status === 'delivered';\n\n // ETA: the service's live, distance-based estimate while the courier is on\n // the way; otherwise only a real estimated time from the backend.\n const liveTracking = tracking?.active ? tracking : null;\n const etaMinutes =\n liveTracking?.etaMinutes ??\n (order.estimatedDeliveryTime\n ? Math.max(\n 0,\n Math.round((new Date(order.estimatedDeliveryTime).getTime() - Date.now()) / 60000)\n )\n : null);\n const courierLocation = liveTracking?.location ?? null;\n const mapOrigin = tracking?.origin ?? null;\n const mapDestination = liveTracking?.destination ?? null;\n const hasMapPoints = Boolean(mapOrigin || mapDestination || courierLocation);\n\n const courier = courierContact(tracking?.courier ?? null, order.assignedWorker);\n const courierPhone = courier?.phone?.replace(/\\s/g, '');\n\n const timelineItems: TimelineItem[] = statusOrder.map((stepStatus, i) => {\n const tone = i < currentStatusIndex ? 'success' : i === currentStatusIndex ? 'accent' : 'muted';\n const isCurrent = i === currentStatusIndex;\n return {\n id: stepStatus,\n title: statusLabels[stepStatus],\n tone,\n meta: (\n <span className={cn(isCurrent ? 'text-text-primary' : undefined)}>\n {statusDescriptions[stepStatus]}\n </span>\n ),\n };\n });\n\n return (\n <PageLayout\n title={\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/orders')}\n className=\"rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n <ArrowLeft className=\"h-5 w-5\" />\n </button>\n <span>Track Order</span>\n </div>\n }\n actions={<StatusBadge status={order.status} />}\n >\n <PagePurpose className=\"mb-6\">\n Follow your order in real time — see exactly where it is from kitchen to doorstep, who's\n delivering it, and reach out for help if anything looks off. The live status updates as your\n order moves through each stage.\n </PagePurpose>\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Left: Order Details & Timeline */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Order Header — the one emphasis zone (live status) */}\n <GlassCard treatment=\"glass\" glow className=\"p-5\">\n <div className=\"flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3\">\n <div className=\"flex-1\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Order #{order.id}</h2>\n <p className=\"text-sm text-text-secondary\">{order.cartName}</p>\n <p className=\"text-xs text-text-secondary mt-0.5\">{formatDate(order.orderDate)}</p>\n </div>\n <div className=\"text-left sm:text-right\">\n <p className=\"text-xl font-bold text-text-primary\">\n {formatCurrency(order.total, { minimumFractionDigits: 0 })}\n </p>\n <p className=\"text-xs text-text-secondary uppercase\">{order.paymentMethod}</p>\n </div>\n </div>\n\n {/* Status Banner */}\n {isCancelled ? (\n <div className=\"mt-4 flex items-start gap-3 rounded-lg bg-status-error-bg/10 p-4 border border-status-error-border/20\">\n <XCircle className=\"h-5 w-5 text-status-error-text mt-0.5 shrink-0\" />\n <div>\n <p className=\"font-medium text-status-error-text\">Order Cancelled</p>\n {order.cancellationReason && (\n <p className=\"text-sm text-status-error-text/80 mt-0.5\">\n {order.cancellationReason}\n </p>\n )}\n </div>\n </div>\n ) : (\n <div\n className={cn(\n 'mt-4 flex items-start gap-3 rounded-lg p-4 border',\n isDelivered\n ? 'bg-status-success-bg-subtle border-status-success-text/20'\n : 'bg-[var(--color-accent-soft)] border-border-focus/20'\n )}\n >\n {isDelivered ? (\n <CheckCircle2 className=\"h-5 w-5 text-status-success-text mt-0.5 shrink-0\" />\n ) : (\n <Clock className=\"h-5 w-5 text-text-primary mt-0.5 shrink-0\" />\n )}\n <p\n className={cn(\n 'text-sm font-medium',\n isDelivered ? 'text-status-success-text' : 'text-text-primary'\n )}\n >\n {isDelivered\n ? `Delivered at ${formatDate(order.actualDeliveryTime!)}`\n : order.estimatedDeliveryTime\n ? `Estimated delivery by ${formatDate(order.estimatedDeliveryTime)}`\n : 'Estimated delivery time: TBD'}\n </p>\n </div>\n )}\n </GlassCard>\n\n {/* Live tracking: ETA + live map + status timeline */}\n {!isCancelled && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <div className=\"mb-4 flex flex-wrap items-center justify-between gap-2\">\n <h3 className=\"text-base font-semibold text-text-primary\">Order Status</h3>\n {!isDelivered && etaMinutes != null && (\n <span className=\"inline-flex items-center gap-1.5 rounded-full bg-[var(--color-accent-soft)] px-3 py-1 text-sm font-semibold text-accent-primary\">\n <Clock className=\"h-3.5 w-3.5\" />\n {etaMinutes === 0 ? 'Arriving now' : `Arriving in ~${etaMinutes} min`}\n </span>\n )}\n </div>\n {hasMapPoints ? (\n <LiveTrackingMap\n origin={mapOrigin}\n destination={mapDestination}\n courier={courierLocation}\n originLabel={order.cartName}\n destinationLabel=\"Your drop-off point\"\n courierLabel={courier ? `${courier.name} (delivery partner)` : 'Delivery partner'}\n className=\"h-64\"\n />\n ) : (\n <div className=\"flex h-32 items-center justify-center rounded-lg border border-border-subtle bg-bg-sunken px-4 text-center text-sm text-text-secondary\">\n The live map appears once your order is on its way.\n </div>\n )}\n <div className=\"mb-6 mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary\">\n <span\n className={cn(\n 'inline-flex items-center gap-1',\n courierLocation?.stale && 'text-status-warning-text'\n )}\n >\n {courierLocation && <Navigation className=\"h-3 w-3\" />}\n {liveLocationCaption(courierLocation, Boolean(liveTracking), isDelivered)}\n </span>\n {liveTracking?.distanceMeters != null && (\n <span>{formatDistance(liveTracking.distanceMeters / 1000)} away</span>\n )}\n </div>\n <Timeline items={timelineItems} />\n </div>\n )}\n\n {/* Order Items & Price Breakdown */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <h3 className=\"text-base font-semibold text-text-primary mb-3\">Order Items</h3>\n <div className=\"space-y-2\">\n {order.items.map((item, index) => (\n <div\n key={index}\n className=\"flex justify-between items-start pb-2 border-b border-border-subtle last:border-b-0\"\n >\n <div className=\"flex-1 pr-2\">\n <p className=\"text-sm font-medium text-text-primary\">{item.name}</p>\n {item.customizations && item.customizations.length > 0 && (\n <p className=\"text-xs text-text-secondary\">\n {item.customizations.join(', ')}\n </p>\n )}\n <p className=\"text-xs text-text-secondary\">\n {formatCurrency(item.price, { minimumFractionDigits: 0 })} x {item.quantity}\n </p>\n </div>\n <p className=\"text-sm font-medium text-text-primary\">\n {formatCurrency(item.price * item.quantity, { minimumFractionDigits: 0 })}\n </p>\n </div>\n ))}\n </div>\n\n {/* Price Breakdown */}\n <div className=\"mt-4 pt-4 border-t border-border-subtle space-y-2 text-sm\">\n <div className=\"flex justify-between text-text-secondary\">\n <span>Subtotal</span>\n <span>{formatCurrency(order.subtotal, { minimumFractionDigits: 0 })}</span>\n </div>\n <div className=\"flex justify-between text-text-secondary\">\n <span>Delivery Fee</span>\n <span>\n {order.deliveryFee === 0\n ? 'FREE'\n : formatCurrency(order.deliveryFee, { minimumFractionDigits: 0 })}\n </span>\n </div>\n <div className=\"flex justify-between text-text-secondary\">\n <span>Tax</span>\n <span>{formatCurrency(order.taxes, { minimumFractionDigits: 0 })}</span>\n </div>\n {order.discount && order.discount > 0 && (\n <div className=\"flex justify-between text-status-success-text\">\n <span>Discount</span>\n <span>-{formatCurrency(order.discount, { minimumFractionDigits: 0 })}</span>\n </div>\n )}\n <div className=\"flex justify-between font-semibold pt-2 border-t border-border-subtle text-text-primary\">\n <span>Total</span>\n <span>{formatCurrency(order.total, { minimumFractionDigits: 0 })}</span>\n </div>\n </div>\n </div>\n </div>\n\n {/* Right: Sidebar */}\n <div className=\"lg:col-span-1 space-y-6\">\n {/* Delivery Details */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <h3 className=\"text-base font-semibold text-text-primary mb-3\">Delivery Details</h3>\n <div className=\"space-y-3\">\n <div className=\"flex items-start gap-2\">\n <MapPin className=\"mt-0.5 h-4 w-4 shrink-0 text-text-secondary\" />\n <div>\n <p className=\"text-xs text-text-secondary\">Delivery Address</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {order.deliveryAddress.street}\n </p>\n <p className=\"text-sm text-text-secondary\">{order.deliveryAddress.area}</p>\n <p className=\"text-sm text-text-secondary\">\n {order.deliveryAddress.city}, {order.deliveryAddress.pincode}\n </p>\n {order.deliveryAddress.landmark && (\n <p className=\"text-xs text-text-secondary mt-0.5\">\n Landmark: {order.deliveryAddress.landmark}\n </p>\n )}\n </div>\n </div>\n\n {/* Customer Notes */}\n {order.customerNotes && (\n <div>\n <p className=\"text-xs text-text-secondary\">Customer Notes</p>\n <p className=\"text-sm text-text-primary\">{order.customerNotes}</p>\n </div>\n )}\n\n {/* Payment */}\n <div>\n <p className=\"text-xs text-text-secondary\">Payment Method</p>\n <p className=\"text-sm font-medium text-text-primary capitalize\">\n {order.paymentMethod}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {order.paymentStatus === 'paid'\n ? 'Paid'\n : order.paymentStatus === 'refunded'\n ? 'Refunded'\n : order.paymentStatus === 'failed'\n ? 'Payment Failed'\n : order.paymentStatus === 'processing'\n ? 'Payment Processing'\n : 'Payment Pending'}\n </p>\n </div>\n </div>\n </div>\n\n {/* Delivery Partner */}\n {courier && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <h3 className=\"text-base font-semibold text-text-primary mb-3\">Delivery Partner</h3>\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-3\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary\">\n <span className=\"text-sm font-semibold\">{courier.name.charAt(0)}</span>\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium text-text-primary\">{courier.name}</p>\n {courier.rating != null ? (\n <div className=\"flex items-center gap-1.5 mt-0.5\">\n <Star className=\"h-3 w-3 fill-status-warning-text text-status-warning-text\" />\n <span className=\"text-xs text-text-secondary\">{courier.rating}/5</span>\n </div>\n ) : courierPhone ? (\n <p className=\"text-xs text-text-secondary mt-0.5\">{courier.phone}</p>\n ) : null}\n </div>\n </div>\n {courierPhone ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <a\n href={`tel:${courierPhone}`}\n className=\"flex items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-3 py-2.5 text-sm font-semibold text-action-primary-text hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Phone className=\"h-4 w-4\" />\n Call\n </a>\n <a\n href={`sms:${courierPhone}`}\n className=\"flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <MessageCircle className=\"h-4 w-4\" />\n Message\n </a>\n </div>\n ) : (\n <p className=\"text-xs text-text-secondary\">\n The cart has not shared a contact number for this delivery partner.\n </p>\n )}\n </div>\n </div>\n )}\n\n {/* Need Help */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <h3 className=\"text-base font-semibold text-text-primary mb-3\">Need Help?</h3>\n <div className=\"space-y-2\">\n <a\n href=\"mailto:support@kadaikodi.com\"\n className=\"w-full flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <MessageCircle className=\"h-4 w-4\" />\n Email Support\n </a>\n <button\n type=\"button\"\n onClick={() => (window.location.href = 'tel:7012270561')}\n className=\"w-full flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Phone className=\"h-4 w-4\" />\n Call Support\n </button>\n {isDelivered && !order.rating && (\n <button\n type=\"button\"\n onClick={() => setShowRateModal(true)}\n className=\"w-full flex items-center justify-center gap-2 rounded-lg bg-foreground px-3 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n <Star className=\"h-4 w-4\" />\n Rate Order\n </button>\n )}\n </div>\n </div>\n </div>\n </div>\n\n {/* Status message */}\n {statusMessage && (\n <div className=\"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle px-4 py-3 shadow-lg flex items-center gap-2\">\n <CheckCircle2 className=\"h-4 w-4 text-status-success-text shrink-0\" />\n <p className=\"text-sm text-status-success-text\">{statusMessage}</p>\n </div>\n )}\n\n {/* Rate Order Modal */}\n {showRateModal && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4\">\n <div className=\"w-full max-w-md rounded-lg border border-border-subtle bg-bg-surface shadow-lg\">\n <div className=\"p-5\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"text-lg font-semibold text-text-primary\">Rate your order</h3>\n <button\n type=\"button\"\n onClick={() => setShowRateModal(false)}\n className=\"rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n\n <div className=\"mb-4\">\n <label className=\"block text-sm font-medium text-text-primary mb-2\">\n Your rating\n </label>\n <div className=\"flex items-center gap-1\">\n {[1, 2, 3, 4, 5].map((star) => (\n <button\n key={star}\n type=\"button\"\n onClick={() => setRating(star)}\n className=\"p-0.5\"\n aria-label={`${star} star${star > 1 ? 's' : ''}`}\n >\n <Star\n className={cn(\n 'h-7 w-7',\n star <= rating\n ? 'fill-status-warning-text text-status-warning-text'\n : 'fill-none text-text-secondary/40'\n )}\n />\n </button>\n ))}\n </div>\n </div>\n\n <div className=\"mb-5\">\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n Review <span className=\"text-text-secondary font-normal\">(optional)</span>\n </label>\n <textarea\n rows={4}\n value={reviewText}\n onChange={(e) => setReviewText(e.target.value)}\n placeholder=\"How was your order?\"\n className=\"w-full rounded-lg 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-[var(--color-focus-ring)] resize-none\"\n />\n </div>\n\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={handleSubmitRating}\n disabled={createReview.isPending}\n className={cn(\n 'flex-1 inline-flex items-center justify-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity',\n createReview.isPending ? 'opacity-60 cursor-not-allowed' : 'hover:opacity-90'\n )}\n >\n {createReview.isPending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n Submit Rating\n </button>\n <button\n type=\"button\"\n onClick={() => setShowRateModal(false)}\n className=\"rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n Cancel\n </button>\n </div>\n </div>\n </div>\n </div>\n )}\n </PageLayout>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ACvB,WAAWoD,EACT,oJACApD,EAAa,YAAY,kCAAkC,kBAC7D;SAPF,UAAA,CASGA,EAAa,aAAa,kBAACuE,IAAD,EAAS,WAAU,uBAAwB,CAAA,GAAE,eAElE;QACR,CAAA,GAAA,kBAAC,UAAD;SACE,MAAK;SACL,eAAepE,EAAiB,EAAK;SACrC,WAAU;SACX,UAAA;QAEO,CAAA,CACL;;MACF;;IACF,CAAA;GACF,CAAA;EAEG;;AAEhB"}
1
+ {"version":3,"file":"OrderTrackingPage.js","names":["statusOrder","statusLabels","statusDescriptions","courierContact","live","assigned","deliveryBannerText","delivered","order","formatDate","liveEtaAt","liveLocationCaption","location","updated","formatRelativeTime","OrderTrackingPage","useParams","useKadaikodi","useOrder","orderId","tracking","useOrderTracking","createReview","useCreateReview","showRateModal","setShowRateModal","useState","rating","setRating","reviewText","setReviewText","statusMessage","setStatusMessage","showStatus","msg","cachedOrder","useKadaikodiStore","s","setLastKnownOrderStatus","hasNotifiedRef","useRef","previousStatus","changed","changeKey","label","notifyOrderStatusChange","handleSubmitRating","currentUser","isLoading","PageLayout","isError","WifiOff","StatusBadge","formatCurrency","EmptyState","ShoppingBag","navigateTo","currentStatusIndex","isCancelled","isDelivered","liveTracking","etaMinutes","courierLocation","mapOrigin","mapDestination","hasMapPoints","courier","courierPhone","timelineItems","tone","i","isCurrent","stepStatus","cn","ArrowLeft","PagePurpose","GlassCard","XCircle","CheckCircle2","Clock","LiveTrackingMap","Navigation","formatDistance","Timeline","item","index","MapPin","Star","Phone","MessageCircle","X","star","Loader2"],"sources":["../../../../src/kadaikodi/pages/customer/OrderTrackingPage.tsx"],"sourcesContent":["/**\n * Order Tracking Page\n * @module kadaikodi/pages/customer\n *\n * Real-time order tracking with status timeline, delivery partner info,\n * price breakdown, Need Help sidebar, and rate order functionality.\n *\n * Live courier position, drop-off pin and ETA come from\n * `kadaikodiOrderTracking` (BOFF-3962), polled at the interval the service\n * returns, and are drawn on a real map (LiveTrackingMap).\n */\n\nimport { useEffect, useRef, useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n ArrowLeft,\n CheckCircle2,\n Clock,\n MapPin,\n Phone,\n Star,\n ShoppingBag,\n WifiOff,\n XCircle,\n MessageCircle,\n Loader2,\n Navigation,\n X,\n} from 'lucide-react';\nimport { GlassCard, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { EmptyState } from '../../components/EmptyState';\nimport { Timeline, type TimelineItem } from '../../components/viz';\nimport { LiveTrackingMap } from '../../components/LiveTrackingMap';\nimport { useKadaikodi } from '../../context/KadaikodiContext';\nimport { useOrder, useCreateReview } from '../../hooks/useKadaikodiApi';\nimport {\n useOrderTracking,\n type CourierLocation,\n type TrackingCourier,\n} from '../../hooks/useTrackingApi';\nimport { cn } from '../../utils/cn';\nimport {\n formatCurrency,\n formatDate,\n formatDistance,\n formatRelativeTime,\n} from '../../utils/formatters';\nimport { notifyOrderStatusChange } from '../../utils/orderStatusNotifier';\nimport { useKadaikodiStore } from '../../store';\nimport type { MockOrder, OrderStatus } from '../../types';\n\nconst statusOrder: OrderStatus[] = [\n 'pending',\n 'confirmed',\n 'preparing',\n 'ready',\n 'out_for_delivery',\n 'delivered',\n];\n\nconst statusLabels: Record<string, string> = {\n pending: 'Order Placed',\n confirmed: 'Confirmed',\n preparing: 'Preparing',\n ready: 'Ready',\n out_for_delivery: 'Out for Delivery',\n delivered: 'Delivered',\n};\n\nconst statusDescriptions: Record<string, string> = {\n pending: 'Your order has been received',\n confirmed: 'Cart has accepted your order',\n preparing: 'Your food is being prepared',\n ready: 'Order is ready for pickup/delivery',\n out_for_delivery: 'Your order is on the way',\n delivered: 'Order has been delivered',\n};\n\ninterface CourierContact {\n name: string;\n phone?: string;\n rating?: number;\n}\n\n/** Courier contact: the live tracking courier, else the order's assigned worker. */\nfunction courierContact(\n live: TrackingCourier | null,\n assigned: MockOrder['assignedWorker']\n): CourierContact | null {\n if (live) return { name: live.name, phone: live.phone ?? undefined };\n if (assigned) {\n return { name: assigned.name, phone: assigned.phone || undefined, rating: assigned.rating };\n }\n return null;\n}\n\n/**\n * Header banner text. While the courier is on the way the live ETA from\n * kadaikodiOrderTracking wins over the order's static estimate, so the banner\n * never says \"TBD\" next to a live \"Arriving in\" chip.\n */\nfunction deliveryBannerText(\n order: MockOrder,\n delivered: boolean,\n liveEtaAt: string | null\n): string {\n if (delivered) {\n return order.actualDeliveryTime\n ? `Delivered at ${formatDate(order.actualDeliveryTime)}`\n : 'Delivered';\n }\n if (liveEtaAt) return `Estimated arrival by ${formatDate(liveEtaAt)}`;\n if (order.estimatedDeliveryTime) {\n return `Estimated delivery by ${formatDate(order.estimatedDeliveryTime)}`;\n }\n return 'Estimated delivery time: TBD';\n}\n\n/** One line under the map describing what the live location shows. */\nfunction liveLocationCaption(\n location: CourierLocation | null,\n live: boolean,\n delivered: boolean\n): string {\n if (location) {\n const updated = formatRelativeTime(location.recordedAt);\n return location.stale\n ? `Courier location last updated ${updated}`\n : `Live courier location · updated ${updated}`;\n }\n if (live) return \"Waiting for the delivery partner's location…\";\n if (delivered) return '';\n return 'Live courier location is shared while your order is out for delivery.';\n}\n\nexport function OrderTrackingPage() {\n const { orderId } = useParams<{ orderId: string }>();\n const { navigateTo, currentUser } = useKadaikodi();\n const { data: order, isLoading, isError } = useOrder(orderId, { pollWhileActive: true });\n const { data: tracking } = useOrderTracking(orderId);\n const createReview = useCreateReview();\n const [showRateModal, setShowRateModal] = useState(false);\n const [rating, setRating] = useState(5);\n const [reviewText, setReviewText] = useState('');\n const [statusMessage, setStatusMessage] = useState<string | null>(null);\n\n const showStatus = (msg: string) => {\n setStatusMessage(msg);\n setTimeout(() => setStatusMessage(null), 3000);\n };\n\n // Offline-cached order status (BOFF-4301). `cachedOrder` is what OS-level\n // notifications and the offline fallback view below both key off; it\n // outlives an app kill/reload because it's persisted, unlike the\n // in-memory react-query cache `order` comes from.\n const cachedOrder = useKadaikodiStore((s) =>\n orderId ? s.lastKnownOrderStatus[orderId] : undefined\n );\n const setLastKnownOrderStatus = useKadaikodiStore((s) => s.setLastKnownOrderStatus);\n const hasNotifiedRef = useRef<Set<string>>(new Set());\n\n useEffect(() => {\n if (!order || !orderId) return;\n const previousStatus = cachedOrder?.status;\n const changed = previousStatus !== undefined && previousStatus !== order.status;\n // De-dupe within a single mount: React Query's polling can re-fire the\n // same status more than once before the store write is observed.\n const changeKey = `${orderId}:${order.status}`;\n if (changed && !hasNotifiedRef.current.has(changeKey)) {\n hasNotifiedRef.current.add(changeKey);\n const label = statusLabels[order.status] ?? order.status;\n showStatus(`Order status updated: ${label}`);\n void notifyOrderStatusChange({\n orderId,\n title: `${order.cartName} — ${label}`,\n body: statusDescriptions[order.status] ?? `Your order is now ${label.toLowerCase()}.`,\n });\n }\n setLastKnownOrderStatus(orderId, {\n status: order.status,\n orderNumber: order.id,\n cartName: order.cartName,\n total: order.total,\n cachedAt: new Date().toISOString(),\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only order.status changes should re-run this; cachedOrder/setLastKnownOrderStatus would otherwise loop against the write this effect itself performs.\n }, [order?.status, order?.id, orderId]);\n\n const handleSubmitRating = () => {\n if (!order || !currentUser?.id) {\n showStatus('Please sign in to rate this order.');\n return;\n }\n createReview.mutate(\n {\n providerId: order.cartId,\n orderId: order.id,\n customerId: currentUser.id,\n rating,\n review: reviewText.trim() || undefined,\n },\n {\n onSuccess: () => {\n setShowRateModal(false);\n setReviewText('');\n showStatus('Thanks! Your rating has been submitted.');\n },\n onError: () => showStatus('Could not submit your rating. Please try again.'),\n }\n );\n };\n\n if (isLoading) {\n return (\n <PageLayout title=\"Track Order\">\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading order details...</p>\n </div>\n </PageLayout>\n );\n }\n\n if (!order) {\n // BOFF-4301: the live fetch failed (most likely offline) but a\n // previous session cached this order's last-known status on-device —\n // show that instead of a bare \"not found\", which would be misleading\n // (the order does exist; we just can't reach the network right now).\n if (isError && cachedOrder) {\n return (\n <PageLayout title=\"Track Order\">\n <div className=\"mb-4 flex items-start gap-3 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4\">\n <WifiOff className=\"h-5 w-5 text-status-warning-text mt-0.5 shrink-0\" />\n <div>\n <p className=\"text-sm font-medium text-status-warning-text\">\n You&apos;re offline — showing the last known status\n </p>\n <p className=\"text-xs text-status-warning-text/80 mt-0.5\">\n Cached {formatDate(cachedOrder.cachedAt)}. Reconnect to see live updates.\n </p>\n </div>\n </div>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n Order #{cachedOrder.orderNumber}\n </h2>\n <p className=\"text-sm text-text-secondary\">{cachedOrder.cartName}</p>\n </div>\n <StatusBadge status={cachedOrder.status as OrderStatus} />\n </div>\n <p className=\"mt-3 text-sm text-text-primary\">\n Last known total: {formatCurrency(cachedOrder.total, { minimumFractionDigits: 0 })}\n </p>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout title=\"Order Not Found\">\n <EmptyState\n icon={<ShoppingBag className=\"h-12 w-12\" />}\n title=\"Order not found\"\n description={`The order you're looking for doesn't exist.`}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/orders')}\n className=\"rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n View All Orders\n </button>\n }\n />\n </PageLayout>\n );\n }\n\n const currentStatusIndex = statusOrder.indexOf(order.status);\n const isCancelled = order.status === 'cancelled';\n const isDelivered = order.status === 'delivered';\n\n // ETA: the service's live, distance-based estimate while the courier is on\n // the way; otherwise only a real estimated time from the backend.\n const liveTracking = tracking?.active ? tracking : null;\n const etaMinutes =\n liveTracking?.etaMinutes ??\n (order.estimatedDeliveryTime\n ? Math.max(\n 0,\n Math.round((new Date(order.estimatedDeliveryTime).getTime() - Date.now()) / 60000)\n )\n : null);\n const courierLocation = liveTracking?.location ?? null;\n const mapOrigin = tracking?.origin ?? null;\n const mapDestination = liveTracking?.destination ?? null;\n const hasMapPoints = Boolean(mapOrigin || mapDestination || courierLocation);\n\n const courier = courierContact(tracking?.courier ?? null, order.assignedWorker);\n const courierPhone = courier?.phone?.replace(/\\s/g, '');\n\n const timelineItems: TimelineItem[] = statusOrder.map((stepStatus, i) => {\n const tone = i < currentStatusIndex ? 'success' : i === currentStatusIndex ? 'accent' : 'muted';\n const isCurrent = i === currentStatusIndex;\n return {\n id: stepStatus,\n title: statusLabels[stepStatus],\n tone,\n meta: (\n <span className={cn(isCurrent ? 'text-text-primary' : undefined)}>\n {statusDescriptions[stepStatus]}\n </span>\n ),\n };\n });\n\n return (\n <PageLayout\n title={\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/orders')}\n className=\"rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n <ArrowLeft className=\"h-5 w-5\" />\n </button>\n <span>Track Order</span>\n </div>\n }\n actions={<StatusBadge status={order.status} />}\n >\n <PagePurpose className=\"mb-6\">\n Follow your order in real time — see exactly where it is from kitchen to doorstep, who's\n delivering it, and reach out for help if anything looks off. The live status updates as your\n order moves through each stage.\n </PagePurpose>\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Left: Order Details & Timeline */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Order Header — the one emphasis zone (live status) */}\n <GlassCard treatment=\"glass\" glow className=\"p-5\">\n <div className=\"flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3\">\n <div className=\"flex-1\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Order #{order.id}</h2>\n <p className=\"text-sm text-text-secondary\">{order.cartName}</p>\n <p className=\"text-xs text-text-secondary mt-0.5\">{formatDate(order.orderDate)}</p>\n </div>\n <div className=\"text-left sm:text-right\">\n <p className=\"text-xl font-bold text-text-primary\">\n {formatCurrency(order.total, { minimumFractionDigits: 0 })}\n </p>\n <p className=\"text-xs text-text-secondary uppercase\">{order.paymentMethod}</p>\n </div>\n </div>\n\n {/* Status Banner */}\n {isCancelled ? (\n <div className=\"mt-4 flex items-start gap-3 rounded-lg bg-status-error-bg/10 p-4 border border-status-error-border/20\">\n <XCircle className=\"h-5 w-5 text-status-error-text mt-0.5 shrink-0\" />\n <div>\n <p className=\"font-medium text-status-error-text\">Order Cancelled</p>\n {order.cancellationReason && (\n <p className=\"text-sm text-status-error-text/80 mt-0.5\">\n {order.cancellationReason}\n </p>\n )}\n </div>\n </div>\n ) : (\n <div\n className={cn(\n 'mt-4 flex items-start gap-3 rounded-lg p-4 border',\n isDelivered\n ? 'bg-status-success-bg-subtle border-status-success-text/20'\n : 'bg-[var(--color-accent-soft)] border-border-focus/20'\n )}\n >\n {isDelivered ? (\n <CheckCircle2 className=\"h-5 w-5 text-status-success-text mt-0.5 shrink-0\" />\n ) : (\n <Clock className=\"h-5 w-5 text-text-primary mt-0.5 shrink-0\" />\n )}\n <p\n className={cn(\n 'text-sm font-medium',\n isDelivered ? 'text-status-success-text' : 'text-text-primary'\n )}\n >\n {deliveryBannerText(order, isDelivered, liveTracking?.etaAt ?? null)}\n </p>\n </div>\n )}\n </GlassCard>\n\n {/* Live tracking: ETA + live map + status timeline */}\n {!isCancelled && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <div className=\"mb-4 flex flex-wrap items-center justify-between gap-2\">\n <h3 className=\"text-base font-semibold text-text-primary\">Order Status</h3>\n {!isDelivered && etaMinutes != null && (\n <span className=\"inline-flex items-center gap-1.5 rounded-full bg-[var(--color-accent-soft)] px-3 py-1 text-sm font-semibold text-accent-primary\">\n <Clock className=\"h-3.5 w-3.5\" />\n {etaMinutes === 0 ? 'Arriving now' : `Arriving in ~${etaMinutes} min`}\n </span>\n )}\n </div>\n {hasMapPoints ? (\n <LiveTrackingMap\n origin={mapOrigin}\n destination={mapDestination}\n courier={courierLocation}\n originLabel={order.cartName}\n destinationLabel=\"Your drop-off point\"\n courierLabel={courier ? `${courier.name} (delivery partner)` : 'Delivery partner'}\n className=\"h-64\"\n />\n ) : (\n <div className=\"flex h-32 items-center justify-center rounded-lg border border-border-subtle bg-bg-sunken px-4 text-center text-sm text-text-secondary\">\n The live map appears once your order is on its way.\n </div>\n )}\n <div className=\"mb-6 mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary\">\n <span\n className={cn(\n 'inline-flex items-center gap-1',\n courierLocation?.stale && 'text-status-warning-text'\n )}\n >\n {courierLocation && <Navigation className=\"h-3 w-3\" />}\n {liveLocationCaption(courierLocation, Boolean(liveTracking), isDelivered)}\n </span>\n {liveTracking?.distanceMeters != null && (\n <span>{formatDistance(liveTracking.distanceMeters / 1000)} away</span>\n )}\n </div>\n <Timeline items={timelineItems} />\n </div>\n )}\n\n {/* Order Items & Price Breakdown */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <h3 className=\"text-base font-semibold text-text-primary mb-3\">Order Items</h3>\n <div className=\"space-y-2\">\n {order.items.map((item, index) => (\n <div\n key={index}\n className=\"flex justify-between items-start pb-2 border-b border-border-subtle last:border-b-0\"\n >\n <div className=\"flex-1 pr-2\">\n <p className=\"text-sm font-medium text-text-primary\">{item.name}</p>\n {item.customizations && item.customizations.length > 0 && (\n <p className=\"text-xs text-text-secondary\">\n {item.customizations.join(', ')}\n </p>\n )}\n <p className=\"text-xs text-text-secondary\">\n {formatCurrency(item.price, { minimumFractionDigits: 0 })} x {item.quantity}\n </p>\n </div>\n <p className=\"text-sm font-medium text-text-primary\">\n {formatCurrency(item.price * item.quantity, { minimumFractionDigits: 0 })}\n </p>\n </div>\n ))}\n </div>\n\n {/* Price Breakdown */}\n <div className=\"mt-4 pt-4 border-t border-border-subtle space-y-2 text-sm\">\n <div className=\"flex justify-between text-text-secondary\">\n <span>Subtotal</span>\n <span>{formatCurrency(order.subtotal, { minimumFractionDigits: 0 })}</span>\n </div>\n <div className=\"flex justify-between text-text-secondary\">\n <span>Delivery Fee</span>\n <span>\n {order.deliveryFee === 0\n ? 'FREE'\n : formatCurrency(order.deliveryFee, { minimumFractionDigits: 0 })}\n </span>\n </div>\n <div className=\"flex justify-between text-text-secondary\">\n <span>Tax</span>\n <span>{formatCurrency(order.taxes, { minimumFractionDigits: 0 })}</span>\n </div>\n {order.discount && order.discount > 0 && (\n <div className=\"flex justify-between text-status-success-text\">\n <span>Discount</span>\n <span>-{formatCurrency(order.discount, { minimumFractionDigits: 0 })}</span>\n </div>\n )}\n <div className=\"flex justify-between font-semibold pt-2 border-t border-border-subtle text-text-primary\">\n <span>Total</span>\n <span>{formatCurrency(order.total, { minimumFractionDigits: 0 })}</span>\n </div>\n </div>\n </div>\n </div>\n\n {/* Right: Sidebar */}\n <div className=\"lg:col-span-1 space-y-6\">\n {/* Delivery Details */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <h3 className=\"text-base font-semibold text-text-primary mb-3\">Delivery Details</h3>\n <div className=\"space-y-3\">\n <div className=\"flex items-start gap-2\">\n <MapPin className=\"mt-0.5 h-4 w-4 shrink-0 text-text-secondary\" />\n <div>\n <p className=\"text-xs text-text-secondary\">Delivery Address</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {order.deliveryAddress.street}\n </p>\n <p className=\"text-sm text-text-secondary\">{order.deliveryAddress.area}</p>\n <p className=\"text-sm text-text-secondary\">\n {order.deliveryAddress.city}, {order.deliveryAddress.pincode}\n </p>\n {order.deliveryAddress.landmark && (\n <p className=\"text-xs text-text-secondary mt-0.5\">\n Landmark: {order.deliveryAddress.landmark}\n </p>\n )}\n </div>\n </div>\n\n {/* Customer Notes */}\n {order.customerNotes && (\n <div>\n <p className=\"text-xs text-text-secondary\">Customer Notes</p>\n <p className=\"text-sm text-text-primary\">{order.customerNotes}</p>\n </div>\n )}\n\n {/* Payment */}\n <div>\n <p className=\"text-xs text-text-secondary\">Payment Method</p>\n <p className=\"text-sm font-medium text-text-primary capitalize\">\n {order.paymentMethod}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {order.paymentStatus === 'paid'\n ? 'Paid'\n : order.paymentStatus === 'refunded'\n ? 'Refunded'\n : order.paymentStatus === 'failed'\n ? 'Payment Failed'\n : order.paymentStatus === 'processing'\n ? 'Payment Processing'\n : 'Payment Pending'}\n </p>\n </div>\n </div>\n </div>\n\n {/* Delivery Partner */}\n {courier && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <h3 className=\"text-base font-semibold text-text-primary mb-3\">Delivery Partner</h3>\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-3\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary\">\n <span className=\"text-sm font-semibold\">{courier.name.charAt(0)}</span>\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium text-text-primary\">{courier.name}</p>\n {courier.rating != null ? (\n <div className=\"flex items-center gap-1.5 mt-0.5\">\n <Star className=\"h-3 w-3 fill-status-warning-text text-status-warning-text\" />\n <span className=\"text-xs text-text-secondary\">{courier.rating}/5</span>\n </div>\n ) : courierPhone ? (\n <p className=\"text-xs text-text-secondary mt-0.5\">{courier.phone}</p>\n ) : null}\n </div>\n </div>\n {courierPhone ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <a\n href={`tel:${courierPhone}`}\n className=\"flex items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-3 py-2.5 text-sm font-semibold text-action-primary-text hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Phone className=\"h-4 w-4\" />\n Call\n </a>\n <a\n href={`sms:${courierPhone}`}\n className=\"flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <MessageCircle className=\"h-4 w-4\" />\n Message\n </a>\n </div>\n ) : (\n <p className=\"text-xs text-text-secondary\">\n The cart has not shared a contact number for this delivery partner.\n </p>\n )}\n </div>\n </div>\n )}\n\n {/* Need Help */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-5\">\n <h3 className=\"text-base font-semibold text-text-primary mb-3\">Need Help?</h3>\n <div className=\"space-y-2\">\n <a\n href=\"mailto:support@kadaikodi.com\"\n className=\"w-full flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <MessageCircle className=\"h-4 w-4\" />\n Email Support\n </a>\n <button\n type=\"button\"\n onClick={() => (window.location.href = 'tel:7012270561')}\n className=\"w-full flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Phone className=\"h-4 w-4\" />\n Call Support\n </button>\n {isDelivered && !order.rating && (\n <button\n type=\"button\"\n onClick={() => setShowRateModal(true)}\n className=\"w-full flex items-center justify-center gap-2 rounded-lg bg-foreground px-3 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n <Star className=\"h-4 w-4\" />\n Rate Order\n </button>\n )}\n </div>\n </div>\n </div>\n </div>\n\n {/* Status message */}\n {statusMessage && (\n <div className=\"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle px-4 py-3 shadow-lg flex items-center gap-2\">\n <CheckCircle2 className=\"h-4 w-4 text-status-success-text shrink-0\" />\n <p className=\"text-sm text-status-success-text\">{statusMessage}</p>\n </div>\n )}\n\n {/* Rate Order Modal */}\n {showRateModal && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4\">\n <div className=\"w-full max-w-md rounded-lg border border-border-subtle bg-bg-surface shadow-lg\">\n <div className=\"p-5\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"text-lg font-semibold text-text-primary\">Rate your order</h3>\n <button\n type=\"button\"\n onClick={() => setShowRateModal(false)}\n className=\"rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n\n <div className=\"mb-4\">\n <label className=\"block text-sm font-medium text-text-primary mb-2\">\n Your rating\n </label>\n <div className=\"flex items-center gap-1\">\n {[1, 2, 3, 4, 5].map((star) => (\n <button\n key={star}\n type=\"button\"\n onClick={() => setRating(star)}\n className=\"p-0.5\"\n aria-label={`${star} star${star > 1 ? 's' : ''}`}\n >\n <Star\n className={cn(\n 'h-7 w-7',\n star <= rating\n ? 'fill-status-warning-text text-status-warning-text'\n : 'fill-none text-text-secondary/40'\n )}\n />\n </button>\n ))}\n </div>\n </div>\n\n <div className=\"mb-5\">\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n Review <span className=\"text-text-secondary font-normal\">(optional)</span>\n </label>\n <textarea\n rows={4}\n value={reviewText}\n onChange={(e) => setReviewText(e.target.value)}\n placeholder=\"How was your order?\"\n className=\"w-full rounded-lg 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-[var(--color-focus-ring)] resize-none\"\n />\n </div>\n\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={handleSubmitRating}\n disabled={createReview.isPending}\n className={cn(\n 'flex-1 inline-flex items-center justify-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity',\n createReview.isPending ? 'opacity-60 cursor-not-allowed' : 'hover:opacity-90'\n )}\n >\n {createReview.isPending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n Submit Rating\n </button>\n <button\n type=\"button\"\n onClick={() => setShowRateModal(false)}\n className=\"rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n Cancel\n </button>\n </div>\n </div>\n </div>\n </div>\n )}\n </PageLayout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AAK;SAC7C,aAAY;SACZ,WAAU;QACX,CAAA,CACE;;OAEL,kBAAC,OAAD;QAAK,WAAU;QAAf,UAAA,CACE,kBAAC,UAAD;SACE,MAAK;SACL,SAASgB;SACT,UAAUxB,EAAa;SACvB,WAAWmD,EACT,oJACAnD,EAAa,YAAY,kCAAkC,kBAC7D;SAPF,UAAA,CASGA,EAAa,aAAa,kBAACsE,IAAD,EAAS,WAAU,uBAAwB,CAAA,GAAE,eAElE;QACR,CAAA,GAAA,kBAAC,UAAD;SACE,MAAK;SACL,eAAenE,EAAiB,EAAK;SACrC,WAAU;SACX,UAAA;QAEO,CAAA,CACL;;MACF;;IACF,CAAA;GACF,CAAA;EAEG;;AAEhB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-kadaikodi",
3
- "version": "2026.1127.1",
3
+ "version": "2026.1127.2",
4
4
  "description": "Burdenoff Kadaikodi Microfrontend - Mobile services marketplace platform for connecting service providers with customers",
5
5
  "type": "module",
6
6
  "files": [