@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,634 +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 { useState as r } from "react";
5
- import { AlertCircle as i, Calendar as a, CheckCircle2 as o, Clock as s, Home as c, Package as l, Plus as u, Save as d, Settings as f, ShoppingBag as p, Trash2 as m, Truck as h } from "lucide-react";
6
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
7
- import { EmphasisPanel as y } from "@burdenoff/fe-libs/ui";
8
- //#region src/adaptercloud/pages/cart-owner/CartServiceConfigPage.tsx
9
- var b = [
10
- {
11
- value: "products_only",
12
- label: "Products Only",
13
- description: "You'll manage physical products with inventory, stock levels, and shipping."
14
- },
15
- {
16
- value: "services_only",
17
- label: "Services Only",
18
- description: "You'll manage services with appointments, bookings, and time slots."
19
- },
20
- {
21
- value: "both",
22
- label: "Products & Services",
23
- description: "You'll manage both products and services with full flexibility."
24
- }
25
- ], x = [
26
- "monday",
27
- "tuesday",
28
- "wednesday",
29
- "thursday",
30
- "friday",
31
- "saturday",
32
- "sunday"
33
- ], S = {
34
- monday: "Mon",
35
- tuesday: "Tue",
36
- wednesday: "Wed",
37
- thursday: "Thu",
38
- friday: "Fri",
39
- saturday: "Sat",
40
- sunday: "Sun"
41
- }, C = {
42
- monday: {
43
- isOpen: !0,
44
- open: "09:00",
45
- close: "21:00"
46
- },
47
- tuesday: {
48
- isOpen: !0,
49
- open: "09:00",
50
- close: "21:00"
51
- },
52
- wednesday: {
53
- isOpen: !0,
54
- open: "09:00",
55
- close: "21:00"
56
- },
57
- thursday: {
58
- isOpen: !0,
59
- open: "09:00",
60
- close: "21:00"
61
- },
62
- friday: {
63
- isOpen: !0,
64
- open: "09:00",
65
- close: "22:00"
66
- },
67
- saturday: {
68
- isOpen: !0,
69
- open: "10:00",
70
- close: "22:00"
71
- },
72
- sunday: {
73
- isOpen: !1,
74
- open: "10:00",
75
- close: "18:00"
76
- }
77
- }, w = {
78
- pickup: {
79
- enabled: !0,
80
- preparationTime: 15
81
- },
82
- delivery: {
83
- enabled: !0,
84
- deliveryRadius: 5,
85
- deliveryFee: 30,
86
- minimumOrderValue: 100
87
- },
88
- scheduledStop: {
89
- enabled: !1,
90
- stops: []
91
- },
92
- directService: {
93
- enabled: !1,
94
- config: {
95
- serviceFee: 50,
96
- minimumAdvancePayment: 200,
97
- serviceRadius: 10,
98
- estimatedArrivalTime: 45,
99
- minimumOrderValue: 300
100
- }
101
- }
102
- }, T = () => {
103
- let { navigateTo: T } = e(), [E, D] = r(!0), [O, k] = r("both"), [A, j] = r(C), [M, N] = r(w), [P, F] = r(!1), [I, L] = r(!1), [R, z] = r([]), B = (e, t, n) => {
104
- j((r) => ({
105
- ...r,
106
- [e]: {
107
- ...r[e],
108
- [t]: n
109
- }
110
- }));
111
- }, V = (e, t, n) => {
112
- N((r) => ({
113
- ...r,
114
- [e]: {
115
- ...r[e],
116
- [t]: n
117
- }
118
- }));
119
- }, H = (e, t) => {
120
- N((n) => ({
121
- ...n,
122
- directService: {
123
- ...n.directService,
124
- config: {
125
- ...n.directService.config,
126
- [e]: t
127
- }
128
- }
129
- }));
130
- }, U = () => {
131
- let e = {
132
- id: `stop-${Date.now()}`,
133
- name: "",
134
- address: "",
135
- arrivalTime: "09:00",
136
- departureTime: "11:00",
137
- daysOfWeek: [
138
- "monday",
139
- "tuesday",
140
- "wednesday",
141
- "thursday",
142
- "friday"
143
- ],
144
- isActive: !0
145
- };
146
- N((t) => ({
147
- ...t,
148
- scheduledStop: {
149
- ...t.scheduledStop,
150
- stops: [...t.scheduledStop.stops, e]
151
- }
152
- }));
153
- }, W = (e) => {
154
- N((t) => ({
155
- ...t,
156
- scheduledStop: {
157
- ...t.scheduledStop,
158
- stops: t.scheduledStop.stops.filter((t) => t.id !== e)
159
- }
160
- }));
161
- }, G = (e, t, n) => {
162
- N((r) => ({
163
- ...r,
164
- scheduledStop: {
165
- ...r.scheduledStop,
166
- stops: r.scheduledStop.stops.map((r) => r.id === e ? {
167
- ...r,
168
- [t]: n
169
- } : r)
170
- }
171
- }));
172
- }, K = (e, t) => {
173
- N((n) => ({
174
- ...n,
175
- scheduledStop: {
176
- ...n.scheduledStop,
177
- stops: n.scheduledStop.stops.map((n) => {
178
- if (n.id === e) {
179
- let e = n.daysOfWeek.includes(t) ? n.daysOfWeek.filter((e) => e !== t) : [...n.daysOfWeek, t];
180
- return {
181
- ...n,
182
- daysOfWeek: e
183
- };
184
- }
185
- return n;
186
- })
187
- }
188
- }));
189
- }, q = () => {
190
- let e = [];
191
- if (M.delivery.enabled && (M.delivery.deliveryRadius <= 0 && e.push("Delivery radius must be greater than 0"), M.delivery.deliveryFee < 0 && e.push("Delivery fee cannot be negative"), M.delivery.minimumOrderValue < 0 && e.push("Minimum order value cannot be negative")), M.pickup.enabled && M.pickup.preparationTime <= 0 && e.push("Preparation time must be greater than 0"), M.scheduledStop.enabled) {
192
- M.scheduledStop.stops.length === 0 && e.push("At least one scheduled stop is required when scheduled stop service is enabled");
193
- for (let t of M.scheduledStop.stops) t.name.trim() || e.push("All scheduled stops must have a name"), t.address.trim() || e.push("All scheduled stops must have an address"), t.daysOfWeek.length === 0 && e.push("All scheduled stops must have at least one day selected"), t.arrivalTime >= t.departureTime && e.push("Departure time must be after arrival time for all stops");
194
- }
195
- return M.directService.enabled && (M.directService.config.serviceFee < 0 && e.push("Service fee cannot be negative"), M.directService.config.minimumAdvancePayment < 0 && e.push("Minimum advance payment cannot be negative"), M.directService.config.serviceRadius <= 0 && e.push("Service radius must be greater than 0"), M.directService.config.estimatedArrivalTime <= 0 && e.push("Estimated arrival time must be greater than 0")), Object.values(A).some((e) => e.isOpen) || e.push("At least one day must be open"), e;
196
- }, J = () => {
197
- z([]);
198
- let e = q();
199
- if (e.length > 0) {
200
- z(e);
201
- return;
202
- }
203
- F(!0), setTimeout(() => {
204
- F(!1), L(!0), setTimeout(() => L(!1), 3e3);
205
- }, 1e3);
206
- }, Y = b.find((e) => e.value === O);
207
- return /* @__PURE__ */ _(n, {
208
- title: "Service Provider Configuration",
209
- description: "Manage your service status, operating hours, and service types",
210
- purpose: "Tell customers when and what you serve — flip your cart open or closed, set operating hours, and choose the service types you offer. This is what decides whether you show up in customer searches right now.",
211
- actions: /* @__PURE__ */ _("button", {
212
- type: "button",
213
- onClick: J,
214
- disabled: P,
215
- className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", P ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
216
- children: P ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(d, { className: "h-4 w-4" }), "Save Configuration"] })
217
- }),
218
- children: /* @__PURE__ */ v("div", {
219
- className: "space-y-6 max-w-4xl",
220
- children: [
221
- I && /* @__PURE__ */ v("div", {
222
- className: "flex items-center gap-2 rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/10 p-4",
223
- children: [/* @__PURE__ */ _(o, { className: "h-5 w-5 text-status-success-text shrink-0" }), /* @__PURE__ */ _("span", {
224
- className: "text-sm font-medium text-status-success-text",
225
- children: "Configuration saved successfully!"
226
- })]
227
- }),
228
- R.length > 0 && /* @__PURE__ */ _("div", {
229
- className: "rounded-lg border border-status-error-border/30 bg-status-error-bg-subtle/10 p-4 space-y-1",
230
- children: R.map((e, t) => /* @__PURE__ */ v("div", {
231
- className: "flex items-start gap-2",
232
- children: [/* @__PURE__ */ _(i, { className: "h-4 w-4 text-status-error-text shrink-0 mt-0.5" }), /* @__PURE__ */ _("span", {
233
- className: "text-sm text-status-error-text",
234
- children: e
235
- })]
236
- }, t))
237
- }),
238
- /* @__PURE__ */ _(y, {
239
- role: "region",
240
- "aria-label": "Service status",
241
- children: /* @__PURE__ */ v("div", {
242
- className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",
243
- children: [/* @__PURE__ */ v("div", {
244
- className: "flex-1",
245
- children: [/* @__PURE__ */ v("h2", {
246
- className: "text-lg font-semibold text-text-primary flex items-center gap-2",
247
- children: [/* @__PURE__ */ _(f, { className: "h-5 w-5 text-text-secondary" }), "Service Status"]
248
- }), /* @__PURE__ */ _("p", {
249
- className: "text-sm text-text-secondary mt-1",
250
- children: "Control whether your service is currently accepting orders"
251
- })]
252
- }), /* @__PURE__ */ v("div", {
253
- className: "flex items-center gap-3",
254
- children: [/* @__PURE__ */ _("span", {
255
- className: t("inline-flex items-center rounded-full px-3 py-1 text-xs font-medium", E ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg-subtle/20 text-status-error-text"),
256
- children: E ? "Open" : "Closed"
257
- }), /* @__PURE__ */ _("button", {
258
- type: "button",
259
- onClick: () => D(!E),
260
- className: t("rounded-md px-4 py-2 text-sm font-medium transition-colors", E ? "bg-status-error-bg-subtle/10 text-status-error-text hover:bg-status-error-bg-subtle/20" : "bg-status-success-bg-subtle/10 text-status-success-text hover:bg-status-success-bg-subtle/20"),
261
- children: E ? "Close Service" : "Open Service"
262
- })]
263
- })]
264
- })
265
- }),
266
- /* @__PURE__ */ v("section", {
267
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
268
- children: [/* @__PURE__ */ v("h2", {
269
- className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-4",
270
- children: [/* @__PURE__ */ _(l, { className: "h-5 w-5 text-text-secondary" }), "Offering Type"]
271
- }), /* @__PURE__ */ v("div", {
272
- className: "space-y-3",
273
- children: [
274
- /* @__PURE__ */ _("label", {
275
- htmlFor: "offering-type",
276
- className: "block text-sm font-medium text-text-primary",
277
- children: "What do you provide?"
278
- }),
279
- /* @__PURE__ */ _("select", {
280
- id: "offering-type",
281
- value: O,
282
- onChange: (e) => k(e.target.value),
283
- className: "w-full sm:w-64 rounded-md 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)]",
284
- children: b.map((e) => /* @__PURE__ */ _("option", {
285
- value: e.value,
286
- children: e.label
287
- }, e.value))
288
- }),
289
- /* @__PURE__ */ _("p", {
290
- className: "text-sm text-text-secondary",
291
- children: Y.description
292
- })
293
- ]
294
- })]
295
- }),
296
- /* @__PURE__ */ v("section", {
297
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
298
- children: [/* @__PURE__ */ v("h2", {
299
- className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-4",
300
- children: [/* @__PURE__ */ _(s, { className: "h-5 w-5 text-text-secondary" }), "Operating Hours"]
301
- }), /* @__PURE__ */ _("div", {
302
- className: "grid grid-cols-1 md:grid-cols-2 gap-3",
303
- children: x.map((e) => {
304
- let n = A[e];
305
- return /* @__PURE__ */ v("div", {
306
- className: t("flex flex-col sm:flex-row sm:items-center gap-3 p-4 rounded-lg", n.isOpen ? "bg-bg-sunken/50" : "bg-bg-sunken/30 opacity-60"),
307
- children: [/* @__PURE__ */ _("span", {
308
- className: "min-w-[50px] text-sm font-medium text-text-primary",
309
- children: S[e]
310
- }), /* @__PURE__ */ v("div", {
311
- className: "flex items-center gap-3 flex-1",
312
- children: [
313
- /* @__PURE__ */ _("button", {
314
- type: "button",
315
- onClick: () => B(e, "isOpen", !n.isOpen),
316
- className: t("h-5 w-5 rounded border transition-colors shrink-0", n.isOpen ? "bg-accent-blue-subtle border-accent-blue-subtle" : "border-border-subtle bg-bg-surface"),
317
- children: n.isOpen && /* @__PURE__ */ _(o, { className: "h-5 w-5 text-white" })
318
- }),
319
- /* @__PURE__ */ _("span", {
320
- className: "text-xs text-text-secondary min-w-[35px]",
321
- children: "Open"
322
- }),
323
- n.isOpen && /* @__PURE__ */ v("div", {
324
- className: "flex items-center gap-2",
325
- children: [
326
- /* @__PURE__ */ _("input", {
327
- type: "time",
328
- value: n.open,
329
- onChange: (t) => B(e, "open", t.target.value),
330
- className: "text-sm rounded border border-border-subtle bg-bg-surface px-2 py-1.5 text-text-primary w-[110px]"
331
- }),
332
- /* @__PURE__ */ _("span", {
333
- className: "text-xs text-text-secondary",
334
- children: "to"
335
- }),
336
- /* @__PURE__ */ _("input", {
337
- type: "time",
338
- value: n.close,
339
- onChange: (t) => B(e, "close", t.target.value),
340
- className: "text-sm rounded border border-border-subtle bg-bg-surface px-2 py-1.5 text-text-primary w-[110px]"
341
- })
342
- ]
343
- })
344
- ]
345
- })]
346
- }, e);
347
- })
348
- })]
349
- }),
350
- /* @__PURE__ */ v("section", {
351
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
352
- children: [/* @__PURE__ */ v("h2", {
353
- className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-6",
354
- children: [/* @__PURE__ */ _(h, { className: "h-5 w-5 text-text-secondary" }), "Service Types"]
355
- }), /* @__PURE__ */ v("div", {
356
- className: "space-y-6",
357
- children: [
358
- /* @__PURE__ */ v("div", {
359
- className: "border border-border-subtle rounded-lg p-4",
360
- children: [/* @__PURE__ */ v("div", {
361
- className: "flex items-center justify-between mb-4",
362
- children: [/* @__PURE__ */ v("div", {
363
- className: "flex items-center gap-2",
364
- children: [/* @__PURE__ */ _(p, { className: "h-5 w-5 text-accent-blue" }), /* @__PURE__ */ _("span", {
365
- className: "font-medium text-text-primary",
366
- children: "Pickup Service"
367
- })]
368
- }), /* @__PURE__ */ _("button", {
369
- type: "button",
370
- onClick: () => V("pickup", "enabled", !M.pickup.enabled),
371
- className: t("h-6 w-11 rounded-full transition-colors relative", M.pickup.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
372
- children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", M.pickup.enabled ? "translate-x-5" : "translate-x-0.5") })
373
- })]
374
- }), M.pickup.enabled && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
375
- className: "block text-sm font-medium text-text-primary mb-1",
376
- children: "Preparation Time (minutes)"
377
- }), /* @__PURE__ */ _("input", {
378
- type: "number",
379
- value: M.pickup.preparationTime,
380
- onChange: (e) => V("pickup", "preparationTime", parseInt(e.target.value) || 0),
381
- className: "w-full sm:w-32 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
382
- })] })]
383
- }),
384
- /* @__PURE__ */ v("div", {
385
- className: "border border-border-subtle rounded-lg p-4",
386
- children: [/* @__PURE__ */ v("div", {
387
- className: "flex items-center justify-between mb-4",
388
- children: [/* @__PURE__ */ v("div", {
389
- className: "flex items-center gap-2",
390
- children: [/* @__PURE__ */ _(h, { className: "h-5 w-5 text-status-success-text" }), /* @__PURE__ */ _("span", {
391
- className: "font-medium text-text-primary",
392
- children: "Delivery Service"
393
- })]
394
- }), /* @__PURE__ */ _("button", {
395
- type: "button",
396
- onClick: () => V("delivery", "enabled", !M.delivery.enabled),
397
- className: t("h-6 w-11 rounded-full transition-colors relative", M.delivery.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
398
- children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", M.delivery.enabled ? "translate-x-5" : "translate-x-0.5") })
399
- })]
400
- }), M.delivery.enabled && /* @__PURE__ */ v("div", {
401
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
402
- children: [
403
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
404
- className: "block text-sm font-medium text-text-primary mb-1",
405
- children: "Delivery Radius (km)"
406
- }), /* @__PURE__ */ _("input", {
407
- type: "number",
408
- value: M.delivery.deliveryRadius,
409
- onChange: (e) => V("delivery", "deliveryRadius", parseInt(e.target.value) || 0),
410
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
411
- })] }),
412
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
413
- className: "block text-sm font-medium text-text-primary mb-1",
414
- children: "Delivery Fee (₹)"
415
- }), /* @__PURE__ */ _("input", {
416
- type: "number",
417
- value: M.delivery.deliveryFee,
418
- onChange: (e) => V("delivery", "deliveryFee", parseInt(e.target.value) || 0),
419
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
420
- })] }),
421
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
422
- className: "block text-sm font-medium text-text-primary mb-1",
423
- children: "Minimum Order (₹)"
424
- }), /* @__PURE__ */ _("input", {
425
- type: "number",
426
- value: M.delivery.minimumOrderValue,
427
- onChange: (e) => V("delivery", "minimumOrderValue", parseInt(e.target.value) || 0),
428
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
429
- })] })
430
- ]
431
- })]
432
- }),
433
- /* @__PURE__ */ v("div", {
434
- className: "border border-border-subtle rounded-lg p-4",
435
- children: [/* @__PURE__ */ v("div", {
436
- className: "flex items-center justify-between mb-4",
437
- children: [/* @__PURE__ */ v("div", {
438
- className: "flex items-center gap-2",
439
- children: [/* @__PURE__ */ _(a, { className: "h-5 w-5 text-accent-orange" }), /* @__PURE__ */ _("span", {
440
- className: "font-medium text-text-primary",
441
- children: "Scheduled Stop Service"
442
- })]
443
- }), /* @__PURE__ */ _("button", {
444
- type: "button",
445
- onClick: () => V("scheduledStop", "enabled", !M.scheduledStop.enabled),
446
- className: t("h-6 w-11 rounded-full transition-colors relative", M.scheduledStop.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
447
- children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", M.scheduledStop.enabled ? "translate-x-5" : "translate-x-0.5") })
448
- })]
449
- }), M.scheduledStop.enabled && /* @__PURE__ */ v("div", {
450
- className: "space-y-4",
451
- children: [
452
- /* @__PURE__ */ v("div", {
453
- className: "flex items-center justify-between",
454
- children: [/* @__PURE__ */ _("span", {
455
- className: "text-sm text-text-secondary",
456
- children: "Configure locations and times where your cart will be available"
457
- }), /* @__PURE__ */ v("button", {
458
- type: "button",
459
- onClick: U,
460
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
461
- children: [/* @__PURE__ */ _(u, { className: "h-4 w-4" }), "Add Stop"]
462
- })]
463
- }),
464
- M.scheduledStop.stops.map((e) => /* @__PURE__ */ v("div", {
465
- className: "border border-border-subtle rounded-lg p-4 bg-bg-sunken/50",
466
- children: [
467
- /* @__PURE__ */ v("div", {
468
- className: "flex items-center justify-between mb-3",
469
- children: [/* @__PURE__ */ _("h4", {
470
- className: "font-medium text-text-primary text-sm",
471
- children: "Stop Configuration"
472
- }), /* @__PURE__ */ v("button", {
473
- type: "button",
474
- onClick: () => W(e.id),
475
- className: "inline-flex items-center gap-1 rounded-md bg-status-error-bg-subtle/10 px-2 py-1 text-xs text-status-error-text hover:bg-status-error-bg-subtle/20 transition-colors",
476
- children: [/* @__PURE__ */ _(m, { className: "h-3.5 w-3.5" }), "Remove"]
477
- })]
478
- }),
479
- /* @__PURE__ */ v("div", {
480
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4",
481
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
482
- className: "block text-xs font-medium text-text-primary mb-1",
483
- children: "Stop Name"
484
- }), /* @__PURE__ */ _("input", {
485
- type: "text",
486
- value: e.name,
487
- onChange: (t) => G(e.id, "name", t.target.value),
488
- placeholder: "e.g., Tech Park Morning",
489
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
490
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
491
- className: "block text-xs font-medium text-text-primary mb-1",
492
- children: "Address"
493
- }), /* @__PURE__ */ _("input", {
494
- type: "text",
495
- value: e.address,
496
- onChange: (t) => G(e.id, "address", t.target.value),
497
- placeholder: "Full address",
498
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
499
- })] })]
500
- }),
501
- /* @__PURE__ */ v("div", {
502
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4",
503
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
504
- className: "block text-xs font-medium text-text-primary mb-1",
505
- children: "Arrival Time"
506
- }), /* @__PURE__ */ _("input", {
507
- type: "time",
508
- value: e.arrivalTime,
509
- onChange: (t) => G(e.id, "arrivalTime", t.target.value),
510
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
511
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
512
- className: "block text-xs font-medium text-text-primary mb-1",
513
- children: "Departure Time"
514
- }), /* @__PURE__ */ _("input", {
515
- type: "time",
516
- value: e.departureTime,
517
- onChange: (t) => G(e.id, "departureTime", t.target.value),
518
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
519
- })] })]
520
- }),
521
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
522
- className: "block text-xs font-medium text-text-primary mb-2",
523
- children: "Days of Week"
524
- }), /* @__PURE__ */ _("div", {
525
- className: "flex flex-wrap gap-1.5",
526
- children: x.map((n) => /* @__PURE__ */ _("button", {
527
- type: "button",
528
- onClick: () => K(e.id, n),
529
- className: t("px-3 py-1 rounded-full text-xs font-medium transition-colors", e.daysOfWeek.includes(n) ? "bg-accent-blue-subtle text-white" : "bg-bg-sunken text-text-secondary hover:bg-muted-foreground/20"),
530
- children: S[n]
531
- }, n))
532
- })] })
533
- ]
534
- }, e.id)),
535
- M.scheduledStop.stops.length === 0 && /* @__PURE__ */ _("div", {
536
- className: "text-center py-6 text-sm text-text-secondary",
537
- children: "No scheduled stops configured. Click\"Add Stop\" to create one."
538
- })
539
- ]
540
- })]
541
- }),
542
- /* @__PURE__ */ v("div", {
543
- className: "border border-border-subtle rounded-lg p-4",
544
- children: [/* @__PURE__ */ v("div", {
545
- className: "flex items-center justify-between mb-4",
546
- children: [/* @__PURE__ */ v("div", {
547
- className: "flex items-center gap-2",
548
- children: [/* @__PURE__ */ _(c, { className: "h-5 w-5 text-accent-purple" }), /* @__PURE__ */ _("span", {
549
- className: "font-medium text-text-primary",
550
- children: "Direct Service"
551
- })]
552
- }), /* @__PURE__ */ _("button", {
553
- type: "button",
554
- onClick: () => V("directService", "enabled", !M.directService.enabled),
555
- className: t("h-6 w-11 rounded-full transition-colors relative", M.directService.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
556
- children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", M.directService.enabled ? "translate-x-5" : "translate-x-0.5") })
557
- })]
558
- }), M.directService.enabled && /* @__PURE__ */ v("div", {
559
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
560
- children: [
561
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
562
- className: "block text-sm font-medium text-text-primary mb-1",
563
- children: "Service Fee (₹)"
564
- }), /* @__PURE__ */ _("input", {
565
- type: "number",
566
- value: M.directService.config.serviceFee,
567
- onChange: (e) => H("serviceFee", parseInt(e.target.value) || 0),
568
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
569
- })] }),
570
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
571
- className: "block text-sm font-medium text-text-primary mb-1",
572
- children: "Minimum Advance Payment (₹)"
573
- }), /* @__PURE__ */ _("input", {
574
- type: "number",
575
- value: M.directService.config.minimumAdvancePayment,
576
- onChange: (e) => H("minimumAdvancePayment", parseInt(e.target.value) || 0),
577
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
578
- })] }),
579
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
580
- className: "block text-sm font-medium text-text-primary mb-1",
581
- children: "Service Radius (km)"
582
- }), /* @__PURE__ */ _("input", {
583
- type: "number",
584
- value: M.directService.config.serviceRadius,
585
- onChange: (e) => H("serviceRadius", parseInt(e.target.value) || 0),
586
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
587
- })] }),
588
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
589
- className: "block text-sm font-medium text-text-primary mb-1",
590
- children: "Estimated Arrival Time (min)"
591
- }), /* @__PURE__ */ _("input", {
592
- type: "number",
593
- value: M.directService.config.estimatedArrivalTime,
594
- onChange: (e) => H("estimatedArrivalTime", parseInt(e.target.value) || 0),
595
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
596
- })] }),
597
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
598
- className: "block text-sm font-medium text-text-primary mb-1",
599
- children: "Minimum Order Value (₹)"
600
- }), /* @__PURE__ */ _("input", {
601
- type: "number",
602
- value: M.directService.config.minimumOrderValue,
603
- onChange: (e) => H("minimumOrderValue", parseInt(e.target.value) || 0),
604
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
605
- })] })
606
- ]
607
- })]
608
- })
609
- ]
610
- })]
611
- }),
612
- /* @__PURE__ */ v("div", {
613
- className: "flex items-center justify-between pt-2",
614
- children: [/* @__PURE__ */ _("button", {
615
- type: "button",
616
- onClick: () => T("/cart-owner/dashboard"),
617
- className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
618
- children: "Cancel"
619
- }), /* @__PURE__ */ _("button", {
620
- type: "button",
621
- onClick: J,
622
- disabled: P,
623
- className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", P ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
624
- children: P ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(d, { className: "h-4 w-4" }), "Save Configuration"] })
625
- })]
626
- })
627
- ]
628
- })
629
- });
630
- };
631
- //#endregion
632
- export { T as CartServiceConfigPage };
633
-
634
- //# sourceMappingURL=CartServiceConfigPage.js.map