@burdenoff/microfe-kadaikodi 2026.1126.2 → 2026.1127.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +12 -0
- package/dist/kadaikodi/components/CourierLocationSharingCard.d.ts +10 -0
- package/dist/kadaikodi/components/CourierLocationSharingCard.js +52 -0
- package/dist/kadaikodi/components/CourierLocationSharingCard.js.map +1 -0
- package/dist/kadaikodi/components/DropoffPinField.d.ts +16 -0
- package/dist/kadaikodi/components/DropoffPinField.js +67 -0
- package/dist/kadaikodi/components/DropoffPinField.js.map +1 -0
- package/dist/kadaikodi/components/LiveTrackingMap.d.ts +27 -0
- package/dist/kadaikodi/components/LiveTrackingMap.js +74 -0
- package/dist/kadaikodi/components/LiveTrackingMap.js.map +1 -0
- package/dist/kadaikodi/hooks/useCourierLocationSharing.d.ts +24 -0
- package/dist/kadaikodi/hooks/useCourierLocationSharing.js +54 -0
- package/dist/kadaikodi/hooks/useCourierLocationSharing.js.map +1 -0
- package/dist/kadaikodi/hooks/useTrackingApi.d.ts +63 -0
- package/dist/kadaikodi/hooks/useTrackingApi.js +37 -0
- package/dist/kadaikodi/hooks/useTrackingApi.js.map +1 -0
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +222 -213
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.d.ts +4 -0
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +274 -252
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/shared.d.ts +0 -13
- package/dist/kadaikodi/pages/customer/shared.js +16 -119
- package/dist/kadaikodi/pages/customer/shared.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.d.ts +3 -2
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +67 -65
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/utils/deviceGeolocation.d.ts +46 -0
- package/dist/kadaikodi/utils/deviceGeolocation.js +71 -0
- package/dist/kadaikodi/utils/deviceGeolocation.js.map +1 -0
- package/dist/kadaikodi/utils/leaflet.d.ts +8 -0
- package/dist/kadaikodi/utils/leaflet.js +11 -0
- package/dist/kadaikodi/utils/leaflet.js.map +1 -0
- package/dist/node_modules/leaflet/dist/leaflet-src.js +4535 -0
- package/dist/node_modules/leaflet/dist/leaflet-src.js.map +1 -0
- package/package.json +4 -1
|
@@ -2,36 +2,37 @@ import { PageLayout as e } from "../../components/PageLayout.js";
|
|
|
2
2
|
import { StatusBadge as t } from "../../components/StatusBadge.js";
|
|
3
3
|
import { EmptyState as n } from "../../components/EmptyState.js";
|
|
4
4
|
import "../../components/viz/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { LiveTrackingMap as r } from "../../components/LiveTrackingMap.js";
|
|
6
|
+
import { useKadaikodi as i } from "../../context/KadaikodiContext.js";
|
|
7
|
+
import { useCreateReview as a, useOrder as ee } from "../../hooks/useKadaikodiApi.js";
|
|
8
8
|
import { useKadaikodiStore as o } from "../../store/kadaikodiStore.js";
|
|
9
|
-
import {
|
|
10
|
-
import { Timeline as
|
|
11
|
-
import {
|
|
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";
|
|
12
14
|
import "../../store/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { GlassCard as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
|
|
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";
|
|
17
|
+
import { useParams as b } from "react-router";
|
|
18
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
19
|
+
import { GlassCard as fe, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
|
|
19
20
|
// src/kadaikodi/pages/customer/OrderTrackingPage.tsx
|
|
20
|
-
var
|
|
21
|
+
var C = [
|
|
21
22
|
"pending",
|
|
22
23
|
"confirmed",
|
|
23
24
|
"preparing",
|
|
24
25
|
"ready",
|
|
25
26
|
"out_for_delivery",
|
|
26
27
|
"delivered"
|
|
27
|
-
],
|
|
28
|
+
], w = {
|
|
28
29
|
pending: "Order Placed",
|
|
29
30
|
confirmed: "Confirmed",
|
|
30
31
|
preparing: "Preparing",
|
|
31
32
|
ready: "Ready",
|
|
32
33
|
out_for_delivery: "Out for Delivery",
|
|
33
34
|
delivered: "Delivered"
|
|
34
|
-
},
|
|
35
|
+
}, T = {
|
|
35
36
|
pending: "Your order has been received",
|
|
36
37
|
confirmed: "Cart has accepted your order",
|
|
37
38
|
preparing: "Your food is being prepared",
|
|
@@ -39,417 +40,438 @@ var O = [
|
|
|
39
40
|
out_for_delivery: "Your order is on the way",
|
|
40
41
|
delivered: "Order has been delivered"
|
|
41
42
|
};
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
function me(e, t) {
|
|
44
|
+
return e ? {
|
|
45
|
+
name: e.name,
|
|
46
|
+
phone: e.phone ?? void 0
|
|
47
|
+
} : t ? {
|
|
48
|
+
name: t.name,
|
|
49
|
+
phone: t.phone || void 0,
|
|
50
|
+
rating: t.rating
|
|
51
|
+
} : null;
|
|
52
|
+
}
|
|
53
|
+
function he(e, t, n) {
|
|
54
|
+
if (e) {
|
|
55
|
+
let t = u(e.recordedAt);
|
|
56
|
+
return e.stale ? `Courier location last updated ${t}` : `Live courier location · updated ${t}`;
|
|
57
|
+
}
|
|
58
|
+
return t ? "Waiting for the delivery partner's location…" : n ? "" : "Live courier location is shared while your order is out for delivery.";
|
|
59
|
+
}
|
|
60
|
+
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) => {
|
|
62
|
+
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}`;
|
|
67
|
+
if (t && !U.current.has(n)) {
|
|
68
|
+
U.current.add(n);
|
|
69
|
+
let e = w[O.status] ?? O.status;
|
|
70
|
+
V(`Order status updated: ${e}`), d({
|
|
71
|
+
orderId: u,
|
|
72
|
+
title: `${O.cartName} — ${e}`,
|
|
73
|
+
body: T[O.status] ?? `Your order is now ${e.toLowerCase()}.`
|
|
56
74
|
});
|
|
57
75
|
}
|
|
58
|
-
|
|
59
|
-
status:
|
|
60
|
-
orderNumber:
|
|
61
|
-
cartName:
|
|
62
|
-
total:
|
|
76
|
+
ge(u, {
|
|
77
|
+
status: O.status,
|
|
78
|
+
orderNumber: O.id,
|
|
79
|
+
cartName: O.cartName,
|
|
80
|
+
total: O.total,
|
|
63
81
|
cachedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
64
82
|
});
|
|
65
83
|
}, [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
84
|
+
O?.status,
|
|
85
|
+
O?.id,
|
|
86
|
+
u
|
|
69
87
|
]);
|
|
70
|
-
let
|
|
71
|
-
!
|
|
72
|
-
providerId:
|
|
73
|
-
orderId:
|
|
74
|
-
customerId:
|
|
75
|
-
rating:
|
|
76
|
-
review:
|
|
88
|
+
let _e = () => {
|
|
89
|
+
!O || !D?.id ? V("Please sign in to rate this order.") : M.mutate({
|
|
90
|
+
providerId: O.cartId,
|
|
91
|
+
orderId: O.id,
|
|
92
|
+
customerId: D.id,
|
|
93
|
+
rating: F,
|
|
94
|
+
review: L.trim() || void 0
|
|
77
95
|
}, {
|
|
78
96
|
onSuccess: () => {
|
|
79
|
-
|
|
97
|
+
P(!1), R(""), V("Thanks! Your rating has been submitted.");
|
|
80
98
|
},
|
|
81
|
-
onError: () =>
|
|
99
|
+
onError: () => V("Could not submit your rating. Please try again.")
|
|
82
100
|
});
|
|
83
101
|
};
|
|
84
|
-
if (
|
|
102
|
+
if (k) return /* @__PURE__ */ x(e, {
|
|
85
103
|
title: "Track Order",
|
|
86
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ S("div", {
|
|
87
105
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
88
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ x("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4" }), /* @__PURE__ */ x("p", {
|
|
89
107
|
className: "text-sm text-text-secondary",
|
|
90
108
|
children: "Loading order details..."
|
|
91
109
|
})]
|
|
92
110
|
})
|
|
93
111
|
});
|
|
94
|
-
if (!
|
|
112
|
+
if (!O) return A && H ? /* @__PURE__ */ S(e, {
|
|
95
113
|
title: "Track Order",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ S("div", {
|
|
97
115
|
className: "mb-4 flex items-start gap-3 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ x(le, { className: "h-5 w-5 text-status-warning-text mt-0.5 shrink-0" }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
99
117
|
className: "text-sm font-medium text-status-warning-text",
|
|
100
118
|
children: "You're offline — showing the last known status"
|
|
101
|
-
}), /* @__PURE__ */
|
|
119
|
+
}), /* @__PURE__ */ S("p", {
|
|
102
120
|
className: "text-xs text-status-warning-text/80 mt-0.5",
|
|
103
121
|
children: [
|
|
104
122
|
"Cached ",
|
|
105
|
-
|
|
123
|
+
l(H.cachedAt),
|
|
106
124
|
". Reconnect to see live updates."
|
|
107
125
|
]
|
|
108
126
|
})] })]
|
|
109
|
-
}), /* @__PURE__ */
|
|
127
|
+
}), /* @__PURE__ */ S("div", {
|
|
110
128
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ S("div", {
|
|
112
130
|
className: "flex items-center justify-between gap-3",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("h2", {
|
|
114
132
|
className: "text-lg font-semibold text-text-primary",
|
|
115
|
-
children: ["Order #",
|
|
116
|
-
}), /* @__PURE__ */
|
|
133
|
+
children: ["Order #", H.orderNumber]
|
|
134
|
+
}), /* @__PURE__ */ x("p", {
|
|
117
135
|
className: "text-sm text-text-secondary",
|
|
118
|
-
children:
|
|
119
|
-
})] }), /* @__PURE__ */
|
|
120
|
-
}), /* @__PURE__ */
|
|
136
|
+
children: H.cartName
|
|
137
|
+
})] }), /* @__PURE__ */ x(t, { status: H.status })]
|
|
138
|
+
}), /* @__PURE__ */ S("p", {
|
|
121
139
|
className: "mt-3 text-sm text-text-primary",
|
|
122
|
-
children: ["Last known total: ",
|
|
140
|
+
children: ["Last known total: ", c(H.total, { minimumFractionDigits: 0 })]
|
|
123
141
|
})]
|
|
124
142
|
})]
|
|
125
|
-
}) : /* @__PURE__ */
|
|
143
|
+
}) : /* @__PURE__ */ x(e, {
|
|
126
144
|
title: "Order Not Found",
|
|
127
|
-
children: /* @__PURE__ */
|
|
128
|
-
icon: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ x(n, {
|
|
146
|
+
icon: /* @__PURE__ */ x(v, { className: "h-12 w-12" }),
|
|
129
147
|
title: "Order not found",
|
|
130
148
|
description: "The order you're looking for doesn't exist.",
|
|
131
|
-
action: /* @__PURE__ */
|
|
149
|
+
action: /* @__PURE__ */ x("button", {
|
|
132
150
|
type: "button",
|
|
133
|
-
onClick: () =>
|
|
151
|
+
onClick: () => E("/customer/orders"),
|
|
134
152
|
className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
135
153
|
children: "View All Orders"
|
|
136
154
|
})
|
|
137
155
|
})
|
|
138
156
|
});
|
|
139
|
-
let
|
|
140
|
-
let n = t <
|
|
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) => {
|
|
158
|
+
let n = t < W ? "success" : t === W ? "accent" : "muted", r = t === W;
|
|
141
159
|
return {
|
|
142
160
|
id: e,
|
|
143
|
-
title:
|
|
161
|
+
title: w[e],
|
|
144
162
|
tone: n,
|
|
145
|
-
meta: /* @__PURE__ */
|
|
146
|
-
className:
|
|
147
|
-
children:
|
|
163
|
+
meta: /* @__PURE__ */ x("span", {
|
|
164
|
+
className: s(r ? "text-text-primary" : void 0),
|
|
165
|
+
children: T[e]
|
|
148
166
|
})
|
|
149
167
|
};
|
|
150
168
|
});
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
title: /* @__PURE__ */
|
|
169
|
+
return /* @__PURE__ */ S(e, {
|
|
170
|
+
title: /* @__PURE__ */ S("div", {
|
|
153
171
|
className: "flex items-center gap-3",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ x("button", {
|
|
155
173
|
type: "button",
|
|
156
|
-
onClick: () =>
|
|
174
|
+
onClick: () => E("/customer/orders"),
|
|
157
175
|
className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
158
|
-
children: /* @__PURE__ */
|
|
159
|
-
}), /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ x(ae, { className: "h-5 w-5" })
|
|
177
|
+
}), /* @__PURE__ */ x("span", { children: "Track Order" })]
|
|
160
178
|
}),
|
|
161
|
-
actions: /* @__PURE__ */
|
|
179
|
+
actions: /* @__PURE__ */ x(t, { status: O.status }),
|
|
162
180
|
children: [
|
|
163
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ x(pe, {
|
|
164
182
|
className: "mb-6",
|
|
165
183
|
children: "Follow your order in real time — see exactly where it is from kitchen to doorstep, who's delivering it, and reach out for help if anything looks off. The live status updates as your order moves through each stage."
|
|
166
184
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ S("div", {
|
|
168
186
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ S("div", {
|
|
170
188
|
className: "lg:col-span-2 space-y-6",
|
|
171
189
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ S(fe, {
|
|
173
191
|
treatment: "glass",
|
|
174
192
|
glow: !0,
|
|
175
193
|
className: "p-5",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ S("div", {
|
|
177
195
|
className: "flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ S("div", {
|
|
179
197
|
className: "flex-1",
|
|
180
198
|
children: [
|
|
181
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ S("h2", {
|
|
182
200
|
className: "text-lg font-semibold text-text-primary",
|
|
183
|
-
children: ["Order #",
|
|
201
|
+
children: ["Order #", O.id]
|
|
184
202
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ x("p", {
|
|
186
204
|
className: "text-sm text-text-secondary",
|
|
187
|
-
children:
|
|
205
|
+
children: O.cartName
|
|
188
206
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ x("p", {
|
|
190
208
|
className: "text-xs text-text-secondary mt-0.5",
|
|
191
|
-
children:
|
|
209
|
+
children: l(O.orderDate)
|
|
192
210
|
})
|
|
193
211
|
]
|
|
194
|
-
}), /* @__PURE__ */
|
|
212
|
+
}), /* @__PURE__ */ S("div", {
|
|
195
213
|
className: "text-left sm:text-right",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ x("p", {
|
|
197
215
|
className: "text-xl font-bold text-text-primary",
|
|
198
|
-
children:
|
|
199
|
-
}), /* @__PURE__ */
|
|
216
|
+
children: c(O.total, { minimumFractionDigits: 0 })
|
|
217
|
+
}), /* @__PURE__ */ x("p", {
|
|
200
218
|
className: "text-xs text-text-secondary uppercase",
|
|
201
|
-
children:
|
|
219
|
+
children: O.paymentMethod
|
|
202
220
|
})]
|
|
203
221
|
})]
|
|
204
|
-
}),
|
|
222
|
+
}), G ? /* @__PURE__ */ S("div", {
|
|
205
223
|
className: "mt-4 flex items-start gap-3 rounded-lg bg-status-error-bg/10 p-4 border border-status-error-border/20",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ x(de, { className: "h-5 w-5 text-status-error-text mt-0.5 shrink-0" }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
207
225
|
className: "font-medium text-status-error-text",
|
|
208
226
|
children: "Order Cancelled"
|
|
209
|
-
}),
|
|
227
|
+
}), O.cancellationReason && /* @__PURE__ */ x("p", {
|
|
210
228
|
className: "text-sm text-status-error-text/80 mt-0.5",
|
|
211
|
-
children:
|
|
229
|
+
children: O.cancellationReason
|
|
212
230
|
})] })]
|
|
213
|
-
}) : /* @__PURE__ */
|
|
214
|
-
className:
|
|
215
|
-
children: [
|
|
216
|
-
className:
|
|
217
|
-
children:
|
|
231
|
+
}) : /* @__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"
|
|
218
236
|
})]
|
|
219
237
|
})]
|
|
220
238
|
}),
|
|
221
|
-
!
|
|
239
|
+
!G && /* @__PURE__ */ S("div", {
|
|
222
240
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
223
241
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ S("div", {
|
|
225
243
|
className: "mb-4 flex flex-wrap items-center justify-between gap-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
227
245
|
className: "text-base font-semibold text-text-primary",
|
|
228
246
|
children: "Order Status"
|
|
229
|
-
}), !
|
|
247
|
+
}), !K && J != null && /* @__PURE__ */ S("span", {
|
|
230
248
|
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",
|
|
231
|
-
children: [
|
|
232
|
-
/* @__PURE__ */ w(g, { className: "h-3.5 w-3.5" }),
|
|
233
|
-
"Arriving in ~",
|
|
234
|
-
$,
|
|
235
|
-
" min"
|
|
236
|
-
]
|
|
249
|
+
children: [/* @__PURE__ */ x(h, { className: "h-3.5 w-3.5" }), J === 0 ? "Arriving now" : `Arriving in ~${J} min`]
|
|
237
250
|
})]
|
|
238
251
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
252
|
+
ve ? /* @__PURE__ */ x(r, {
|
|
253
|
+
origin: X,
|
|
254
|
+
destination: Z,
|
|
255
|
+
courier: Y,
|
|
256
|
+
originLabel: O.cartName,
|
|
257
|
+
destinationLabel: "Your drop-off point",
|
|
258
|
+
courierLabel: Q ? `${Q.name} (delivery partner)` : "Delivery partner",
|
|
259
|
+
className: "h-64"
|
|
260
|
+
}) : /* @__PURE__ */ x("div", {
|
|
261
|
+
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",
|
|
262
|
+
children: "The live map appears once your order is on its way."
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ S("div", {
|
|
265
|
+
className: "mb-6 mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
|
|
266
|
+
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"] })]
|
|
244
270
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ x(ne, { items: ye })
|
|
246
272
|
]
|
|
247
273
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ S("div", {
|
|
249
275
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
250
276
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ x("h3", {
|
|
252
278
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
253
279
|
children: "Order Items"
|
|
254
280
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ x("div", {
|
|
256
282
|
className: "space-y-2",
|
|
257
|
-
children:
|
|
283
|
+
children: O.items.map((e, t) => /* @__PURE__ */ S("div", {
|
|
258
284
|
className: "flex justify-between items-start pb-2 border-b border-border-subtle last:border-b-0",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ S("div", {
|
|
260
286
|
className: "flex-1 pr-2",
|
|
261
287
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ x("p", {
|
|
263
289
|
className: "text-sm font-medium text-text-primary",
|
|
264
290
|
children: e.name
|
|
265
291
|
}),
|
|
266
|
-
e.customizations && e.customizations.length > 0 && /* @__PURE__ */
|
|
292
|
+
e.customizations && e.customizations.length > 0 && /* @__PURE__ */ x("p", {
|
|
267
293
|
className: "text-xs text-text-secondary",
|
|
268
294
|
children: e.customizations.join(", ")
|
|
269
295
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ S("p", {
|
|
271
297
|
className: "text-xs text-text-secondary",
|
|
272
298
|
children: [
|
|
273
|
-
|
|
299
|
+
c(e.price, { minimumFractionDigits: 0 }),
|
|
274
300
|
" x ",
|
|
275
301
|
e.quantity
|
|
276
302
|
]
|
|
277
303
|
})
|
|
278
304
|
]
|
|
279
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ x("p", {
|
|
280
306
|
className: "text-sm font-medium text-text-primary",
|
|
281
|
-
children:
|
|
307
|
+
children: c(e.price * e.quantity, { minimumFractionDigits: 0 })
|
|
282
308
|
})]
|
|
283
309
|
}, t))
|
|
284
310
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ S("div", {
|
|
286
312
|
className: "mt-4 pt-4 border-t border-border-subtle space-y-2 text-sm",
|
|
287
313
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ S("div", {
|
|
289
315
|
className: "flex justify-between text-text-secondary",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ x("span", { children: "Subtotal" }), /* @__PURE__ */ x("span", { children: c(O.subtotal, { minimumFractionDigits: 0 }) })]
|
|
291
317
|
}),
|
|
292
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ S("div", {
|
|
293
319
|
className: "flex justify-between text-text-secondary",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ x("span", { children: "Delivery Fee" }), /* @__PURE__ */ x("span", { children: O.deliveryFee === 0 ? "FREE" : c(O.deliveryFee, { minimumFractionDigits: 0 }) })]
|
|
295
321
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ S("div", {
|
|
297
323
|
className: "flex justify-between text-text-secondary",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ x("span", { children: "Tax" }), /* @__PURE__ */ x("span", { children: c(O.taxes, { minimumFractionDigits: 0 }) })]
|
|
299
325
|
}),
|
|
300
|
-
|
|
326
|
+
O.discount && O.discount > 0 && /* @__PURE__ */ S("div", {
|
|
301
327
|
className: "flex justify-between text-status-success-text",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ x("span", { children: "Discount" }), /* @__PURE__ */ S("span", { children: ["-", c(O.discount, { minimumFractionDigits: 0 })] })]
|
|
303
329
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ S("div", {
|
|
305
331
|
className: "flex justify-between font-semibold pt-2 border-t border-border-subtle text-text-primary",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ x("span", { children: "Total" }), /* @__PURE__ */ x("span", { children: c(O.total, { minimumFractionDigits: 0 }) })]
|
|
307
333
|
})
|
|
308
334
|
]
|
|
309
335
|
})
|
|
310
336
|
]
|
|
311
337
|
})
|
|
312
338
|
]
|
|
313
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ S("div", {
|
|
314
340
|
className: "lg:col-span-1 space-y-6",
|
|
315
341
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ S("div", {
|
|
317
343
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
319
345
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
320
346
|
children: "Delivery Details"
|
|
321
|
-
}), /* @__PURE__ */
|
|
347
|
+
}), /* @__PURE__ */ S("div", {
|
|
322
348
|
className: "space-y-3",
|
|
323
349
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ S("div", {
|
|
325
351
|
className: "flex items-start gap-2",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
352
|
+
children: [/* @__PURE__ */ x(se, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("div", { children: [
|
|
353
|
+
/* @__PURE__ */ x("p", {
|
|
328
354
|
className: "text-xs text-text-secondary",
|
|
329
355
|
children: "Delivery Address"
|
|
330
356
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ x("p", {
|
|
332
358
|
className: "text-sm font-medium text-text-primary",
|
|
333
|
-
children:
|
|
359
|
+
children: O.deliveryAddress.street
|
|
334
360
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ x("p", {
|
|
336
362
|
className: "text-sm text-text-secondary",
|
|
337
|
-
children:
|
|
363
|
+
children: O.deliveryAddress.area
|
|
338
364
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ S("p", {
|
|
340
366
|
className: "text-sm text-text-secondary",
|
|
341
367
|
children: [
|
|
342
|
-
|
|
368
|
+
O.deliveryAddress.city,
|
|
343
369
|
", ",
|
|
344
|
-
|
|
370
|
+
O.deliveryAddress.pincode
|
|
345
371
|
]
|
|
346
372
|
}),
|
|
347
|
-
|
|
373
|
+
O.deliveryAddress.landmark && /* @__PURE__ */ S("p", {
|
|
348
374
|
className: "text-xs text-text-secondary mt-0.5",
|
|
349
|
-
children: ["Landmark: ",
|
|
375
|
+
children: ["Landmark: ", O.deliveryAddress.landmark]
|
|
350
376
|
})
|
|
351
377
|
] })]
|
|
352
378
|
}),
|
|
353
|
-
|
|
379
|
+
O.customerNotes && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
354
380
|
className: "text-xs text-text-secondary",
|
|
355
381
|
children: "Customer Notes"
|
|
356
|
-
}), /* @__PURE__ */
|
|
382
|
+
}), /* @__PURE__ */ x("p", {
|
|
357
383
|
className: "text-sm text-text-primary",
|
|
358
|
-
children:
|
|
384
|
+
children: O.customerNotes
|
|
359
385
|
})] }),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ S("div", { children: [
|
|
387
|
+
/* @__PURE__ */ x("p", {
|
|
362
388
|
className: "text-xs text-text-secondary",
|
|
363
389
|
children: "Payment Method"
|
|
364
390
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ x("p", {
|
|
366
392
|
className: "text-sm font-medium text-text-primary capitalize",
|
|
367
|
-
children:
|
|
393
|
+
children: O.paymentMethod
|
|
368
394
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ x("p", {
|
|
370
396
|
className: "text-xs text-text-secondary",
|
|
371
|
-
children:
|
|
397
|
+
children: O.paymentStatus === "paid" ? "Paid" : O.paymentStatus === "refunded" ? "Refunded" : O.paymentStatus === "failed" ? "Payment Failed" : O.paymentStatus === "processing" ? "Payment Processing" : "Payment Pending"
|
|
372
398
|
})
|
|
373
399
|
] })
|
|
374
400
|
]
|
|
375
401
|
})]
|
|
376
402
|
}),
|
|
377
|
-
|
|
403
|
+
Q && /* @__PURE__ */ S("div", {
|
|
378
404
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
380
406
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
381
407
|
children: "Delivery Partner"
|
|
382
|
-
}), /* @__PURE__ */
|
|
408
|
+
}), /* @__PURE__ */ S("div", {
|
|
383
409
|
className: "space-y-3",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ S("div", {
|
|
385
411
|
className: "flex items-center gap-3",
|
|
386
|
-
children: [
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
children: P.assignedWorker.name.charAt(0)
|
|
392
|
-
})
|
|
393
|
-
}),
|
|
394
|
-
/* @__PURE__ */ T("div", {
|
|
395
|
-
className: "flex-1 min-w-0",
|
|
396
|
-
children: [/* @__PURE__ */ w("p", {
|
|
397
|
-
className: "text-sm font-medium text-text-primary",
|
|
398
|
-
children: P.assignedWorker.name
|
|
399
|
-
}), /* @__PURE__ */ T("div", {
|
|
400
|
-
className: "flex items-center gap-1.5 mt-0.5",
|
|
401
|
-
children: [/* @__PURE__ */ w(b, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ T("span", {
|
|
402
|
-
className: "text-xs text-text-secondary",
|
|
403
|
-
children: [P.assignedWorker.rating, "/5"]
|
|
404
|
-
})]
|
|
405
|
-
})]
|
|
406
|
-
}),
|
|
407
|
-
/* @__PURE__ */ w("a", {
|
|
408
|
-
href: `tel:${P.assignedWorker.phone}`,
|
|
409
|
-
className: "flex h-9 w-9 items-center justify-center rounded-full bg-bg-sunken text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
410
|
-
children: /* @__PURE__ */ w(y, { className: "h-4 w-4" })
|
|
412
|
+
children: [/* @__PURE__ */ x("div", {
|
|
413
|
+
className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
|
|
414
|
+
children: /* @__PURE__ */ x("span", {
|
|
415
|
+
className: "text-sm font-semibold",
|
|
416
|
+
children: Q.name.charAt(0)
|
|
411
417
|
})
|
|
412
|
-
|
|
413
|
-
|
|
418
|
+
}), /* @__PURE__ */ S("div", {
|
|
419
|
+
className: "flex-1 min-w-0",
|
|
420
|
+
children: [/* @__PURE__ */ x("p", {
|
|
421
|
+
className: "text-sm font-medium text-text-primary",
|
|
422
|
+
children: Q.name
|
|
423
|
+
}), Q.rating == null ? $ ? /* @__PURE__ */ x("p", {
|
|
424
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
425
|
+
children: Q.phone
|
|
426
|
+
}) : null : /* @__PURE__ */ S("div", {
|
|
427
|
+
className: "flex items-center gap-1.5 mt-0.5",
|
|
428
|
+
children: [/* @__PURE__ */ x(y, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ S("span", {
|
|
429
|
+
className: "text-xs text-text-secondary",
|
|
430
|
+
children: [Q.rating, "/5"]
|
|
431
|
+
})]
|
|
432
|
+
})]
|
|
433
|
+
})]
|
|
434
|
+
}), $ ? /* @__PURE__ */ S("div", {
|
|
414
435
|
className: "grid grid-cols-2 gap-2",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
416
|
-
href: `tel:${
|
|
436
|
+
children: [/* @__PURE__ */ S("a", {
|
|
437
|
+
href: `tel:${$}`,
|
|
417
438
|
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",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
419
|
-
}), /* @__PURE__ */
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
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-secondary cursor-not-allowed opacity-70",
|
|
424
|
-
children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Chat"]
|
|
439
|
+
children: [/* @__PURE__ */ x(_, { className: "h-4 w-4" }), "Call"]
|
|
440
|
+
}), /* @__PURE__ */ S("a", {
|
|
441
|
+
href: `sms:${$}`,
|
|
442
|
+
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",
|
|
443
|
+
children: [/* @__PURE__ */ x(g, { className: "h-4 w-4" }), "Message"]
|
|
425
444
|
})]
|
|
445
|
+
}) : /* @__PURE__ */ x("p", {
|
|
446
|
+
className: "text-xs text-text-secondary",
|
|
447
|
+
children: "The cart has not shared a contact number for this delivery partner."
|
|
426
448
|
})]
|
|
427
449
|
})]
|
|
428
450
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ S("div", {
|
|
430
452
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
432
454
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
433
455
|
children: "Need Help?"
|
|
434
|
-
}), /* @__PURE__ */
|
|
456
|
+
}), /* @__PURE__ */ S("div", {
|
|
435
457
|
className: "space-y-2",
|
|
436
458
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ S("a", {
|
|
438
460
|
href: "mailto:support@kadaikodi.com",
|
|
439
461
|
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",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
462
|
+
children: [/* @__PURE__ */ x(g, { className: "h-4 w-4" }), "Email Support"]
|
|
441
463
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ S("button", {
|
|
443
465
|
type: "button",
|
|
444
466
|
onClick: () => window.location.href = "tel:7012270561",
|
|
445
467
|
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",
|
|
446
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ x(_, { className: "h-4 w-4" }), "Call Support"]
|
|
447
469
|
}),
|
|
448
|
-
|
|
470
|
+
K && !O.rating && /* @__PURE__ */ S("button", {
|
|
449
471
|
type: "button",
|
|
450
|
-
onClick: () =>
|
|
472
|
+
onClick: () => P(!0),
|
|
451
473
|
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",
|
|
452
|
-
children: [/* @__PURE__ */
|
|
474
|
+
children: [/* @__PURE__ */ x(y, { className: "h-4 w-4" }), "Rate Order"]
|
|
453
475
|
})
|
|
454
476
|
]
|
|
455
477
|
})]
|
|
@@ -457,38 +479,38 @@ function j() {
|
|
|
457
479
|
]
|
|
458
480
|
})]
|
|
459
481
|
}),
|
|
460
|
-
|
|
482
|
+
z && /* @__PURE__ */ S("div", {
|
|
461
483
|
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",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
484
|
+
children: [/* @__PURE__ */ x(m, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ x("p", {
|
|
463
485
|
className: "text-sm text-status-success-text",
|
|
464
|
-
children:
|
|
486
|
+
children: z
|
|
465
487
|
})]
|
|
466
488
|
}),
|
|
467
|
-
|
|
489
|
+
N && /* @__PURE__ */ x("div", {
|
|
468
490
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
469
|
-
children: /* @__PURE__ */
|
|
491
|
+
children: /* @__PURE__ */ x("div", {
|
|
470
492
|
className: "w-full max-w-md rounded-lg border border-border-subtle bg-bg-surface shadow-lg",
|
|
471
|
-
children: /* @__PURE__ */
|
|
493
|
+
children: /* @__PURE__ */ S("div", {
|
|
472
494
|
className: "p-5",
|
|
473
495
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ S("div", {
|
|
475
497
|
className: "flex items-center justify-between mb-4",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
498
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
477
499
|
className: "text-lg font-semibold text-text-primary",
|
|
478
500
|
children: "Rate your order"
|
|
479
|
-
}), /* @__PURE__ */
|
|
501
|
+
}), /* @__PURE__ */ x("button", {
|
|
480
502
|
type: "button",
|
|
481
|
-
onClick: () =>
|
|
503
|
+
onClick: () => P(!1),
|
|
482
504
|
className: "rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
483
|
-
children: /* @__PURE__ */
|
|
505
|
+
children: /* @__PURE__ */ x(ue, { className: "h-4 w-4" })
|
|
484
506
|
})]
|
|
485
507
|
}),
|
|
486
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ S("div", {
|
|
487
509
|
className: "mb-4",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
510
|
+
children: [/* @__PURE__ */ x("label", {
|
|
489
511
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
490
512
|
children: "Your rating"
|
|
491
|
-
}), /* @__PURE__ */
|
|
513
|
+
}), /* @__PURE__ */ x("div", {
|
|
492
514
|
className: "flex items-center gap-1",
|
|
493
515
|
children: [
|
|
494
516
|
1,
|
|
@@ -496,42 +518,42 @@ function j() {
|
|
|
496
518
|
3,
|
|
497
519
|
4,
|
|
498
520
|
5
|
|
499
|
-
].map((e) => /* @__PURE__ */
|
|
521
|
+
].map((e) => /* @__PURE__ */ x("button", {
|
|
500
522
|
type: "button",
|
|
501
|
-
onClick: () =>
|
|
523
|
+
onClick: () => I(e),
|
|
502
524
|
className: "p-0.5",
|
|
503
525
|
"aria-label": `${e} star${e > 1 ? "s" : ""}`,
|
|
504
|
-
children: /* @__PURE__ */
|
|
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") })
|
|
505
527
|
}, e))
|
|
506
528
|
})]
|
|
507
529
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ S("div", {
|
|
509
531
|
className: "mb-5",
|
|
510
|
-
children: [/* @__PURE__ */
|
|
532
|
+
children: [/* @__PURE__ */ S("label", {
|
|
511
533
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
512
|
-
children: ["Review ", /* @__PURE__ */
|
|
534
|
+
children: ["Review ", /* @__PURE__ */ x("span", {
|
|
513
535
|
className: "text-text-secondary font-normal",
|
|
514
536
|
children: "(optional)"
|
|
515
537
|
})]
|
|
516
|
-
}), /* @__PURE__ */
|
|
538
|
+
}), /* @__PURE__ */ x("textarea", {
|
|
517
539
|
rows: 4,
|
|
518
|
-
value:
|
|
519
|
-
onChange: (e) =>
|
|
540
|
+
value: L,
|
|
541
|
+
onChange: (e) => R(e.target.value),
|
|
520
542
|
placeholder: "How was your order?",
|
|
521
543
|
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"
|
|
522
544
|
})]
|
|
523
545
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ S("div", {
|
|
525
547
|
className: "flex items-center gap-3",
|
|
526
|
-
children: [/* @__PURE__ */
|
|
548
|
+
children: [/* @__PURE__ */ S("button", {
|
|
527
549
|
type: "button",
|
|
528
|
-
onClick:
|
|
529
|
-
disabled:
|
|
530
|
-
className:
|
|
531
|
-
children: [
|
|
532
|
-
}), /* @__PURE__ */
|
|
550
|
+
onClick: _e,
|
|
551
|
+
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"]
|
|
554
|
+
}), /* @__PURE__ */ x("button", {
|
|
533
555
|
type: "button",
|
|
534
|
-
onClick: () =>
|
|
556
|
+
onClick: () => P(!1),
|
|
535
557
|
className: "rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
536
558
|
children: "Cancel"
|
|
537
559
|
})]
|
|
@@ -543,6 +565,6 @@ function j() {
|
|
|
543
565
|
]
|
|
544
566
|
});
|
|
545
567
|
}
|
|
546
|
-
export {
|
|
568
|
+
export { E as OrderTrackingPage };
|
|
547
569
|
|
|
548
570
|
//# sourceMappingURL=OrderTrackingPage.js.map
|