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