@burdenoff/microfe-adaptercloud 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/adaptercloud/components/PageLayout.js +24 -17
- package/dist/adaptercloud/components/PageLayout.js.map +1 -1
- package/dist/adaptercloud/pages/HomePage.js +18 -16
- package/dist/adaptercloud/pages/HomePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminDashboard.js +70 -44
- package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +60 -55
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +97 -92
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js +59 -57
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +118 -104
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/CartManagementPage.js +145 -140
- package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/UserManagementPage.js +152 -147
- package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +87 -81
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +179 -165
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +73 -48
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +95 -93
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +110 -107
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +293 -299
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +218 -224
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +122 -128
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/HelpSupportPage.js +248 -244
- package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js +96 -91
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/SettingsPage.js +754 -736
- package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDetailPage.js +110 -108
- package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +221 -217
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CheckoutPage.js +89 -87
- package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js +410 -381
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +120 -118
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +86 -81
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/FavoritesPage.js +53 -51
- package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +114 -109
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +60 -58
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +87 -72
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/ReviewsPage.js +65 -63
- package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +68 -53
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +86 -84
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +57 -55
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js +341 -308
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +34 -32
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +48 -46
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +383 -381
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +348 -319
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js +84 -59
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +73 -71
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +76 -74
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +70 -68
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,15 +2,16 @@ import { useAdapterCloud as e } from "../../context/AdapterCloudContext.js";
|
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
4
|
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
-
import { useInvestmentOpportunities as
|
|
6
|
-
import { formatCurrency as
|
|
7
|
-
import { useMemo as
|
|
8
|
-
import { ArrowLeft as
|
|
5
|
+
import { useInvestmentOpportunities as ee, useOfferings as i, useProviders as a } from "../../hooks/useAdapterCloudApi.js";
|
|
6
|
+
import { formatCurrency as o, formatDistance as s, formatDuration as c } from "../../utils/formatters.js";
|
|
7
|
+
import { useMemo as l, useState as u } from "react";
|
|
8
|
+
import { ArrowLeft as d, Calendar as f, CheckCircle2 as p, Clock as m, Flame as h, Home as g, Leaf as _, MapPin as v, Minus as y, Plus as b, Search as x, ShoppingCart as S, Star as C, TrendingUp as w, X as T } from "lucide-react";
|
|
9
9
|
import { useParams as E } from "react-router-dom";
|
|
10
10
|
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
11
|
+
import { EmphasisPanel as A } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
//#region src/adaptercloud/pages/customer/CartDetailPage.tsx
|
|
12
|
-
function
|
|
13
|
-
let { cartId:
|
|
13
|
+
function j() {
|
|
14
|
+
let { cartId: j } = E(), { navigateTo: M } = e(), { data: N = [], isLoading: te } = a(), { data: P = [], isLoading: ne } = i(j), { data: F = [], isLoading: re } = ee(), I = l(() => N.find((e) => e.id === j), [N, j]), L = l(() => F.find((e) => e.cartId === j), [F, j]), [R, z] = u(""), [B, V] = u(""), [H, U] = u([]), [W, G] = u(!1), [K, q] = u(null), J = l(() => P.map((e) => ({
|
|
14
15
|
id: e.id,
|
|
15
16
|
name: e.name,
|
|
16
17
|
price: e.price,
|
|
@@ -20,24 +21,24 @@ function A() {
|
|
|
20
21
|
isVeg: !0,
|
|
21
22
|
duration: e.durationMinutes,
|
|
22
23
|
serviceType: e.serviceType
|
|
23
|
-
})), [
|
|
24
|
-
let e =
|
|
25
|
-
if (
|
|
26
|
-
let t =
|
|
24
|
+
})), [P]), Y = l(() => [...new Set(J.map((e) => e.category))], [J]), X = l(() => {
|
|
25
|
+
let e = J;
|
|
26
|
+
if (B && (e = e.filter((e) => e.category === B)), R.trim()) {
|
|
27
|
+
let t = R.toLowerCase();
|
|
27
28
|
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.description.toLowerCase().includes(t));
|
|
28
29
|
}
|
|
29
30
|
return e;
|
|
30
31
|
}, [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
]),
|
|
32
|
+
J,
|
|
33
|
+
B,
|
|
34
|
+
R
|
|
35
|
+
]), Z = l(() => {
|
|
35
36
|
let e = {};
|
|
36
|
-
return
|
|
37
|
+
return X.forEach((t) => {
|
|
37
38
|
e[t.category] || (e[t.category] = []), e[t.category].push(t);
|
|
38
39
|
}), e;
|
|
39
|
-
}, [
|
|
40
|
-
|
|
40
|
+
}, [X]), ie = (e, t = 1, n) => {
|
|
41
|
+
U((r) => r.find((t) => t.productId === e.id) ? r.map((n) => n.productId === e.id ? {
|
|
41
42
|
...n,
|
|
42
43
|
quantity: n.quantity + t
|
|
43
44
|
} : n) : [...r, {
|
|
@@ -49,64 +50,65 @@ function A() {
|
|
|
49
50
|
specialInstructions: n
|
|
50
51
|
}]);
|
|
51
52
|
}, Q = (e, t) => {
|
|
52
|
-
|
|
53
|
+
U((n) => n.map((n) => n.productId === e ? {
|
|
53
54
|
...n,
|
|
54
55
|
quantity: Math.max(0, n.quantity + t)
|
|
55
56
|
} : n).filter((e) => e.quantity > 0));
|
|
56
57
|
}, $ = (e) => {
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
58
|
+
U((t) => t.filter((t) => t.productId !== e));
|
|
59
|
+
}, ae = (e) => H.find((t) => t.productId === e)?.quantity ?? 0, oe = H.reduce((e, t) => e + t.price * t.quantity, 0), se = H.reduce((e, t) => e + t.quantity, 0), ce = (e) => {
|
|
60
|
+
q({
|
|
60
61
|
product: e,
|
|
61
62
|
quantity: 1,
|
|
62
63
|
specialInstructions: ""
|
|
63
|
-
}),
|
|
64
|
+
}), G(!0);
|
|
64
65
|
};
|
|
65
|
-
return
|
|
66
|
+
return I ? /* @__PURE__ */ k(n, {
|
|
66
67
|
title: /* @__PURE__ */ k("div", {
|
|
67
68
|
className: "flex items-center gap-3",
|
|
68
69
|
children: [
|
|
69
70
|
/* @__PURE__ */ O("button", {
|
|
70
71
|
type: "button",
|
|
71
|
-
onClick: () =>
|
|
72
|
+
onClick: () => M("/customer/carts"),
|
|
72
73
|
className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
73
|
-
children: /* @__PURE__ */ O(
|
|
74
|
+
children: /* @__PURE__ */ O(d, { className: "h-5 w-5" })
|
|
74
75
|
}),
|
|
75
76
|
/* @__PURE__ */ O("span", {
|
|
76
77
|
className: "truncate",
|
|
77
|
-
children:
|
|
78
|
+
children: I.name
|
|
78
79
|
}),
|
|
79
|
-
|
|
80
|
+
I.isVerified && /* @__PURE__ */ O(p, { className: "h-5 w-5 text-accent-blue shrink-0" })
|
|
80
81
|
]
|
|
81
82
|
}),
|
|
82
|
-
description:
|
|
83
|
+
description: I.category,
|
|
84
|
+
purpose: "See everything this cart offers and decide whether to order — its menu and prices, ratings and reviews, hours and location. Add items to your order, book a direct service, or save it to favorites for later.",
|
|
83
85
|
children: [
|
|
84
|
-
/* @__PURE__ */ k(
|
|
85
|
-
className: "relative h-48
|
|
86
|
+
/* @__PURE__ */ k(A, {
|
|
87
|
+
className: "relative h-48 overflow-hidden p-0",
|
|
86
88
|
children: [/* @__PURE__ */ O("img", {
|
|
87
|
-
src:
|
|
88
|
-
alt:
|
|
89
|
+
src: I.image,
|
|
90
|
+
alt: I.name,
|
|
89
91
|
className: "h-full w-full object-cover"
|
|
90
92
|
}), /* @__PURE__ */ O("div", {
|
|
91
93
|
className: "absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 to-transparent p-4",
|
|
92
94
|
children: /* @__PURE__ */ k("div", {
|
|
93
95
|
className: "flex items-center gap-3",
|
|
94
96
|
children: [/* @__PURE__ */ O("span", {
|
|
95
|
-
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",
|
|
96
|
-
children:
|
|
97
|
+
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", I.isOpen ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg-subtle/20 text-status-error-text"),
|
|
98
|
+
children: I.isOpen ? "Open Now" : "Closed"
|
|
97
99
|
}), /* @__PURE__ */ k("div", {
|
|
98
100
|
className: "flex items-center gap-1 text-white text-sm",
|
|
99
101
|
children: [
|
|
100
|
-
/* @__PURE__ */ O(
|
|
102
|
+
/* @__PURE__ */ O(C, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }),
|
|
101
103
|
/* @__PURE__ */ O("span", {
|
|
102
104
|
className: "font-medium",
|
|
103
|
-
children:
|
|
105
|
+
children: I.rating
|
|
104
106
|
}),
|
|
105
107
|
/* @__PURE__ */ k("span", {
|
|
106
108
|
className: "text-white/70",
|
|
107
109
|
children: [
|
|
108
110
|
"(",
|
|
109
|
-
|
|
111
|
+
I.totalRatings,
|
|
110
112
|
")"
|
|
111
113
|
]
|
|
112
114
|
})
|
|
@@ -115,7 +117,7 @@ function A() {
|
|
|
115
117
|
})
|
|
116
118
|
})]
|
|
117
119
|
}),
|
|
118
|
-
!
|
|
120
|
+
!I.isOpen && /* @__PURE__ */ O("div", {
|
|
119
121
|
className: "mt-4 rounded-lg border border-status-warning-border/30 bg-status-warning-bg-subtle/10 p-3",
|
|
120
122
|
children: /* @__PURE__ */ k("p", {
|
|
121
123
|
className: "text-sm text-status-warning-text",
|
|
@@ -130,18 +132,18 @@ function A() {
|
|
|
130
132
|
children: [
|
|
131
133
|
/* @__PURE__ */ k("div", {
|
|
132
134
|
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
133
|
-
children: [/* @__PURE__ */ O(
|
|
135
|
+
children: [/* @__PURE__ */ O(v, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ O("span", {
|
|
134
136
|
className: "font-medium uppercase tracking-wider",
|
|
135
137
|
children: "Location"
|
|
136
138
|
})]
|
|
137
139
|
}),
|
|
138
140
|
/* @__PURE__ */ O("p", {
|
|
139
141
|
className: "text-sm text-text-primary",
|
|
140
|
-
children:
|
|
142
|
+
children: I.location.address
|
|
141
143
|
}),
|
|
142
144
|
/* @__PURE__ */ k("p", {
|
|
143
145
|
className: "text-xs text-text-secondary",
|
|
144
|
-
children: [
|
|
146
|
+
children: [s(I.distance), " away"]
|
|
145
147
|
})
|
|
146
148
|
]
|
|
147
149
|
}),
|
|
@@ -150,18 +152,18 @@ function A() {
|
|
|
150
152
|
children: [
|
|
151
153
|
/* @__PURE__ */ k("div", {
|
|
152
154
|
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
153
|
-
children: [/* @__PURE__ */ O(
|
|
155
|
+
children: [/* @__PURE__ */ O(m, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ O("span", {
|
|
154
156
|
className: "font-medium uppercase tracking-wider",
|
|
155
157
|
children: "Estimated Time"
|
|
156
158
|
})]
|
|
157
159
|
}),
|
|
158
160
|
/* @__PURE__ */ O("p", {
|
|
159
161
|
className: "text-sm text-text-primary",
|
|
160
|
-
children:
|
|
162
|
+
children: c(I.estimatedTime)
|
|
161
163
|
}),
|
|
162
|
-
|
|
164
|
+
I.averageOrderValue && /* @__PURE__ */ k("p", {
|
|
163
165
|
className: "text-xs text-text-secondary",
|
|
164
|
-
children: ["Avg ",
|
|
166
|
+
children: ["Avg ", o(I.averageOrderValue, { minimumFractionDigits: 0 })]
|
|
165
167
|
})
|
|
166
168
|
]
|
|
167
169
|
}),
|
|
@@ -170,31 +172,31 @@ function A() {
|
|
|
170
172
|
children: [
|
|
171
173
|
/* @__PURE__ */ k("div", {
|
|
172
174
|
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
173
|
-
children: [/* @__PURE__ */ O(
|
|
175
|
+
children: [/* @__PURE__ */ O(C, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ O("span", {
|
|
174
176
|
className: "font-medium uppercase tracking-wider",
|
|
175
177
|
children: "Rating"
|
|
176
178
|
})]
|
|
177
179
|
}),
|
|
178
180
|
/* @__PURE__ */ k("p", {
|
|
179
181
|
className: "text-sm text-text-primary",
|
|
180
|
-
children: [
|
|
182
|
+
children: [I.rating, " / 5.0"]
|
|
181
183
|
}),
|
|
182
184
|
/* @__PURE__ */ k("p", {
|
|
183
185
|
className: "text-xs text-text-secondary",
|
|
184
|
-
children: [
|
|
186
|
+
children: [I.totalRatings, " reviews"]
|
|
185
187
|
})
|
|
186
188
|
]
|
|
187
189
|
})
|
|
188
190
|
]
|
|
189
191
|
}),
|
|
190
|
-
|
|
192
|
+
I.businessHours && Object.keys(I.businessHours).length > 0 && /* @__PURE__ */ k("section", {
|
|
191
193
|
className: "mt-6",
|
|
192
194
|
children: [/* @__PURE__ */ O("h2", {
|
|
193
195
|
className: "text-base font-semibold text-text-primary mb-2",
|
|
194
196
|
children: "Operating Hours"
|
|
195
197
|
}), /* @__PURE__ */ O("div", {
|
|
196
198
|
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
|
|
197
|
-
children: Object.entries(
|
|
199
|
+
children: Object.entries(I.businessHours).map(([e, t]) => /* @__PURE__ */ k("div", {
|
|
198
200
|
className: "flex items-center justify-between px-4 py-2 border-b border-border-subtle last:border-b-0",
|
|
199
201
|
children: [/* @__PURE__ */ O("span", {
|
|
200
202
|
className: "text-sm font-medium text-text-primary capitalize",
|
|
@@ -222,21 +224,21 @@ function A() {
|
|
|
222
224
|
className: "flex flex-col gap-3 sm:flex-row mb-4",
|
|
223
225
|
children: [/* @__PURE__ */ k("div", {
|
|
224
226
|
className: "relative flex-1",
|
|
225
|
-
children: [/* @__PURE__ */ O(
|
|
227
|
+
children: [/* @__PURE__ */ O(x, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ O("input", {
|
|
226
228
|
type: "text",
|
|
227
229
|
placeholder: "Search offerings...",
|
|
228
|
-
value:
|
|
229
|
-
onChange: (e) =>
|
|
230
|
+
value: R,
|
|
231
|
+
onChange: (e) => z(e.target.value),
|
|
230
232
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
231
233
|
})]
|
|
232
234
|
}), /* @__PURE__ */ k("select", {
|
|
233
|
-
value:
|
|
234
|
-
onChange: (e) =>
|
|
235
|
+
value: B,
|
|
236
|
+
onChange: (e) => V(e.target.value),
|
|
235
237
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
236
238
|
children: [/* @__PURE__ */ O("option", {
|
|
237
239
|
value: "",
|
|
238
240
|
children: "All Categories"
|
|
239
|
-
}),
|
|
241
|
+
}), Y.map((e) => /* @__PURE__ */ O("option", {
|
|
240
242
|
value: e,
|
|
241
243
|
children: e
|
|
242
244
|
}, e))]
|
|
@@ -246,25 +248,25 @@ function A() {
|
|
|
246
248
|
className: "text-lg font-semibold text-text-primary mb-3",
|
|
247
249
|
children: [
|
|
248
250
|
"Menu & Services (",
|
|
249
|
-
|
|
251
|
+
X.length,
|
|
250
252
|
")"
|
|
251
253
|
]
|
|
252
254
|
}),
|
|
253
|
-
|
|
255
|
+
X.length === 0 ? /* @__PURE__ */ k("div", {
|
|
254
256
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-8 text-center",
|
|
255
|
-
children: [/* @__PURE__ */ O(
|
|
257
|
+
children: [/* @__PURE__ */ O(x, { className: "mx-auto h-10 w-10 text-text-secondary/50" }), /* @__PURE__ */ O("p", {
|
|
256
258
|
className: "mt-3 text-sm text-text-secondary",
|
|
257
259
|
children: "No offerings found"
|
|
258
260
|
})]
|
|
259
261
|
}) : /* @__PURE__ */ O("div", {
|
|
260
262
|
className: "space-y-6",
|
|
261
|
-
children: Object.entries(
|
|
263
|
+
children: Object.entries(Z).map(([e, n]) => /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", {
|
|
262
264
|
className: "text-sm font-semibold text-text-primary mb-2 px-1",
|
|
263
265
|
children: e
|
|
264
266
|
}), /* @__PURE__ */ O("div", {
|
|
265
267
|
className: "space-y-2",
|
|
266
268
|
children: n.map((e) => {
|
|
267
|
-
let n =
|
|
269
|
+
let n = ae(e.id);
|
|
268
270
|
return /* @__PURE__ */ k("div", {
|
|
269
271
|
className: "flex gap-4 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
270
272
|
children: [/* @__PURE__ */ O("div", {
|
|
@@ -284,13 +286,13 @@ function A() {
|
|
|
284
286
|
children: [/* @__PURE__ */ O("h4", {
|
|
285
287
|
className: "text-sm font-semibold text-text-primary",
|
|
286
288
|
children: e.name
|
|
287
|
-
}), e.isVeg && /* @__PURE__ */ O(
|
|
289
|
+
}), e.isVeg && /* @__PURE__ */ O(_, { className: "h-3.5 w-3.5 text-status-success-text" })]
|
|
288
290
|
}), /* @__PURE__ */ O("p", {
|
|
289
291
|
className: "text-xs text-text-secondary mt-0.5",
|
|
290
292
|
children: e.category
|
|
291
293
|
})] }), /* @__PURE__ */ O("span", {
|
|
292
294
|
className: "text-sm font-bold text-text-primary whitespace-nowrap",
|
|
293
|
-
children:
|
|
295
|
+
children: o(e.price, { minimumFractionDigits: 0 })
|
|
294
296
|
})]
|
|
295
297
|
}),
|
|
296
298
|
/* @__PURE__ */ O("p", {
|
|
@@ -302,7 +304,7 @@ function A() {
|
|
|
302
304
|
children: [
|
|
303
305
|
e.duration != null && e.duration > 0 && /* @__PURE__ */ k("span", {
|
|
304
306
|
className: "flex items-center gap-0.5",
|
|
305
|
-
children: [/* @__PURE__ */ O(
|
|
307
|
+
children: [/* @__PURE__ */ O(m, { className: "h-3 w-3" }), c(e.duration)]
|
|
306
308
|
}),
|
|
307
309
|
e.serviceType && /* @__PURE__ */ O("span", {
|
|
308
310
|
className: "rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
|
|
@@ -310,7 +312,7 @@ function A() {
|
|
|
310
312
|
}),
|
|
311
313
|
e.spiceLevel && /* @__PURE__ */ k("span", {
|
|
312
314
|
className: "flex items-center gap-0.5 rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
|
|
313
|
-
children: [/* @__PURE__ */ O(
|
|
315
|
+
children: [/* @__PURE__ */ O(h, { className: "h-3 w-3" }), e.spiceLevel]
|
|
314
316
|
})
|
|
315
317
|
]
|
|
316
318
|
}),
|
|
@@ -323,7 +325,7 @@ function A() {
|
|
|
323
325
|
type: "button",
|
|
324
326
|
onClick: () => Q(e.id, -1),
|
|
325
327
|
className: "flex h-7 w-7 items-center justify-center rounded-full bg-bg-sunken text-text-primary hover:bg-accent",
|
|
326
|
-
children: /* @__PURE__ */ O(
|
|
328
|
+
children: /* @__PURE__ */ O(y, { className: "h-3.5 w-3.5" })
|
|
327
329
|
}),
|
|
328
330
|
/* @__PURE__ */ O("span", {
|
|
329
331
|
className: "min-w-[2ch] text-center text-sm font-medium text-text-primary",
|
|
@@ -333,7 +335,7 @@ function A() {
|
|
|
333
335
|
type: "button",
|
|
334
336
|
onClick: () => Q(e.id, 1),
|
|
335
337
|
className: "flex h-7 w-7 items-center justify-center rounded-full bg-foreground text-background hover:opacity-90",
|
|
336
|
-
children: /* @__PURE__ */ O(
|
|
338
|
+
children: /* @__PURE__ */ O(b, { className: "h-3.5 w-3.5" })
|
|
337
339
|
}),
|
|
338
340
|
/* @__PURE__ */ O("button", {
|
|
339
341
|
type: "button",
|
|
@@ -344,9 +346,9 @@ function A() {
|
|
|
344
346
|
]
|
|
345
347
|
}) : /* @__PURE__ */ O("button", {
|
|
346
348
|
type: "button",
|
|
347
|
-
disabled: !
|
|
348
|
-
onClick: () =>
|
|
349
|
-
className: t("rounded-lg px-4 py-1.5 text-xs font-medium transition-opacity",
|
|
349
|
+
disabled: !I.isOpen,
|
|
350
|
+
onClick: () => ce(e),
|
|
351
|
+
className: t("rounded-lg px-4 py-1.5 text-xs font-medium transition-opacity", I.isOpen ? "bg-foreground text-background hover:opacity-90" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
|
|
350
352
|
children: "Add"
|
|
351
353
|
})
|
|
352
354
|
})
|
|
@@ -364,16 +366,16 @@ function A() {
|
|
|
364
366
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 lg:sticky lg:top-6 bg-gloss-card shadow-pop",
|
|
365
367
|
children: [/* @__PURE__ */ k("h3", {
|
|
366
368
|
className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
367
|
-
children: [/* @__PURE__ */ O(
|
|
368
|
-
}),
|
|
369
|
+
children: [/* @__PURE__ */ O(S, { className: "h-4 w-4" }), "Your Order"]
|
|
370
|
+
}), H.length === 0 ? /* @__PURE__ */ k("div", {
|
|
369
371
|
className: "py-6 text-center",
|
|
370
|
-
children: [/* @__PURE__ */ O(
|
|
372
|
+
children: [/* @__PURE__ */ O(S, { className: "mx-auto h-8 w-8 text-text-secondary/40" }), /* @__PURE__ */ O("p", {
|
|
371
373
|
className: "mt-2 text-sm text-text-secondary",
|
|
372
374
|
children: "Your cart is empty"
|
|
373
375
|
})]
|
|
374
376
|
}) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
|
|
375
377
|
className: "space-y-2 max-h-64 overflow-y-auto mb-3",
|
|
376
|
-
children:
|
|
378
|
+
children: H.map((e) => /* @__PURE__ */ k("div", {
|
|
377
379
|
className: "flex items-center justify-between gap-2",
|
|
378
380
|
children: [/* @__PURE__ */ k("div", {
|
|
379
381
|
className: "flex-1 min-w-0",
|
|
@@ -383,7 +385,7 @@ function A() {
|
|
|
383
385
|
}), /* @__PURE__ */ k("p", {
|
|
384
386
|
className: "text-xs text-text-secondary",
|
|
385
387
|
children: [
|
|
386
|
-
|
|
388
|
+
o(e.price, { minimumFractionDigits: 0 }),
|
|
387
389
|
" x",
|
|
388
390
|
" ",
|
|
389
391
|
e.quantity
|
|
@@ -423,25 +425,25 @@ function A() {
|
|
|
423
425
|
className: "flex justify-between items-center mb-3",
|
|
424
426
|
children: [/* @__PURE__ */ k("span", {
|
|
425
427
|
className: "text-sm font-semibold text-text-primary",
|
|
426
|
-
children: ["Total: ",
|
|
428
|
+
children: ["Total: ", o(oe, { minimumFractionDigits: 0 })]
|
|
427
429
|
}), /* @__PURE__ */ k("span", {
|
|
428
430
|
className: "text-xs text-text-secondary",
|
|
429
|
-
children: [
|
|
431
|
+
children: [se, " items"]
|
|
430
432
|
})]
|
|
431
433
|
}), /* @__PURE__ */ O("button", {
|
|
432
434
|
type: "button",
|
|
433
|
-
onClick: () =>
|
|
435
|
+
onClick: () => M("/customer/checkout"),
|
|
434
436
|
className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
435
437
|
children: "Proceed to Checkout"
|
|
436
438
|
})]
|
|
437
439
|
})] })]
|
|
438
440
|
}),
|
|
439
|
-
|
|
441
|
+
I.serviceTypes?.includes("direct_service") && /* @__PURE__ */ k("div", {
|
|
440
442
|
className: "rounded-lg border border-accent-purple-subtle/30 bg-accent-purple-subtle/10 p-4",
|
|
441
443
|
children: [
|
|
442
444
|
/* @__PURE__ */ k("h3", {
|
|
443
445
|
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
444
|
-
children: [/* @__PURE__ */ O(
|
|
446
|
+
children: [/* @__PURE__ */ O(g, { className: "h-4 w-4 text-accent-purple" }), "Direct Service"]
|
|
445
447
|
}),
|
|
446
448
|
/* @__PURE__ */ O("p", {
|
|
447
449
|
className: "text-xs text-text-secondary mb-3",
|
|
@@ -449,47 +451,47 @@ function A() {
|
|
|
449
451
|
}),
|
|
450
452
|
/* @__PURE__ */ O("button", {
|
|
451
453
|
type: "button",
|
|
452
|
-
onClick: () =>
|
|
454
|
+
onClick: () => M(`/customer/carts/${I.id}`),
|
|
453
455
|
className: "w-full rounded-lg bg-accent-purple-subtle py-2 text-xs font-medium text-white hover:bg-accent-purple-subtle transition-colors",
|
|
454
456
|
children: "Book Direct Service"
|
|
455
457
|
})
|
|
456
458
|
]
|
|
457
459
|
}),
|
|
458
|
-
|
|
460
|
+
I.serviceTypes?.includes("appointment") && /* @__PURE__ */ k("div", {
|
|
459
461
|
className: "rounded-lg border border-accent-blue-subtle/30 bg-accent-blue-subtle/10 p-4",
|
|
460
462
|
children: [/* @__PURE__ */ k("h3", {
|
|
461
463
|
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
462
|
-
children: [/* @__PURE__ */ O(
|
|
464
|
+
children: [/* @__PURE__ */ O(f, { className: "h-4 w-4 text-accent-blue" }), "Appointments Available"]
|
|
463
465
|
}), /* @__PURE__ */ O("p", {
|
|
464
466
|
className: "text-xs text-text-secondary",
|
|
465
467
|
children: "This service provider accepts appointments. Contact them to schedule."
|
|
466
468
|
})]
|
|
467
469
|
}),
|
|
468
|
-
|
|
470
|
+
L && /* @__PURE__ */ k("div", {
|
|
469
471
|
className: "rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/10 p-4",
|
|
470
472
|
children: [
|
|
471
473
|
/* @__PURE__ */ k("h3", {
|
|
472
474
|
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
473
|
-
children: [/* @__PURE__ */ O(
|
|
475
|
+
children: [/* @__PURE__ */ O(w, { className: "h-4 w-4 text-status-success-text" }), "Investment Opportunity"]
|
|
474
476
|
}),
|
|
475
477
|
/* @__PURE__ */ O("p", {
|
|
476
478
|
className: "text-xs text-text-secondary mb-2",
|
|
477
|
-
children:
|
|
479
|
+
children: L.description
|
|
478
480
|
}),
|
|
479
481
|
/* @__PURE__ */ k("div", {
|
|
480
482
|
className: "space-y-1 text-xs text-text-secondary mb-3",
|
|
481
483
|
children: [
|
|
482
|
-
/* @__PURE__ */ k("p", { children: ["Target: ",
|
|
483
|
-
/* @__PURE__ */ k("p", { children: ["Raised: ",
|
|
484
|
+
/* @__PURE__ */ k("p", { children: ["Target: ", o(L.targetAmount, { minimumFractionDigits: 0 })] }),
|
|
485
|
+
/* @__PURE__ */ k("p", { children: ["Raised: ", o(L.raisedAmount, { minimumFractionDigits: 0 })] }),
|
|
484
486
|
/* @__PURE__ */ k("p", { children: [
|
|
485
487
|
"Expected Returns: ",
|
|
486
|
-
|
|
488
|
+
L.expectedReturns,
|
|
487
489
|
"%"
|
|
488
490
|
] }),
|
|
489
491
|
/* @__PURE__ */ k("p", { children: [
|
|
490
492
|
"Min Investment:",
|
|
491
493
|
" ",
|
|
492
|
-
|
|
494
|
+
o(L.minimumInvestment, { minimumFractionDigits: 0 })
|
|
493
495
|
] })
|
|
494
496
|
]
|
|
495
497
|
}),
|
|
@@ -504,7 +506,7 @@ function A() {
|
|
|
504
506
|
]
|
|
505
507
|
})]
|
|
506
508
|
}),
|
|
507
|
-
|
|
509
|
+
W && K && /* @__PURE__ */ O("div", {
|
|
508
510
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
509
511
|
children: /* @__PURE__ */ O("div", {
|
|
510
512
|
className: "w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface",
|
|
@@ -515,11 +517,11 @@ function A() {
|
|
|
515
517
|
className: "flex items-center justify-between mb-4",
|
|
516
518
|
children: [/* @__PURE__ */ O("h3", {
|
|
517
519
|
className: "text-lg font-semibold text-text-primary",
|
|
518
|
-
children:
|
|
520
|
+
children: K.product.name
|
|
519
521
|
}), /* @__PURE__ */ O("button", {
|
|
520
522
|
type: "button",
|
|
521
523
|
onClick: () => {
|
|
522
|
-
|
|
524
|
+
G(!1), q(null);
|
|
523
525
|
},
|
|
524
526
|
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
525
527
|
children: /* @__PURE__ */ O(T, { className: "h-5 w-5" })
|
|
@@ -527,11 +529,11 @@ function A() {
|
|
|
527
529
|
}),
|
|
528
530
|
/* @__PURE__ */ O("p", {
|
|
529
531
|
className: "text-sm text-text-secondary mb-4",
|
|
530
|
-
children:
|
|
532
|
+
children: K.product.description
|
|
531
533
|
}),
|
|
532
534
|
/* @__PURE__ */ O("p", {
|
|
533
535
|
className: "text-lg font-bold text-text-primary mb-4",
|
|
534
|
-
children:
|
|
536
|
+
children: o(K.product.price, { minimumFractionDigits: 0 })
|
|
535
537
|
}),
|
|
536
538
|
/* @__PURE__ */ k("div", {
|
|
537
539
|
className: "mb-4",
|
|
@@ -543,25 +545,25 @@ function A() {
|
|
|
543
545
|
children: [
|
|
544
546
|
/* @__PURE__ */ O("button", {
|
|
545
547
|
type: "button",
|
|
546
|
-
onClick: () =>
|
|
548
|
+
onClick: () => q((e) => e && {
|
|
547
549
|
...e,
|
|
548
550
|
quantity: Math.max(1, e.quantity - 1)
|
|
549
551
|
}),
|
|
550
552
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
|
|
551
|
-
children: /* @__PURE__ */ O(
|
|
553
|
+
children: /* @__PURE__ */ O(y, { className: "h-4 w-4" })
|
|
552
554
|
}),
|
|
553
555
|
/* @__PURE__ */ O("span", {
|
|
554
556
|
className: "min-w-[2ch] text-center font-medium text-text-primary",
|
|
555
|
-
children:
|
|
557
|
+
children: K.quantity
|
|
556
558
|
}),
|
|
557
559
|
/* @__PURE__ */ O("button", {
|
|
558
560
|
type: "button",
|
|
559
|
-
onClick: () =>
|
|
561
|
+
onClick: () => q((e) => e && {
|
|
560
562
|
...e,
|
|
561
563
|
quantity: e.quantity + 1
|
|
562
564
|
}),
|
|
563
565
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
|
|
564
|
-
children: /* @__PURE__ */ O(
|
|
566
|
+
children: /* @__PURE__ */ O(b, { className: "h-4 w-4" })
|
|
565
567
|
})
|
|
566
568
|
]
|
|
567
569
|
})]
|
|
@@ -572,8 +574,8 @@ function A() {
|
|
|
572
574
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
573
575
|
children: "Special Instructions"
|
|
574
576
|
}), /* @__PURE__ */ O("textarea", {
|
|
575
|
-
value:
|
|
576
|
-
onChange: (e) =>
|
|
577
|
+
value: K.specialInstructions,
|
|
578
|
+
onChange: (e) => q((t) => t && {
|
|
577
579
|
...t,
|
|
578
580
|
specialInstructions: e.target.value
|
|
579
581
|
}),
|
|
@@ -585,13 +587,13 @@ function A() {
|
|
|
585
587
|
/* @__PURE__ */ k("button", {
|
|
586
588
|
type: "button",
|
|
587
589
|
onClick: () => {
|
|
588
|
-
|
|
590
|
+
K && (ie(K.product, K.quantity, K.specialInstructions), G(!1), q(null), alert(`${K.product.name} added to cart`));
|
|
589
591
|
},
|
|
590
592
|
className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
591
593
|
children: [
|
|
592
594
|
"Add to Cart -",
|
|
593
595
|
" ",
|
|
594
|
-
|
|
596
|
+
o(K.product.price * K.quantity, { minimumFractionDigits: 0 })
|
|
595
597
|
]
|
|
596
598
|
})
|
|
597
599
|
]
|
|
@@ -603,12 +605,12 @@ function A() {
|
|
|
603
605
|
title: "Cart Not Found",
|
|
604
606
|
children: /* @__PURE__ */ O(r, {
|
|
605
607
|
illustration: "empty-generic",
|
|
606
|
-
icon: /* @__PURE__ */ O(
|
|
608
|
+
icon: /* @__PURE__ */ O(S, { className: "h-12 w-12" }),
|
|
607
609
|
title: "Cart not found",
|
|
608
|
-
description: `No cart found with ID"${
|
|
610
|
+
description: `No cart found with ID"${j}".`,
|
|
609
611
|
action: /* @__PURE__ */ O("button", {
|
|
610
612
|
type: "button",
|
|
611
|
-
onClick: () =>
|
|
613
|
+
onClick: () => M("/customer/carts"),
|
|
612
614
|
className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
613
615
|
children: "Browse Carts"
|
|
614
616
|
})
|
|
@@ -616,6 +618,6 @@ function A() {
|
|
|
616
618
|
});
|
|
617
619
|
}
|
|
618
620
|
//#endregion
|
|
619
|
-
export {
|
|
621
|
+
export { j as CartDetailPage };
|
|
620
622
|
|
|
621
623
|
//# sourceMappingURL=CartDetailPage.js.map
|