@burdenoff/microfe-atheletebridge 2026.625.1 → 2026.626.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/atheletebridge/pages/HomePage.js +272 -268
- package/dist/atheletebridge/pages/HomePage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminDashboard.js +76 -44
- package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +63 -55
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +244 -237
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js +59 -57
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +110 -106
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/CartManagementPage.js +166 -159
- package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/UserManagementPage.js +310 -303
- package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +86 -81
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +170 -166
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +141 -109
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +139 -134
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +109 -107
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +318 -318
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +262 -262
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +170 -162
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/HelpSupportPage.js +292 -298
- package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js +99 -91
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/SettingsPage.js +742 -734
- package/dist/atheletebridge/pages/common/SettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +364 -356
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CartDetailPage.js +276 -241
- package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +260 -250
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CheckoutPage.js +93 -89
- package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js +430 -387
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +526 -490
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +523 -512
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/FavoritesPage.js +83 -75
- package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +116 -108
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +65 -61
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +80 -75
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/ReviewsPage.js +80 -72
- package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +62 -55
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +93 -61
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +89 -84
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +60 -55
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js +345 -311
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +37 -32
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +75 -67
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +385 -381
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +352 -319
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js +353 -318
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +133 -128
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +81 -77
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +352 -344
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -6,8 +6,9 @@ import { formatCurrency as a } from "../../utils/formatters.js";
|
|
|
6
6
|
import { useMemo as o, useState as s } from "react";
|
|
7
7
|
import { AlertCircle as c, ArrowLeft as l, Banknote as u, CheckCircle2 as d, CreditCard as f, Heart as p, Loader2 as m, MapPin as h, ShoppingBag as g, Smartphone as _, Wallet as v } from "lucide-react";
|
|
8
8
|
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/atheletebridge/pages/customer/CheckoutPage.tsx
|
|
10
|
-
var
|
|
11
|
+
var C = [
|
|
11
12
|
{
|
|
12
13
|
id: "cash",
|
|
13
14
|
label: "Cash on Delivery",
|
|
@@ -32,66 +33,66 @@ var x = [
|
|
|
32
33
|
icon: v,
|
|
33
34
|
description: "AthleteBridge Wallet Balance"
|
|
34
35
|
}
|
|
35
|
-
],
|
|
36
|
+
], w = [
|
|
36
37
|
0,
|
|
37
38
|
10,
|
|
38
39
|
20,
|
|
39
40
|
30
|
|
40
41
|
];
|
|
41
|
-
function
|
|
42
|
-
let { navigateTo: u, currentUser: _ } = e(), { data: v = [], isLoading:
|
|
42
|
+
function T() {
|
|
43
|
+
let { navigateTo: u, currentUser: _ } = e(), { data: v = [], isLoading: T } = r({ customerId: _?.id }), E = i(), D = o(() => v.find((e) => e.status === "pending") || v[0], [v]), [O, k] = s({
|
|
43
44
|
addressLine1: "",
|
|
44
45
|
addressLine2: "",
|
|
45
46
|
city: "Bangalore",
|
|
46
47
|
state: "Karnataka",
|
|
47
48
|
pincode: ""
|
|
48
|
-
}), [
|
|
49
|
+
}), [A, j] = s("cash"), [M, N] = s({
|
|
49
50
|
cardNumber: "",
|
|
50
51
|
expiryDate: "",
|
|
51
52
|
cvv: "",
|
|
52
53
|
upiId: ""
|
|
53
|
-
}), [
|
|
54
|
-
if (!
|
|
54
|
+
}), [P, F] = s(0), [I, L] = s(""), [R, z] = s(""), [B, V] = s(!1), H = o(() => {
|
|
55
|
+
if (!D) return {
|
|
55
56
|
subtotal: 0,
|
|
56
57
|
deliveryFee: 0,
|
|
57
58
|
tax: 0,
|
|
58
59
|
total: 0
|
|
59
60
|
};
|
|
60
|
-
let e =
|
|
61
|
+
let e = D.subtotal, t = D.deliveryFee, n = D.taxes, r = D.discount ?? 0;
|
|
61
62
|
return {
|
|
62
63
|
subtotal: e,
|
|
63
64
|
deliveryFee: t,
|
|
64
65
|
tax: n,
|
|
65
66
|
discount: r,
|
|
66
|
-
total: e + t + n +
|
|
67
|
+
total: e + t + n + P - r
|
|
67
68
|
};
|
|
68
|
-
}, [
|
|
69
|
-
|
|
69
|
+
}, [D, P]), U = o(() => D ? D.items.reduce((e, t) => e + t.quantity, 0) : 0, [D]), W = (e, t) => {
|
|
70
|
+
k((n) => ({
|
|
70
71
|
...n,
|
|
71
72
|
[e]: t
|
|
72
73
|
}));
|
|
73
|
-
},
|
|
74
|
-
|
|
74
|
+
}, G = (e, t) => {
|
|
75
|
+
N((n) => ({
|
|
75
76
|
...n,
|
|
76
77
|
[e]: t
|
|
77
78
|
}));
|
|
78
|
-
},
|
|
79
|
-
if (!
|
|
80
|
-
if (!
|
|
81
|
-
if (
|
|
82
|
-
if (!
|
|
83
|
-
if (!
|
|
84
|
-
if (!
|
|
79
|
+
}, K = () => {
|
|
80
|
+
if (!O.addressLine1.trim()) return alert("Please enter delivery address"), !1;
|
|
81
|
+
if (!O.pincode.trim() || O.pincode.length !== 6) return alert("Please enter a valid 6-digit pincode"), !1;
|
|
82
|
+
if (A === "card") {
|
|
83
|
+
if (!M.cardNumber || M.cardNumber.length < 16) return alert("Please enter a valid 16-digit card number"), !1;
|
|
84
|
+
if (!M.expiryDate) return alert("Please enter card expiry date"), !1;
|
|
85
|
+
if (!M.cvv || M.cvv.length < 3) return alert("Please enter a valid 3-digit CVV"), !1;
|
|
85
86
|
}
|
|
86
|
-
return
|
|
87
|
+
return A === "upi" && !M.upiId.trim() ? (alert("Please enter UPI ID"), !1) : !0;
|
|
87
88
|
};
|
|
88
|
-
return
|
|
89
|
+
return T ? /* @__PURE__ */ y(n, {
|
|
89
90
|
title: "Checkout",
|
|
90
91
|
children: /* @__PURE__ */ y("div", {
|
|
91
92
|
className: "flex h-[60vh] items-center justify-center",
|
|
92
93
|
children: /* @__PURE__ */ y(m, { className: "h-8 w-8 animate-spin text-primary" })
|
|
93
94
|
})
|
|
94
|
-
}) :
|
|
95
|
+
}) : D ? /* @__PURE__ */ b(n, {
|
|
95
96
|
title: /* @__PURE__ */ b("div", {
|
|
96
97
|
className: "flex items-center gap-3",
|
|
97
98
|
children: [/* @__PURE__ */ y("button", {
|
|
@@ -102,7 +103,10 @@ function C() {
|
|
|
102
103
|
}), /* @__PURE__ */ y("span", { children: "Checkout" })]
|
|
103
104
|
}),
|
|
104
105
|
description: "Review your order and complete payment",
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ y(S, {
|
|
107
|
+
className: "mb-6",
|
|
108
|
+
children: "The final step before your order is on its way. Confirm where it should be delivered, pick how you'll pay, add a tip or any special instructions, then review the full price breakdown and place your order."
|
|
109
|
+
}), /* @__PURE__ */ b("div", {
|
|
106
110
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
107
111
|
children: [/* @__PURE__ */ b("div", {
|
|
108
112
|
className: "lg:col-span-2 space-y-6",
|
|
@@ -124,8 +128,8 @@ function C() {
|
|
|
124
128
|
}), /* @__PURE__ */ y("input", {
|
|
125
129
|
type: "text",
|
|
126
130
|
placeholder: "Building, Street, Area",
|
|
127
|
-
value:
|
|
128
|
-
onChange: (e) =>
|
|
131
|
+
value: O.addressLine1,
|
|
132
|
+
onChange: (e) => W("addressLine1", e.target.value),
|
|
129
133
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
130
134
|
})] }),
|
|
131
135
|
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
@@ -134,8 +138,8 @@ function C() {
|
|
|
134
138
|
}), /* @__PURE__ */ y("input", {
|
|
135
139
|
type: "text",
|
|
136
140
|
placeholder: "Apartment, Suite, Floor (Optional)",
|
|
137
|
-
value:
|
|
138
|
-
onChange: (e) =>
|
|
141
|
+
value: O.addressLine2,
|
|
142
|
+
onChange: (e) => W("addressLine2", e.target.value),
|
|
139
143
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
140
144
|
})] }),
|
|
141
145
|
/* @__PURE__ */ b("div", {
|
|
@@ -148,8 +152,8 @@ function C() {
|
|
|
148
152
|
})]
|
|
149
153
|
}), /* @__PURE__ */ y("input", {
|
|
150
154
|
type: "text",
|
|
151
|
-
value:
|
|
152
|
-
onChange: (e) =>
|
|
155
|
+
value: O.city,
|
|
156
|
+
onChange: (e) => W("city", e.target.value),
|
|
153
157
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
154
158
|
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("label", {
|
|
155
159
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
@@ -159,8 +163,8 @@ function C() {
|
|
|
159
163
|
})]
|
|
160
164
|
}), /* @__PURE__ */ y("input", {
|
|
161
165
|
type: "text",
|
|
162
|
-
value:
|
|
163
|
-
onChange: (e) =>
|
|
166
|
+
value: O.state,
|
|
167
|
+
onChange: (e) => W("state", e.target.value),
|
|
164
168
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
165
169
|
})] })]
|
|
166
170
|
}),
|
|
@@ -174,8 +178,8 @@ function C() {
|
|
|
174
178
|
type: "text",
|
|
175
179
|
placeholder: "560001",
|
|
176
180
|
maxLength: 6,
|
|
177
|
-
value:
|
|
178
|
-
onChange: (e) =>
|
|
181
|
+
value: O.pincode,
|
|
182
|
+
onChange: (e) => W("pincode", e.target.value.replace(/\D/g, "")),
|
|
179
183
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
180
184
|
})] })
|
|
181
185
|
]
|
|
@@ -190,12 +194,12 @@ function C() {
|
|
|
190
194
|
}),
|
|
191
195
|
/* @__PURE__ */ y("div", {
|
|
192
196
|
className: "space-y-2",
|
|
193
|
-
children:
|
|
197
|
+
children: C.map((e) => {
|
|
194
198
|
let n = e.icon;
|
|
195
199
|
return /* @__PURE__ */ b("button", {
|
|
196
200
|
type: "button",
|
|
197
|
-
onClick: () =>
|
|
198
|
-
className: t("flex w-full items-center gap-4 rounded-lg border p-3 transition-colors text-left",
|
|
201
|
+
onClick: () => j(e.id),
|
|
202
|
+
className: t("flex w-full items-center gap-4 rounded-lg border p-3 transition-colors text-left", A === e.id ? "border-foreground bg-accent" : "border-border-subtle bg-bg-surface hover:bg-accent"),
|
|
199
203
|
children: [
|
|
200
204
|
/* @__PURE__ */ y("div", {
|
|
201
205
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken",
|
|
@@ -211,12 +215,12 @@ function C() {
|
|
|
211
215
|
children: e.description
|
|
212
216
|
})]
|
|
213
217
|
}),
|
|
214
|
-
|
|
218
|
+
A === e.id && /* @__PURE__ */ y(d, { className: "h-5 w-5 text-text-primary shrink-0" })
|
|
215
219
|
]
|
|
216
220
|
}, e.id);
|
|
217
221
|
})
|
|
218
222
|
}),
|
|
219
|
-
|
|
223
|
+
A === "card" && /* @__PURE__ */ b("div", {
|
|
220
224
|
className: "mt-4 space-y-4 border-t border-border-subtle pt-4",
|
|
221
225
|
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("label", {
|
|
222
226
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
@@ -228,8 +232,8 @@ function C() {
|
|
|
228
232
|
type: "text",
|
|
229
233
|
placeholder: "1234 5678 9012 3456",
|
|
230
234
|
maxLength: 16,
|
|
231
|
-
value:
|
|
232
|
-
onChange: (e) =>
|
|
235
|
+
value: M.cardNumber,
|
|
236
|
+
onChange: (e) => G("cardNumber", e.target.value.replace(/\D/g, "")),
|
|
233
237
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
234
238
|
})] }), /* @__PURE__ */ b("div", {
|
|
235
239
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
@@ -243,10 +247,10 @@ function C() {
|
|
|
243
247
|
type: "text",
|
|
244
248
|
placeholder: "MM/YY",
|
|
245
249
|
maxLength: 5,
|
|
246
|
-
value:
|
|
250
|
+
value: M.expiryDate,
|
|
247
251
|
onChange: (e) => {
|
|
248
252
|
let t = e.target.value.replace(/\D/g, "");
|
|
249
|
-
t.length >= 2 && (t = t.slice(0, 2) + "/" + t.slice(2, 4)),
|
|
253
|
+
t.length >= 2 && (t = t.slice(0, 2) + "/" + t.slice(2, 4)), G("expiryDate", t);
|
|
250
254
|
},
|
|
251
255
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
252
256
|
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("label", {
|
|
@@ -259,13 +263,13 @@ function C() {
|
|
|
259
263
|
type: "text",
|
|
260
264
|
placeholder: "123",
|
|
261
265
|
maxLength: 3,
|
|
262
|
-
value:
|
|
263
|
-
onChange: (e) =>
|
|
266
|
+
value: M.cvv,
|
|
267
|
+
onChange: (e) => G("cvv", e.target.value.replace(/\D/g, "")),
|
|
264
268
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
265
269
|
})] })]
|
|
266
270
|
})]
|
|
267
271
|
}),
|
|
268
|
-
|
|
272
|
+
A === "upi" && /* @__PURE__ */ b("div", {
|
|
269
273
|
className: "mt-4 border-t border-border-subtle pt-4",
|
|
270
274
|
children: [/* @__PURE__ */ b("label", {
|
|
271
275
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
@@ -276,12 +280,12 @@ function C() {
|
|
|
276
280
|
}), /* @__PURE__ */ y("input", {
|
|
277
281
|
type: "text",
|
|
278
282
|
placeholder: "user@paytm",
|
|
279
|
-
value:
|
|
280
|
-
onChange: (e) =>
|
|
283
|
+
value: M.upiId,
|
|
284
|
+
onChange: (e) => G("upiId", e.target.value),
|
|
281
285
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
282
286
|
})]
|
|
283
287
|
}),
|
|
284
|
-
|
|
288
|
+
A === "wallet" && /* @__PURE__ */ b("div", {
|
|
285
289
|
className: "mt-4 flex items-start gap-3 rounded-lg bg-blue-500/10 p-4 border border-blue-500/20",
|
|
286
290
|
children: [/* @__PURE__ */ y(c, { className: "h-4 w-4 text-blue-600 dark:text-blue-400 mt-0.5 shrink-0" }), /* @__PURE__ */ y("p", {
|
|
287
291
|
className: "text-sm text-blue-600 dark:text-blue-400",
|
|
@@ -304,22 +308,22 @@ function C() {
|
|
|
304
308
|
}),
|
|
305
309
|
/* @__PURE__ */ y("div", {
|
|
306
310
|
className: "flex flex-wrap gap-2 mb-3",
|
|
307
|
-
children:
|
|
311
|
+
children: w.map((e) => /* @__PURE__ */ y("button", {
|
|
308
312
|
type: "button",
|
|
309
313
|
onClick: () => {
|
|
310
|
-
|
|
314
|
+
F(e), L("");
|
|
311
315
|
},
|
|
312
|
-
className: t("flex-1 min-w-[64px] rounded-lg px-3 py-2.5 text-sm font-medium transition-colors",
|
|
316
|
+
className: t("flex-1 min-w-[64px] rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", P === e && I === "" ? "bg-foreground text-background" : "bg-bg-sunken text-text-secondary hover:bg-accent hover:text-text-primary"),
|
|
313
317
|
children: e === 0 ? "No Tip" : `₹${e}`
|
|
314
318
|
}, e))
|
|
315
319
|
}),
|
|
316
320
|
/* @__PURE__ */ y("input", {
|
|
317
321
|
type: "number",
|
|
318
322
|
placeholder: "Custom tip amount",
|
|
319
|
-
value:
|
|
323
|
+
value: I,
|
|
320
324
|
onChange: (e) => {
|
|
321
325
|
let t = e.target.value;
|
|
322
|
-
|
|
326
|
+
L(t), F(parseInt(t) || 0);
|
|
323
327
|
},
|
|
324
328
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
325
329
|
})
|
|
@@ -329,8 +333,8 @@ function C() {
|
|
|
329
333
|
}), /* @__PURE__ */ y("textarea", {
|
|
330
334
|
rows: 3,
|
|
331
335
|
placeholder: "Any special requests for your order...",
|
|
332
|
-
value:
|
|
333
|
-
onChange: (e) =>
|
|
336
|
+
value: R,
|
|
337
|
+
onChange: (e) => z(e.target.value),
|
|
334
338
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
|
|
335
339
|
})] })]
|
|
336
340
|
})]
|
|
@@ -338,8 +342,8 @@ function C() {
|
|
|
338
342
|
]
|
|
339
343
|
}), /* @__PURE__ */ y("div", {
|
|
340
344
|
className: "lg:col-span-1",
|
|
341
|
-
children: /* @__PURE__ */ b(
|
|
342
|
-
className: "sticky top-6
|
|
345
|
+
children: /* @__PURE__ */ b(x, {
|
|
346
|
+
className: "sticky top-6 p-5",
|
|
343
347
|
children: [
|
|
344
348
|
/* @__PURE__ */ y("h2", {
|
|
345
349
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
@@ -350,25 +354,25 @@ function C() {
|
|
|
350
354
|
children: [/* @__PURE__ */ y("div", {
|
|
351
355
|
className: "h-12 w-12 rounded-md bg-bg-sunken overflow-hidden",
|
|
352
356
|
children: /* @__PURE__ */ y("img", {
|
|
353
|
-
src:
|
|
354
|
-
alt:
|
|
357
|
+
src: D.cartImage,
|
|
358
|
+
alt: D.cartName,
|
|
355
359
|
className: "h-full w-full object-cover"
|
|
356
360
|
})
|
|
357
361
|
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
358
362
|
className: "text-sm font-medium text-text-primary",
|
|
359
|
-
children:
|
|
363
|
+
children: D.cartName
|
|
360
364
|
}), /* @__PURE__ */ b("p", {
|
|
361
365
|
className: "text-xs text-text-secondary",
|
|
362
366
|
children: [
|
|
363
|
-
|
|
367
|
+
D.items.length,
|
|
364
368
|
" item",
|
|
365
|
-
|
|
369
|
+
D.items.length === 1 ? "" : "s"
|
|
366
370
|
]
|
|
367
371
|
})] })]
|
|
368
372
|
}),
|
|
369
373
|
/* @__PURE__ */ y("div", {
|
|
370
374
|
className: "space-y-2 mb-4",
|
|
371
|
-
children:
|
|
375
|
+
children: D.items.map((e) => /* @__PURE__ */ b("div", {
|
|
372
376
|
className: "flex justify-between items-start",
|
|
373
377
|
children: [/* @__PURE__ */ b("div", {
|
|
374
378
|
className: "flex-1 min-w-0",
|
|
@@ -405,12 +409,12 @@ function C() {
|
|
|
405
409
|
className: "text-text-secondary",
|
|
406
410
|
children: [
|
|
407
411
|
"Subtotal (",
|
|
408
|
-
|
|
412
|
+
U,
|
|
409
413
|
" items)"
|
|
410
414
|
]
|
|
411
415
|
}), /* @__PURE__ */ y("span", {
|
|
412
416
|
className: "text-text-primary",
|
|
413
|
-
children: a(
|
|
417
|
+
children: a(H.subtotal, { minimumFractionDigits: 0 })
|
|
414
418
|
})]
|
|
415
419
|
}),
|
|
416
420
|
/* @__PURE__ */ b("div", {
|
|
@@ -420,7 +424,7 @@ function C() {
|
|
|
420
424
|
children: "Delivery Fee"
|
|
421
425
|
}), /* @__PURE__ */ y("span", {
|
|
422
426
|
className: "text-text-primary",
|
|
423
|
-
children:
|
|
427
|
+
children: H.deliveryFee === 0 ? "FREE" : a(H.deliveryFee, { minimumFractionDigits: 0 })
|
|
424
428
|
})]
|
|
425
429
|
}),
|
|
426
430
|
/* @__PURE__ */ b("div", {
|
|
@@ -430,27 +434,27 @@ function C() {
|
|
|
430
434
|
children: "Tax"
|
|
431
435
|
}), /* @__PURE__ */ y("span", {
|
|
432
436
|
className: "text-text-primary",
|
|
433
|
-
children: a(
|
|
437
|
+
children: a(H.tax, { minimumFractionDigits: 0 })
|
|
434
438
|
})]
|
|
435
439
|
}),
|
|
436
|
-
|
|
440
|
+
P > 0 && /* @__PURE__ */ b("div", {
|
|
437
441
|
className: "flex justify-between",
|
|
438
442
|
children: [/* @__PURE__ */ y("span", {
|
|
439
443
|
className: "text-text-secondary",
|
|
440
444
|
children: "Tip"
|
|
441
445
|
}), /* @__PURE__ */ y("span", {
|
|
442
446
|
className: "text-text-primary",
|
|
443
|
-
children: a(
|
|
447
|
+
children: a(P, { minimumFractionDigits: 0 })
|
|
444
448
|
})]
|
|
445
449
|
}),
|
|
446
|
-
|
|
450
|
+
H.discount && H.discount > 0 && /* @__PURE__ */ b("div", {
|
|
447
451
|
className: "flex justify-between",
|
|
448
452
|
children: [/* @__PURE__ */ y("span", {
|
|
449
453
|
className: "text-green-600 dark:text-green-400",
|
|
450
454
|
children: "Discount"
|
|
451
455
|
}), /* @__PURE__ */ b("span", {
|
|
452
456
|
className: "text-green-600 dark:text-green-400",
|
|
453
|
-
children: ["-", a(
|
|
457
|
+
children: ["-", a(H.discount, { minimumFractionDigits: 0 })]
|
|
454
458
|
})]
|
|
455
459
|
})
|
|
456
460
|
]
|
|
@@ -462,37 +466,37 @@ function C() {
|
|
|
462
466
|
children: "Total"
|
|
463
467
|
}), /* @__PURE__ */ y("span", {
|
|
464
468
|
className: "text-base font-bold text-text-primary",
|
|
465
|
-
children: a(
|
|
469
|
+
children: a(H.total, { minimumFractionDigits: 0 })
|
|
466
470
|
})]
|
|
467
471
|
}),
|
|
468
472
|
/* @__PURE__ */ b("button", {
|
|
469
473
|
type: "button",
|
|
470
474
|
onClick: async () => {
|
|
471
|
-
if (!(!
|
|
472
|
-
let e = await
|
|
473
|
-
providerId:
|
|
475
|
+
if (!(!K() || !D)) try {
|
|
476
|
+
let e = await E.mutateAsync({
|
|
477
|
+
providerId: D.cartId,
|
|
474
478
|
customerId: _?.id,
|
|
475
|
-
items:
|
|
479
|
+
items: D.items.map((e) => ({
|
|
476
480
|
offeringId: e.id,
|
|
477
481
|
quantity: e.quantity,
|
|
478
482
|
customizations: e.customizations
|
|
479
483
|
})),
|
|
480
|
-
deliveryAddress: `${
|
|
481
|
-
paymentMethod:
|
|
482
|
-
notes:
|
|
483
|
-
deliveryFee:
|
|
484
|
-
tax:
|
|
485
|
-
tip:
|
|
486
|
-
total:
|
|
484
|
+
deliveryAddress: `${O.addressLine1}, ${O.addressLine2}, ${O.city}, ${O.state} - ${O.pincode}`,
|
|
485
|
+
paymentMethod: A.toUpperCase(),
|
|
486
|
+
notes: R,
|
|
487
|
+
deliveryFee: H.deliveryFee,
|
|
488
|
+
tax: H.tax,
|
|
489
|
+
tip: P,
|
|
490
|
+
total: H.total
|
|
487
491
|
});
|
|
488
492
|
alert("Order placed successfully!"), u(`/customer/order/${e.id}`);
|
|
489
493
|
} catch {
|
|
490
494
|
alert("Failed to place order. Please try again.");
|
|
491
495
|
}
|
|
492
496
|
},
|
|
493
|
-
disabled:
|
|
494
|
-
className: t("mt-6 flex w-full items-center justify-center gap-2 rounded-lg py-3 text-sm font-medium transition-opacity", "bg-foreground text-background",
|
|
495
|
-
children: [
|
|
497
|
+
disabled: E.isPending,
|
|
498
|
+
className: t("mt-6 flex w-full items-center justify-center gap-2 rounded-lg py-3 text-sm font-medium transition-opacity", "bg-foreground text-background", E.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
|
|
499
|
+
children: [E.isPending ? /* @__PURE__ */ y(m, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ y(g, { className: "h-4 w-4" }), E.isPending ? "Placing Order..." : `Place Order - ${a(H.total, { minimumFractionDigits: 0 })}`]
|
|
496
500
|
}),
|
|
497
501
|
/* @__PURE__ */ y("p", {
|
|
498
502
|
className: "mt-3 text-center text-xs text-text-secondary",
|
|
@@ -501,7 +505,7 @@ function C() {
|
|
|
501
505
|
]
|
|
502
506
|
})
|
|
503
507
|
})]
|
|
504
|
-
})
|
|
508
|
+
})]
|
|
505
509
|
}) : /* @__PURE__ */ y(n, {
|
|
506
510
|
title: "Checkout",
|
|
507
511
|
children: /* @__PURE__ */ b("div", {
|
|
@@ -527,6 +531,6 @@ function C() {
|
|
|
527
531
|
});
|
|
528
532
|
}
|
|
529
533
|
//#endregion
|
|
530
|
-
export {
|
|
534
|
+
export { T as CheckoutPage };
|
|
531
535
|
|
|
532
536
|
//# sourceMappingURL=CheckoutPage.js.map
|