@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,714 +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, Bell as a, CheckCircle2 as o, Clock as s, Link2 as c, MapPin as l, Phone as u, Save as d, Shield as f, Store as p } from "lucide-react";
6
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
7
- import { EmphasisPanel as _ } from "@burdenoff/fe-libs/ui";
8
- //#region src/adaptercloud/pages/cart-owner/BusinessSettingsPage.tsx
9
- var v = [
10
- {
11
- id: "general",
12
- label: "General",
13
- icon: p
14
- },
15
- {
16
- id: "contact",
17
- label: "Contact",
18
- icon: u
19
- },
20
- {
21
- id: "location",
22
- label: "Location",
23
- icon: l
24
- },
25
- {
26
- id: "operating",
27
- label: "Operating",
28
- icon: s
29
- },
30
- {
31
- id: "policies",
32
- label: "Policies",
33
- icon: f
34
- },
35
- {
36
- id: "notifications",
37
- label: "Notifications",
38
- icon: a
39
- },
40
- {
41
- id: "integration",
42
- label: "Integrations",
43
- icon: c
44
- }
45
- ], y = [
46
- "Food & Beverage",
47
- "Personal Care & Beauty",
48
- "Repair & Maintenance",
49
- "Home Services",
50
- "Clothing & Fashion",
51
- "Health & Wellness",
52
- "Education & Skills",
53
- "Retail & Merchandise",
54
- "Grocery & Essentials"
55
- ], b = ({ label: e, value: t, onChange: n, type: r = "text", options: i, placeholder: a, hint: o, rows: s = 3 }) => {
56
- let c = e.toLowerCase().replace(/\s+/g, "-");
57
- return /* @__PURE__ */ g("div", { children: [
58
- /* @__PURE__ */ h("label", {
59
- htmlFor: c,
60
- className: "block text-sm font-medium text-text-primary mb-1.5",
61
- children: e
62
- }),
63
- r === "textarea" ? /* @__PURE__ */ h("textarea", {
64
- id: c,
65
- value: t,
66
- onChange: (e) => n(e.target.value),
67
- rows: s,
68
- placeholder: a,
69
- 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 focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
70
- }) : r === "select" ? /* @__PURE__ */ h("select", {
71
- id: c,
72
- value: t,
73
- onChange: (e) => n(e.target.value),
74
- className: "w-full 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)]",
75
- children: i?.map((e) => /* @__PURE__ */ h("option", {
76
- value: e,
77
- children: e
78
- }, e))
79
- }) : /* @__PURE__ */ h("input", {
80
- id: c,
81
- type: r,
82
- value: t,
83
- onChange: (e) => n(e.target.value),
84
- placeholder: a,
85
- 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 focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
86
- }),
87
- o && /* @__PURE__ */ h("p", {
88
- className: "mt-1 text-xs text-text-secondary",
89
- children: o
90
- })
91
- ] });
92
- }, x = ({ label: e, description: n, checked: r, onChange: i }) => /* @__PURE__ */ g("div", {
93
- className: "flex items-center justify-between py-3",
94
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
95
- className: "text-sm font-medium text-text-primary",
96
- children: e
97
- }), n && /* @__PURE__ */ h("p", {
98
- className: "text-xs text-text-secondary mt-0.5",
99
- children: n
100
- })] }), /* @__PURE__ */ h("button", {
101
- type: "button",
102
- onClick: () => i(!r),
103
- className: t("h-6 w-11 rounded-full transition-colors relative", r ? "bg-accent-blue-subtle" : "bg-muted-foreground/30"),
104
- children: /* @__PURE__ */ h("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", r ? "translate-x-5" : "translate-x-0.5") })
105
- })]
106
- }), S = () => {
107
- let { navigateTo: a } = e(), [s, c] = r("general"), [l, u] = r(!1), [f, S] = r(!1), [C, w] = r({
108
- businessName: "Dosa Express",
109
- description: "Authentic South Indian street food with a modern twist. Serving crispy dosas, filter coffee, and more since 2020.",
110
- category: "Food & Beverage",
111
- gstNumber: "29ABCDE1234F1Z5",
112
- panNumber: "ABCDE1234F",
113
- fssaiLicense: "12345678",
114
- establishedYear: "2020"
115
- }), [T, E] = r({
116
- phone: "+91-9876543210",
117
- email: "ravi@dosaexpress.in",
118
- website: "https://dosaexpress.in",
119
- whatsapp: "+91-9876543210",
120
- instagram: "@dosaexpress",
121
- twitter: "@dosaexpress",
122
- facebook: "dosaexpress"
123
- }), [D, O] = r({
124
- address: "Koramangala 5th Block",
125
- city: "Bangalore",
126
- state: "Karnataka",
127
- pincode: "560034",
128
- latitude: "12.9352",
129
- longitude: "77.6245",
130
- deliveryRadius: 5,
131
- deliveryCharge: 30,
132
- freeDeliveryAbove: 300
133
- }), [k, A] = r({
134
- autoAcceptOrders: !0,
135
- preparationTime: 15,
136
- maxConcurrentOrders: 10,
137
- advanceBookingDays: 3
138
- }), [j, M] = r({
139
- returnPolicy: "Items can be returned within 30 minutes of delivery if there are quality issues. Refund will be processed within 2-3 business days.",
140
- cancellationPolicy: "Orders can be cancelled within 2 minutes of placing. After preparation starts, cancellation is not allowed.",
141
- privacyPolicy: "We collect and process your data in accordance with applicable privacy laws. Your data is never shared with third parties without consent.",
142
- termsOfService: "By using our services, you agree to our terms. All prices are inclusive of taxes unless stated otherwise."
143
- }), [N, P] = r({
144
- newOrderEmail: !0,
145
- newOrderSms: !0,
146
- newOrderPush: !0,
147
- orderUpdateEmail: !0,
148
- orderUpdatePush: !0,
149
- dailySummaryEmail: !0,
150
- weeklySummaryEmail: !1,
151
- lowStockAlert: !0,
152
- reviewNotification: !0,
153
- marketingEmails: !1
154
- }), [F, I] = r({
155
- paymentGateway: "razorpay",
156
- paymentGatewayKey: "rzp_live_xxxxxxxx",
157
- smsProvider: "twilio",
158
- smsApiKey: "",
159
- analyticsId: ""
160
- }), L = () => {
161
- u(!0), setTimeout(() => {
162
- u(!1), S(!0), setTimeout(() => S(!1), 3e3);
163
- }, 1e3);
164
- }, R = (e) => (t) => w((n) => ({
165
- ...n,
166
- [e]: t
167
- })), z = (e) => (t) => E((n) => ({
168
- ...n,
169
- [e]: t
170
- })), B = (e) => (t) => O((n) => ({
171
- ...n,
172
- [e]: e === "deliveryRadius" || e === "deliveryCharge" || e === "freeDeliveryAbove" ? parseInt(t) || 0 : t
173
- })), V = (e) => (t) => M((n) => ({
174
- ...n,
175
- [e]: t
176
- })), H = (e) => (t) => P((n) => ({
177
- ...n,
178
- [e]: t
179
- })), U = (e) => (t) => I((n) => ({
180
- ...n,
181
- [e]: t
182
- }));
183
- return v.find((e) => e.id === s)?.icon, /* @__PURE__ */ g(n, {
184
- title: "Business Settings",
185
- description: "Manage your business profile and configuration",
186
- purpose: "Control how your cart works behind the scenes — business details, operating preferences, payment and payout setup, and whether orders are accepted automatically. Get these right once and your day-to-day runs on autopilot.",
187
- actions: /* @__PURE__ */ h("button", {
188
- type: "button",
189
- onClick: L,
190
- disabled: l,
191
- className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", f ? "bg-status-success-bg-subtle/10 text-status-success-text" : l ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
192
- children: l ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : f ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(o, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(d, { className: "h-4 w-4" }), "Save Settings"] })
193
- }),
194
- children: [/* @__PURE__ */ g(_, {
195
- className: "mb-6 flex items-start gap-3 p-4",
196
- children: [/* @__PURE__ */ h(p, {
197
- className: "h-5 w-5 shrink-0 text-text-secondary",
198
- "aria-hidden": "true"
199
- }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
200
- className: "text-sm font-semibold text-text-primary",
201
- children: "Set this up once, run on autopilot"
202
- }), /* @__PURE__ */ h("p", {
203
- className: "mt-0.5 text-sm text-text-secondary",
204
- children: "Your business details, payment and payout setup, and order preferences live across these tabs. Getting them right means smoother orders and faster payouts every day."
205
- })] })]
206
- }), /* @__PURE__ */ g("div", {
207
- className: "flex flex-col lg:flex-row gap-6",
208
- children: [
209
- /* @__PURE__ */ h("div", {
210
- className: "lg:hidden",
211
- children: /* @__PURE__ */ h("div", {
212
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3 shadow-sm",
213
- children: /* @__PURE__ */ h("div", {
214
- className: "grid grid-cols-4 gap-2",
215
- children: v.map((e) => {
216
- let n = e.icon;
217
- return /* @__PURE__ */ g("button", {
218
- type: "button",
219
- onClick: () => c(e.id),
220
- className: t("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors", s === e.id ? "bg-accent text-text-primary" : "text-text-secondary hover:bg-bg-sunken"),
221
- children: [/* @__PURE__ */ h(n, { className: "h-4 w-4" }), /* @__PURE__ */ h("span", {
222
- className: "hidden sm:inline",
223
- children: e.label
224
- })]
225
- }, e.id);
226
- })
227
- })
228
- })
229
- }),
230
- /* @__PURE__ */ h("div", {
231
- className: "hidden lg:block lg:w-56 shrink-0",
232
- children: /* @__PURE__ */ g("div", {
233
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm sticky top-24",
234
- children: [/* @__PURE__ */ h("div", {
235
- className: "p-4 border-b border-border-subtle",
236
- children: /* @__PURE__ */ h("h2", {
237
- className: "font-semibold text-text-primary text-sm",
238
- children: "Settings"
239
- })
240
- }), /* @__PURE__ */ h("nav", {
241
- className: "p-2",
242
- children: v.map((e) => {
243
- let n = e.icon;
244
- return /* @__PURE__ */ g("button", {
245
- type: "button",
246
- onClick: () => c(e.id),
247
- className: t("w-full text-left px-3 py-2 rounded-md mb-1 flex items-center gap-3 text-sm transition-colors", s === e.id ? "bg-accent text-text-primary font-medium" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
248
- children: [/* @__PURE__ */ h(n, { className: "h-4 w-4" }), e.label]
249
- }, e.id);
250
- })
251
- })]
252
- })
253
- }),
254
- /* @__PURE__ */ h("div", {
255
- className: "flex-1 min-w-0",
256
- children: /* @__PURE__ */ g("div", {
257
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 sm:p-6 bg-gloss-card shadow-pop",
258
- children: [
259
- s === "general" && /* @__PURE__ */ g("div", {
260
- className: "space-y-5",
261
- children: [
262
- /* @__PURE__ */ h(b, {
263
- label: "Business Name",
264
- value: C.businessName,
265
- onChange: R("businessName")
266
- }),
267
- /* @__PURE__ */ h(b, {
268
- label: "Description",
269
- value: C.description,
270
- onChange: R("description"),
271
- type: "textarea"
272
- }),
273
- /* @__PURE__ */ g("div", {
274
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
275
- children: [/* @__PURE__ */ h(b, {
276
- label: "Category",
277
- value: C.category,
278
- onChange: R("category"),
279
- type: "select",
280
- options: y
281
- }), /* @__PURE__ */ h(b, {
282
- label: "Established Year",
283
- value: C.establishedYear,
284
- onChange: R("establishedYear")
285
- })]
286
- }),
287
- /* @__PURE__ */ g("div", {
288
- className: "flex items-start gap-3 rounded-md bg-accent-blue-subtle/5 border border-accent-blue-subtle/20 p-3",
289
- children: [/* @__PURE__ */ h(i, { className: "h-4 w-4 text-accent-blue shrink-0 mt-0.5" }), /* @__PURE__ */ h("p", {
290
- className: "text-xs text-accent-blue",
291
- children: "GST, PAN, and FSSAI details are used for invoicing and compliance. Changes require verification."
292
- })]
293
- }),
294
- /* @__PURE__ */ g("div", {
295
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
296
- children: [
297
- /* @__PURE__ */ h(b, {
298
- label: "GST Number",
299
- value: C.gstNumber,
300
- onChange: R("gstNumber"),
301
- hint: "15-digit GST ID"
302
- }),
303
- /* @__PURE__ */ h(b, {
304
- label: "PAN Number",
305
- value: C.panNumber,
306
- onChange: R("panNumber"),
307
- hint: "10-digit PAN"
308
- }),
309
- /* @__PURE__ */ h(b, {
310
- label: "FSSAI License",
311
- value: C.fssaiLicense,
312
- onChange: R("fssaiLicense"),
313
- hint: "FSSAI license number"
314
- })
315
- ]
316
- })
317
- ]
318
- }),
319
- s === "contact" && /* @__PURE__ */ g("div", {
320
- className: "space-y-5",
321
- children: [
322
- /* @__PURE__ */ g("div", {
323
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
324
- children: [/* @__PURE__ */ h(b, {
325
- label: "Phone",
326
- value: T.phone,
327
- onChange: z("phone"),
328
- type: "tel"
329
- }), /* @__PURE__ */ h(b, {
330
- label: "Email",
331
- value: T.email,
332
- onChange: z("email"),
333
- type: "email"
334
- })]
335
- }),
336
- /* @__PURE__ */ g("div", {
337
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
338
- children: [/* @__PURE__ */ h(b, {
339
- label: "Website",
340
- value: T.website,
341
- onChange: z("website"),
342
- type: "url",
343
- placeholder: "https://"
344
- }), /* @__PURE__ */ h(b, {
345
- label: "WhatsApp",
346
- value: T.whatsapp,
347
- onChange: z("whatsapp"),
348
- type: "tel"
349
- })]
350
- }),
351
- /* @__PURE__ */ h("h3", {
352
- className: "text-sm font-semibold text-text-primary pt-2",
353
- children: "Social Media"
354
- }),
355
- /* @__PURE__ */ g("div", {
356
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
357
- children: [
358
- /* @__PURE__ */ h(b, {
359
- label: "Instagram",
360
- value: T.instagram,
361
- onChange: z("instagram"),
362
- placeholder: "@handle"
363
- }),
364
- /* @__PURE__ */ h(b, {
365
- label: "Twitter / X",
366
- value: T.twitter,
367
- onChange: z("twitter"),
368
- placeholder: "@handle"
369
- }),
370
- /* @__PURE__ */ h(b, {
371
- label: "Facebook",
372
- value: T.facebook,
373
- onChange: z("facebook"),
374
- placeholder: "Page name"
375
- })
376
- ]
377
- })
378
- ]
379
- }),
380
- s === "location" && /* @__PURE__ */ g("div", {
381
- className: "space-y-5",
382
- children: [
383
- /* @__PURE__ */ h(b, {
384
- label: "Address",
385
- value: D.address,
386
- onChange: B("address"),
387
- type: "textarea",
388
- rows: 2
389
- }),
390
- /* @__PURE__ */ g("div", {
391
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
392
- children: [
393
- /* @__PURE__ */ h(b, {
394
- label: "City",
395
- value: D.city,
396
- onChange: B("city")
397
- }),
398
- /* @__PURE__ */ h(b, {
399
- label: "State",
400
- value: D.state,
401
- onChange: B("state")
402
- }),
403
- /* @__PURE__ */ h(b, {
404
- label: "Pincode",
405
- value: D.pincode,
406
- onChange: B("pincode")
407
- })
408
- ]
409
- }),
410
- /* @__PURE__ */ g("div", {
411
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
412
- children: [/* @__PURE__ */ h(b, {
413
- label: "Latitude",
414
- value: D.latitude,
415
- onChange: B("latitude"),
416
- hint: "e.g., 12.9352"
417
- }), /* @__PURE__ */ h(b, {
418
- label: "Longitude",
419
- value: D.longitude,
420
- onChange: B("longitude"),
421
- hint: "e.g., 77.6245"
422
- })]
423
- }),
424
- /* @__PURE__ */ h("h3", {
425
- className: "text-sm font-semibold text-text-primary pt-2",
426
- children: "Delivery Settings"
427
- }),
428
- /* @__PURE__ */ g("div", {
429
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
430
- children: [
431
- /* @__PURE__ */ h(b, {
432
- label: "Delivery Radius (km)",
433
- value: D.deliveryRadius,
434
- onChange: B("deliveryRadius"),
435
- type: "number"
436
- }),
437
- /* @__PURE__ */ h(b, {
438
- label: "Delivery Charge (₹)",
439
- value: D.deliveryCharge,
440
- onChange: B("deliveryCharge"),
441
- type: "number"
442
- }),
443
- /* @__PURE__ */ h(b, {
444
- label: "Free Delivery Above (₹)",
445
- value: D.freeDeliveryAbove,
446
- onChange: B("freeDeliveryAbove"),
447
- type: "number"
448
- })
449
- ]
450
- })
451
- ]
452
- }),
453
- s === "operating" && /* @__PURE__ */ g("div", {
454
- className: "space-y-5",
455
- children: [/* @__PURE__ */ h(x, {
456
- label: "Auto-Accept Orders",
457
- description: "Automatically accept incoming orders without manual confirmation",
458
- checked: k.autoAcceptOrders,
459
- onChange: (e) => A((t) => ({
460
- ...t,
461
- autoAcceptOrders: e
462
- }))
463
- }), /* @__PURE__ */ g("div", {
464
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
465
- children: [
466
- /* @__PURE__ */ h(b, {
467
- label: "Default Preparation Time (min)",
468
- value: k.preparationTime,
469
- onChange: (e) => A((t) => ({
470
- ...t,
471
- preparationTime: parseInt(e) || 0
472
- })),
473
- type: "number"
474
- }),
475
- /* @__PURE__ */ h(b, {
476
- label: "Max Concurrent Orders",
477
- value: k.maxConcurrentOrders,
478
- onChange: (e) => A((t) => ({
479
- ...t,
480
- maxConcurrentOrders: parseInt(e) || 0
481
- })),
482
- type: "number"
483
- }),
484
- /* @__PURE__ */ h(b, {
485
- label: "Advance Booking (days)",
486
- value: k.advanceBookingDays,
487
- onChange: (e) => A((t) => ({
488
- ...t,
489
- advanceBookingDays: parseInt(e) || 0
490
- })),
491
- type: "number"
492
- })
493
- ]
494
- })]
495
- }),
496
- s === "policies" && /* @__PURE__ */ g("div", {
497
- className: "space-y-5",
498
- children: [
499
- /* @__PURE__ */ h(b, {
500
- label: "Return Policy",
501
- value: j.returnPolicy,
502
- onChange: V("returnPolicy"),
503
- type: "textarea",
504
- rows: 4
505
- }),
506
- /* @__PURE__ */ h(b, {
507
- label: "Cancellation Policy",
508
- value: j.cancellationPolicy,
509
- onChange: V("cancellationPolicy"),
510
- type: "textarea",
511
- rows: 4
512
- }),
513
- /* @__PURE__ */ h(b, {
514
- label: "Privacy Policy",
515
- value: j.privacyPolicy,
516
- onChange: V("privacyPolicy"),
517
- type: "textarea",
518
- rows: 4
519
- }),
520
- /* @__PURE__ */ h(b, {
521
- label: "Terms of Service",
522
- value: j.termsOfService,
523
- onChange: V("termsOfService"),
524
- type: "textarea",
525
- rows: 4
526
- })
527
- ]
528
- }),
529
- s === "notifications" && /* @__PURE__ */ g("div", {
530
- className: "space-y-1 divide-y divide-border",
531
- children: [
532
- /* @__PURE__ */ h("h3", {
533
- className: "text-sm font-semibold text-text-primary pb-2",
534
- children: "New Orders"
535
- }),
536
- /* @__PURE__ */ h(x, {
537
- label: "Email Notification",
538
- description: "Receive email for new orders",
539
- checked: N.newOrderEmail,
540
- onChange: H("newOrderEmail")
541
- }),
542
- /* @__PURE__ */ h(x, {
543
- label: "SMS Notification",
544
- description: "Receive SMS for new orders",
545
- checked: N.newOrderSms,
546
- onChange: H("newOrderSms")
547
- }),
548
- /* @__PURE__ */ h(x, {
549
- label: "Push Notification",
550
- description: "Receive push notifications for new orders",
551
- checked: N.newOrderPush,
552
- onChange: H("newOrderPush")
553
- }),
554
- /* @__PURE__ */ h("h3", {
555
- className: "text-sm font-semibold text-text-primary pt-4 pb-2",
556
- children: "Order Updates"
557
- }),
558
- /* @__PURE__ */ h(x, {
559
- label: "Email Updates",
560
- description: "Get email when order status changes",
561
- checked: N.orderUpdateEmail,
562
- onChange: H("orderUpdateEmail")
563
- }),
564
- /* @__PURE__ */ h(x, {
565
- label: "Push Updates",
566
- description: "Get push notifications for order updates",
567
- checked: N.orderUpdatePush,
568
- onChange: H("orderUpdatePush")
569
- }),
570
- /* @__PURE__ */ h("h3", {
571
- className: "text-sm font-semibold text-text-primary pt-4 pb-2",
572
- children: "Reports & Alerts"
573
- }),
574
- /* @__PURE__ */ h(x, {
575
- label: "Daily Summary",
576
- description: "Receive daily business summary email",
577
- checked: N.dailySummaryEmail,
578
- onChange: H("dailySummaryEmail")
579
- }),
580
- /* @__PURE__ */ h(x, {
581
- label: "Weekly Summary",
582
- description: "Receive weekly performance report",
583
- checked: N.weeklySummaryEmail,
584
- onChange: H("weeklySummaryEmail")
585
- }),
586
- /* @__PURE__ */ h(x, {
587
- label: "Low Stock Alert",
588
- description: "Get alerted when items are low on stock",
589
- checked: N.lowStockAlert,
590
- onChange: H("lowStockAlert")
591
- }),
592
- /* @__PURE__ */ h(x, {
593
- label: "Review Notifications",
594
- description: "Get notified for new customer reviews",
595
- checked: N.reviewNotification,
596
- onChange: H("reviewNotification")
597
- }),
598
- /* @__PURE__ */ h(x, {
599
- label: "Marketing Emails",
600
- description: "Receive tips and promotional content",
601
- checked: N.marketingEmails,
602
- onChange: H("marketingEmails")
603
- })
604
- ]
605
- }),
606
- s === "integration" && /* @__PURE__ */ g("div", {
607
- className: "space-y-5",
608
- children: [
609
- /* @__PURE__ */ h("h3", {
610
- className: "text-sm font-semibold text-text-primary",
611
- children: "Payment Gateway"
612
- }),
613
- /* @__PURE__ */ g("div", {
614
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
615
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
616
- className: "block text-sm font-medium text-text-primary mb-1.5",
617
- children: "Provider"
618
- }), /* @__PURE__ */ g("select", {
619
- value: F.paymentGateway,
620
- onChange: (e) => U("paymentGateway")(e.target.value),
621
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
622
- children: [
623
- /* @__PURE__ */ h("option", {
624
- value: "razorpay",
625
- children: "Razorpay"
626
- }),
627
- /* @__PURE__ */ h("option", {
628
- value: "paytm",
629
- children: "Paytm"
630
- }),
631
- /* @__PURE__ */ h("option", {
632
- value: "stripe",
633
- children: "Stripe"
634
- }),
635
- /* @__PURE__ */ h("option", {
636
- value: "phonepe",
637
- children: "PhonePe"
638
- })
639
- ]
640
- })] }), /* @__PURE__ */ h(b, {
641
- label: "API Key",
642
- value: F.paymentGatewayKey,
643
- onChange: U("paymentGatewayKey"),
644
- placeholder: "Enter API key",
645
- hint: "Keep this secret"
646
- })]
647
- }),
648
- /* @__PURE__ */ h("h3", {
649
- className: "text-sm font-semibold text-text-primary pt-2",
650
- children: "SMS Provider"
651
- }),
652
- /* @__PURE__ */ g("div", {
653
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
654
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
655
- className: "block text-sm font-medium text-text-primary mb-1.5",
656
- children: "Provider"
657
- }), /* @__PURE__ */ g("select", {
658
- value: F.smsProvider,
659
- onChange: (e) => U("smsProvider")(e.target.value),
660
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
661
- children: [
662
- /* @__PURE__ */ h("option", {
663
- value: "twilio",
664
- children: "Twilio"
665
- }),
666
- /* @__PURE__ */ h("option", {
667
- value: "msg91",
668
- children: "MSG91"
669
- }),
670
- /* @__PURE__ */ h("option", {
671
- value: "textlocal",
672
- children: "Textlocal"
673
- })
674
- ]
675
- })] }), /* @__PURE__ */ h(b, {
676
- label: "SMS API Key",
677
- value: F.smsApiKey,
678
- onChange: U("smsApiKey"),
679
- placeholder: "Enter SMS API key"
680
- })]
681
- }),
682
- /* @__PURE__ */ h("h3", {
683
- className: "text-sm font-semibold text-text-primary pt-2",
684
- children: "Analytics"
685
- }),
686
- /* @__PURE__ */ h(b, {
687
- label: "Google Analytics ID",
688
- value: F.analyticsId,
689
- onChange: U("analyticsId"),
690
- placeholder: "GA-XXXXXXXXX"
691
- })
692
- ]
693
- }),
694
- /* @__PURE__ */ h("div", {
695
- className: "flex justify-end mt-8 pt-6 border-t border-border-subtle",
696
- children: /* @__PURE__ */ h("button", {
697
- type: "button",
698
- onClick: L,
699
- disabled: l,
700
- className: t("inline-flex items-center gap-2 rounded-md px-6 py-2 text-sm font-medium transition-colors", f ? "bg-status-success-bg-subtle/10 text-status-success-text" : l ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
701
- children: l ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : f ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(o, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(d, { className: "h-4 w-4" }), "Save Settings"] })
702
- })
703
- })
704
- ]
705
- })
706
- })
707
- ]
708
- })]
709
- });
710
- };
711
- //#endregion
712
- export { S as BusinessSettingsPage };
713
-
714
- //# sourceMappingURL=BusinessSettingsPage.js.map