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