@burdenoff/microfe-atheletebridge 2026.626.1 → 2026.629.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atheletebridge/AthleteBridgeRoot.js +49 -129
- package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
- package/dist/atheletebridge/AthleteBridgeRoutes.js +65 -184
- package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
- package/dist/atheletebridge/components/CursorPager.js +34 -0
- package/dist/atheletebridge/components/CursorPager.js.map +1 -0
- package/dist/atheletebridge/components/FilterSelect.js +22 -0
- package/dist/atheletebridge/components/FilterSelect.js.map +1 -0
- package/dist/atheletebridge/components/FixtureCard.js +76 -0
- package/dist/atheletebridge/components/FixtureCard.js.map +1 -0
- package/dist/atheletebridge/components/LoadingState.js +36 -0
- package/dist/atheletebridge/components/LoadingState.js.map +1 -0
- package/dist/atheletebridge/components/ProgramCard.js +69 -0
- package/dist/atheletebridge/components/ProgramCard.js.map +1 -0
- package/dist/atheletebridge/components/SessionCard.js +76 -0
- package/dist/atheletebridge/components/SessionCard.js.map +1 -0
- package/dist/atheletebridge/components/StatusBadge.js +44 -35
- package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
- package/dist/atheletebridge/components/TeamCard.js +81 -0
- package/dist/atheletebridge/components/TeamCard.js.map +1 -0
- package/dist/atheletebridge/components/domain.js +47 -0
- package/dist/atheletebridge/components/domain.js.map +1 -0
- package/dist/atheletebridge/components/form.js +29 -0
- package/dist/atheletebridge/components/form.js.map +1 -0
- package/dist/atheletebridge/context/AthleteBridgeContext.js +6 -6
- package/dist/atheletebridge/context/AthleteBridgeContext.js.map +1 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +342 -165
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
- package/dist/atheletebridge/index.js +1 -1
- package/dist/atheletebridge/pages/DashboardPage.js +169 -0
- package/dist/atheletebridge/pages/DashboardPage.js.map +1 -0
- package/dist/atheletebridge/pages/StandingsPage.js +166 -0
- package/dist/atheletebridge/pages/StandingsPage.js.map +1 -0
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +201 -0
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -0
- package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js +205 -0
- package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js.map +1 -0
- package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +92 -0
- package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -0
- package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +374 -0
- package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -0
- package/dist/atheletebridge/pages/programs/ProgramFormPage.js +207 -0
- package/dist/atheletebridge/pages/programs/ProgramFormPage.js.map +1 -0
- package/dist/atheletebridge/pages/programs/ProgramsListPage.js +113 -0
- package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -0
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +224 -0
- package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -0
- package/dist/atheletebridge/pages/sessions/SessionFormPage.js +206 -0
- package/dist/atheletebridge/pages/sessions/SessionFormPage.js.map +1 -0
- package/dist/atheletebridge/pages/sessions/SessionsListPage.js +92 -0
- package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -0
- package/dist/atheletebridge/pages/teams/TeamDetailPage.js +350 -0
- package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -0
- package/dist/atheletebridge/pages/teams/TeamFormPage.js +222 -0
- package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -0
- package/dist/atheletebridge/pages/teams/TeamsListPage.js +101 -0
- package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -0
- package/dist/atheletebridge/store/atheletebridgeStore.js +2 -13
- package/dist/atheletebridge/store/atheletebridgeStore.js.map +1 -1
- package/dist/atheletebridge/utils/datetime.js +10 -0
- package/dist/atheletebridge/utils/datetime.js.map +1 -0
- package/dist/atheletebridge/utils/formatters.js +1 -4
- package/dist/atheletebridge/utils/formatters.js.map +1 -1
- package/package.json +1 -1
- package/dist/atheletebridge/components/InvestmentCard.js +0 -96
- package/dist/atheletebridge/components/InvestmentCard.js.map +0 -1
- package/dist/atheletebridge/components/RatingDisplay.js +0 -35
- package/dist/atheletebridge/components/RatingDisplay.js.map +0 -1
- package/dist/atheletebridge/mocks/data.js +0 -1517
- package/dist/atheletebridge/mocks/data.js.map +0 -1
- package/dist/atheletebridge/mocks/users.js +0 -34
- package/dist/atheletebridge/mocks/users.js.map +0 -1
- package/dist/atheletebridge/pages/HomePage.js +0 -936
- package/dist/atheletebridge/pages/HomePage.js.map +0 -1
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +0 -653
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +0 -1
- package/dist/atheletebridge/pages/admin/AdminDashboard.js +0 -671
- package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +0 -1
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +0 -429
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +0 -1
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +0 -667
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +0 -1
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js +0 -261
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +0 -1
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +0 -653
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +0 -1
- package/dist/atheletebridge/pages/admin/CartManagementPage.js +0 -876
- package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +0 -1
- package/dist/atheletebridge/pages/admin/UserManagementPage.js +0 -900
- package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +0 -1
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +0 -839
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +0 -704
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +0 -792
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +0 -891
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +0 -633
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +0 -913
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +0 -1
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +0 -881
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +0 -1
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +0 -841
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +0 -1
- package/dist/atheletebridge/pages/common/HelpSupportPage.js +0 -1319
- package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +0 -1
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js +0 -674
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +0 -1
- package/dist/atheletebridge/pages/common/SettingsPage.js +0 -972
- package/dist/atheletebridge/pages/common/SettingsPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +0 -602
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/CartDetailPage.js +0 -656
- package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +0 -558
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/CheckoutPage.js +0 -536
- package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js +0 -539
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +0 -1
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +0 -657
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +0 -635
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/FavoritesPage.js +0 -486
- package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +0 -447
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +0 -393
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +0 -494
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/ReviewsPage.js +0 -615
- package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +0 -1
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +0 -451
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +0 -1
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +0 -881
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +0 -1
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +0 -945
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +0 -686
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +0 -1
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js +0 -453
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +0 -1
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +0 -405
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +0 -1
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +0 -577
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +0 -1
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +0 -1069
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +0 -1
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +0 -530
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +0 -1
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js +0 -669
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +0 -1
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +0 -681
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +0 -1
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +0 -691
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +0 -1
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +0 -588
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +0 -1
|
@@ -1,656 +0,0 @@
|
|
|
1
|
-
import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.js";
|
|
2
|
-
import { cn as t } from "../../utils/cn.js";
|
|
3
|
-
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
-
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
-
import { useInvestmentOpportunities as i, useOfferings as ee, useProviders as a } from "../../hooks/useAthleteBridgeApi.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 te, X as w } from "lucide-react";
|
|
9
|
-
import { useParams as T } from "react-router-dom";
|
|
10
|
-
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
11
|
-
import { EmphasisPanel as k, NextSteps as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
|
|
12
|
-
//#region src/atheletebridge/pages/customer/CartDetailPage.tsx
|
|
13
|
-
function M() {
|
|
14
|
-
let { cartId: M } = T(), { navigateTo: N } = e(), { data: P = [], isLoading: ne } = a(), { data: F = [], isLoading: re } = ee(M), { data: I = [], isLoading: ie } = i(), L = l(() => P.find((e) => e.id === M), [P, M]), R = l(() => I.find((e) => e.cartId === M), [I, M]), [z, B] = u(""), [V, H] = u(""), [U, W] = u([]), [G, K] = u(!1), [q, J] = u(null), Y = l(() => F.map((e) => ({
|
|
15
|
-
id: e.id,
|
|
16
|
-
name: e.name,
|
|
17
|
-
price: e.price,
|
|
18
|
-
description: e.description,
|
|
19
|
-
image: e.media?.[0] || "https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=400",
|
|
20
|
-
category: e.category,
|
|
21
|
-
isVeg: !0,
|
|
22
|
-
duration: e.durationMinutes,
|
|
23
|
-
serviceType: e.serviceType
|
|
24
|
-
})), [F]), X = l(() => [...new Set(Y.map((e) => e.category))], [Y]), Z = l(() => {
|
|
25
|
-
let e = Y;
|
|
26
|
-
if (V && (e = e.filter((e) => e.category === V)), z.trim()) {
|
|
27
|
-
let t = z.toLowerCase();
|
|
28
|
-
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.description.toLowerCase().includes(t));
|
|
29
|
-
}
|
|
30
|
-
return e;
|
|
31
|
-
}, [
|
|
32
|
-
Y,
|
|
33
|
-
V,
|
|
34
|
-
z
|
|
35
|
-
]), ae = l(() => {
|
|
36
|
-
let e = {};
|
|
37
|
-
return Z.forEach((t) => {
|
|
38
|
-
e[t.category] || (e[t.category] = []), e[t.category].push(t);
|
|
39
|
-
}), e;
|
|
40
|
-
}, [Z]), oe = (e, t = 1, n) => {
|
|
41
|
-
W((r) => r.find((t) => t.productId === e.id) ? r.map((n) => n.productId === e.id ? {
|
|
42
|
-
...n,
|
|
43
|
-
quantity: n.quantity + t
|
|
44
|
-
} : n) : [...r, {
|
|
45
|
-
id: `cart-${Date.now()}`,
|
|
46
|
-
productId: e.id,
|
|
47
|
-
name: e.name,
|
|
48
|
-
price: e.price,
|
|
49
|
-
quantity: t,
|
|
50
|
-
specialInstructions: n
|
|
51
|
-
}]);
|
|
52
|
-
}, Q = (e, t) => {
|
|
53
|
-
W((n) => n.map((n) => n.productId === e ? {
|
|
54
|
-
...n,
|
|
55
|
-
quantity: Math.max(0, n.quantity + t)
|
|
56
|
-
} : n).filter((e) => e.quantity > 0));
|
|
57
|
-
}, $ = (e) => {
|
|
58
|
-
W((t) => t.filter((t) => t.productId !== e));
|
|
59
|
-
}, se = (e) => U.find((t) => t.productId === e)?.quantity ?? 0, ce = U.reduce((e, t) => e + t.price * t.quantity, 0), le = U.reduce((e, t) => e + t.quantity, 0), ue = (e) => {
|
|
60
|
-
J({
|
|
61
|
-
product: e,
|
|
62
|
-
quantity: 1,
|
|
63
|
-
specialInstructions: ""
|
|
64
|
-
}), K(!0);
|
|
65
|
-
};
|
|
66
|
-
return L ? /* @__PURE__ */ O(n, {
|
|
67
|
-
title: /* @__PURE__ */ O("div", {
|
|
68
|
-
className: "flex items-center gap-3",
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ D("button", {
|
|
71
|
-
type: "button",
|
|
72
|
-
onClick: () => N("/customer/carts"),
|
|
73
|
-
className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
74
|
-
children: /* @__PURE__ */ D(d, { className: "h-5 w-5" })
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ D("span", {
|
|
77
|
-
className: "truncate",
|
|
78
|
-
children: L.name
|
|
79
|
-
}),
|
|
80
|
-
L.isVerified && /* @__PURE__ */ D(p, { className: "h-5 w-5 text-blue-500 shrink-0" })
|
|
81
|
-
]
|
|
82
|
-
}),
|
|
83
|
-
description: L.category,
|
|
84
|
-
children: [
|
|
85
|
-
/* @__PURE__ */ D(j, {
|
|
86
|
-
className: "mb-6",
|
|
87
|
-
children: "Everything this provider offers, in one place. Browse and search their offerings, customise items, add them to your order, then proceed to checkout. Use the operating hours and ratings to decide before you order."
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ D(k, {
|
|
90
|
-
className: "p-0 overflow-hidden",
|
|
91
|
-
children: /* @__PURE__ */ O("div", {
|
|
92
|
-
className: "relative h-48 rounded-lg bg-bg-sunken overflow-hidden",
|
|
93
|
-
children: [/* @__PURE__ */ D("img", {
|
|
94
|
-
src: L.image,
|
|
95
|
-
alt: L.name,
|
|
96
|
-
className: "h-full w-full object-cover"
|
|
97
|
-
}), /* @__PURE__ */ D("div", {
|
|
98
|
-
className: "absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 to-transparent p-4",
|
|
99
|
-
children: /* @__PURE__ */ O("div", {
|
|
100
|
-
className: "flex items-center gap-3",
|
|
101
|
-
children: [/* @__PURE__ */ D("span", {
|
|
102
|
-
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", L.isOpen ? "bg-green-500/20 text-green-300" : "bg-red-500/20 text-red-300"),
|
|
103
|
-
children: L.isOpen ? "Open Now" : "Closed"
|
|
104
|
-
}), /* @__PURE__ */ O("div", {
|
|
105
|
-
className: "flex items-center gap-1 text-white text-sm",
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ D(C, { className: "h-3.5 w-3.5 fill-yellow-400 text-yellow-400" }),
|
|
108
|
-
/* @__PURE__ */ D("span", {
|
|
109
|
-
className: "font-medium",
|
|
110
|
-
children: L.rating
|
|
111
|
-
}),
|
|
112
|
-
/* @__PURE__ */ O("span", {
|
|
113
|
-
className: "text-white/70",
|
|
114
|
-
children: [
|
|
115
|
-
"(",
|
|
116
|
-
L.totalRatings,
|
|
117
|
-
")"
|
|
118
|
-
]
|
|
119
|
-
})
|
|
120
|
-
]
|
|
121
|
-
})]
|
|
122
|
-
})
|
|
123
|
-
})]
|
|
124
|
-
})
|
|
125
|
-
}),
|
|
126
|
-
/* @__PURE__ */ D(A, {
|
|
127
|
-
className: "mt-6",
|
|
128
|
-
storageKey: "atheletebridge-cart-detail",
|
|
129
|
-
steps: [
|
|
130
|
-
{
|
|
131
|
-
id: "browse",
|
|
132
|
-
label: "Browse the offerings",
|
|
133
|
-
description: "Search or filter by category to find what you want.",
|
|
134
|
-
icon: /* @__PURE__ */ D(x, { className: "h-4 w-4" }),
|
|
135
|
-
onClick: () => {
|
|
136
|
-
document.getElementById("cart-offerings")?.scrollIntoView({ behavior: "smooth" });
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
id: "add",
|
|
141
|
-
label: "Add items to your order",
|
|
142
|
-
description: "Use the + control on any item to build your order.",
|
|
143
|
-
icon: /* @__PURE__ */ D(b, { className: "h-4 w-4" })
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: "checkout",
|
|
147
|
-
label: "Proceed to checkout",
|
|
148
|
-
description: "Review your order and place it when you are ready.",
|
|
149
|
-
icon: /* @__PURE__ */ D(S, { className: "h-4 w-4" }),
|
|
150
|
-
onClick: () => N("/customer/checkout")
|
|
151
|
-
}
|
|
152
|
-
]
|
|
153
|
-
}),
|
|
154
|
-
!L.isOpen && /* @__PURE__ */ D("div", {
|
|
155
|
-
className: "mt-4 rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3",
|
|
156
|
-
children: /* @__PURE__ */ O("p", {
|
|
157
|
-
className: "text-sm text-yellow-700 dark:text-yellow-400",
|
|
158
|
-
children: [/* @__PURE__ */ D("strong", { children: "This cart is currently closed." }), " You can browse the offerings but orders are not being accepted."]
|
|
159
|
-
})
|
|
160
|
-
}),
|
|
161
|
-
/* @__PURE__ */ O("div", {
|
|
162
|
-
className: "mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
163
|
-
children: [
|
|
164
|
-
/* @__PURE__ */ O("div", {
|
|
165
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ O("div", {
|
|
168
|
-
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
169
|
-
children: [/* @__PURE__ */ D(v, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
|
|
170
|
-
className: "font-medium uppercase tracking-wider",
|
|
171
|
-
children: "Location"
|
|
172
|
-
})]
|
|
173
|
-
}),
|
|
174
|
-
/* @__PURE__ */ D("p", {
|
|
175
|
-
className: "text-sm text-text-primary",
|
|
176
|
-
children: L.location.address
|
|
177
|
-
}),
|
|
178
|
-
/* @__PURE__ */ O("p", {
|
|
179
|
-
className: "text-xs text-text-secondary",
|
|
180
|
-
children: [s(L.distance), " away"]
|
|
181
|
-
})
|
|
182
|
-
]
|
|
183
|
-
}),
|
|
184
|
-
/* @__PURE__ */ O("div", {
|
|
185
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
186
|
-
children: [
|
|
187
|
-
/* @__PURE__ */ O("div", {
|
|
188
|
-
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
189
|
-
children: [/* @__PURE__ */ D(m, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
|
|
190
|
-
className: "font-medium uppercase tracking-wider",
|
|
191
|
-
children: "Estimated Time"
|
|
192
|
-
})]
|
|
193
|
-
}),
|
|
194
|
-
/* @__PURE__ */ D("p", {
|
|
195
|
-
className: "text-sm text-text-primary",
|
|
196
|
-
children: c(L.estimatedTime)
|
|
197
|
-
}),
|
|
198
|
-
L.averageOrderValue && /* @__PURE__ */ O("p", {
|
|
199
|
-
className: "text-xs text-text-secondary",
|
|
200
|
-
children: ["Avg ", o(L.averageOrderValue, { minimumFractionDigits: 0 })]
|
|
201
|
-
})
|
|
202
|
-
]
|
|
203
|
-
}),
|
|
204
|
-
/* @__PURE__ */ O("div", {
|
|
205
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
206
|
-
children: [
|
|
207
|
-
/* @__PURE__ */ O("div", {
|
|
208
|
-
className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
|
|
209
|
-
children: [/* @__PURE__ */ D(C, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
|
|
210
|
-
className: "font-medium uppercase tracking-wider",
|
|
211
|
-
children: "Rating"
|
|
212
|
-
})]
|
|
213
|
-
}),
|
|
214
|
-
/* @__PURE__ */ O("p", {
|
|
215
|
-
className: "text-sm text-text-primary",
|
|
216
|
-
children: [L.rating, " / 5.0"]
|
|
217
|
-
}),
|
|
218
|
-
/* @__PURE__ */ O("p", {
|
|
219
|
-
className: "text-xs text-text-secondary",
|
|
220
|
-
children: [L.totalRatings, " reviews"]
|
|
221
|
-
})
|
|
222
|
-
]
|
|
223
|
-
})
|
|
224
|
-
]
|
|
225
|
-
}),
|
|
226
|
-
L.businessHours && Object.keys(L.businessHours).length > 0 && /* @__PURE__ */ O("section", {
|
|
227
|
-
className: "mt-6",
|
|
228
|
-
children: [/* @__PURE__ */ D("h2", {
|
|
229
|
-
className: "text-base font-semibold text-text-primary mb-2",
|
|
230
|
-
children: "Operating Hours"
|
|
231
|
-
}), /* @__PURE__ */ D("div", {
|
|
232
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
|
|
233
|
-
children: Object.entries(L.businessHours).map(([e, t]) => /* @__PURE__ */ O("div", {
|
|
234
|
-
className: "flex items-center justify-between px-4 py-2 border-b border-border-subtle last:border-b-0",
|
|
235
|
-
children: [/* @__PURE__ */ D("span", {
|
|
236
|
-
className: "text-sm font-medium text-text-primary capitalize",
|
|
237
|
-
children: e
|
|
238
|
-
}), t.isOpen ? /* @__PURE__ */ O("span", {
|
|
239
|
-
className: "text-sm text-text-secondary",
|
|
240
|
-
children: [
|
|
241
|
-
t.open,
|
|
242
|
-
" - ",
|
|
243
|
-
t.close
|
|
244
|
-
]
|
|
245
|
-
}) : /* @__PURE__ */ D("span", {
|
|
246
|
-
className: "text-sm text-status-error-text",
|
|
247
|
-
children: "Closed"
|
|
248
|
-
})]
|
|
249
|
-
}, e))
|
|
250
|
-
})]
|
|
251
|
-
}),
|
|
252
|
-
/* @__PURE__ */ O("div", {
|
|
253
|
-
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
254
|
-
children: [/* @__PURE__ */ O("div", {
|
|
255
|
-
className: "lg:col-span-2",
|
|
256
|
-
children: [
|
|
257
|
-
/* @__PURE__ */ O("div", {
|
|
258
|
-
className: "flex flex-col gap-3 sm:flex-row mb-4",
|
|
259
|
-
children: [/* @__PURE__ */ O("div", {
|
|
260
|
-
className: "relative flex-1",
|
|
261
|
-
children: [/* @__PURE__ */ D(x, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ D("input", {
|
|
262
|
-
type: "text",
|
|
263
|
-
placeholder: "Search offerings...",
|
|
264
|
-
value: z,
|
|
265
|
-
onChange: (e) => B(e.target.value),
|
|
266
|
-
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)]"
|
|
267
|
-
})]
|
|
268
|
-
}), /* @__PURE__ */ O("select", {
|
|
269
|
-
value: V,
|
|
270
|
-
onChange: (e) => H(e.target.value),
|
|
271
|
-
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)]",
|
|
272
|
-
children: [/* @__PURE__ */ D("option", {
|
|
273
|
-
value: "",
|
|
274
|
-
children: "All Categories"
|
|
275
|
-
}), X.map((e) => /* @__PURE__ */ D("option", {
|
|
276
|
-
value: e,
|
|
277
|
-
children: e
|
|
278
|
-
}, e))]
|
|
279
|
-
})]
|
|
280
|
-
}),
|
|
281
|
-
/* @__PURE__ */ O("h2", {
|
|
282
|
-
id: "cart-offerings",
|
|
283
|
-
className: "text-lg font-semibold text-text-primary mb-3",
|
|
284
|
-
children: [
|
|
285
|
-
"Menu & Services (",
|
|
286
|
-
Z.length,
|
|
287
|
-
")"
|
|
288
|
-
]
|
|
289
|
-
}),
|
|
290
|
-
Z.length === 0 ? /* @__PURE__ */ D(r, {
|
|
291
|
-
illustration: "empty-search",
|
|
292
|
-
title: "No offerings found",
|
|
293
|
-
description: "No items match your search. Try a different keyword or clear the category filter."
|
|
294
|
-
}) : /* @__PURE__ */ D("div", {
|
|
295
|
-
className: "space-y-6",
|
|
296
|
-
children: Object.entries(ae).map(([e, n]) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h3", {
|
|
297
|
-
className: "text-sm font-semibold text-text-primary mb-2 px-1",
|
|
298
|
-
children: e
|
|
299
|
-
}), /* @__PURE__ */ D("div", {
|
|
300
|
-
className: "space-y-2",
|
|
301
|
-
children: n.map((e) => {
|
|
302
|
-
let n = se(e.id);
|
|
303
|
-
return /* @__PURE__ */ O("div", {
|
|
304
|
-
className: "flex gap-4 rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
305
|
-
children: [/* @__PURE__ */ D("div", {
|
|
306
|
-
className: "h-20 w-20 shrink-0 rounded-md bg-bg-sunken overflow-hidden",
|
|
307
|
-
children: /* @__PURE__ */ D("img", {
|
|
308
|
-
src: e.image,
|
|
309
|
-
alt: e.name,
|
|
310
|
-
className: "h-full w-full object-cover"
|
|
311
|
-
})
|
|
312
|
-
}), /* @__PURE__ */ O("div", {
|
|
313
|
-
className: "flex-1 min-w-0",
|
|
314
|
-
children: [
|
|
315
|
-
/* @__PURE__ */ O("div", {
|
|
316
|
-
className: "flex items-start justify-between gap-2",
|
|
317
|
-
children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
|
|
318
|
-
className: "flex items-center gap-2",
|
|
319
|
-
children: [/* @__PURE__ */ D("h4", {
|
|
320
|
-
className: "text-sm font-semibold text-text-primary",
|
|
321
|
-
children: e.name
|
|
322
|
-
}), e.isVeg && /* @__PURE__ */ D(_, { className: "h-3.5 w-3.5 text-green-600 dark:text-green-400" })]
|
|
323
|
-
}), /* @__PURE__ */ D("p", {
|
|
324
|
-
className: "text-xs text-text-secondary mt-0.5",
|
|
325
|
-
children: e.category
|
|
326
|
-
})] }), /* @__PURE__ */ D("span", {
|
|
327
|
-
className: "text-sm font-bold text-text-primary whitespace-nowrap",
|
|
328
|
-
children: o(e.price, { minimumFractionDigits: 0 })
|
|
329
|
-
})]
|
|
330
|
-
}),
|
|
331
|
-
/* @__PURE__ */ D("p", {
|
|
332
|
-
className: "mt-1 text-xs text-text-secondary line-clamp-2",
|
|
333
|
-
children: e.description
|
|
334
|
-
}),
|
|
335
|
-
/* @__PURE__ */ O("div", {
|
|
336
|
-
className: "mt-2 flex flex-wrap items-center gap-2 text-[10px] text-text-secondary",
|
|
337
|
-
children: [
|
|
338
|
-
e.duration != null && e.duration > 0 && /* @__PURE__ */ O("span", {
|
|
339
|
-
className: "flex items-center gap-0.5",
|
|
340
|
-
children: [/* @__PURE__ */ D(m, { className: "h-3 w-3" }), c(e.duration)]
|
|
341
|
-
}),
|
|
342
|
-
e.serviceType && /* @__PURE__ */ D("span", {
|
|
343
|
-
className: "rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
|
|
344
|
-
children: e.serviceType
|
|
345
|
-
}),
|
|
346
|
-
e.spiceLevel && /* @__PURE__ */ O("span", {
|
|
347
|
-
className: "flex items-center gap-0.5 rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
|
|
348
|
-
children: [/* @__PURE__ */ D(h, { className: "h-3 w-3" }), e.spiceLevel]
|
|
349
|
-
})
|
|
350
|
-
]
|
|
351
|
-
}),
|
|
352
|
-
/* @__PURE__ */ D("div", {
|
|
353
|
-
className: "mt-2 flex justify-end",
|
|
354
|
-
children: n > 0 ? /* @__PURE__ */ O("div", {
|
|
355
|
-
className: "flex items-center gap-2",
|
|
356
|
-
children: [
|
|
357
|
-
/* @__PURE__ */ D("button", {
|
|
358
|
-
type: "button",
|
|
359
|
-
onClick: () => Q(e.id, -1),
|
|
360
|
-
className: "flex h-7 w-7 items-center justify-center rounded-full bg-bg-sunken text-text-primary hover:bg-accent",
|
|
361
|
-
children: /* @__PURE__ */ D(y, { className: "h-3.5 w-3.5" })
|
|
362
|
-
}),
|
|
363
|
-
/* @__PURE__ */ D("span", {
|
|
364
|
-
className: "min-w-[2ch] text-center text-sm font-medium text-text-primary",
|
|
365
|
-
children: n
|
|
366
|
-
}),
|
|
367
|
-
/* @__PURE__ */ D("button", {
|
|
368
|
-
type: "button",
|
|
369
|
-
onClick: () => Q(e.id, 1),
|
|
370
|
-
className: "flex h-7 w-7 items-center justify-center rounded-full bg-foreground text-background hover:opacity-90",
|
|
371
|
-
children: /* @__PURE__ */ D(b, { className: "h-3.5 w-3.5" })
|
|
372
|
-
}),
|
|
373
|
-
/* @__PURE__ */ D("button", {
|
|
374
|
-
type: "button",
|
|
375
|
-
onClick: () => $(e.id),
|
|
376
|
-
className: "ml-1 flex h-7 w-7 items-center justify-center rounded-full text-status-error-text hover:bg-status-error-bg/10",
|
|
377
|
-
children: /* @__PURE__ */ D(w, { className: "h-3.5 w-3.5" })
|
|
378
|
-
})
|
|
379
|
-
]
|
|
380
|
-
}) : /* @__PURE__ */ D("button", {
|
|
381
|
-
type: "button",
|
|
382
|
-
disabled: !L.isOpen,
|
|
383
|
-
onClick: () => ue(e),
|
|
384
|
-
className: t("rounded-lg px-4 py-1.5 text-xs font-medium transition-opacity", L.isOpen ? "bg-foreground text-background hover:opacity-90" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
|
|
385
|
-
children: "Add"
|
|
386
|
-
})
|
|
387
|
-
})
|
|
388
|
-
]
|
|
389
|
-
})]
|
|
390
|
-
}, e.id);
|
|
391
|
-
})
|
|
392
|
-
})] }, e))
|
|
393
|
-
})
|
|
394
|
-
]
|
|
395
|
-
}), /* @__PURE__ */ O("div", {
|
|
396
|
-
className: "space-y-4",
|
|
397
|
-
children: [
|
|
398
|
-
/* @__PURE__ */ O("div", {
|
|
399
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 lg:sticky lg:top-6",
|
|
400
|
-
children: [/* @__PURE__ */ O("h3", {
|
|
401
|
-
className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
402
|
-
children: [/* @__PURE__ */ D(S, { className: "h-4 w-4" }), "Your Order"]
|
|
403
|
-
}), U.length === 0 ? /* @__PURE__ */ O("div", {
|
|
404
|
-
className: "py-6 text-center",
|
|
405
|
-
children: [/* @__PURE__ */ D(S, { className: "mx-auto h-8 w-8 text-text-secondary/40" }), /* @__PURE__ */ D("p", {
|
|
406
|
-
className: "mt-2 text-sm text-text-secondary",
|
|
407
|
-
children: "Your cart is empty"
|
|
408
|
-
})]
|
|
409
|
-
}) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
|
|
410
|
-
className: "space-y-2 max-h-64 overflow-y-auto mb-3",
|
|
411
|
-
children: U.map((e) => /* @__PURE__ */ O("div", {
|
|
412
|
-
className: "flex items-center justify-between gap-2",
|
|
413
|
-
children: [/* @__PURE__ */ O("div", {
|
|
414
|
-
className: "flex-1 min-w-0",
|
|
415
|
-
children: [/* @__PURE__ */ D("p", {
|
|
416
|
-
className: "text-sm font-medium text-text-primary truncate",
|
|
417
|
-
children: e.name
|
|
418
|
-
}), /* @__PURE__ */ O("p", {
|
|
419
|
-
className: "text-xs text-text-secondary",
|
|
420
|
-
children: [
|
|
421
|
-
o(e.price, { minimumFractionDigits: 0 }),
|
|
422
|
-
" x",
|
|
423
|
-
" ",
|
|
424
|
-
e.quantity
|
|
425
|
-
]
|
|
426
|
-
})]
|
|
427
|
-
}), /* @__PURE__ */ O("div", {
|
|
428
|
-
className: "flex items-center gap-1",
|
|
429
|
-
children: [
|
|
430
|
-
/* @__PURE__ */ D("button", {
|
|
431
|
-
type: "button",
|
|
432
|
-
onClick: () => Q(e.productId, -1),
|
|
433
|
-
className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
|
|
434
|
-
children: "-"
|
|
435
|
-
}),
|
|
436
|
-
/* @__PURE__ */ D("span", {
|
|
437
|
-
className: "min-w-[2ch] text-center text-xs font-medium",
|
|
438
|
-
children: e.quantity
|
|
439
|
-
}),
|
|
440
|
-
/* @__PURE__ */ D("button", {
|
|
441
|
-
type: "button",
|
|
442
|
-
onClick: () => Q(e.productId, 1),
|
|
443
|
-
className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
|
|
444
|
-
children: "+"
|
|
445
|
-
}),
|
|
446
|
-
/* @__PURE__ */ D("button", {
|
|
447
|
-
type: "button",
|
|
448
|
-
onClick: () => $(e.productId),
|
|
449
|
-
className: "ml-1 text-status-error-text hover:text-status-error-text/80",
|
|
450
|
-
children: /* @__PURE__ */ D(w, { className: "h-3.5 w-3.5" })
|
|
451
|
-
})
|
|
452
|
-
]
|
|
453
|
-
})]
|
|
454
|
-
}, e.id))
|
|
455
|
-
}), /* @__PURE__ */ O("div", {
|
|
456
|
-
className: "border-t border-border-subtle pt-3",
|
|
457
|
-
children: [/* @__PURE__ */ O("div", {
|
|
458
|
-
className: "flex justify-between items-center mb-3",
|
|
459
|
-
children: [/* @__PURE__ */ O("span", {
|
|
460
|
-
className: "text-sm font-semibold text-text-primary",
|
|
461
|
-
children: ["Total: ", o(ce, { minimumFractionDigits: 0 })]
|
|
462
|
-
}), /* @__PURE__ */ O("span", {
|
|
463
|
-
className: "text-xs text-text-secondary",
|
|
464
|
-
children: [le, " items"]
|
|
465
|
-
})]
|
|
466
|
-
}), /* @__PURE__ */ D("button", {
|
|
467
|
-
type: "button",
|
|
468
|
-
onClick: () => N("/customer/checkout"),
|
|
469
|
-
className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
470
|
-
children: "Proceed to Checkout"
|
|
471
|
-
})]
|
|
472
|
-
})] })]
|
|
473
|
-
}),
|
|
474
|
-
L.serviceTypes?.includes("direct_service") && /* @__PURE__ */ O("div", {
|
|
475
|
-
className: "rounded-lg border border-purple-500/30 bg-purple-500/10 p-4",
|
|
476
|
-
children: [
|
|
477
|
-
/* @__PURE__ */ O("h3", {
|
|
478
|
-
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
479
|
-
children: [/* @__PURE__ */ D(g, { className: "h-4 w-4 text-purple-600 dark:text-purple-400" }), "Direct Service"]
|
|
480
|
-
}),
|
|
481
|
-
/* @__PURE__ */ D("p", {
|
|
482
|
-
className: "text-xs text-text-secondary mb-3",
|
|
483
|
-
children: "Cart comes to your location!"
|
|
484
|
-
}),
|
|
485
|
-
/* @__PURE__ */ D("button", {
|
|
486
|
-
type: "button",
|
|
487
|
-
onClick: () => N(`/customer/carts/${L.id}`),
|
|
488
|
-
className: "w-full rounded-lg bg-purple-600 py-2 text-xs font-medium text-white hover:bg-purple-700 transition-colors",
|
|
489
|
-
children: "Book Direct Service"
|
|
490
|
-
})
|
|
491
|
-
]
|
|
492
|
-
}),
|
|
493
|
-
L.serviceTypes?.includes("appointment") && /* @__PURE__ */ O("div", {
|
|
494
|
-
className: "rounded-lg border border-blue-500/30 bg-blue-500/10 p-4",
|
|
495
|
-
children: [/* @__PURE__ */ O("h3", {
|
|
496
|
-
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
497
|
-
children: [/* @__PURE__ */ D(f, { className: "h-4 w-4 text-blue-600 dark:text-blue-400" }), "Appointments Available"]
|
|
498
|
-
}), /* @__PURE__ */ D("p", {
|
|
499
|
-
className: "text-xs text-text-secondary",
|
|
500
|
-
children: "This service provider accepts appointments. Contact them to schedule."
|
|
501
|
-
})]
|
|
502
|
-
}),
|
|
503
|
-
R && /* @__PURE__ */ O("div", {
|
|
504
|
-
className: "rounded-lg border border-green-500/30 bg-green-500/10 p-4",
|
|
505
|
-
children: [
|
|
506
|
-
/* @__PURE__ */ O("h3", {
|
|
507
|
-
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
|
|
508
|
-
children: [/* @__PURE__ */ D(te, { className: "h-4 w-4 text-green-600 dark:text-green-400" }), "Investment Opportunity"]
|
|
509
|
-
}),
|
|
510
|
-
/* @__PURE__ */ D("p", {
|
|
511
|
-
className: "text-xs text-text-secondary mb-2",
|
|
512
|
-
children: R.description
|
|
513
|
-
}),
|
|
514
|
-
/* @__PURE__ */ O("div", {
|
|
515
|
-
className: "space-y-1 text-xs text-text-secondary mb-3",
|
|
516
|
-
children: [
|
|
517
|
-
/* @__PURE__ */ O("p", { children: ["Target: ", o(R.targetAmount, { minimumFractionDigits: 0 })] }),
|
|
518
|
-
/* @__PURE__ */ O("p", { children: ["Raised: ", o(R.raisedAmount, { minimumFractionDigits: 0 })] }),
|
|
519
|
-
/* @__PURE__ */ O("p", { children: [
|
|
520
|
-
"Expected Returns: ",
|
|
521
|
-
R.expectedReturns,
|
|
522
|
-
"%"
|
|
523
|
-
] }),
|
|
524
|
-
/* @__PURE__ */ O("p", { children: [
|
|
525
|
-
"Min Investment:",
|
|
526
|
-
" ",
|
|
527
|
-
o(R.minimumInvestment, { minimumFractionDigits: 0 })
|
|
528
|
-
] })
|
|
529
|
-
]
|
|
530
|
-
}),
|
|
531
|
-
/* @__PURE__ */ D("button", {
|
|
532
|
-
type: "button",
|
|
533
|
-
onClick: () => alert("Navigate to investor section to fund this business."),
|
|
534
|
-
className: "w-full rounded-lg bg-green-600 py-2 text-xs font-medium text-white hover:bg-green-700 transition-colors",
|
|
535
|
-
children: "Fund This Business"
|
|
536
|
-
})
|
|
537
|
-
]
|
|
538
|
-
})
|
|
539
|
-
]
|
|
540
|
-
})]
|
|
541
|
-
}),
|
|
542
|
-
G && q && /* @__PURE__ */ D("div", {
|
|
543
|
-
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
544
|
-
children: /* @__PURE__ */ D("div", {
|
|
545
|
-
className: "w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface",
|
|
546
|
-
children: /* @__PURE__ */ O("div", {
|
|
547
|
-
className: "p-5",
|
|
548
|
-
children: [
|
|
549
|
-
/* @__PURE__ */ O("div", {
|
|
550
|
-
className: "flex items-center justify-between mb-4",
|
|
551
|
-
children: [/* @__PURE__ */ D("h3", {
|
|
552
|
-
className: "text-lg font-semibold text-text-primary",
|
|
553
|
-
children: q.product.name
|
|
554
|
-
}), /* @__PURE__ */ D("button", {
|
|
555
|
-
type: "button",
|
|
556
|
-
onClick: () => {
|
|
557
|
-
K(!1), J(null);
|
|
558
|
-
},
|
|
559
|
-
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
560
|
-
children: /* @__PURE__ */ D(w, { className: "h-5 w-5" })
|
|
561
|
-
})]
|
|
562
|
-
}),
|
|
563
|
-
/* @__PURE__ */ D("p", {
|
|
564
|
-
className: "text-sm text-text-secondary mb-4",
|
|
565
|
-
children: q.product.description
|
|
566
|
-
}),
|
|
567
|
-
/* @__PURE__ */ D("p", {
|
|
568
|
-
className: "text-lg font-bold text-text-primary mb-4",
|
|
569
|
-
children: o(q.product.price, { minimumFractionDigits: 0 })
|
|
570
|
-
}),
|
|
571
|
-
/* @__PURE__ */ O("div", {
|
|
572
|
-
className: "mb-4",
|
|
573
|
-
children: [/* @__PURE__ */ D("label", {
|
|
574
|
-
className: "block text-sm font-medium text-text-primary mb-2",
|
|
575
|
-
children: "Quantity"
|
|
576
|
-
}), /* @__PURE__ */ O("div", {
|
|
577
|
-
className: "flex items-center gap-3",
|
|
578
|
-
children: [
|
|
579
|
-
/* @__PURE__ */ D("button", {
|
|
580
|
-
type: "button",
|
|
581
|
-
onClick: () => J((e) => e && {
|
|
582
|
-
...e,
|
|
583
|
-
quantity: Math.max(1, e.quantity - 1)
|
|
584
|
-
}),
|
|
585
|
-
className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
|
|
586
|
-
children: /* @__PURE__ */ D(y, { className: "h-4 w-4" })
|
|
587
|
-
}),
|
|
588
|
-
/* @__PURE__ */ D("span", {
|
|
589
|
-
className: "min-w-[2ch] text-center font-medium text-text-primary",
|
|
590
|
-
children: q.quantity
|
|
591
|
-
}),
|
|
592
|
-
/* @__PURE__ */ D("button", {
|
|
593
|
-
type: "button",
|
|
594
|
-
onClick: () => J((e) => e && {
|
|
595
|
-
...e,
|
|
596
|
-
quantity: e.quantity + 1
|
|
597
|
-
}),
|
|
598
|
-
className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
|
|
599
|
-
children: /* @__PURE__ */ D(b, { className: "h-4 w-4" })
|
|
600
|
-
})
|
|
601
|
-
]
|
|
602
|
-
})]
|
|
603
|
-
}),
|
|
604
|
-
/* @__PURE__ */ O("div", {
|
|
605
|
-
className: "mb-4",
|
|
606
|
-
children: [/* @__PURE__ */ D("label", {
|
|
607
|
-
className: "block text-sm font-medium text-text-primary mb-2",
|
|
608
|
-
children: "Special Instructions"
|
|
609
|
-
}), /* @__PURE__ */ D("textarea", {
|
|
610
|
-
value: q.specialInstructions,
|
|
611
|
-
onChange: (e) => J((t) => t && {
|
|
612
|
-
...t,
|
|
613
|
-
specialInstructions: e.target.value
|
|
614
|
-
}),
|
|
615
|
-
placeholder: "Any special requests...",
|
|
616
|
-
className: "w-full rounded-lg border border-border-subtle bg-bg-surface p-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
617
|
-
rows: 3
|
|
618
|
-
})]
|
|
619
|
-
}),
|
|
620
|
-
/* @__PURE__ */ O("button", {
|
|
621
|
-
type: "button",
|
|
622
|
-
onClick: () => {
|
|
623
|
-
q && (oe(q.product, q.quantity, q.specialInstructions), K(!1), J(null), alert(`${q.product.name} added to cart`));
|
|
624
|
-
},
|
|
625
|
-
className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
626
|
-
children: [
|
|
627
|
-
"Add to Cart -",
|
|
628
|
-
" ",
|
|
629
|
-
o(q.product.price * q.quantity, { minimumFractionDigits: 0 })
|
|
630
|
-
]
|
|
631
|
-
})
|
|
632
|
-
]
|
|
633
|
-
})
|
|
634
|
-
})
|
|
635
|
-
})
|
|
636
|
-
]
|
|
637
|
-
}) : /* @__PURE__ */ D(n, {
|
|
638
|
-
title: "Cart Not Found",
|
|
639
|
-
children: /* @__PURE__ */ D(r, {
|
|
640
|
-
illustration: "empty-generic",
|
|
641
|
-
icon: /* @__PURE__ */ D(S, { className: "h-12 w-12" }),
|
|
642
|
-
title: "Cart not found",
|
|
643
|
-
description: `No cart found with ID "${M}".`,
|
|
644
|
-
action: /* @__PURE__ */ D("button", {
|
|
645
|
-
type: "button",
|
|
646
|
-
onClick: () => N("/customer/carts"),
|
|
647
|
-
className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
648
|
-
children: "Browse Carts"
|
|
649
|
-
})
|
|
650
|
-
})
|
|
651
|
-
});
|
|
652
|
-
}
|
|
653
|
-
//#endregion
|
|
654
|
-
export { M as CartDetailPage };
|
|
655
|
-
|
|
656
|
-
//# sourceMappingURL=CartDetailPage.js.map
|