@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.5
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/kadaikodi/KadaikodiRoutes.js +34 -26
- package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
- package/dist/kadaikodi/components/viz/AllocationBar.js +68 -0
- package/dist/kadaikodi/components/viz/AllocationBar.js.map +1 -0
- package/dist/kadaikodi/components/viz/AreaChart.js +102 -0
- package/dist/kadaikodi/components/viz/AreaChart.js.map +1 -0
- package/dist/kadaikodi/components/viz/AvatarStack.js +36 -0
- package/dist/kadaikodi/components/viz/AvatarStack.js.map +1 -0
- package/dist/kadaikodi/components/viz/BarChart.js +83 -0
- package/dist/kadaikodi/components/viz/BarChart.js.map +1 -0
- package/dist/kadaikodi/components/viz/CertificateCard.js +4 -0
- package/dist/kadaikodi/components/viz/DonutChart.js +109 -0
- package/dist/kadaikodi/components/viz/DonutChart.js.map +1 -0
- package/dist/kadaikodi/components/viz/HBarFunnel.js +54 -0
- package/dist/kadaikodi/components/viz/HBarFunnel.js.map +1 -0
- package/dist/kadaikodi/components/viz/Heatmap.js +3 -0
- package/dist/kadaikodi/components/viz/KanbanBoard.js +50 -0
- package/dist/kadaikodi/components/viz/KanbanBoard.js.map +1 -0
- package/dist/kadaikodi/components/viz/LineChart.js +4 -0
- package/dist/kadaikodi/components/viz/OrgTree.js +2 -0
- package/dist/kadaikodi/components/viz/PathSteps.js +3 -0
- package/dist/kadaikodi/components/viz/ProgressRing.js +68 -0
- package/dist/kadaikodi/components/viz/ProgressRing.js.map +1 -0
- package/dist/kadaikodi/components/viz/RatingStars.js +51 -0
- package/dist/kadaikodi/components/viz/RatingStars.js.map +1 -0
- package/dist/kadaikodi/components/viz/SegmentedTabs.js +69 -0
- package/dist/kadaikodi/components/viz/SegmentedTabs.js.map +1 -0
- package/dist/kadaikodi/components/viz/SkillBar.js +3 -0
- package/dist/kadaikodi/components/viz/Sparkline.js +74 -0
- package/dist/kadaikodi/components/viz/Sparkline.js.map +1 -0
- package/dist/kadaikodi/components/viz/StatCard.js +60 -0
- package/dist/kadaikodi/components/viz/StatCard.js.map +1 -0
- package/dist/kadaikodi/components/viz/StepProgress.js +64 -0
- package/dist/kadaikodi/components/viz/StepProgress.js.map +1 -0
- package/dist/kadaikodi/components/viz/Timeline.js +66 -0
- package/dist/kadaikodi/components/viz/Timeline.js.map +1 -0
- package/dist/kadaikodi/components/viz/index.js +23 -0
- package/dist/kadaikodi/components/viz/lib/Avatar.js +30 -0
- package/dist/kadaikodi/components/viz/lib/Avatar.js.map +1 -0
- package/dist/kadaikodi/components/viz/lib/CartesianFrame.js +119 -0
- package/dist/kadaikodi/components/viz/lib/CartesianFrame.js.map +1 -0
- package/dist/kadaikodi/components/viz/lib/ResponsiveSvg.js +35 -0
- package/dist/kadaikodi/components/viz/lib/ResponsiveSvg.js.map +1 -0
- package/dist/kadaikodi/components/viz/lib/format.js +21 -0
- package/dist/kadaikodi/components/viz/lib/format.js.map +1 -0
- package/dist/kadaikodi/components/viz/lib/geometry.js +61 -0
- package/dist/kadaikodi/components/viz/lib/geometry.js.map +1 -0
- package/dist/kadaikodi/components/viz/lib/hooks.js +39 -0
- package/dist/kadaikodi/components/viz/lib/hooks.js.map +1 -0
- package/dist/kadaikodi/components/viz/lib/palette.js +27 -0
- package/dist/kadaikodi/components/viz/lib/palette.js.map +1 -0
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +84 -6
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/HomePage.js +373 -631
- package/dist/kadaikodi/pages/HomePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +304 -169
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminDashboard.js +255 -271
- package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +185 -125
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +141 -102
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js +564 -729
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +201 -120
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +173 -194
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +428 -347
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +332 -0
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
- package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js +373 -0
- package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js.map +1 -0
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +294 -162
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +180 -181
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +239 -156
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +405 -248
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +258 -232
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +254 -205
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +5 -5
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +272 -230
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/FavoritesPage.js +150 -413
- package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +173 -134
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +411 -305
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js +310 -406
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/shared.js +181 -0
- package/dist/kadaikodi/pages/customer/shared.js.map +1 -0
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +438 -311
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +320 -293
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +159 -91
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js +137 -107
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +157 -135
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +280 -206
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +428 -431
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js +328 -445
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +141 -164
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +360 -288
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +303 -281
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,24 +4,42 @@ import { PageLayout as n } from "../../components/PageLayout.js";
|
|
|
4
4
|
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
5
|
import { useOfferings as i, usePlaceOrder as a, useProvider as o } from "../../hooks/useKadaikodiApi.js";
|
|
6
6
|
import { formatCurrency as s } from "../../utils/formatters.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { StepProgress as c } from "../../components/viz/StepProgress.js";
|
|
8
|
+
import { SegmentedTabs as l } from "../../components/viz/SegmentedTabs.js";
|
|
9
|
+
import "../../components/viz/index.js";
|
|
10
|
+
import { ProviderImage as ee } from "./shared.js";
|
|
11
|
+
import { useState as u } from "react";
|
|
12
|
+
import { AlertCircle as d, ArrowLeft as f, ArrowRight as p, Calendar as m, CheckCircle2 as h, Clock as g, CreditCard as _, Home as v, Loader2 as te, MapPin as ne, Navigation as re, Phone as ie, Smartphone as y, Wallet as b } from "lucide-react";
|
|
13
|
+
import { useParams as x } from "react-router-dom";
|
|
14
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
15
|
+
import { EmphasisPanel as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
|
|
12
16
|
//#region src/kadaikodi/pages/customer/DirectServiceBookingPage.tsx
|
|
13
|
-
var
|
|
17
|
+
var D = [
|
|
14
18
|
"location",
|
|
15
19
|
"details",
|
|
16
20
|
"payment",
|
|
17
21
|
"confirmation"
|
|
18
|
-
],
|
|
22
|
+
], O = {
|
|
19
23
|
location: "Location",
|
|
20
24
|
details: "Details",
|
|
21
25
|
payment: "Payment",
|
|
22
26
|
confirmation: "Confirmation"
|
|
23
27
|
};
|
|
24
|
-
function
|
|
28
|
+
function ae() {
|
|
29
|
+
let e = [], t = /* @__PURE__ */ new Date();
|
|
30
|
+
for (let n = 0; n < 4; n++) {
|
|
31
|
+
let r = new Date(t.getTime() + n * 864e5), i = n === 0 ? "Today" : n === 1 ? "Tomorrow" : r.toLocaleDateString([], {
|
|
32
|
+
weekday: "short",
|
|
33
|
+
day: "numeric"
|
|
34
|
+
});
|
|
35
|
+
e.push({
|
|
36
|
+
value: r.toISOString().slice(0, 10),
|
|
37
|
+
label: i
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return e;
|
|
41
|
+
}
|
|
42
|
+
function oe() {
|
|
25
43
|
let e = [], t = new Date((/* @__PURE__ */ new Date()).getTime() + 30 * 6e4);
|
|
26
44
|
for (let n = 0; n < 8; n++) {
|
|
27
45
|
let r = new Date(t.getTime() + n * 30 * 6e4), i = r.toTimeString().slice(0, 5), a = r.toLocaleTimeString([], {
|
|
@@ -35,86 +53,87 @@ function A() {
|
|
|
35
53
|
}
|
|
36
54
|
return e;
|
|
37
55
|
}
|
|
38
|
-
function
|
|
39
|
-
let { cartId:
|
|
56
|
+
function k() {
|
|
57
|
+
let { cartId: k } = x(), { navigateTo: A, currentUser: j } = e(), { data: M, isLoading: N } = o(k), { data: P = [] } = i(k), F = a(), I = P[0], [L, R] = u("location"), [z, B] = u(!1), [V, H] = u({
|
|
40
58
|
address: "",
|
|
41
59
|
landmark: "",
|
|
42
60
|
instructions: "",
|
|
43
61
|
phoneNumber: ""
|
|
44
|
-
}), [
|
|
62
|
+
}), [U, W] = u({
|
|
45
63
|
preferredTime: "",
|
|
46
64
|
specialInstructions: "",
|
|
47
65
|
isUrgent: !1
|
|
48
|
-
}), [q, J] =
|
|
49
|
-
if (
|
|
66
|
+
}), [G, K] = u("schedule"), [q, se] = u(""), [J, ce] = u("upi"), [Y, X] = u(null), Z = I?.price ?? 0, Q = Math.round(Z * .2), $ = Z - Q, le = Z;
|
|
67
|
+
if (N) return /* @__PURE__ */ C(n, {
|
|
50
68
|
title: "Book Direct Service",
|
|
51
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ C("div", {
|
|
52
70
|
className: "flex items-center justify-center py-20",
|
|
53
|
-
children: /* @__PURE__ */
|
|
71
|
+
children: /* @__PURE__ */ C("div", { className: "h-12 w-12 animate-spin rounded-full border-b-2 border-foreground" })
|
|
54
72
|
})
|
|
55
73
|
});
|
|
56
|
-
if (!
|
|
74
|
+
if (!M) return /* @__PURE__ */ C(n, {
|
|
57
75
|
title: "Cart Not Found",
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
icon: /* @__PURE__ */
|
|
76
|
+
children: /* @__PURE__ */ C(r, {
|
|
77
|
+
icon: /* @__PURE__ */ C(v, { className: "h-12 w-12" }),
|
|
60
78
|
title: "Service not available",
|
|
61
79
|
description: "Direct service is not available for this cart.",
|
|
62
|
-
action: /* @__PURE__ */
|
|
80
|
+
action: /* @__PURE__ */ C("button", {
|
|
63
81
|
type: "button",
|
|
64
|
-
onClick: () =>
|
|
82
|
+
onClick: () => A("/customer/discover"),
|
|
65
83
|
className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
66
84
|
children: "Browse Carts"
|
|
67
85
|
})
|
|
68
86
|
})
|
|
69
87
|
});
|
|
70
|
-
let
|
|
88
|
+
let ue = oe(), de = D.indexOf(L), fe = () => {
|
|
71
89
|
if (!navigator.geolocation) {
|
|
72
90
|
alert("Geolocation is not supported by this browser.");
|
|
73
91
|
return;
|
|
74
92
|
}
|
|
75
93
|
navigator.geolocation.getCurrentPosition(() => {
|
|
76
|
-
|
|
94
|
+
H((e) => ({
|
|
77
95
|
...e,
|
|
78
96
|
address: e.address || "Current location detected"
|
|
79
97
|
})), alert("Location detected successfully!");
|
|
80
98
|
}, () => {
|
|
81
99
|
alert("Failed to get your location. Please enter address manually.");
|
|
82
100
|
});
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
101
|
+
}, pe = () => V.address.trim() ? V.phoneNumber.trim() ? !0 : (alert("Please enter your phone number."), !1) : (alert("Please enter your address."), !1), me = () => G === "schedule" && !U.preferredTime ? (alert("Please select a preferred time slot."), !1) : !0, he = () => {
|
|
102
|
+
L === "location" && pe() ? R("details") : L === "details" && me() ? R("payment") : L === "payment" && _e();
|
|
103
|
+
}, ge = () => {
|
|
104
|
+
L === "details" ? R("location") : L === "payment" && R("details");
|
|
105
|
+
}, _e = () => {
|
|
106
|
+
B(!0);
|
|
89
107
|
let e = new Date(Date.now() + 30 * 6e4).toISOString();
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
-
providerId:
|
|
93
|
-
customerId:
|
|
108
|
+
if (M && I && j?.id) {
|
|
109
|
+
F.mutate({
|
|
110
|
+
providerId: M.id,
|
|
111
|
+
customerId: j.id,
|
|
94
112
|
fulfillmentType: "delivery",
|
|
95
|
-
paymentMethod:
|
|
113
|
+
paymentMethod: J,
|
|
96
114
|
tax: 0,
|
|
97
115
|
items: [{
|
|
98
|
-
name:
|
|
99
|
-
offeringId:
|
|
116
|
+
name: I.name,
|
|
117
|
+
offeringId: I.id,
|
|
100
118
|
quantity: 1,
|
|
101
119
|
unitPrice: Z
|
|
102
120
|
}],
|
|
103
|
-
notes: [
|
|
121
|
+
notes: [V.instructions, U.specialInstructions].filter(Boolean).join(" | ") || void 0,
|
|
104
122
|
deliveryAddress: {
|
|
105
|
-
street:
|
|
106
|
-
landmark:
|
|
123
|
+
street: V.address,
|
|
124
|
+
landmark: V.landmark
|
|
107
125
|
}
|
|
108
126
|
}, {
|
|
109
127
|
onSuccess: (t) => {
|
|
110
128
|
X({
|
|
111
129
|
bookingId: t.orderNumber || t.id,
|
|
130
|
+
orderId: t.id,
|
|
112
131
|
transactionId: `TXN-${t.id}`,
|
|
113
132
|
estimatedArrival: e
|
|
114
|
-
}),
|
|
133
|
+
}), R("confirmation"), B(!1);
|
|
115
134
|
},
|
|
116
135
|
onError: () => {
|
|
117
|
-
|
|
136
|
+
B(!1), alert("Could not place your booking. Please try again.");
|
|
118
137
|
}
|
|
119
138
|
});
|
|
120
139
|
return;
|
|
@@ -122,132 +141,118 @@ function j() {
|
|
|
122
141
|
let t = `BK-${Date.now()}`;
|
|
123
142
|
X({
|
|
124
143
|
bookingId: t,
|
|
144
|
+
orderId: t,
|
|
125
145
|
transactionId: t,
|
|
126
146
|
estimatedArrival: e
|
|
127
|
-
}),
|
|
147
|
+
}), R("confirmation"), B(!1);
|
|
128
148
|
};
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
title: /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ w(n, {
|
|
150
|
+
title: /* @__PURE__ */ w("div", {
|
|
131
151
|
className: "flex items-center gap-3",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
152
|
+
children: [/* @__PURE__ */ C("button", {
|
|
133
153
|
type: "button",
|
|
134
|
-
onClick: () =>
|
|
154
|
+
onClick: () => A(`/customer/cart/${M.id}`),
|
|
135
155
|
className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
136
|
-
children: /* @__PURE__ */
|
|
137
|
-
}), /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ C(f, { className: "h-5 w-5" })
|
|
157
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", { children: "Book Direct Service" }), /* @__PURE__ */ C("p", {
|
|
138
158
|
className: "text-xs font-normal text-text-secondary",
|
|
139
|
-
children:
|
|
159
|
+
children: M.name
|
|
140
160
|
})] })]
|
|
141
161
|
}),
|
|
142
162
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ C(E, {
|
|
144
164
|
className: "mb-6",
|
|
145
165
|
children: "Book a service directly from this cart in a few guided steps — tell us where and when you need it, add any details, then confirm. Follow the progress bar below to know what's left."
|
|
146
166
|
}),
|
|
147
|
-
/* @__PURE__ */ T
|
|
167
|
+
/* @__PURE__ */ C(T, {
|
|
148
168
|
className: "mb-6",
|
|
149
|
-
children: /* @__PURE__ */
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
let r = n < re, i = e === z;
|
|
153
|
-
return /* @__PURE__ */ E("div", {
|
|
154
|
-
className: "flex items-center",
|
|
155
|
-
children: [/* @__PURE__ */ E("div", {
|
|
156
|
-
className: "flex flex-col items-center",
|
|
157
|
-
children: [/* @__PURE__ */ T("div", {
|
|
158
|
-
className: t("flex h-8 w-8 items-center justify-center rounded-full text-xs font-medium", r ? "bg-status-success-bg-subtle text-status-success-text" : i ? "bg-foreground text-background" : "bg-bg-sunken text-text-secondary"),
|
|
159
|
-
children: r ? /* @__PURE__ */ T(p, { className: "h-4 w-4" }) : n + 1
|
|
160
|
-
}), /* @__PURE__ */ T("span", {
|
|
161
|
-
className: t("mt-1 text-[10px]", i ? "font-medium text-text-primary" : "text-text-secondary"),
|
|
162
|
-
children: k[e]
|
|
163
|
-
})]
|
|
164
|
-
}), n < O.length - 1 && /* @__PURE__ */ T("div", { className: t("mx-2 h-0.5 w-8 sm:w-16", r ? "bg-status-success-bg-subtle" : "bg-border") })]
|
|
165
|
-
}, e);
|
|
166
|
-
})
|
|
169
|
+
children: /* @__PURE__ */ C(c, {
|
|
170
|
+
steps: D.map((e) => ({ label: O[e] })),
|
|
171
|
+
current: de
|
|
167
172
|
})
|
|
168
173
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ w("div", {
|
|
170
175
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ w("div", {
|
|
172
177
|
className: "lg:col-span-2",
|
|
173
178
|
children: [
|
|
174
|
-
|
|
179
|
+
L === "location" && /* @__PURE__ */ w("div", {
|
|
175
180
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
176
181
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ w("h2", {
|
|
178
183
|
className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ C(ne, { className: "h-4 w-4" }), "Service Location"]
|
|
180
185
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ C("p", {
|
|
182
187
|
className: "text-xs text-text-secondary mb-5",
|
|
183
188
|
children: "Where should the cart come?"
|
|
184
189
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ w("div", {
|
|
186
191
|
className: "space-y-4",
|
|
187
192
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("label", {
|
|
189
194
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
190
|
-
children: ["Your Address ", /* @__PURE__ */
|
|
195
|
+
children: ["Your Address ", /* @__PURE__ */ C("span", {
|
|
191
196
|
className: "text-status-error-text",
|
|
192
197
|
children: "*"
|
|
193
198
|
})]
|
|
194
|
-
}), /* @__PURE__ */
|
|
199
|
+
}), /* @__PURE__ */ w("div", {
|
|
195
200
|
className: "flex gap-2",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ C("input", {
|
|
197
202
|
type: "text",
|
|
198
203
|
placeholder: "Enter your full address",
|
|
199
|
-
value:
|
|
200
|
-
onChange: (e) =>
|
|
204
|
+
value: V.address,
|
|
205
|
+
onChange: (e) => H((t) => ({
|
|
201
206
|
...t,
|
|
202
207
|
address: e.target.value
|
|
203
208
|
})),
|
|
204
209
|
className: "flex-1 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)]"
|
|
205
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ w("button", {
|
|
206
211
|
type: "button",
|
|
207
|
-
onClick:
|
|
212
|
+
onClick: fe,
|
|
208
213
|
className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent transition-colors whitespace-nowrap",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ C(re, { className: "h-3.5 w-3.5" }), "Use Current Location"]
|
|
210
215
|
})]
|
|
211
216
|
})] }),
|
|
212
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
213
218
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
214
219
|
children: "Nearby Landmark"
|
|
215
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ C("input", {
|
|
216
221
|
type: "text",
|
|
217
222
|
placeholder: "e.g., Near Metro Station, Opposite Mall",
|
|
218
|
-
value:
|
|
219
|
-
onChange: (e) =>
|
|
223
|
+
value: V.landmark,
|
|
224
|
+
onChange: (e) => H((t) => ({
|
|
220
225
|
...t,
|
|
221
226
|
landmark: e.target.value
|
|
222
227
|
})),
|
|
223
228
|
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)]"
|
|
224
229
|
})] }),
|
|
225
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
226
231
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
227
232
|
children: "Instructions for Cart Owner"
|
|
228
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ C("textarea", {
|
|
229
234
|
rows: 3,
|
|
230
235
|
placeholder: "Any specific instructions to help us find you...",
|
|
231
|
-
value:
|
|
232
|
-
onChange: (e) =>
|
|
236
|
+
value: V.instructions,
|
|
237
|
+
onChange: (e) => H((t) => ({
|
|
233
238
|
...t,
|
|
234
239
|
instructions: e.target.value
|
|
235
240
|
})),
|
|
236
241
|
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"
|
|
237
242
|
})] }),
|
|
238
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("label", {
|
|
239
244
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
240
|
-
children: ["Phone Number ", /* @__PURE__ */
|
|
245
|
+
children: ["Phone Number ", /* @__PURE__ */ C("span", {
|
|
241
246
|
className: "text-status-error-text",
|
|
242
247
|
children: "*"
|
|
243
248
|
})]
|
|
244
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ w("div", {
|
|
245
250
|
className: "relative",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ C(ie, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ C("input", {
|
|
247
252
|
type: "tel",
|
|
248
253
|
placeholder: "Enter your phone number",
|
|
249
|
-
value:
|
|
250
|
-
onChange: (e) =>
|
|
254
|
+
value: V.phoneNumber,
|
|
255
|
+
onChange: (e) => H((t) => ({
|
|
251
256
|
...t,
|
|
252
257
|
phoneNumber: e.target.value
|
|
253
258
|
})),
|
|
@@ -258,62 +263,96 @@ function j() {
|
|
|
258
263
|
})
|
|
259
264
|
]
|
|
260
265
|
}),
|
|
261
|
-
|
|
266
|
+
L === "details" && /* @__PURE__ */ w("div", {
|
|
262
267
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
263
268
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ w("h2", {
|
|
265
270
|
className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ C(m, { className: "h-4 w-4" }), "Booking Details"]
|
|
267
272
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ C("p", {
|
|
269
274
|
className: "text-xs text-text-secondary mb-5",
|
|
270
275
|
children: "Choose your preferred timing"
|
|
271
276
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ w("div", {
|
|
273
278
|
className: "space-y-4",
|
|
274
279
|
children: [
|
|
275
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ w("div", { children: [
|
|
281
|
+
/* @__PURE__ */ C("label", {
|
|
282
|
+
className: "block text-sm font-medium text-text-primary mb-2",
|
|
283
|
+
children: "When do you need it?"
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ C(l, {
|
|
286
|
+
fill: !0,
|
|
287
|
+
"aria-label": "Timing",
|
|
288
|
+
tabs: [{
|
|
289
|
+
id: "now",
|
|
290
|
+
label: "Come now"
|
|
291
|
+
}, {
|
|
292
|
+
id: "schedule",
|
|
293
|
+
label: "Schedule"
|
|
294
|
+
}],
|
|
295
|
+
value: G,
|
|
296
|
+
onChange: (e) => K(e)
|
|
297
|
+
}),
|
|
298
|
+
G === "now" && /* @__PURE__ */ C("p", {
|
|
299
|
+
className: "mt-2 text-xs text-text-secondary",
|
|
300
|
+
children: "The cart heads to you as soon as it accepts — no slot needed."
|
|
301
|
+
})
|
|
302
|
+
] }),
|
|
303
|
+
G === "schedule" && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
276
304
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
277
|
-
children:
|
|
305
|
+
children: "Day"
|
|
306
|
+
}), /* @__PURE__ */ C("div", {
|
|
307
|
+
className: "grid grid-cols-4 gap-2",
|
|
308
|
+
children: ae().map((e) => /* @__PURE__ */ C("button", {
|
|
309
|
+
type: "button",
|
|
310
|
+
onClick: () => se(e.value),
|
|
311
|
+
className: t("rounded-lg border py-2 px-2 text-xs font-medium transition-colors", q === e.value ? "border-action-primary-bg bg-[var(--color-accent-soft)] text-accent-primary" : "border-border-subtle text-text-secondary hover:bg-accent hover:text-text-primary"),
|
|
312
|
+
children: e.label
|
|
313
|
+
}, e.value))
|
|
314
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("label", {
|
|
315
|
+
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
316
|
+
children: ["Preferred Time Slot ", /* @__PURE__ */ C("span", {
|
|
278
317
|
className: "text-status-error-text",
|
|
279
318
|
children: "*"
|
|
280
319
|
})]
|
|
281
|
-
}), /* @__PURE__ */
|
|
320
|
+
}), /* @__PURE__ */ C("div", {
|
|
282
321
|
className: "grid grid-cols-4 gap-2",
|
|
283
|
-
children:
|
|
322
|
+
children: ue.map((e) => /* @__PURE__ */ C("button", {
|
|
284
323
|
type: "button",
|
|
285
|
-
onClick: () =>
|
|
324
|
+
onClick: () => W((t) => ({
|
|
286
325
|
...t,
|
|
287
326
|
preferredTime: e.value
|
|
288
327
|
})),
|
|
289
|
-
className: t("rounded-lg border py-2 px-2 text-xs font-medium transition-colors",
|
|
328
|
+
className: t("rounded-lg border py-2 px-2 text-xs font-medium transition-colors", U.preferredTime === e.value ? "border-action-primary-bg bg-[var(--color-accent-soft)] text-accent-primary" : "border-border-subtle text-text-secondary hover:bg-accent hover:text-text-primary"),
|
|
290
329
|
children: e.label
|
|
291
330
|
}, e.value))
|
|
292
|
-
})] }),
|
|
293
|
-
/* @__PURE__ */
|
|
331
|
+
})] })] }),
|
|
332
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
294
333
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
295
334
|
children: "Special Instructions"
|
|
296
|
-
}), /* @__PURE__ */
|
|
335
|
+
}), /* @__PURE__ */ C("textarea", {
|
|
297
336
|
rows: 3,
|
|
298
337
|
placeholder: "Any special requests or dietary preferences...",
|
|
299
|
-
value:
|
|
300
|
-
onChange: (e) =>
|
|
338
|
+
value: U.specialInstructions,
|
|
339
|
+
onChange: (e) => W((t) => ({
|
|
301
340
|
...t,
|
|
302
341
|
specialInstructions: e.target.value
|
|
303
342
|
})),
|
|
304
343
|
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"
|
|
305
344
|
})] }),
|
|
306
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ w("label", {
|
|
307
346
|
className: "flex items-center gap-2 cursor-pointer",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ C("input", {
|
|
309
348
|
type: "checkbox",
|
|
310
|
-
checked:
|
|
311
|
-
onChange: (e) =>
|
|
349
|
+
checked: U.isUrgent,
|
|
350
|
+
onChange: (e) => W((t) => ({
|
|
312
351
|
...t,
|
|
313
352
|
isUrgent: e.target.checked
|
|
314
353
|
})),
|
|
315
354
|
className: "h-4 w-4 rounded border-border-subtle"
|
|
316
|
-
}), /* @__PURE__ */
|
|
355
|
+
}), /* @__PURE__ */ C("span", {
|
|
317
356
|
className: "text-sm text-text-secondary",
|
|
318
357
|
children: "This is urgent (additional charges may apply)"
|
|
319
358
|
})]
|
|
@@ -322,23 +361,23 @@ function j() {
|
|
|
322
361
|
})
|
|
323
362
|
]
|
|
324
363
|
}),
|
|
325
|
-
|
|
364
|
+
L === "payment" && /* @__PURE__ */ w("div", {
|
|
326
365
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
327
366
|
children: [
|
|
328
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ w("h2", {
|
|
329
368
|
className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ C(_, { className: "h-4 w-4" }), "Advance Payment"]
|
|
331
370
|
}),
|
|
332
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ C("p", {
|
|
333
372
|
className: "text-xs text-text-secondary mb-5",
|
|
334
373
|
children: "Select your payment method"
|
|
335
374
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ w("div", {
|
|
337
376
|
className: "space-y-4",
|
|
338
377
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ w("div", {
|
|
340
379
|
className: "flex items-start gap-2 rounded-lg border border-border-focus/20 bg-[var(--color-accent-soft)] p-3",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
380
|
+
children: [/* @__PURE__ */ C(d, { className: "h-4 w-4 text-text-primary shrink-0 mt-0.5" }), /* @__PURE__ */ w("p", {
|
|
342
381
|
className: "text-xs text-text-primary",
|
|
343
382
|
children: [
|
|
344
383
|
"You need to pay ",
|
|
@@ -348,84 +387,84 @@ function j() {
|
|
|
348
387
|
]
|
|
349
388
|
})]
|
|
350
389
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ C("div", {
|
|
352
391
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
|
|
353
392
|
children: [
|
|
354
393
|
{
|
|
355
394
|
value: "upi",
|
|
356
395
|
label: "UPI",
|
|
357
396
|
sub: "Instant payment",
|
|
358
|
-
Icon:
|
|
397
|
+
Icon: y
|
|
359
398
|
},
|
|
360
399
|
{
|
|
361
400
|
value: "card",
|
|
362
401
|
label: "Card",
|
|
363
402
|
sub: "Secure payment",
|
|
364
|
-
Icon:
|
|
403
|
+
Icon: _
|
|
365
404
|
},
|
|
366
405
|
{
|
|
367
406
|
value: "wallet",
|
|
368
407
|
label: "Wallet",
|
|
369
408
|
sub: "Quick payment",
|
|
370
|
-
Icon:
|
|
409
|
+
Icon: b
|
|
371
410
|
}
|
|
372
|
-
].map(({ value: e, label: n, sub: r, Icon: i }) => /* @__PURE__ */
|
|
411
|
+
].map(({ value: e, label: n, sub: r, Icon: i }) => /* @__PURE__ */ w("button", {
|
|
373
412
|
type: "button",
|
|
374
|
-
onClick: () =>
|
|
375
|
-
className: t("rounded-lg border p-3 text-center transition-colors",
|
|
413
|
+
onClick: () => ce(e),
|
|
414
|
+
className: t("rounded-lg border p-3 text-center transition-colors", J === e ? "border-foreground bg-accent" : "border-border-subtle hover:bg-accent"),
|
|
376
415
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ C(i, { className: "mx-auto h-5 w-5 text-text-secondary mb-1" }),
|
|
417
|
+
/* @__PURE__ */ C("p", {
|
|
379
418
|
className: "text-sm font-medium text-text-primary",
|
|
380
419
|
children: n
|
|
381
420
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ C("p", {
|
|
383
422
|
className: "text-[10px] text-text-secondary",
|
|
384
423
|
children: r
|
|
385
424
|
})
|
|
386
425
|
]
|
|
387
426
|
}, e))
|
|
388
427
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ w("div", {
|
|
390
429
|
className: "rounded-lg bg-bg-sunken p-4",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
430
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
392
431
|
className: "text-sm font-medium text-text-primary mb-2",
|
|
393
432
|
children: "Payment Summary"
|
|
394
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), /* @__PURE__ */ w("div", {
|
|
395
434
|
className: "space-y-2 text-sm",
|
|
396
435
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ w("div", {
|
|
398
437
|
className: "flex justify-between",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ C("span", {
|
|
400
439
|
className: "text-text-secondary",
|
|
401
440
|
children: "Advance Payment:"
|
|
402
|
-
}), /* @__PURE__ */
|
|
441
|
+
}), /* @__PURE__ */ C("span", {
|
|
403
442
|
className: "text-text-primary",
|
|
404
443
|
children: s(Q, { minimumFractionDigits: 0 })
|
|
405
444
|
})]
|
|
406
445
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ w("div", {
|
|
408
447
|
className: "flex justify-between",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ C("span", {
|
|
410
449
|
className: "text-text-secondary",
|
|
411
450
|
children: "Service Fee:"
|
|
412
|
-
}), /* @__PURE__ */
|
|
451
|
+
}), /* @__PURE__ */ C("span", {
|
|
413
452
|
className: "text-text-primary",
|
|
414
453
|
children: s(Z, { minimumFractionDigits: 0 })
|
|
415
454
|
})]
|
|
416
455
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ w("div", {
|
|
418
457
|
className: "flex justify-between text-text-secondary",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ C("span", { children: "Balance Payment (at arrival):" }), /* @__PURE__ */ C("span", { children: s($, { minimumFractionDigits: 0 }) })]
|
|
420
459
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ w("div", {
|
|
422
461
|
className: "flex justify-between border-t border-border-subtle pt-2 font-semibold",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
462
|
+
children: [/* @__PURE__ */ C("span", {
|
|
424
463
|
className: "text-text-primary",
|
|
425
464
|
children: "Total Amount:"
|
|
426
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), /* @__PURE__ */ C("span", {
|
|
427
466
|
className: "text-text-primary",
|
|
428
|
-
children: s(
|
|
467
|
+
children: s(le, { minimumFractionDigits: 0 })
|
|
429
468
|
})]
|
|
430
469
|
})
|
|
431
470
|
]
|
|
@@ -435,127 +474,127 @@ function j() {
|
|
|
435
474
|
})
|
|
436
475
|
]
|
|
437
476
|
}),
|
|
438
|
-
|
|
477
|
+
L === "confirmation" && Y && /* @__PURE__ */ w("div", {
|
|
439
478
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
440
479
|
children: [
|
|
441
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ w("div", {
|
|
442
481
|
className: "text-center mb-6",
|
|
443
482
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ C("div", {
|
|
445
484
|
className: "mx-auto mb-3 flex h-14 w-14 items-center justify-center rounded-full bg-status-success-bg-subtle",
|
|
446
|
-
children: /* @__PURE__ */
|
|
485
|
+
children: /* @__PURE__ */ C(h, { className: "h-7 w-7 text-status-success-text" })
|
|
447
486
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ C("h2", {
|
|
449
488
|
className: "text-lg font-semibold text-text-primary mb-1",
|
|
450
489
|
children: "Booking Confirmed!"
|
|
451
490
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ C("p", {
|
|
453
492
|
className: "text-sm text-text-secondary",
|
|
454
493
|
children: "Your direct service booking has been confirmed and payment processed."
|
|
455
494
|
})
|
|
456
495
|
]
|
|
457
496
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ w("div", {
|
|
459
498
|
className: "rounded-lg bg-bg-sunken p-4 mb-4",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
499
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
461
500
|
className: "text-sm font-medium text-text-primary mb-3",
|
|
462
501
|
children: "Booking Details"
|
|
463
|
-
}), /* @__PURE__ */
|
|
502
|
+
}), /* @__PURE__ */ w("div", {
|
|
464
503
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm",
|
|
465
504
|
children: [
|
|
466
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
|
|
467
506
|
className: "text-xs text-text-secondary",
|
|
468
507
|
children: "Booking ID"
|
|
469
|
-
}), /* @__PURE__ */
|
|
508
|
+
}), /* @__PURE__ */ C("p", {
|
|
470
509
|
className: "font-mono text-xs text-text-primary",
|
|
471
510
|
children: Y.bookingId
|
|
472
511
|
})] }),
|
|
473
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
|
|
474
513
|
className: "text-xs text-text-secondary",
|
|
475
514
|
children: "Est. Arrival"
|
|
476
|
-
}), /* @__PURE__ */
|
|
515
|
+
}), /* @__PURE__ */ C("p", {
|
|
477
516
|
className: "text-text-primary",
|
|
478
517
|
children: new Date(Y.estimatedArrival).toLocaleTimeString([], {
|
|
479
518
|
hour: "2-digit",
|
|
480
519
|
minute: "2-digit"
|
|
481
520
|
})
|
|
482
521
|
})] }),
|
|
483
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
|
|
484
523
|
className: "text-xs text-text-secondary",
|
|
485
524
|
children: "Location"
|
|
486
|
-
}), /* @__PURE__ */
|
|
525
|
+
}), /* @__PURE__ */ C("p", {
|
|
487
526
|
className: "text-text-primary truncate",
|
|
488
|
-
children:
|
|
527
|
+
children: V.address
|
|
489
528
|
})] }),
|
|
490
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
|
|
491
530
|
className: "text-xs text-text-secondary",
|
|
492
531
|
children: "Phone"
|
|
493
|
-
}), /* @__PURE__ */
|
|
532
|
+
}), /* @__PURE__ */ C("p", {
|
|
494
533
|
className: "text-text-primary",
|
|
495
|
-
children:
|
|
534
|
+
children: V.phoneNumber
|
|
496
535
|
})] })
|
|
497
536
|
]
|
|
498
537
|
})]
|
|
499
538
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ w("div", {
|
|
501
540
|
className: "rounded-lg border border-status-success-text/20 bg-status-success-bg-subtle p-4 mb-4",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ w("h3", {
|
|
503
542
|
className: "text-sm font-medium text-status-success-text mb-2 flex items-center gap-2",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
505
|
-
}), /* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ C(h, { className: "h-4 w-4" }), "Payment Processed"]
|
|
544
|
+
}), /* @__PURE__ */ w("div", {
|
|
506
545
|
className: "grid grid-cols-2 gap-3 text-sm",
|
|
507
546
|
children: [
|
|
508
|
-
/* @__PURE__ */
|
|
547
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
|
|
509
548
|
className: "text-xs text-text-secondary",
|
|
510
549
|
children: "Transaction ID"
|
|
511
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ C("p", {
|
|
512
551
|
className: "font-mono text-xs text-text-primary",
|
|
513
552
|
children: Y.transactionId
|
|
514
553
|
})] }),
|
|
515
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
|
|
516
555
|
className: "text-xs text-text-secondary",
|
|
517
556
|
children: "Advance Paid"
|
|
518
|
-
}), /* @__PURE__ */
|
|
557
|
+
}), /* @__PURE__ */ C("p", {
|
|
519
558
|
className: "font-medium text-text-primary",
|
|
520
559
|
children: s(Q, { minimumFractionDigits: 0 })
|
|
521
560
|
})] }),
|
|
522
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
|
|
523
562
|
className: "text-xs text-text-secondary",
|
|
524
563
|
children: "Method"
|
|
525
|
-
}), /* @__PURE__ */
|
|
564
|
+
}), /* @__PURE__ */ C("p", {
|
|
526
565
|
className: "capitalize text-text-primary",
|
|
527
|
-
children:
|
|
566
|
+
children: J
|
|
528
567
|
})] }),
|
|
529
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
|
|
530
569
|
className: "text-xs text-text-secondary",
|
|
531
570
|
children: "Status"
|
|
532
|
-
}), /* @__PURE__ */
|
|
571
|
+
}), /* @__PURE__ */ C("p", {
|
|
533
572
|
className: "font-medium text-status-success-text",
|
|
534
573
|
children: "Paid"
|
|
535
574
|
})] })
|
|
536
575
|
]
|
|
537
576
|
})]
|
|
538
577
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ w("div", {
|
|
540
579
|
className: "rounded-lg border border-border-focus/20 bg-[var(--color-accent-soft)] p-4 mb-6",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
542
581
|
className: "text-sm font-medium text-text-primary mb-2",
|
|
543
582
|
children: "Next Steps"
|
|
544
|
-
}), /* @__PURE__ */
|
|
583
|
+
}), /* @__PURE__ */ w("div", {
|
|
545
584
|
className: "space-y-2 text-xs text-text-primary",
|
|
546
585
|
children: [
|
|
547
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ w("div", {
|
|
548
587
|
className: "flex items-start gap-2",
|
|
549
|
-
children: [/* @__PURE__ */
|
|
588
|
+
children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5 text-status-success-text mt-0.5 shrink-0" }), /* @__PURE__ */ w("span", { children: [
|
|
550
589
|
"Payment confirmed -",
|
|
551
590
|
" ",
|
|
552
591
|
s(Q, { minimumFractionDigits: 0 }),
|
|
553
592
|
" paid"
|
|
554
593
|
] })]
|
|
555
594
|
}),
|
|
556
|
-
/* @__PURE__ */
|
|
595
|
+
/* @__PURE__ */ w("div", {
|
|
557
596
|
className: "flex items-start gap-2",
|
|
558
|
-
children: [/* @__PURE__ */
|
|
597
|
+
children: [/* @__PURE__ */ C(g, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ w("span", { children: [
|
|
559
598
|
"Cart will arrive around",
|
|
560
599
|
" ",
|
|
561
600
|
new Date(Y.estimatedArrival).toLocaleTimeString([], {
|
|
@@ -564,9 +603,9 @@ function j() {
|
|
|
564
603
|
})
|
|
565
604
|
] })]
|
|
566
605
|
}),
|
|
567
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ w("div", {
|
|
568
607
|
className: "flex items-start gap-2",
|
|
569
|
-
children: [/* @__PURE__ */
|
|
608
|
+
children: [/* @__PURE__ */ C(_, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ w("span", { children: [
|
|
570
609
|
"Pay remaining ",
|
|
571
610
|
s($, { minimumFractionDigits: 0 }),
|
|
572
611
|
" ",
|
|
@@ -576,87 +615,90 @@ function j() {
|
|
|
576
615
|
]
|
|
577
616
|
})]
|
|
578
617
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ w("div", {
|
|
580
619
|
className: "flex gap-3",
|
|
581
|
-
children: [/* @__PURE__ */
|
|
620
|
+
children: [/* @__PURE__ */ C("button", {
|
|
582
621
|
type: "button",
|
|
583
|
-
onClick: () =>
|
|
622
|
+
onClick: () => A(`/customer/booking/${Y.orderId}`),
|
|
584
623
|
className: "flex-1 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
585
624
|
children: "View Booking"
|
|
586
|
-
}), /* @__PURE__ */
|
|
625
|
+
}), /* @__PURE__ */ C("button", {
|
|
587
626
|
type: "button",
|
|
588
|
-
onClick: () =>
|
|
627
|
+
onClick: () => A("/customer/discover"),
|
|
589
628
|
className: "flex-1 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
590
629
|
children: "Browse More"
|
|
591
630
|
})]
|
|
592
631
|
})
|
|
593
632
|
]
|
|
594
633
|
}),
|
|
595
|
-
|
|
634
|
+
L !== "confirmation" && /* @__PURE__ */ w("div", {
|
|
596
635
|
className: "flex justify-between mt-5",
|
|
597
|
-
children: [/* @__PURE__ */
|
|
636
|
+
children: [/* @__PURE__ */ w("button", {
|
|
598
637
|
type: "button",
|
|
599
|
-
onClick:
|
|
600
|
-
disabled:
|
|
601
|
-
className: t("flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary transition-colors",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
603
|
-
}), /* @__PURE__ */
|
|
638
|
+
onClick: ge,
|
|
639
|
+
disabled: L === "location",
|
|
640
|
+
className: t("flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary transition-colors", L === "location" ? "opacity-40 cursor-not-allowed" : "hover:bg-accent"),
|
|
641
|
+
children: [/* @__PURE__ */ C(f, { className: "h-4 w-4" }), "Previous"]
|
|
642
|
+
}), /* @__PURE__ */ C("button", {
|
|
604
643
|
type: "button",
|
|
605
|
-
onClick:
|
|
606
|
-
disabled:
|
|
607
|
-
className: t("flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity",
|
|
608
|
-
children:
|
|
644
|
+
onClick: he,
|
|
645
|
+
disabled: z,
|
|
646
|
+
className: t("flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity", z ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
|
|
647
|
+
children: z ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(te, { className: "h-4 w-4 animate-spin" }), L === "payment" ? "Processing Payment..." : "Processing..."] }) : /* @__PURE__ */ w(S, { children: [L === "payment" ? "Confirm & Pay" : "Next", /* @__PURE__ */ C(p, { className: "h-4 w-4" })] })
|
|
609
648
|
})]
|
|
610
649
|
})
|
|
611
650
|
]
|
|
612
|
-
}), /* @__PURE__ */
|
|
651
|
+
}), /* @__PURE__ */ C("div", {
|
|
613
652
|
className: "lg:col-span-1",
|
|
614
|
-
children: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ w("div", {
|
|
615
654
|
className: "sticky top-6 rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
616
655
|
children: [
|
|
617
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ C("h3", {
|
|
618
657
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
619
658
|
children: "Service Summary"
|
|
620
659
|
}),
|
|
621
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ w("div", {
|
|
622
661
|
className: "flex items-center gap-3 mb-4",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
662
|
+
children: [/* @__PURE__ */ C("div", {
|
|
663
|
+
className: "h-12 w-12 shrink-0 overflow-hidden rounded-lg",
|
|
664
|
+
children: /* @__PURE__ */ C(ee, {
|
|
665
|
+
src: M.image,
|
|
666
|
+
alt: M.name,
|
|
667
|
+
seed: M.name
|
|
668
|
+
})
|
|
669
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
628
670
|
className: "text-sm font-medium text-text-primary",
|
|
629
|
-
children:
|
|
630
|
-
}), /* @__PURE__ */
|
|
671
|
+
children: M.name
|
|
672
|
+
}), /* @__PURE__ */ C("p", {
|
|
631
673
|
className: "text-xs text-text-secondary",
|
|
632
|
-
children:
|
|
674
|
+
children: M.category
|
|
633
675
|
})] })]
|
|
634
676
|
}),
|
|
635
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ w("div", {
|
|
636
678
|
className: "space-y-2 text-sm border-t border-border-subtle pt-3",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
679
|
+
children: [/* @__PURE__ */ w("div", {
|
|
638
680
|
className: "flex justify-between",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
681
|
+
children: [/* @__PURE__ */ C("span", {
|
|
640
682
|
className: "text-text-secondary",
|
|
641
683
|
children: "Service Fee:"
|
|
642
|
-
}), /* @__PURE__ */
|
|
684
|
+
}), /* @__PURE__ */ C("span", {
|
|
643
685
|
className: "text-text-primary",
|
|
644
686
|
children: s(Z, { minimumFractionDigits: 0 })
|
|
645
687
|
})]
|
|
646
|
-
}), /* @__PURE__ */
|
|
688
|
+
}), /* @__PURE__ */ w("div", {
|
|
647
689
|
className: "flex justify-between",
|
|
648
|
-
children: [/* @__PURE__ */
|
|
690
|
+
children: [/* @__PURE__ */ C("span", {
|
|
649
691
|
className: "text-text-secondary",
|
|
650
692
|
children: "Advance Payment:"
|
|
651
|
-
}), /* @__PURE__ */
|
|
693
|
+
}), /* @__PURE__ */ C("span", {
|
|
652
694
|
className: "font-medium text-text-primary",
|
|
653
695
|
children: s(Q, { minimumFractionDigits: 0 })
|
|
654
696
|
})]
|
|
655
697
|
})]
|
|
656
698
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ w("div", {
|
|
658
700
|
className: "flex items-center gap-2 mt-3 pt-3 border-t border-border-subtle text-status-success-text",
|
|
659
|
-
children: [/* @__PURE__ */
|
|
701
|
+
children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ C("span", {
|
|
660
702
|
className: "text-xs",
|
|
661
703
|
children: "Pay remaining amount at cart"
|
|
662
704
|
})]
|
|
@@ -669,6 +711,6 @@ function j() {
|
|
|
669
711
|
});
|
|
670
712
|
}
|
|
671
713
|
//#endregion
|
|
672
|
-
export {
|
|
714
|
+
export { k as DirectServiceBookingPage };
|
|
673
715
|
|
|
674
716
|
//# sourceMappingURL=DirectServiceBookingPage.js.map
|