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