@burdenoff/microfe-subscriberbot 2026.626.1 → 2026.628.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/subscriberbot/SubscriberBotRoot.js +61 -133
  3. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  4. package/dist/subscriberbot/SubscriberBotRoutes.js +56 -187
  5. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  6. package/dist/subscriberbot/components/StateViews.js +49 -0
  7. package/dist/subscriberbot/components/StateViews.js.map +1 -0
  8. package/dist/subscriberbot/components/StatusBadge.js +45 -47
  9. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  10. package/dist/subscriberbot/context/SubscriberBotContext.js +22 -30
  11. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +342 -195
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  14. package/dist/subscriberbot/index.js +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +269 -0
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -0
  17. package/dist/subscriberbot/pages/InboxPage.js +186 -0
  18. package/dist/subscriberbot/pages/InboxPage.js.map +1 -0
  19. package/dist/subscriberbot/pages/InvoicesPage.js +211 -0
  20. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -0
  21. package/dist/subscriberbot/pages/WorkflowsPage.js +236 -0
  22. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -0
  23. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +160 -0
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -0
  25. package/dist/subscriberbot/pages/agents/AgentNewPage.js +140 -0
  26. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -0
  27. package/dist/subscriberbot/pages/agents/AgentsListPage.js +178 -0
  28. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -0
  29. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +179 -0
  30. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -0
  31. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +185 -0
  32. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -0
  33. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +254 -0
  34. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -0
  35. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +306 -0
  36. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -0
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +253 -0
  38. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -0
  39. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +248 -0
  40. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -0
  41. package/dist/subscriberbot/utils/formatters.js +50 -32
  42. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/subscriberbot/components/InvestmentCard.js +0 -97
  45. package/dist/subscriberbot/components/InvestmentCard.js.map +0 -1
  46. package/dist/subscriberbot/components/RatingDisplay.js +0 -35
  47. package/dist/subscriberbot/components/RatingDisplay.js.map +0 -1
  48. package/dist/subscriberbot/mocks/data.js +0 -1517
  49. package/dist/subscriberbot/mocks/data.js.map +0 -1
  50. package/dist/subscriberbot/mocks/users.js +0 -34
  51. package/dist/subscriberbot/mocks/users.js.map +0 -1
  52. package/dist/subscriberbot/pages/HomePage.js +0 -930
  53. package/dist/subscriberbot/pages/HomePage.js.map +0 -1
  54. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +0 -651
  55. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +0 -1
  56. package/dist/subscriberbot/pages/admin/AdminDashboard.js +0 -679
  57. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +0 -1
  58. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +0 -427
  59. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +0 -1
  60. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +0 -665
  61. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +0 -1
  62. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +0 -261
  63. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +0 -1
  64. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +0 -654
  65. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +0 -1
  66. package/dist/subscriberbot/pages/admin/CartManagementPage.js +0 -874
  67. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +0 -1
  68. package/dist/subscriberbot/pages/admin/UserManagementPage.js +0 -898
  69. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +0 -1
  70. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +0 -839
  71. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  72. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +0 -705
  73. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  74. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +0 -802
  75. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  76. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  77. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  78. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +0 -633
  79. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  80. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +0 -910
  81. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  82. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +0 -879
  83. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +0 -1
  84. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +0 -838
  85. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +0 -1
  86. package/dist/subscriberbot/pages/common/HelpSupportPage.js +0 -1323
  87. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +0 -1
  88. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +0 -672
  89. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +0 -1
  90. package/dist/subscriberbot/pages/common/SettingsPage.js +0 -973
  91. package/dist/subscriberbot/pages/common/SettingsPage.js.map +0 -1
  92. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +0 -626
  93. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +0 -1
  94. package/dist/subscriberbot/pages/customer/CartDetailPage.js +0 -654
  95. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +0 -1
  96. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +0 -555
  97. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +0 -1
  98. package/dist/subscriberbot/pages/customer/CheckoutPage.js +0 -529
  99. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +0 -1
  100. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +0 -532
  101. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +0 -1
  102. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +0 -630
  103. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +0 -1
  104. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +0 -633
  105. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +0 -1
  106. package/dist/subscriberbot/pages/customer/FavoritesPage.js +0 -484
  107. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +0 -1
  108. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +0 -446
  109. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +0 -1
  110. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +0 -394
  111. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +0 -1
  112. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +0 -495
  113. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +0 -1
  114. package/dist/subscriberbot/pages/customer/ReviewsPage.js +0 -613
  115. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +0 -1
  116. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +0 -450
  117. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +0 -1
  118. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +0 -886
  119. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +0 -1
  120. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +0 -947
  121. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  122. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +0 -687
  123. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  124. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +0 -451
  125. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +0 -1
  126. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +0 -406
  127. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  128. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +0 -575
  129. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +0 -1
  130. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +0 -1070
  131. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +0 -1
  132. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +0 -535
  133. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +0 -1
  134. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +0 -666
  135. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +0 -1
  136. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +0 -681
  137. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +0 -1
  138. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +0 -692
  139. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +0 -1
  140. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +0 -588
  141. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,802 +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 { formatCurrency as r } from "../../utils/formatters.js";
5
- import { mockAdminAnalytics as i } from "../../mocks/data.js";
6
- import { useState as a } from "react";
7
- import { Activity as o, AlertCircle as s, ArrowRight as c, BarChart3 as l, Bell as u, CheckCircle as d, ChevronRight as f, Clock as p, Edit as m, Eye as h, Flame as g, IndianRupee as _, MapPin as v, Package as y, Plus as b, Settings as x, ShoppingCart as S, Star as C, Store as w, TrendingDown as T, TrendingUp as E, UserCheck as D, Users as O } from "lucide-react";
8
- import { jsx as k, jsxs as A } from "react/jsx-runtime";
9
- import { EmphasisPanel as j, GradientText as M, NextSteps as N, PagePurpose as P } from "@burdenoff/fe-libs/ui";
10
- //#region src/subscriberbot/pages/cart-owner/CartOwnerDashboard.tsx
11
- var F = {
12
- totalRevenue: 45230,
13
- dailyRevenue: 1850,
14
- ordersToday: 23,
15
- totalOrders: 1247,
16
- activeOfferings: 68,
17
- averageOrderValue: 80,
18
- customerCount: 342,
19
- rating: 4.2
20
- }, I = [
21
- {
22
- id: "ORD-001",
23
- customerName: "Rahul Sharma",
24
- items: [
25
- "Masala Dosa",
26
- "Filter Coffee",
27
- "Vada"
28
- ],
29
- total: 180,
30
- status: "preparing",
31
- timestamp: "10 mins ago",
32
- priority: "urgent"
33
- },
34
- {
35
- id: "ORD-002",
36
- customerName: "Priya Patel",
37
- items: ["Idli Sambar (2)", "Coconut Chutney"],
38
- total: 80,
39
- status: "ready",
40
- timestamp: "15 mins ago",
41
- priority: "normal"
42
- },
43
- {
44
- id: "ORD-003",
45
- customerName: "Amit Kumar",
46
- items: [
47
- "Rava Dosa",
48
- "Sambar",
49
- "Coffee"
50
- ],
51
- total: 160,
52
- status: "delivered",
53
- timestamp: "25 mins ago",
54
- priority: "normal"
55
- },
56
- {
57
- id: "ORD-004",
58
- customerName: "Sneha Singh",
59
- items: ["Upma", "Coffee"],
60
- total: 60,
61
- status: "pending",
62
- timestamp: "2 mins ago",
63
- priority: "urgent"
64
- }
65
- ], L = [
66
- {
67
- name: "Masala Dosa",
68
- quantity: 245,
69
- revenue: 19600
70
- },
71
- {
72
- name: "Filter Coffee",
73
- quantity: 312,
74
- revenue: 9360
75
- },
76
- {
77
- name: "Idli Sambar",
78
- quantity: 189,
79
- revenue: 7560
80
- },
81
- {
82
- name: "Vada",
83
- quantity: 156,
84
- revenue: 4680
85
- },
86
- {
87
- name: "Rava Dosa",
88
- quantity: 98,
89
- revenue: 8820
90
- }
91
- ], R = [
92
- {
93
- name: "Ramesh Kumar",
94
- role: "Chef",
95
- status: "active"
96
- },
97
- {
98
- name: "Priya Sharma",
99
- role: "Server",
100
- status: "active"
101
- },
102
- {
103
- name: "Amit Patel",
104
- role: "Delivery",
105
- status: "on-break"
106
- },
107
- {
108
- name: "Sneha Reddy",
109
- role: "Manager",
110
- status: "active"
111
- }
112
- ], z = [
113
- {
114
- id: "1",
115
- message: "New order #ORD-004 received",
116
- type: "info",
117
- time: "2 min ago"
118
- },
119
- {
120
- id: "2",
121
- message: "Low stock alert: Vada batter running low",
122
- type: "warning",
123
- time: "15 min ago"
124
- },
125
- {
126
- id: "3",
127
- message: "Order #ORD-003 delivered successfully",
128
- type: "success",
129
- time: "25 min ago"
130
- },
131
- {
132
- id: "4",
133
- message: "New 5-star review from Priya Patel",
134
- type: "success",
135
- time: "1 hr ago"
136
- },
137
- {
138
- id: "5",
139
- message: "Peak hours approaching (12-2 PM)",
140
- type: "warning",
141
- time: "1 hr ago"
142
- }
143
- ], B = i.orderTrends.slice(0, 7), V = () => {
144
- let e = (/* @__PURE__ */ new Date()).getHours();
145
- return e < 12 ? "Good Morning" : e < 17 ? "Good Afternoon" : "Good Evening";
146
- }, H = {
147
- pending: "bg-status-error-bg/15 text-status-error-text",
148
- preparing: "bg-status-warning-bg/15 text-status-warning-text",
149
- ready: "bg-status-info-bg/15 text-status-info-text",
150
- delivered: "bg-status-success-bg/15 text-status-success-text",
151
- cancelled: "bg-bg-sunken text-text-secondary"
152
- }, U = {
153
- active: "bg-status-success-text",
154
- "on-break": "bg-status-warning-text",
155
- "off-duty": "bg-muted-foreground"
156
- }, W = {
157
- info: "text-status-info-text",
158
- warning: "text-status-warning-text",
159
- success: "text-status-success-text"
160
- }, G = () => {
161
- let { navigateTo: i } = e(), [G, K] = a(I), [q, J] = a({
162
- isOpen: !0,
163
- currentLocation: "Koramangala 5th Block, Near BDA Complex",
164
- lastUpdate: (/* @__PURE__ */ new Date()).toLocaleTimeString(),
165
- operatingHours: "9:00 AM - 9:00 PM"
166
- }), Y = (e) => {
167
- K((t) => t.map((t) => t.id === e ? {
168
- ...t,
169
- status: "preparing"
170
- } : t));
171
- }, X = (e) => {
172
- K((t) => t.map((t) => t.id === e ? {
173
- ...t,
174
- status: "ready"
175
- } : t));
176
- };
177
- return /* @__PURE__ */ k(n, {
178
- title: /* @__PURE__ */ A("span", { children: [
179
- /* @__PURE__ */ k(M, {
180
- as: "span",
181
- children: V()
182
- }),
183
- ",",
184
- " ",
185
- /* @__PURE__ */ k("span", {
186
- className: "text-text-secondary font-normal",
187
- children: "Rajesh"
188
- })
189
- ] }),
190
- description: "Manage your service provider operations",
191
- actions: /* @__PURE__ */ A("button", {
192
- type: "button",
193
- onClick: () => i("/cart-owner/orders"),
194
- className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
195
- children: ["View All Orders", /* @__PURE__ */ k(c, { className: "h-4 w-4" })]
196
- }),
197
- children: /* @__PURE__ */ A("div", {
198
- className: "space-y-6",
199
- children: [
200
- /* @__PURE__ */ k(P, {
201
- icon: /* @__PURE__ */ k(w, { className: "h-4 w-4" }),
202
- children: "Your daily command center for running the cart. Open or close service, see live orders as they come in, accept and mark them ready, and track today's revenue against yesterday. Glance at top-selling items and staff status, then drill into analytics or inventory when you want to dig deeper."
203
- }),
204
- /* @__PURE__ */ k(N, {
205
- storageKey: "subscriberbot-cart-owner-dashboard",
206
- steps: [
207
- {
208
- id: "manage-orders",
209
- label: "Work through incoming orders",
210
- description: "Accept, prepare and mark orders ready so customers stay informed.",
211
- icon: /* @__PURE__ */ k(S, { className: "h-4 w-4" }),
212
- onClick: () => i("/cart-owner/orders")
213
- },
214
- {
215
- id: "update-inventory",
216
- label: "Update your offerings & stock",
217
- description: "Add items, set prices and flag anything out of stock.",
218
- icon: /* @__PURE__ */ k(y, { className: "h-4 w-4" }),
219
- onClick: () => i("/cart-owner/inventory")
220
- },
221
- {
222
- id: "review-analytics",
223
- label: "Review your analytics",
224
- description: "Understand revenue, peak hours and what sells best.",
225
- icon: /* @__PURE__ */ k(l, { className: "h-4 w-4" }),
226
- onClick: () => i("/cart-owner/analytics")
227
- },
228
- {
229
- id: "manage-staff",
230
- label: "Manage your staff",
231
- description: "Assign roles and keep your team roster up to date.",
232
- icon: /* @__PURE__ */ k(O, { className: "h-4 w-4" }),
233
- onClick: () => i("/cart-owner/staff")
234
- }
235
- ]
236
- }),
237
- /* @__PURE__ */ k(j, {
238
- className: t("border-l-4", q.isOpen ? "border-l-status-success-border" : "border-l-status-error-border"),
239
- children: /* @__PURE__ */ A("div", {
240
- className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",
241
- children: [/* @__PURE__ */ A("div", {
242
- className: "flex items-start gap-3",
243
- children: [/* @__PURE__ */ k("div", { className: t("w-3 h-3 rounded-full mt-1 shrink-0", q.isOpen ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("h3", {
244
- className: "font-semibold text-text-primary text-sm",
245
- children: ["Service Status: ", q.isOpen ? "Open" : "Closed"]
246
- }), /* @__PURE__ */ A("div", {
247
- className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 mt-1 text-xs text-text-secondary",
248
- children: [/* @__PURE__ */ A("span", {
249
- className: "flex items-center gap-1",
250
- children: [/* @__PURE__ */ k(v, { className: "h-3 w-3 shrink-0" }), q.currentLocation]
251
- }), /* @__PURE__ */ A("span", {
252
- className: "flex items-center gap-1",
253
- children: [/* @__PURE__ */ k(p, { className: "h-3 w-3 shrink-0" }), q.operatingHours]
254
- })]
255
- })] })]
256
- }), /* @__PURE__ */ A("div", {
257
- className: "flex gap-2",
258
- children: [/* @__PURE__ */ A("button", {
259
- type: "button",
260
- onClick: () => i("/cart-owner/settings"),
261
- className: "inline-flex items-center gap-1 rounded-md border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
262
- children: [/* @__PURE__ */ k(v, { className: "h-3 w-3" }), "Update Location"]
263
- }), /* @__PURE__ */ k("button", {
264
- type: "button",
265
- onClick: () => {
266
- J((e) => e && {
267
- ...e,
268
- isOpen: !e.isOpen
269
- });
270
- },
271
- className: t("inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", q.isOpen ? "bg-status-error-bg/10 text-status-error-text hover:bg-status-error-bg/20" : "bg-status-success-bg/10 text-status-success-text hover:bg-status-success-bg/20"),
272
- children: q.isOpen ? "Close Service" : "Open Service"
273
- })]
274
- })]
275
- })
276
- }),
277
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h2", {
278
- className: "text-base font-semibold text-text-primary mb-3",
279
- children: "Today's Performance"
280
- }), /* @__PURE__ */ k("div", {
281
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
282
- children: [
283
- {
284
- label: "Daily Revenue",
285
- value: r(F.dailyRevenue, { minimumFractionDigits: 0 }),
286
- icon: _,
287
- trend: "+15.2% vs yesterday",
288
- trendUp: !0
289
- },
290
- {
291
- label: "Orders Today",
292
- value: String(F.ordersToday),
293
- icon: S,
294
- trend: "+8.5% vs yesterday",
295
- trendUp: !0
296
- },
297
- {
298
- label: "Avg Order Value",
299
- value: r(F.averageOrderValue, { minimumFractionDigits: 0 }),
300
- icon: E,
301
- trend: "+3.2% vs last week",
302
- trendUp: !0
303
- },
304
- {
305
- label: "Service Rating",
306
- value: F.rating.toFixed(1),
307
- icon: C,
308
- trend: "Based on 342 reviews",
309
- trendUp: !0
310
- }
311
- ].map((e) => {
312
- let t = e.icon;
313
- return /* @__PURE__ */ A("div", {
314
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
315
- children: [
316
- /* @__PURE__ */ A("div", {
317
- className: "flex items-center justify-between",
318
- children: [/* @__PURE__ */ k("div", {
319
- className: "rounded-md bg-accent p-2",
320
- children: /* @__PURE__ */ k(t, { className: "h-5 w-5 text-text-secondary" })
321
- }), /* @__PURE__ */ A("div", {
322
- className: "flex items-center gap-1 text-xs text-text-secondary",
323
- children: [e.trendUp ? /* @__PURE__ */ k(E, { className: "h-3 w-3 text-status-success-text" }) : /* @__PURE__ */ k(T, { className: "h-3 w-3 text-status-error-text" }), /* @__PURE__ */ k("span", { children: e.trend })]
324
- })]
325
- }),
326
- /* @__PURE__ */ k("p", {
327
- className: "mt-3 text-2xl font-bold text-text-primary",
328
- children: e.value
329
- }),
330
- /* @__PURE__ */ k("p", {
331
- className: "mt-1 text-sm text-text-secondary",
332
- children: e.label
333
- })
334
- ]
335
- }, e.label);
336
- })
337
- })] }),
338
- /* @__PURE__ */ A("div", {
339
- className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
340
- children: [/* @__PURE__ */ A("div", {
341
- className: "lg:col-span-2 space-y-6",
342
- children: [
343
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h3", {
344
- className: "text-base font-semibold mb-3 text-text-primary",
345
- children: "Quick Actions"
346
- }), /* @__PURE__ */ k("div", {
347
- className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3",
348
- children: [
349
- {
350
- label: "Service Config",
351
- icon: x,
352
- color: "bg-status-warning-bg/10 text-status-warning-text",
353
- path: "/cart-owner/service-config"
354
- },
355
- {
356
- label: "Manage Offerings",
357
- icon: y,
358
- color: "bg-status-info-bg/10 text-status-info-text",
359
- path: "/cart-owner/inventory"
360
- },
361
- {
362
- label: "View Orders",
363
- icon: S,
364
- color: "bg-status-success-bg/10 text-status-success-text",
365
- path: "/cart-owner/orders"
366
- },
367
- {
368
- label: "Analytics",
369
- icon: l,
370
- color: "bg-accent-purple-subtle text-accent-purple",
371
- path: "/cart-owner/analytics"
372
- },
373
- {
374
- label: "Staff",
375
- icon: D,
376
- color: "bg-accent-purple-subtle text-accent-purple",
377
- path: "/cart-owner/staff"
378
- }
379
- ].map((e) => {
380
- let n = e.icon;
381
- return /* @__PURE__ */ A("button", {
382
- type: "button",
383
- onClick: () => i(e.path),
384
- className: t("flex flex-col items-center gap-2 rounded-lg p-4 transition-colors hover:opacity-80", e.color),
385
- children: [/* @__PURE__ */ k(n, { className: "h-5 w-5" }), /* @__PURE__ */ k("span", {
386
- className: "text-xs font-medium text-center",
387
- children: e.label
388
- })]
389
- }, e.label);
390
- })
391
- })] }),
392
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("div", {
393
- className: "flex items-center justify-between mb-3",
394
- children: [/* @__PURE__ */ k("h3", {
395
- className: "text-base font-semibold text-text-primary",
396
- children: "Recent Orders"
397
- }), /* @__PURE__ */ k("button", {
398
- type: "button",
399
- onClick: () => i("/cart-owner/orders"),
400
- className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
401
- children: "View All Orders"
402
- })]
403
- }), /* @__PURE__ */ k("div", {
404
- className: "space-y-3",
405
- children: G.map((e) => /* @__PURE__ */ k("div", {
406
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
407
- children: /* @__PURE__ */ A("div", {
408
- className: "flex flex-col lg:flex-row lg:items-start lg:justify-between gap-3",
409
- children: [/* @__PURE__ */ A("div", {
410
- className: "flex-1 min-w-0",
411
- children: [
412
- /* @__PURE__ */ A("div", {
413
- className: "flex flex-wrap items-center gap-2 mb-1",
414
- children: [
415
- /* @__PURE__ */ A("h4", {
416
- className: "font-semibold text-text-primary text-sm",
417
- children: ["#", e.id]
418
- }),
419
- /* @__PURE__ */ k("span", {
420
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium capitalize", H[e.status] || "bg-bg-sunken text-text-secondary"),
421
- children: e.status
422
- }),
423
- e.priority === "urgent" && /* @__PURE__ */ k(s, { className: "h-4 w-4 text-status-error-text" })
424
- ]
425
- }),
426
- /* @__PURE__ */ A("p", {
427
- className: "text-xs text-text-secondary mb-1",
428
- children: ["Customer: ", e.customerName]
429
- }),
430
- /* @__PURE__ */ A("p", {
431
- className: "text-xs text-text-secondary mb-1 truncate",
432
- children: ["Items: ", e.items.join(", ")]
433
- }),
434
- /* @__PURE__ */ A("div", {
435
- className: "flex flex-wrap items-center gap-3 text-xs text-text-secondary",
436
- children: [/* @__PURE__ */ k("span", {
437
- className: "font-semibold text-text-primary",
438
- children: r(e.total, { minimumFractionDigits: 0 })
439
- }), /* @__PURE__ */ A("span", {
440
- className: "flex items-center gap-1",
441
- children: [/* @__PURE__ */ k(p, { className: "h-3 w-3" }), e.timestamp]
442
- })]
443
- })
444
- ]
445
- }), /* @__PURE__ */ A("div", {
446
- className: "flex gap-2",
447
- children: [
448
- /* @__PURE__ */ A("button", {
449
- type: "button",
450
- onClick: () => i("/cart-owner/orders"),
451
- className: "inline-flex items-center gap-1 rounded-md border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
452
- children: [/* @__PURE__ */ k(h, { className: "h-3 w-3" }), "View"]
453
- }),
454
- e.status === "pending" && /* @__PURE__ */ A("button", {
455
- type: "button",
456
- onClick: () => Y(e.id),
457
- className: "inline-flex items-center gap-1 rounded-md bg-status-success-bg/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg/20 transition-colors",
458
- children: [/* @__PURE__ */ k(d, { className: "h-3 w-3" }), "Accept"]
459
- }),
460
- e.status === "preparing" && /* @__PURE__ */ A("button", {
461
- type: "button",
462
- onClick: () => X(e.id),
463
- className: "inline-flex items-center gap-1 rounded-md bg-status-info-bg/10 px-3 py-1.5 text-xs font-medium text-status-info-text hover:bg-status-info-bg/20 transition-colors",
464
- children: [/* @__PURE__ */ k(d, { className: "h-3 w-3" }), "Mark Ready"]
465
- })
466
- ]
467
- })]
468
- })
469
- }, e.id))
470
- })] }),
471
- /* @__PURE__ */ A("div", {
472
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
473
- children: [/* @__PURE__ */ A("div", {
474
- className: "flex items-center justify-between border-b border-border-seam px-5 py-4",
475
- children: [/* @__PURE__ */ k("h3", {
476
- className: "text-base font-semibold text-text-primary",
477
- children: "Revenue (Last 7 Days)"
478
- }), /* @__PURE__ */ k("button", {
479
- type: "button",
480
- onClick: () => i("/cart-owner/analytics"),
481
- className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
482
- children: "View Analytics"
483
- })]
484
- }), /* @__PURE__ */ k("div", {
485
- className: "overflow-x-auto",
486
- children: /* @__PURE__ */ A("table", {
487
- className: "w-full text-sm",
488
- children: [/* @__PURE__ */ k("thead", { children: /* @__PURE__ */ A("tr", {
489
- className: "border-b border-border-seam",
490
- children: [
491
- /* @__PURE__ */ k("th", {
492
- className: "px-5 py-3 text-left font-medium text-text-secondary",
493
- children: "Date"
494
- }),
495
- /* @__PURE__ */ k("th", {
496
- className: "px-5 py-3 text-right font-medium text-text-secondary",
497
- children: "Orders"
498
- }),
499
- /* @__PURE__ */ k("th", {
500
- className: "px-5 py-3 text-right font-medium text-text-secondary",
501
- children: "Revenue"
502
- }),
503
- /* @__PURE__ */ k("th", {
504
- className: "px-5 py-3 text-left font-medium text-text-secondary",
505
- children: "Trend"
506
- })
507
- ]
508
- }) }), /* @__PURE__ */ k("tbody", { children: B.map((e, t) => {
509
- let n = Math.max(...B.map((e) => e.revenue)), i = e.revenue / n * 100;
510
- return /* @__PURE__ */ A("tr", {
511
- className: "border-b border-border-seam last:border-0",
512
- children: [
513
- /* @__PURE__ */ k("td", {
514
- className: "px-5 py-3 text-text-primary text-xs",
515
- children: new Date(e.date).toLocaleDateString("en-IN", {
516
- day: "2-digit",
517
- month: "short",
518
- weekday: "short"
519
- })
520
- }),
521
- /* @__PURE__ */ k("td", {
522
- className: "px-5 py-3 text-right text-text-primary",
523
- children: e.orders
524
- }),
525
- /* @__PURE__ */ k("td", {
526
- className: "px-5 py-3 text-right font-medium text-text-primary",
527
- children: r(e.revenue, { minimumFractionDigits: 0 })
528
- }),
529
- /* @__PURE__ */ k("td", {
530
- className: "px-5 py-3 w-40",
531
- children: /* @__PURE__ */ k("div", {
532
- className: "h-4 rounded bg-bg-sunken overflow-hidden",
533
- children: /* @__PURE__ */ k("div", {
534
- className: "h-full rounded bg-status-info-bg/60",
535
- style: { width: `${i}%` }
536
- })
537
- })
538
- })
539
- ]
540
- }, e.date);
541
- }) })]
542
- })
543
- })]
544
- }),
545
- /* @__PURE__ */ A("div", {
546
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
547
- children: [/* @__PURE__ */ k("h3", {
548
- className: "text-base font-semibold text-text-primary mb-4",
549
- children: "This Month Summary"
550
- }), /* @__PURE__ */ A("div", {
551
- className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
552
- children: [
553
- /* @__PURE__ */ A("div", {
554
- className: "text-center p-3 rounded-lg bg-bg-sunken/50",
555
- children: [/* @__PURE__ */ k("div", {
556
- className: "text-xl font-bold text-text-primary",
557
- children: r(F.totalRevenue, { minimumFractionDigits: 0 })
558
- }), /* @__PURE__ */ k("div", {
559
- className: "text-xs text-text-secondary mt-1",
560
- children: "Total Revenue"
561
- })]
562
- }),
563
- /* @__PURE__ */ A("div", {
564
- className: "text-center p-3 rounded-lg bg-bg-sunken/50",
565
- children: [/* @__PURE__ */ k("div", {
566
- className: "text-xl font-bold text-text-primary",
567
- children: F.totalOrders
568
- }), /* @__PURE__ */ k("div", {
569
- className: "text-xs text-text-secondary mt-1",
570
- children: "Total Orders"
571
- })]
572
- }),
573
- /* @__PURE__ */ A("div", {
574
- className: "text-center p-3 rounded-lg bg-bg-sunken/50",
575
- children: [/* @__PURE__ */ k("div", {
576
- className: "text-xl font-bold text-text-primary",
577
- children: F.customerCount
578
- }), /* @__PURE__ */ k("div", {
579
- className: "text-xs text-text-secondary mt-1",
580
- children: "Unique Customers"
581
- })]
582
- })
583
- ]
584
- })]
585
- })
586
- ]
587
- }), /* @__PURE__ */ A("div", {
588
- className: "space-y-6",
589
- children: [
590
- /* @__PURE__ */ A("div", {
591
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
592
- children: [/* @__PURE__ */ A("div", {
593
- className: "flex items-center justify-between mb-4",
594
- children: [/* @__PURE__ */ A("h3", {
595
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
596
- children: [/* @__PURE__ */ k(u, { className: "h-4 w-4" }), "Notifications"]
597
- }), /* @__PURE__ */ k("span", {
598
- className: "inline-flex items-center justify-center rounded-full bg-status-error-text text-text-inverse text-[10px] font-bold h-5 w-5",
599
- children: z.length
600
- })]
601
- }), /* @__PURE__ */ k("div", {
602
- className: "space-y-3",
603
- children: z.map((e) => /* @__PURE__ */ A("div", {
604
- className: "flex items-start gap-2",
605
- children: [/* @__PURE__ */ k(o, { className: t("h-4 w-4 mt-0.5 shrink-0", W[e.type]) }), /* @__PURE__ */ A("div", {
606
- className: "min-w-0",
607
- children: [/* @__PURE__ */ k("p", {
608
- className: "text-xs text-text-primary leading-tight",
609
- children: e.message
610
- }), /* @__PURE__ */ k("p", {
611
- className: "text-[10px] text-text-secondary mt-0.5",
612
- children: e.time
613
- })]
614
- })]
615
- }, e.id))
616
- })]
617
- }),
618
- /* @__PURE__ */ A("div", {
619
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
620
- children: [/* @__PURE__ */ A("h3", {
621
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
622
- children: [/* @__PURE__ */ k(g, { className: "h-4 w-4 text-status-warning-text" }), "Top Selling Items"]
623
- }), /* @__PURE__ */ k("div", {
624
- className: "space-y-3",
625
- children: L.map((e, t) => /* @__PURE__ */ A("div", {
626
- className: "flex items-center justify-between",
627
- children: [/* @__PURE__ */ A("div", {
628
- className: "flex items-center gap-2 min-w-0",
629
- children: [/* @__PURE__ */ k("span", {
630
- className: "text-sm font-bold text-text-secondary w-5",
631
- children: t + 1
632
- }), /* @__PURE__ */ A("div", {
633
- className: "min-w-0",
634
- children: [/* @__PURE__ */ k("p", {
635
- className: "text-xs font-medium text-text-primary truncate",
636
- children: e.name
637
- }), /* @__PURE__ */ A("p", {
638
- className: "text-[10px] text-text-secondary",
639
- children: [e.quantity, " sold"]
640
- })]
641
- })]
642
- }), /* @__PURE__ */ k("span", {
643
- className: "text-xs font-semibold text-text-primary",
644
- children: r(e.revenue, { minimumFractionDigits: 0 })
645
- })]
646
- }, e.name))
647
- })]
648
- }),
649
- /* @__PURE__ */ A("div", {
650
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
651
- children: [/* @__PURE__ */ A("div", {
652
- className: "flex items-center justify-between mb-4",
653
- children: [/* @__PURE__ */ A("h3", {
654
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
655
- children: [/* @__PURE__ */ k(O, { className: "h-4 w-4" }), "Staff Overview"]
656
- }), /* @__PURE__ */ k("button", {
657
- type: "button",
658
- onClick: () => i("/cart-owner/staff"),
659
- className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
660
- children: "Manage"
661
- })]
662
- }), /* @__PURE__ */ k("div", {
663
- className: "space-y-3",
664
- children: R.map((e) => /* @__PURE__ */ A("div", {
665
- className: "flex items-center justify-between",
666
- children: [/* @__PURE__ */ A("div", {
667
- className: "flex items-center gap-2",
668
- children: [/* @__PURE__ */ k("div", { className: t("w-2 h-2 rounded-full", U[e.status]) }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
669
- className: "text-xs font-medium text-text-primary",
670
- children: e.name
671
- }), /* @__PURE__ */ k("p", {
672
- className: "text-[10px] text-text-secondary",
673
- children: e.role
674
- })] })]
675
- }), /* @__PURE__ */ k("span", {
676
- className: "text-[10px] capitalize text-text-secondary",
677
- children: e.status.replace("-", " ")
678
- })]
679
- }, e.name))
680
- })]
681
- }),
682
- /* @__PURE__ */ A("div", {
683
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
684
- children: [/* @__PURE__ */ k("h3", {
685
- className: "text-base font-semibold text-text-primary mb-4",
686
- children: "Quick Stats"
687
- }), /* @__PURE__ */ A("div", {
688
- className: "space-y-3",
689
- children: [
690
- /* @__PURE__ */ A("div", {
691
- className: "flex items-center justify-between",
692
- children: [/* @__PURE__ */ k("span", {
693
- className: "text-xs text-text-secondary",
694
- children: "Active Offerings"
695
- }), /* @__PURE__ */ k("span", {
696
- className: "text-sm font-semibold text-text-primary",
697
- children: F.activeOfferings
698
- })]
699
- }),
700
- /* @__PURE__ */ A("div", {
701
- className: "flex items-center justify-between",
702
- children: [/* @__PURE__ */ k("span", {
703
- className: "text-xs text-text-secondary",
704
- children: "Customer Rating"
705
- }), /* @__PURE__ */ A("span", {
706
- className: "text-sm font-semibold text-text-primary flex items-center gap-1",
707
- children: [/* @__PURE__ */ k(C, { className: "h-3 w-3 text-status-warning-text fill-status-warning-text" }), F.rating]
708
- })]
709
- }),
710
- /* @__PURE__ */ A("div", {
711
- className: "flex items-center justify-between",
712
- children: [/* @__PURE__ */ k("span", {
713
- className: "text-xs text-text-secondary",
714
- children: "Total Customers"
715
- }), /* @__PURE__ */ k("span", {
716
- className: "text-sm font-semibold text-text-primary",
717
- children: F.customerCount
718
- })]
719
- })
720
- ]
721
- })]
722
- }),
723
- /* @__PURE__ */ A("div", {
724
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
725
- children: [/* @__PURE__ */ k("h3", {
726
- className: "text-base font-semibold text-text-primary mb-3",
727
- children: "Business Settings"
728
- }), /* @__PURE__ */ k("div", {
729
- className: "space-y-2",
730
- children: [
731
- {
732
- label: "Service Settings",
733
- icon: x,
734
- path: "/cart-owner/settings"
735
- },
736
- {
737
- label: "Business Profile",
738
- icon: m,
739
- path: "/cart-owner/profile"
740
- },
741
- {
742
- label: "Add Offerings",
743
- icon: b,
744
- path: "/cart-owner/inventory"
745
- }
746
- ].map((e) => {
747
- let t = e.icon;
748
- return /* @__PURE__ */ A("button", {
749
- type: "button",
750
- onClick: () => i(e.path),
751
- className: "w-full flex items-center justify-between rounded-md border border-border-seam px-3 py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
752
- children: [/* @__PURE__ */ A("span", {
753
- className: "flex items-center gap-2",
754
- children: [/* @__PURE__ */ k(t, { className: "h-3.5 w-3.5" }), e.label]
755
- }), /* @__PURE__ */ k(f, { className: "h-3 w-3 text-text-secondary" })]
756
- }, e.label);
757
- })
758
- })]
759
- }),
760
- /* @__PURE__ */ A("div", {
761
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
762
- children: [/* @__PURE__ */ k("h3", {
763
- className: "text-base font-semibold text-text-primary mb-3",
764
- children: "Recent Activity"
765
- }), /* @__PURE__ */ A("div", {
766
- className: "space-y-2 text-xs",
767
- children: [
768
- /* @__PURE__ */ A("div", {
769
- className: "flex items-center gap-2",
770
- children: [/* @__PURE__ */ k(o, { className: "h-3.5 w-3.5 text-status-success-text" }), /* @__PURE__ */ k("span", {
771
- className: "text-text-secondary",
772
- children: "Order #ORD-003 delivered"
773
- })]
774
- }),
775
- /* @__PURE__ */ A("div", {
776
- className: "flex items-center gap-2",
777
- children: [/* @__PURE__ */ k(o, { className: "h-3.5 w-3.5 text-status-info-text" }), /* @__PURE__ */ k("span", {
778
- className: "text-text-secondary",
779
- children: "Inventory updated"
780
- })]
781
- }),
782
- /* @__PURE__ */ A("div", {
783
- className: "flex items-center gap-2",
784
- children: [/* @__PURE__ */ k(o, { className: "h-3.5 w-3.5 text-status-warning-text" }), /* @__PURE__ */ k("span", {
785
- className: "text-text-secondary",
786
- children: "New customer review"
787
- })]
788
- })
789
- ]
790
- })]
791
- })
792
- ]
793
- })]
794
- })
795
- ]
796
- })
797
- });
798
- };
799
- //#endregion
800
- export { G as CartOwnerDashboard };
801
-
802
- //# sourceMappingURL=CartOwnerDashboard.js.map