@burdenoff/microfe-adaptercloud 2026.625.2 → 2026.628.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.
Files changed (153) hide show
  1. package/dist/adaptercloud/AdapterCloudRoot.js +65 -121
  2. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
  3. package/dist/adaptercloud/AdapterCloudRoutes.js +70 -182
  4. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
  5. package/dist/adaptercloud/components/DataState.js +42 -0
  6. package/dist/adaptercloud/components/DataState.js.map +1 -0
  7. package/dist/adaptercloud/components/SeverityBadge.js +12 -0
  8. package/dist/adaptercloud/components/SeverityBadge.js.map +1 -0
  9. package/dist/adaptercloud/components/StatusBadge.js +43 -44
  10. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  11. package/dist/adaptercloud/context/AdapterCloudContext.js +22 -30
  12. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -1
  13. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +397 -194
  14. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
  15. package/dist/adaptercloud/index.js +1 -0
  16. package/dist/adaptercloud/pages/OverviewPage.js +334 -0
  17. package/dist/adaptercloud/pages/OverviewPage.js.map +1 -0
  18. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +187 -0
  19. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -0
  20. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +278 -0
  21. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -0
  22. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js +172 -0
  23. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -0
  24. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js +247 -0
  25. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js.map +1 -0
  26. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js +271 -0
  27. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js.map +1 -0
  28. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +167 -0
  29. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -0
  30. package/dist/adaptercloud/pages/costs/CostsPage.js +169 -0
  31. package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/drift/DriftListPage.js +132 -0
  33. package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -0
  34. package/dist/adaptercloud/pages/policies/PoliciesListPage.js +171 -0
  35. package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js +185 -0
  37. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/policies/PolicyFormPage.js +215 -0
  39. package/dist/adaptercloud/pages/policies/PolicyFormPage.js.map +1 -0
  40. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +207 -0
  41. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/resources/ResourcesListPage.js +182 -0
  43. package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +196 -0
  45. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/violations/ViolationsListPage.js +258 -0
  47. package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -0
  48. package/dist/adaptercloud/store/adaptercloudStore.js +1 -7
  49. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -1
  50. package/dist/adaptercloud/utils/domain.js +105 -0
  51. package/dist/adaptercloud/utils/domain.js.map +1 -0
  52. package/dist/adaptercloud/utils/formatters.js +1 -12
  53. package/dist/adaptercloud/utils/formatters.js.map +1 -1
  54. package/dist/index.js +5 -4
  55. package/package.json +1 -1
  56. package/dist/adaptercloud/components/InvestmentCard.js +0 -98
  57. package/dist/adaptercloud/components/InvestmentCard.js.map +0 -1
  58. package/dist/adaptercloud/components/RatingDisplay.js +0 -35
  59. package/dist/adaptercloud/components/RatingDisplay.js.map +0 -1
  60. package/dist/adaptercloud/mocks/data.js +0 -1517
  61. package/dist/adaptercloud/mocks/data.js.map +0 -1
  62. package/dist/adaptercloud/mocks/users.js +0 -34
  63. package/dist/adaptercloud/mocks/users.js.map +0 -1
  64. package/dist/adaptercloud/pages/HomePage.js +0 -934
  65. package/dist/adaptercloud/pages/HomePage.js.map +0 -1
  66. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +0 -653
  67. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +0 -1
  68. package/dist/adaptercloud/pages/admin/AdminDashboard.js +0 -665
  69. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +0 -1
  70. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +0 -426
  71. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +0 -1
  72. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +0 -665
  73. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +0 -1
  74. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +0 -261
  75. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +0 -1
  76. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +0 -663
  77. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +0 -1
  78. package/dist/adaptercloud/pages/admin/CartManagementPage.js +0 -874
  79. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +0 -1
  80. package/dist/adaptercloud/pages/admin/UserManagementPage.js +0 -898
  81. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +0 -1
  82. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +0 -840
  83. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  84. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +0 -714
  85. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  86. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +0 -788
  87. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  88. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +0 -888
  89. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  90. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +0 -634
  91. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  92. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +0 -907
  93. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  94. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +0 -875
  95. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +0 -1
  96. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +0 -827
  97. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +0 -1
  98. package/dist/adaptercloud/pages/common/HelpSupportPage.js +0 -1329
  99. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +0 -1
  100. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +0 -671
  101. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +0 -1
  102. package/dist/adaptercloud/pages/common/SettingsPage.js +0 -982
  103. package/dist/adaptercloud/pages/common/SettingsPage.js.map +0 -1
  104. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +0 -596
  105. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +0 -1
  106. package/dist/adaptercloud/pages/customer/CartDetailPage.js +0 -623
  107. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +0 -1
  108. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +0 -552
  109. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +0 -1
  110. package/dist/adaptercloud/pages/customer/CheckoutPage.js +0 -534
  111. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +0 -1
  112. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +0 -525
  113. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +0 -1
  114. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +0 -623
  115. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +0 -1
  116. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +0 -629
  117. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +0 -1
  118. package/dist/adaptercloud/pages/customer/FavoritesPage.js +0 -480
  119. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +0 -1
  120. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +0 -444
  121. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +0 -1
  122. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +0 -391
  123. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +0 -1
  124. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +0 -504
  125. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +0 -1
  126. package/dist/adaptercloud/pages/customer/ReviewsPage.js +0 -609
  127. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +0 -1
  128. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +0 -459
  129. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +0 -1
  130. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +0 -851
  131. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +0 -1
  132. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +0 -942
  133. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  134. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +0 -683
  135. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  136. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +0 -452
  137. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +0 -1
  138. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +0 -402
  139. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  140. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +0 -571
  141. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +0 -1
  142. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +0 -1067
  143. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +0 -1
  144. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +0 -526
  145. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +0 -1
  146. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +0 -659
  147. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +0 -1
  148. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +0 -678
  149. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +0 -1
  150. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +0 -689
  151. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +0 -1
  152. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +0 -582
  153. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,629 +0,0 @@
1
- import { useAdapterCloud as e } from "../../context/AdapterCloudContext.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 { formatCurrency as i } from "../../utils/formatters.js";
6
- import { getCartById as a } from "../../mocks/data.js";
7
- import { useMemo as o, useState as s } from "react";
8
- import { AlertCircle as c, ArrowLeft as l, ArrowRight as u, Calendar as d, CheckCircle2 as f, Clock as p, CreditCard as m, Home as h, Loader2 as g, MapPin as _, Navigation as v, Phone as y, Smartphone as b, Wallet as x } from "lucide-react";
9
- import { useParams as S } from "react-router-dom";
10
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
11
- import { EmphasisPanel as E } from "@burdenoff/fe-libs/ui";
12
- //#region src/adaptercloud/pages/customer/DirectServiceBookingPage.tsx
13
- var D = [
14
- "location",
15
- "details",
16
- "payment",
17
- "confirmation"
18
- ], O = {
19
- location: "Location",
20
- details: "Details",
21
- payment: "Payment",
22
- confirmation: "Confirmation"
23
- };
24
- function k() {
25
- let e = [], t = new Date((/* @__PURE__ */ new Date()).getTime() + 30 * 6e4);
26
- for (let n = 0; n < 8; n++) {
27
- let r = new Date(t.getTime() + n * 30 * 6e4), i = r.toTimeString().slice(0, 5), a = r.toLocaleTimeString([], {
28
- hour: "2-digit",
29
- minute: "2-digit"
30
- });
31
- e.push({
32
- value: i,
33
- label: a
34
- });
35
- }
36
- return e;
37
- }
38
- function A() {
39
- let { cartId: A } = S(), { navigateTo: j } = e(), M = o(() => A ? a(A) : void 0, [A]), [N, P] = s("location"), [F, I] = s(!1), [L, R] = s({
40
- address: "",
41
- landmark: "",
42
- instructions: "",
43
- phoneNumber: ""
44
- }), [z, B] = s({
45
- preferredTime: "",
46
- specialInstructions: "",
47
- isUrgent: !1
48
- }), [V, H] = s("upi"), [U, W] = s(null);
49
- if (!M) return /* @__PURE__ */ w(n, {
50
- title: "Cart Not Found",
51
- children: /* @__PURE__ */ w(r, {
52
- illustration: "empty-search",
53
- icon: /* @__PURE__ */ w(h, { className: "h-12 w-12" }),
54
- title: "Service not available",
55
- description: "Direct service is not available for this cart.",
56
- action: /* @__PURE__ */ w("button", {
57
- type: "button",
58
- onClick: () => j("/customer/carts"),
59
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
60
- children: "Browse Carts"
61
- })
62
- })
63
- });
64
- let G = k(), K = D.indexOf(N), q = () => {
65
- if (!navigator.geolocation) {
66
- alert("Geolocation is not supported by this browser.");
67
- return;
68
- }
69
- navigator.geolocation.getCurrentPosition(() => {
70
- R((e) => ({
71
- ...e,
72
- address: e.address || "Current location detected"
73
- })), alert("Location detected successfully!");
74
- }, () => {
75
- alert("Failed to get your location. Please enter address manually.");
76
- });
77
- }, J = () => L.address.trim() ? L.phoneNumber.trim() ? !0 : (alert("Please enter your phone number."), !1) : (alert("Please enter your address."), !1), Y = () => z.preferredTime ? !0 : (alert("Please select a preferred time slot."), !1), X = () => {
78
- N === "location" && J() ? P("details") : N === "details" && Y() ? P("payment") : N === "payment" && Q();
79
- }, Z = () => {
80
- N === "details" ? P("location") : N === "payment" && P("details");
81
- }, Q = () => {
82
- I(!0), setTimeout(() => {
83
- W({
84
- bookingId: `BK-${Date.now()}`,
85
- transactionId: `TXN-${Date.now()}`,
86
- estimatedArrival: new Date(Date.now() + 30 * 6e4).toISOString()
87
- }), P("confirmation"), I(!1);
88
- }, 1500);
89
- };
90
- return /* @__PURE__ */ T(n, {
91
- title: /* @__PURE__ */ T("div", {
92
- className: "flex items-center gap-3",
93
- children: [/* @__PURE__ */ w("button", {
94
- type: "button",
95
- onClick: () => j(`/customer/carts/${M.id}`),
96
- className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
97
- children: /* @__PURE__ */ w(l, { className: "h-5 w-5" })
98
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", { children: "Book Direct Service" }), /* @__PURE__ */ w("p", {
99
- className: "text-xs font-normal text-text-secondary",
100
- children: M.name
101
- })] })]
102
- }),
103
- purpose: "Book a service from this cart in a few guided steps — pick the service, choose a date and time, add any details, and confirm. Follow the steps top to bottom and you'll have a confirmed booking at the end.",
104
- children: [/* @__PURE__ */ w(E, {
105
- className: "mb-6",
106
- children: /* @__PURE__ */ w("div", {
107
- className: "flex items-center justify-between px-2",
108
- children: D.map((e, n) => {
109
- let r = n < K, i = e === N;
110
- return /* @__PURE__ */ T("div", {
111
- className: "flex items-center",
112
- children: [/* @__PURE__ */ T("div", {
113
- className: "flex flex-col items-center",
114
- children: [/* @__PURE__ */ w("div", {
115
- className: t("flex h-8 w-8 items-center justify-center rounded-full text-xs font-medium", r ? "bg-status-success-bg-subtle/20 text-status-success-text" : i ? "bg-foreground text-background" : "bg-bg-sunken text-text-secondary"),
116
- children: r ? /* @__PURE__ */ w(f, { className: "h-4 w-4" }) : n + 1
117
- }), /* @__PURE__ */ w("span", {
118
- className: t("mt-1 text-[10px]", i ? "font-medium text-text-primary" : "text-text-secondary"),
119
- children: O[e]
120
- })]
121
- }), n < D.length - 1 && /* @__PURE__ */ w("div", { className: t("mx-2 h-0.5 w-8 sm:w-16", r ? "bg-status-success-bg-subtle/30" : "bg-border") })]
122
- }, e);
123
- })
124
- })
125
- }), /* @__PURE__ */ T("div", {
126
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
127
- children: [/* @__PURE__ */ T("div", {
128
- className: "lg:col-span-2",
129
- children: [
130
- N === "location" && /* @__PURE__ */ T("div", {
131
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
132
- children: [
133
- /* @__PURE__ */ T("h2", {
134
- className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
135
- children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), "Service Location"]
136
- }),
137
- /* @__PURE__ */ w("p", {
138
- className: "text-xs text-text-secondary mb-5",
139
- children: "Where should the cart come?"
140
- }),
141
- /* @__PURE__ */ T("div", {
142
- className: "space-y-4",
143
- children: [
144
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
145
- className: "block text-sm font-medium text-text-primary mb-1.5",
146
- children: ["Your Address ", /* @__PURE__ */ w("span", {
147
- className: "text-status-error-text",
148
- children: "*"
149
- })]
150
- }), /* @__PURE__ */ T("div", {
151
- className: "flex gap-2",
152
- children: [/* @__PURE__ */ w("input", {
153
- type: "text",
154
- placeholder: "Enter your full address",
155
- value: L.address,
156
- onChange: (e) => R((t) => ({
157
- ...t,
158
- address: e.target.value
159
- })),
160
- 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)]"
161
- }), /* @__PURE__ */ T("button", {
162
- type: "button",
163
- onClick: q,
164
- 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",
165
- children: [/* @__PURE__ */ w(v, { className: "h-3.5 w-3.5" }), "Use Current Location"]
166
- })]
167
- })] }),
168
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
169
- className: "block text-sm font-medium text-text-primary mb-1.5",
170
- children: "Nearby Landmark"
171
- }), /* @__PURE__ */ w("input", {
172
- type: "text",
173
- placeholder: "e.g., Near Metro Station, Opposite Mall",
174
- value: L.landmark,
175
- onChange: (e) => R((t) => ({
176
- ...t,
177
- landmark: e.target.value
178
- })),
179
- 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)]"
180
- })] }),
181
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
182
- className: "block text-sm font-medium text-text-primary mb-1.5",
183
- children: "Instructions for Cart Owner"
184
- }), /* @__PURE__ */ w("textarea", {
185
- rows: 3,
186
- placeholder: "Any specific instructions to help us find you...",
187
- value: L.instructions,
188
- onChange: (e) => R((t) => ({
189
- ...t,
190
- instructions: e.target.value
191
- })),
192
- 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"
193
- })] }),
194
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
195
- className: "block text-sm font-medium text-text-primary mb-1.5",
196
- children: ["Phone Number ", /* @__PURE__ */ w("span", {
197
- className: "text-status-error-text",
198
- children: "*"
199
- })]
200
- }), /* @__PURE__ */ T("div", {
201
- className: "relative",
202
- children: [/* @__PURE__ */ w(y, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ w("input", {
203
- type: "tel",
204
- placeholder: "Enter your phone number",
205
- value: L.phoneNumber,
206
- onChange: (e) => R((t) => ({
207
- ...t,
208
- phoneNumber: e.target.value
209
- })),
210
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
211
- })]
212
- })] })
213
- ]
214
- })
215
- ]
216
- }),
217
- N === "details" && /* @__PURE__ */ T("div", {
218
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
219
- children: [
220
- /* @__PURE__ */ T("h2", {
221
- className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
222
- children: [/* @__PURE__ */ w(d, { className: "h-4 w-4" }), "Booking Details"]
223
- }),
224
- /* @__PURE__ */ w("p", {
225
- className: "text-xs text-text-secondary mb-5",
226
- children: "Choose your preferred timing"
227
- }),
228
- /* @__PURE__ */ T("div", {
229
- className: "space-y-4",
230
- children: [
231
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
232
- className: "block text-sm font-medium text-text-primary mb-1.5",
233
- children: ["Preferred Time Slot ", /* @__PURE__ */ w("span", {
234
- className: "text-status-error-text",
235
- children: "*"
236
- })]
237
- }), /* @__PURE__ */ w("div", {
238
- className: "grid grid-cols-4 gap-2",
239
- children: G.map((e) => /* @__PURE__ */ w("button", {
240
- type: "button",
241
- onClick: () => B((t) => ({
242
- ...t,
243
- preferredTime: e.value
244
- })),
245
- className: t("rounded-lg border py-2 px-2 text-xs font-medium transition-colors", z.preferredTime === e.value ? "border-foreground bg-accent text-text-primary" : "border-border-subtle text-text-secondary hover:bg-accent hover:text-text-primary"),
246
- children: e.label
247
- }, e.value))
248
- })] }),
249
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
250
- className: "block text-sm font-medium text-text-primary mb-1.5",
251
- children: "Special Instructions"
252
- }), /* @__PURE__ */ w("textarea", {
253
- rows: 3,
254
- placeholder: "Any special requests or dietary preferences...",
255
- value: z.specialInstructions,
256
- onChange: (e) => B((t) => ({
257
- ...t,
258
- specialInstructions: e.target.value
259
- })),
260
- 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"
261
- })] }),
262
- /* @__PURE__ */ T("label", {
263
- className: "flex items-center gap-2 cursor-pointer",
264
- children: [/* @__PURE__ */ w("input", {
265
- type: "checkbox",
266
- checked: z.isUrgent,
267
- onChange: (e) => B((t) => ({
268
- ...t,
269
- isUrgent: e.target.checked
270
- })),
271
- className: "h-4 w-4 rounded border-border-subtle"
272
- }), /* @__PURE__ */ w("span", {
273
- className: "text-sm text-text-secondary",
274
- children: "This is urgent (additional charges may apply)"
275
- })]
276
- })
277
- ]
278
- })
279
- ]
280
- }),
281
- N === "payment" && /* @__PURE__ */ T("div", {
282
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
283
- children: [
284
- /* @__PURE__ */ T("h2", {
285
- className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
286
- children: [/* @__PURE__ */ w(m, { className: "h-4 w-4" }), "Advance Payment"]
287
- }),
288
- /* @__PURE__ */ w("p", {
289
- className: "text-xs text-text-secondary mb-5",
290
- children: "Select your payment method"
291
- }),
292
- /* @__PURE__ */ T("div", {
293
- className: "space-y-4",
294
- children: [
295
- /* @__PURE__ */ T("div", {
296
- className: "flex items-start gap-2 rounded-lg border border-accent-blue-subtle/20 bg-accent-blue-subtle/5 p-3",
297
- children: [/* @__PURE__ */ w(c, { className: "h-4 w-4 text-accent-blue shrink-0 mt-0.5" }), /* @__PURE__ */ T("p", {
298
- className: "text-xs text-accent-blue",
299
- children: [
300
- "You need to pay ",
301
- i(100, { minimumFractionDigits: 0 }),
302
- " ",
303
- "in advance to confirm your booking. Pay the remaining when the cart arrives."
304
- ]
305
- })]
306
- }),
307
- /* @__PURE__ */ w("div", {
308
- className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
309
- children: [
310
- {
311
- value: "upi",
312
- label: "UPI",
313
- sub: "Instant payment",
314
- Icon: b
315
- },
316
- {
317
- value: "card",
318
- label: "Card",
319
- sub: "Secure payment",
320
- Icon: m
321
- },
322
- {
323
- value: "wallet",
324
- label: "Wallet",
325
- sub: "Quick payment",
326
- Icon: x
327
- }
328
- ].map(({ value: e, label: n, sub: r, Icon: i }) => /* @__PURE__ */ T("button", {
329
- type: "button",
330
- onClick: () => H(e),
331
- className: t("rounded-lg border p-3 text-center transition-colors", V === e ? "border-foreground bg-accent" : "border-border-subtle hover:bg-accent"),
332
- children: [
333
- /* @__PURE__ */ w(i, { className: "mx-auto h-5 w-5 text-text-secondary mb-1" }),
334
- /* @__PURE__ */ w("p", {
335
- className: "text-sm font-medium text-text-primary",
336
- children: n
337
- }),
338
- /* @__PURE__ */ w("p", {
339
- className: "text-[10px] text-text-secondary",
340
- children: r
341
- })
342
- ]
343
- }, e))
344
- }),
345
- /* @__PURE__ */ T("div", {
346
- className: "rounded-lg bg-bg-sunken p-4",
347
- children: [/* @__PURE__ */ w("h3", {
348
- className: "text-sm font-medium text-text-primary mb-2",
349
- children: "Payment Summary"
350
- }), /* @__PURE__ */ T("div", {
351
- className: "space-y-2 text-sm",
352
- children: [
353
- /* @__PURE__ */ T("div", {
354
- className: "flex justify-between",
355
- children: [/* @__PURE__ */ w("span", {
356
- className: "text-text-secondary",
357
- children: "Advance Payment:"
358
- }), /* @__PURE__ */ w("span", {
359
- className: "text-text-primary",
360
- children: i(100, { minimumFractionDigits: 0 })
361
- })]
362
- }),
363
- /* @__PURE__ */ T("div", {
364
- className: "flex justify-between",
365
- children: [/* @__PURE__ */ w("span", {
366
- className: "text-text-secondary",
367
- children: "Service Fee:"
368
- }), /* @__PURE__ */ w("span", {
369
- className: "text-text-primary",
370
- children: i(50, { minimumFractionDigits: 0 })
371
- })]
372
- }),
373
- /* @__PURE__ */ T("div", {
374
- className: "flex justify-between text-text-secondary",
375
- children: [/* @__PURE__ */ w("span", { children: "Balance Payment (at arrival):" }), /* @__PURE__ */ w("span", { children: i(50, { minimumFractionDigits: 0 }) })]
376
- }),
377
- /* @__PURE__ */ T("div", {
378
- className: "flex justify-between border-t border-border-subtle pt-2 font-semibold",
379
- children: [/* @__PURE__ */ w("span", {
380
- className: "text-text-primary",
381
- children: "Total Amount:"
382
- }), /* @__PURE__ */ w("span", {
383
- className: "text-text-primary",
384
- children: i(150, { minimumFractionDigits: 0 })
385
- })]
386
- })
387
- ]
388
- })]
389
- })
390
- ]
391
- })
392
- ]
393
- }),
394
- N === "confirmation" && U && /* @__PURE__ */ T("div", {
395
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
396
- children: [
397
- /* @__PURE__ */ T("div", {
398
- className: "text-center mb-6",
399
- children: [
400
- /* @__PURE__ */ w("div", {
401
- className: "mx-auto mb-3 flex h-14 w-14 items-center justify-center rounded-full bg-status-success-bg-subtle/10",
402
- children: /* @__PURE__ */ w(f, { className: "h-7 w-7 text-status-success-text" })
403
- }),
404
- /* @__PURE__ */ w("h2", {
405
- className: "text-lg font-semibold text-text-primary mb-1",
406
- children: "Booking Confirmed!"
407
- }),
408
- /* @__PURE__ */ w("p", {
409
- className: "text-sm text-text-secondary",
410
- children: "Your direct service booking has been confirmed and payment processed."
411
- })
412
- ]
413
- }),
414
- /* @__PURE__ */ T("div", {
415
- className: "rounded-lg bg-bg-sunken p-4 mb-4",
416
- children: [/* @__PURE__ */ w("h3", {
417
- className: "text-sm font-medium text-text-primary mb-3",
418
- children: "Booking Details"
419
- }), /* @__PURE__ */ T("div", {
420
- className: "grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm",
421
- children: [
422
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
423
- className: "text-xs text-text-secondary",
424
- children: "Booking ID"
425
- }), /* @__PURE__ */ w("p", {
426
- className: "font-mono text-xs text-text-primary",
427
- children: U.bookingId
428
- })] }),
429
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
430
- className: "text-xs text-text-secondary",
431
- children: "Est. Arrival"
432
- }), /* @__PURE__ */ w("p", {
433
- className: "text-text-primary",
434
- children: new Date(U.estimatedArrival).toLocaleTimeString([], {
435
- hour: "2-digit",
436
- minute: "2-digit"
437
- })
438
- })] }),
439
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
440
- className: "text-xs text-text-secondary",
441
- children: "Location"
442
- }), /* @__PURE__ */ w("p", {
443
- className: "text-text-primary truncate",
444
- children: L.address
445
- })] }),
446
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
447
- className: "text-xs text-text-secondary",
448
- children: "Phone"
449
- }), /* @__PURE__ */ w("p", {
450
- className: "text-text-primary",
451
- children: L.phoneNumber
452
- })] })
453
- ]
454
- })]
455
- }),
456
- /* @__PURE__ */ T("div", {
457
- className: "rounded-lg border border-status-success-border/20 bg-status-success-bg-subtle/5 p-4 mb-4",
458
- children: [/* @__PURE__ */ T("h3", {
459
- className: "text-sm font-medium text-status-success-text mb-2 flex items-center gap-2",
460
- children: [/* @__PURE__ */ w(f, { className: "h-4 w-4" }), "Payment Processed"]
461
- }), /* @__PURE__ */ T("div", {
462
- className: "grid grid-cols-2 gap-3 text-sm",
463
- children: [
464
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
465
- className: "text-xs text-text-secondary",
466
- children: "Transaction ID"
467
- }), /* @__PURE__ */ w("p", {
468
- className: "font-mono text-xs text-text-primary",
469
- children: U.transactionId
470
- })] }),
471
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
472
- className: "text-xs text-text-secondary",
473
- children: "Advance Paid"
474
- }), /* @__PURE__ */ w("p", {
475
- className: "font-medium text-text-primary",
476
- children: i(100, { minimumFractionDigits: 0 })
477
- })] }),
478
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
479
- className: "text-xs text-text-secondary",
480
- children: "Method"
481
- }), /* @__PURE__ */ w("p", {
482
- className: "capitalize text-text-primary",
483
- children: V
484
- })] }),
485
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("span", {
486
- className: "text-xs text-text-secondary",
487
- children: "Status"
488
- }), /* @__PURE__ */ w("p", {
489
- className: "font-medium text-status-success-text",
490
- children: "Paid"
491
- })] })
492
- ]
493
- })]
494
- }),
495
- /* @__PURE__ */ T("div", {
496
- className: "rounded-lg border border-accent-blue-subtle/20 bg-accent-blue-subtle/5 p-4 mb-6",
497
- children: [/* @__PURE__ */ w("h3", {
498
- className: "text-sm font-medium text-accent-blue mb-2",
499
- children: "Next Steps"
500
- }), /* @__PURE__ */ T("div", {
501
- className: "space-y-2 text-xs text-accent-blue",
502
- children: [
503
- /* @__PURE__ */ T("div", {
504
- className: "flex items-start gap-2",
505
- children: [/* @__PURE__ */ w(f, { className: "h-3.5 w-3.5 text-status-success-text mt-0.5 shrink-0" }), /* @__PURE__ */ T("span", { children: [
506
- "Payment confirmed -",
507
- " ",
508
- i(100, { minimumFractionDigits: 0 }),
509
- " paid"
510
- ] })]
511
- }),
512
- /* @__PURE__ */ T("div", {
513
- className: "flex items-start gap-2",
514
- children: [/* @__PURE__ */ w(p, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ T("span", { children: [
515
- "Cart will arrive around",
516
- " ",
517
- new Date(U.estimatedArrival).toLocaleTimeString([], {
518
- hour: "2-digit",
519
- minute: "2-digit"
520
- })
521
- ] })]
522
- }),
523
- /* @__PURE__ */ T("div", {
524
- className: "flex items-start gap-2",
525
- children: [/* @__PURE__ */ w(m, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ T("span", { children: [
526
- "Pay remaining ",
527
- i(50, { minimumFractionDigits: 0 }),
528
- " ",
529
- "when cart arrives"
530
- ] })]
531
- })
532
- ]
533
- })]
534
- }),
535
- /* @__PURE__ */ T("div", {
536
- className: "flex gap-3",
537
- children: [/* @__PURE__ */ w("button", {
538
- type: "button",
539
- onClick: () => j(`/customer/bookings/${U.bookingId}`),
540
- className: "flex-1 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
541
- children: "View Booking"
542
- }), /* @__PURE__ */ w("button", {
543
- type: "button",
544
- onClick: () => j("/customer/carts"),
545
- 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",
546
- children: "Browse More"
547
- })]
548
- })
549
- ]
550
- }),
551
- N !== "confirmation" && /* @__PURE__ */ T("div", {
552
- className: "flex justify-between mt-5",
553
- children: [/* @__PURE__ */ T("button", {
554
- type: "button",
555
- onClick: Z,
556
- disabled: N === "location",
557
- 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", N === "location" ? "opacity-40 cursor-not-allowed" : "hover:bg-accent"),
558
- children: [/* @__PURE__ */ w(l, { className: "h-4 w-4" }), "Previous"]
559
- }), /* @__PURE__ */ w("button", {
560
- type: "button",
561
- onClick: X,
562
- disabled: F,
563
- className: t("flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity", F ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
564
- children: F ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(g, { className: "h-4 w-4 animate-spin" }), N === "payment" ? "Processing Payment..." : "Processing..."] }) : /* @__PURE__ */ T(C, { children: [N === "payment" ? "Confirm & Pay" : "Next", /* @__PURE__ */ w(u, { className: "h-4 w-4" })] })
565
- })]
566
- })
567
- ]
568
- }), /* @__PURE__ */ w("div", {
569
- className: "lg:col-span-1",
570
- children: /* @__PURE__ */ T("div", {
571
- className: "sticky top-6 rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
572
- children: [
573
- /* @__PURE__ */ w("h3", {
574
- className: "text-base font-semibold text-text-primary mb-4",
575
- children: "Service Summary"
576
- }),
577
- /* @__PURE__ */ T("div", {
578
- className: "flex items-center gap-3 mb-4",
579
- children: [/* @__PURE__ */ w("img", {
580
- src: M.image,
581
- alt: M.name,
582
- className: "h-12 w-12 rounded-lg object-cover"
583
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
584
- className: "text-sm font-medium text-text-primary",
585
- children: M.name
586
- }), /* @__PURE__ */ w("p", {
587
- className: "text-xs text-text-secondary",
588
- children: M.category
589
- })] })]
590
- }),
591
- /* @__PURE__ */ T("div", {
592
- className: "space-y-2 text-sm border-t border-border-subtle pt-3",
593
- children: [/* @__PURE__ */ T("div", {
594
- className: "flex justify-between",
595
- children: [/* @__PURE__ */ w("span", {
596
- className: "text-text-secondary",
597
- children: "Service Fee:"
598
- }), /* @__PURE__ */ w("span", {
599
- className: "text-text-primary",
600
- children: i(50, { minimumFractionDigits: 0 })
601
- })]
602
- }), /* @__PURE__ */ T("div", {
603
- className: "flex justify-between",
604
- children: [/* @__PURE__ */ w("span", {
605
- className: "text-text-secondary",
606
- children: "Advance Payment:"
607
- }), /* @__PURE__ */ w("span", {
608
- className: "font-medium text-text-primary",
609
- children: i(100, { minimumFractionDigits: 0 })
610
- })]
611
- })]
612
- }),
613
- /* @__PURE__ */ T("div", {
614
- className: "flex items-center gap-2 mt-3 pt-3 border-t border-border-subtle text-status-success-text",
615
- children: [/* @__PURE__ */ w(f, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ w("span", {
616
- className: "text-xs",
617
- children: "Pay remaining amount at cart"
618
- })]
619
- })
620
- ]
621
- })
622
- })]
623
- })]
624
- });
625
- }
626
- //#endregion
627
- export { A as DirectServiceBookingPage };
628
-
629
- //# sourceMappingURL=DirectServiceBookingPage.js.map