@burdenoff/microfe-subscriberbot 2026.626.2 → 2026.629.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,705 +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 { useState as r } from "react";
5
- import { AlertCircle as i, Bell as a, Building2 as o, CheckCircle2 as s, Clock as c, Link2 as l, MapPin as u, Phone as d, Save as f, Shield as p, Store as m } from "lucide-react";
6
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
7
- import { EmphasisPanel as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
8
- //#region src/subscriberbot/pages/cart-owner/BusinessSettingsPage.tsx
9
- var b = [
10
- {
11
- id: "general",
12
- label: "General",
13
- icon: m
14
- },
15
- {
16
- id: "contact",
17
- label: "Contact",
18
- icon: d
19
- },
20
- {
21
- id: "location",
22
- label: "Location",
23
- icon: u
24
- },
25
- {
26
- id: "operating",
27
- label: "Operating",
28
- icon: c
29
- },
30
- {
31
- id: "policies",
32
- label: "Policies",
33
- icon: p
34
- },
35
- {
36
- id: "notifications",
37
- label: "Notifications",
38
- icon: a
39
- },
40
- {
41
- id: "integration",
42
- label: "Integrations",
43
- icon: l
44
- }
45
- ], x = [
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
- ], S = ({ 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__ */ _("div", { children: [
58
- /* @__PURE__ */ g("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__ */ g("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-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"
70
- }) : r === "select" ? /* @__PURE__ */ g("select", {
71
- id: c,
72
- value: t,
73
- onChange: (e) => n(e.target.value),
74
- className: "w-full rounded-md border border-border-seam 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__ */ g("option", {
76
- value: e,
77
- children: e
78
- }, e))
79
- }) : /* @__PURE__ */ g("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-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)]"
86
- }),
87
- o && /* @__PURE__ */ g("p", {
88
- className: "mt-1 text-xs text-text-secondary",
89
- children: o
90
- })
91
- ] });
92
- }, C = ({ label: e, description: n, checked: r, onChange: i }) => /* @__PURE__ */ _("div", {
93
- className: "flex items-center justify-between py-3",
94
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
95
- className: "text-sm font-medium text-text-primary",
96
- children: e
97
- }), n && /* @__PURE__ */ g("p", {
98
- className: "text-xs text-text-secondary mt-0.5",
99
- children: n
100
- })] }), /* @__PURE__ */ g("button", {
101
- type: "button",
102
- onClick: () => i(!r),
103
- className: t("h-6 w-11 rounded-full transition-colors relative", r ? "bg-status-info-text" : "bg-muted-foreground/30"),
104
- children: /* @__PURE__ */ g("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-bg-surface transition-transform", r ? "translate-x-5" : "translate-x-0.5") })
105
- })]
106
- }), w = () => {
107
- let { navigateTo: a } = e(), [c, l] = r("general"), [u, d] = r(!1), [p, m] = r(!1), [w, T] = 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
- }), [E, D] = 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
- }), [O, k] = 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
- }), [A, j] = r({
134
- autoAcceptOrders: !0,
135
- preparationTime: 15,
136
- maxConcurrentOrders: 10,
137
- advanceBookingDays: 3
138
- }), [M, N] = 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
- }), [P, F] = 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
- }), [I, L] = r({
155
- paymentGateway: "razorpay",
156
- paymentGatewayKey: "rzp_live_xxxxxxxx",
157
- smsProvider: "twilio",
158
- smsApiKey: "",
159
- analyticsId: ""
160
- }), R = () => {
161
- d(!0), setTimeout(() => {
162
- d(!1), m(!0), setTimeout(() => m(!1), 3e3);
163
- }, 1e3);
164
- }, z = (e) => (t) => T((n) => ({
165
- ...n,
166
- [e]: t
167
- })), B = (e) => (t) => D((n) => ({
168
- ...n,
169
- [e]: t
170
- })), V = (e) => (t) => k((n) => ({
171
- ...n,
172
- [e]: e === "deliveryRadius" || e === "deliveryCharge" || e === "freeDeliveryAbove" ? parseInt(t) || 0 : t
173
- })), H = (e) => (t) => N((n) => ({
174
- ...n,
175
- [e]: t
176
- })), U = (e) => (t) => F((n) => ({
177
- ...n,
178
- [e]: t
179
- })), W = (e) => (t) => L((n) => ({
180
- ...n,
181
- [e]: t
182
- }));
183
- return b.find((e) => e.id === c)?.icon, /* @__PURE__ */ _(n, {
184
- title: "Business Settings",
185
- description: "Manage your business profile and configuration",
186
- actions: /* @__PURE__ */ g("button", {
187
- type: "button",
188
- onClick: R,
189
- disabled: u,
190
- className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", p ? "bg-status-success-bg/10 text-status-success-text" : u ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
191
- children: u ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : p ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(s, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), "Save Settings"] })
192
- }),
193
- children: [/* @__PURE__ */ g(y, {
194
- icon: /* @__PURE__ */ g(o, { className: "h-4 w-4" }),
195
- className: "mb-6",
196
- children: "Your single source of truth for how your business presents itself. Update your name, contact details, location, operating hours, policies and integrations — all in one place. These details power your public profile and order rules, so keep them current and remember to save before you leave a tab."
197
- }), /* @__PURE__ */ _("div", {
198
- className: "flex flex-col lg:flex-row gap-6",
199
- children: [
200
- /* @__PURE__ */ g("div", {
201
- className: "lg:hidden",
202
- children: /* @__PURE__ */ g("div", {
203
- className: "rounded-lg border border-border-seam bg-bg-surface p-3 shadow-sm",
204
- children: /* @__PURE__ */ g("div", {
205
- className: "grid grid-cols-4 gap-2",
206
- children: b.map((e) => {
207
- let n = e.icon;
208
- return /* @__PURE__ */ _("button", {
209
- type: "button",
210
- onClick: () => l(e.id),
211
- className: t("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors", c === e.id ? "bg-accent text-text-primary" : "text-text-secondary hover:bg-bg-sunken"),
212
- children: [/* @__PURE__ */ g(n, { className: "h-4 w-4" }), /* @__PURE__ */ g("span", {
213
- className: "hidden sm:inline",
214
- children: e.label
215
- })]
216
- }, e.id);
217
- })
218
- })
219
- })
220
- }),
221
- /* @__PURE__ */ g("div", {
222
- className: "hidden lg:block lg:w-56 shrink-0",
223
- children: /* @__PURE__ */ _("div", {
224
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm sticky top-24",
225
- children: [/* @__PURE__ */ g("div", {
226
- className: "p-4 border-b border-border-seam",
227
- children: /* @__PURE__ */ g("h2", {
228
- className: "font-semibold text-text-primary text-sm",
229
- children: "Settings"
230
- })
231
- }), /* @__PURE__ */ g("nav", {
232
- className: "p-2",
233
- children: b.map((e) => {
234
- let n = e.icon;
235
- return /* @__PURE__ */ _("button", {
236
- type: "button",
237
- onClick: () => l(e.id),
238
- className: t("w-full text-left px-3 py-2 rounded-md mb-1 flex items-center gap-3 text-sm transition-colors", c === e.id ? "bg-accent text-text-primary font-medium" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
239
- children: [/* @__PURE__ */ g(n, { className: "h-4 w-4" }), e.label]
240
- }, e.id);
241
- })
242
- })]
243
- })
244
- }),
245
- /* @__PURE__ */ g("div", {
246
- className: "flex-1 min-w-0",
247
- children: /* @__PURE__ */ _(v, {
248
- className: "p-5 sm:p-6",
249
- children: [
250
- c === "general" && /* @__PURE__ */ _("div", {
251
- className: "space-y-5",
252
- children: [
253
- /* @__PURE__ */ g(S, {
254
- label: "Business Name",
255
- value: w.businessName,
256
- onChange: z("businessName")
257
- }),
258
- /* @__PURE__ */ g(S, {
259
- label: "Description",
260
- value: w.description,
261
- onChange: z("description"),
262
- type: "textarea"
263
- }),
264
- /* @__PURE__ */ _("div", {
265
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
266
- children: [/* @__PURE__ */ g(S, {
267
- label: "Category",
268
- value: w.category,
269
- onChange: z("category"),
270
- type: "select",
271
- options: x
272
- }), /* @__PURE__ */ g(S, {
273
- label: "Established Year",
274
- value: w.establishedYear,
275
- onChange: z("establishedYear")
276
- })]
277
- }),
278
- /* @__PURE__ */ _("div", {
279
- className: "flex items-start gap-3 rounded-md bg-status-info-bg/5 border border-status-info-border/20 p-3",
280
- children: [/* @__PURE__ */ g(i, { className: "h-4 w-4 text-status-info-text shrink-0 mt-0.5" }), /* @__PURE__ */ g("p", {
281
- className: "text-xs text-status-info-text",
282
- children: "GST, PAN, and FSSAI details are used for invoicing and compliance. Changes require verification."
283
- })]
284
- }),
285
- /* @__PURE__ */ _("div", {
286
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
287
- children: [
288
- /* @__PURE__ */ g(S, {
289
- label: "GST Number",
290
- value: w.gstNumber,
291
- onChange: z("gstNumber"),
292
- hint: "15-digit GST ID"
293
- }),
294
- /* @__PURE__ */ g(S, {
295
- label: "PAN Number",
296
- value: w.panNumber,
297
- onChange: z("panNumber"),
298
- hint: "10-digit PAN"
299
- }),
300
- /* @__PURE__ */ g(S, {
301
- label: "FSSAI License",
302
- value: w.fssaiLicense,
303
- onChange: z("fssaiLicense"),
304
- hint: "FSSAI license number"
305
- })
306
- ]
307
- })
308
- ]
309
- }),
310
- c === "contact" && /* @__PURE__ */ _("div", {
311
- className: "space-y-5",
312
- children: [
313
- /* @__PURE__ */ _("div", {
314
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
315
- children: [/* @__PURE__ */ g(S, {
316
- label: "Phone",
317
- value: E.phone,
318
- onChange: B("phone"),
319
- type: "tel"
320
- }), /* @__PURE__ */ g(S, {
321
- label: "Email",
322
- value: E.email,
323
- onChange: B("email"),
324
- type: "email"
325
- })]
326
- }),
327
- /* @__PURE__ */ _("div", {
328
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
329
- children: [/* @__PURE__ */ g(S, {
330
- label: "Website",
331
- value: E.website,
332
- onChange: B("website"),
333
- type: "url",
334
- placeholder: "https://"
335
- }), /* @__PURE__ */ g(S, {
336
- label: "WhatsApp",
337
- value: E.whatsapp,
338
- onChange: B("whatsapp"),
339
- type: "tel"
340
- })]
341
- }),
342
- /* @__PURE__ */ g("h3", {
343
- className: "text-sm font-semibold text-text-primary pt-2",
344
- children: "Social Media"
345
- }),
346
- /* @__PURE__ */ _("div", {
347
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
348
- children: [
349
- /* @__PURE__ */ g(S, {
350
- label: "Instagram",
351
- value: E.instagram,
352
- onChange: B("instagram"),
353
- placeholder: "@handle"
354
- }),
355
- /* @__PURE__ */ g(S, {
356
- label: "Twitter / X",
357
- value: E.twitter,
358
- onChange: B("twitter"),
359
- placeholder: "@handle"
360
- }),
361
- /* @__PURE__ */ g(S, {
362
- label: "Facebook",
363
- value: E.facebook,
364
- onChange: B("facebook"),
365
- placeholder: "Page name"
366
- })
367
- ]
368
- })
369
- ]
370
- }),
371
- c === "location" && /* @__PURE__ */ _("div", {
372
- className: "space-y-5",
373
- children: [
374
- /* @__PURE__ */ g(S, {
375
- label: "Address",
376
- value: O.address,
377
- onChange: V("address"),
378
- type: "textarea",
379
- rows: 2
380
- }),
381
- /* @__PURE__ */ _("div", {
382
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
383
- children: [
384
- /* @__PURE__ */ g(S, {
385
- label: "City",
386
- value: O.city,
387
- onChange: V("city")
388
- }),
389
- /* @__PURE__ */ g(S, {
390
- label: "State",
391
- value: O.state,
392
- onChange: V("state")
393
- }),
394
- /* @__PURE__ */ g(S, {
395
- label: "Pincode",
396
- value: O.pincode,
397
- onChange: V("pincode")
398
- })
399
- ]
400
- }),
401
- /* @__PURE__ */ _("div", {
402
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
403
- children: [/* @__PURE__ */ g(S, {
404
- label: "Latitude",
405
- value: O.latitude,
406
- onChange: V("latitude"),
407
- hint: "e.g., 12.9352"
408
- }), /* @__PURE__ */ g(S, {
409
- label: "Longitude",
410
- value: O.longitude,
411
- onChange: V("longitude"),
412
- hint: "e.g., 77.6245"
413
- })]
414
- }),
415
- /* @__PURE__ */ g("h3", {
416
- className: "text-sm font-semibold text-text-primary pt-2",
417
- children: "Delivery Settings"
418
- }),
419
- /* @__PURE__ */ _("div", {
420
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
421
- children: [
422
- /* @__PURE__ */ g(S, {
423
- label: "Delivery Radius (km)",
424
- value: O.deliveryRadius,
425
- onChange: V("deliveryRadius"),
426
- type: "number"
427
- }),
428
- /* @__PURE__ */ g(S, {
429
- label: "Delivery Charge (₹)",
430
- value: O.deliveryCharge,
431
- onChange: V("deliveryCharge"),
432
- type: "number"
433
- }),
434
- /* @__PURE__ */ g(S, {
435
- label: "Free Delivery Above (₹)",
436
- value: O.freeDeliveryAbove,
437
- onChange: V("freeDeliveryAbove"),
438
- type: "number"
439
- })
440
- ]
441
- })
442
- ]
443
- }),
444
- c === "operating" && /* @__PURE__ */ _("div", {
445
- className: "space-y-5",
446
- children: [/* @__PURE__ */ g(C, {
447
- label: "Auto-Accept Orders",
448
- description: "Automatically accept incoming orders without manual confirmation",
449
- checked: A.autoAcceptOrders,
450
- onChange: (e) => j((t) => ({
451
- ...t,
452
- autoAcceptOrders: e
453
- }))
454
- }), /* @__PURE__ */ _("div", {
455
- className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
456
- children: [
457
- /* @__PURE__ */ g(S, {
458
- label: "Default Preparation Time (min)",
459
- value: A.preparationTime,
460
- onChange: (e) => j((t) => ({
461
- ...t,
462
- preparationTime: parseInt(e) || 0
463
- })),
464
- type: "number"
465
- }),
466
- /* @__PURE__ */ g(S, {
467
- label: "Max Concurrent Orders",
468
- value: A.maxConcurrentOrders,
469
- onChange: (e) => j((t) => ({
470
- ...t,
471
- maxConcurrentOrders: parseInt(e) || 0
472
- })),
473
- type: "number"
474
- }),
475
- /* @__PURE__ */ g(S, {
476
- label: "Advance Booking (days)",
477
- value: A.advanceBookingDays,
478
- onChange: (e) => j((t) => ({
479
- ...t,
480
- advanceBookingDays: parseInt(e) || 0
481
- })),
482
- type: "number"
483
- })
484
- ]
485
- })]
486
- }),
487
- c === "policies" && /* @__PURE__ */ _("div", {
488
- className: "space-y-5",
489
- children: [
490
- /* @__PURE__ */ g(S, {
491
- label: "Return Policy",
492
- value: M.returnPolicy,
493
- onChange: H("returnPolicy"),
494
- type: "textarea",
495
- rows: 4
496
- }),
497
- /* @__PURE__ */ g(S, {
498
- label: "Cancellation Policy",
499
- value: M.cancellationPolicy,
500
- onChange: H("cancellationPolicy"),
501
- type: "textarea",
502
- rows: 4
503
- }),
504
- /* @__PURE__ */ g(S, {
505
- label: "Privacy Policy",
506
- value: M.privacyPolicy,
507
- onChange: H("privacyPolicy"),
508
- type: "textarea",
509
- rows: 4
510
- }),
511
- /* @__PURE__ */ g(S, {
512
- label: "Terms of Service",
513
- value: M.termsOfService,
514
- onChange: H("termsOfService"),
515
- type: "textarea",
516
- rows: 4
517
- })
518
- ]
519
- }),
520
- c === "notifications" && /* @__PURE__ */ _("div", {
521
- className: "space-y-1 divide-y divide-border",
522
- children: [
523
- /* @__PURE__ */ g("h3", {
524
- className: "text-sm font-semibold text-text-primary pb-2",
525
- children: "New Orders"
526
- }),
527
- /* @__PURE__ */ g(C, {
528
- label: "Email Notification",
529
- description: "Receive email for new orders",
530
- checked: P.newOrderEmail,
531
- onChange: U("newOrderEmail")
532
- }),
533
- /* @__PURE__ */ g(C, {
534
- label: "SMS Notification",
535
- description: "Receive SMS for new orders",
536
- checked: P.newOrderSms,
537
- onChange: U("newOrderSms")
538
- }),
539
- /* @__PURE__ */ g(C, {
540
- label: "Push Notification",
541
- description: "Receive push notifications for new orders",
542
- checked: P.newOrderPush,
543
- onChange: U("newOrderPush")
544
- }),
545
- /* @__PURE__ */ g("h3", {
546
- className: "text-sm font-semibold text-text-primary pt-4 pb-2",
547
- children: "Order Updates"
548
- }),
549
- /* @__PURE__ */ g(C, {
550
- label: "Email Updates",
551
- description: "Get email when order status changes",
552
- checked: P.orderUpdateEmail,
553
- onChange: U("orderUpdateEmail")
554
- }),
555
- /* @__PURE__ */ g(C, {
556
- label: "Push Updates",
557
- description: "Get push notifications for order updates",
558
- checked: P.orderUpdatePush,
559
- onChange: U("orderUpdatePush")
560
- }),
561
- /* @__PURE__ */ g("h3", {
562
- className: "text-sm font-semibold text-text-primary pt-4 pb-2",
563
- children: "Reports & Alerts"
564
- }),
565
- /* @__PURE__ */ g(C, {
566
- label: "Daily Summary",
567
- description: "Receive daily business summary email",
568
- checked: P.dailySummaryEmail,
569
- onChange: U("dailySummaryEmail")
570
- }),
571
- /* @__PURE__ */ g(C, {
572
- label: "Weekly Summary",
573
- description: "Receive weekly performance report",
574
- checked: P.weeklySummaryEmail,
575
- onChange: U("weeklySummaryEmail")
576
- }),
577
- /* @__PURE__ */ g(C, {
578
- label: "Low Stock Alert",
579
- description: "Get alerted when items are low on stock",
580
- checked: P.lowStockAlert,
581
- onChange: U("lowStockAlert")
582
- }),
583
- /* @__PURE__ */ g(C, {
584
- label: "Review Notifications",
585
- description: "Get notified for new customer reviews",
586
- checked: P.reviewNotification,
587
- onChange: U("reviewNotification")
588
- }),
589
- /* @__PURE__ */ g(C, {
590
- label: "Marketing Emails",
591
- description: "Receive tips and promotional content",
592
- checked: P.marketingEmails,
593
- onChange: U("marketingEmails")
594
- })
595
- ]
596
- }),
597
- c === "integration" && /* @__PURE__ */ _("div", {
598
- className: "space-y-5",
599
- children: [
600
- /* @__PURE__ */ g("h3", {
601
- className: "text-sm font-semibold text-text-primary",
602
- children: "Payment Gateway"
603
- }),
604
- /* @__PURE__ */ _("div", {
605
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
606
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
607
- className: "block text-sm font-medium text-text-primary mb-1.5",
608
- children: "Provider"
609
- }), /* @__PURE__ */ _("select", {
610
- value: I.paymentGateway,
611
- onChange: (e) => W("paymentGateway")(e.target.value),
612
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
613
- children: [
614
- /* @__PURE__ */ g("option", {
615
- value: "razorpay",
616
- children: "Razorpay"
617
- }),
618
- /* @__PURE__ */ g("option", {
619
- value: "paytm",
620
- children: "Paytm"
621
- }),
622
- /* @__PURE__ */ g("option", {
623
- value: "stripe",
624
- children: "Stripe"
625
- }),
626
- /* @__PURE__ */ g("option", {
627
- value: "phonepe",
628
- children: "PhonePe"
629
- })
630
- ]
631
- })] }), /* @__PURE__ */ g(S, {
632
- label: "API Key",
633
- value: I.paymentGatewayKey,
634
- onChange: W("paymentGatewayKey"),
635
- placeholder: "Enter API key",
636
- hint: "Keep this secret"
637
- })]
638
- }),
639
- /* @__PURE__ */ g("h3", {
640
- className: "text-sm font-semibold text-text-primary pt-2",
641
- children: "SMS Provider"
642
- }),
643
- /* @__PURE__ */ _("div", {
644
- className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
645
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
646
- className: "block text-sm font-medium text-text-primary mb-1.5",
647
- children: "Provider"
648
- }), /* @__PURE__ */ _("select", {
649
- value: I.smsProvider,
650
- onChange: (e) => W("smsProvider")(e.target.value),
651
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
652
- children: [
653
- /* @__PURE__ */ g("option", {
654
- value: "twilio",
655
- children: "Twilio"
656
- }),
657
- /* @__PURE__ */ g("option", {
658
- value: "msg91",
659
- children: "MSG91"
660
- }),
661
- /* @__PURE__ */ g("option", {
662
- value: "textlocal",
663
- children: "Textlocal"
664
- })
665
- ]
666
- })] }), /* @__PURE__ */ g(S, {
667
- label: "SMS API Key",
668
- value: I.smsApiKey,
669
- onChange: W("smsApiKey"),
670
- placeholder: "Enter SMS API key"
671
- })]
672
- }),
673
- /* @__PURE__ */ g("h3", {
674
- className: "text-sm font-semibold text-text-primary pt-2",
675
- children: "Analytics"
676
- }),
677
- /* @__PURE__ */ g(S, {
678
- label: "Google Analytics ID",
679
- value: I.analyticsId,
680
- onChange: W("analyticsId"),
681
- placeholder: "GA-XXXXXXXXX"
682
- })
683
- ]
684
- }),
685
- /* @__PURE__ */ g("div", {
686
- className: "flex justify-end mt-8 pt-6 border-t border-border-seam",
687
- children: /* @__PURE__ */ g("button", {
688
- type: "button",
689
- onClick: R,
690
- disabled: u,
691
- className: t("inline-flex items-center gap-2 rounded-md px-6 py-2 text-sm font-medium transition-colors", p ? "bg-status-success-bg/10 text-status-success-text" : u ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
692
- children: u ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : p ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(s, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), "Save Settings"] })
693
- })
694
- })
695
- ]
696
- })
697
- })
698
- ]
699
- })]
700
- });
701
- };
702
- //#endregion
703
- export { w as BusinessSettingsPage };
704
-
705
- //# sourceMappingURL=BusinessSettingsPage.js.map