@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,788 +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 { 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, TrendingDown as w, TrendingUp as T, UserCheck as E, Users as D } from "lucide-react";
8
- import { jsx as O, jsxs as k } from "react/jsx-runtime";
9
- import { EmphasisPanel as A, NextSteps as j } from "@burdenoff/fe-libs/ui";
10
- //#region src/adaptercloud/pages/cart-owner/CartOwnerDashboard.tsx
11
- var M = {
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
- }, N = [
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
- ], P = [
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
- ], F = [
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
- ], I = [
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
- ], L = i.orderTrends.slice(0, 7), R = () => {
144
- let e = (/* @__PURE__ */ new Date()).getHours();
145
- return e < 12 ? "Good Morning" : e < 17 ? "Good Afternoon" : "Good Evening";
146
- }, z = {
147
- pending: "bg-status-error-bg-subtle/15 text-status-error-text",
148
- preparing: "bg-status-warning-bg-subtle/15 text-status-warning-text",
149
- ready: "bg-accent-blue-subtle/15 text-accent-blue",
150
- delivered: "bg-status-success-bg-subtle/15 text-status-success-text",
151
- cancelled: "bg-bg-sunken text-text-secondary"
152
- }, B = {
153
- active: "bg-status-success-bg-subtle",
154
- "on-break": "bg-status-warning-bg-subtle",
155
- "off-duty": "bg-muted-foreground"
156
- }, V = {
157
- info: "text-accent-blue",
158
- warning: "text-status-warning-text",
159
- success: "text-status-success-text"
160
- }, H = () => {
161
- let { navigateTo: i } = e(), [H, U] = a(N), [W, G] = 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
- }), K = (e) => {
167
- U((t) => t.map((t) => t.id === e ? {
168
- ...t,
169
- status: "preparing"
170
- } : t));
171
- }, q = (e) => {
172
- U((t) => t.map((t) => t.id === e ? {
173
- ...t,
174
- status: "ready"
175
- } : t));
176
- };
177
- return /* @__PURE__ */ O(n, {
178
- title: /* @__PURE__ */ k("span", { children: [
179
- R(),
180
- ", ",
181
- /* @__PURE__ */ O("span", {
182
- className: "text-text-secondary font-normal",
183
- children: "Rajesh"
184
- })
185
- ] }),
186
- description: "Manage your service provider operations",
187
- purpose: "Your daily home base as a cart owner — see today's orders and earnings at a glance, check whether your cart is open, and jump straight to the things that need you. Start here every morning to run your business.",
188
- actions: /* @__PURE__ */ k("button", {
189
- type: "button",
190
- onClick: () => i("/cart-owner/orders"),
191
- 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",
192
- children: ["View All Orders", /* @__PURE__ */ O(c, { className: "h-4 w-4" })]
193
- }),
194
- children: /* @__PURE__ */ k("div", {
195
- className: "space-y-6",
196
- children: [
197
- /* @__PURE__ */ O("div", {
198
- className: t("p-4 rounded-lg border-l-4", W.isOpen ? "border-status-success-border bg-status-success-bg-subtle/5" : "border-status-error-border bg-status-error-bg-subtle/5"),
199
- children: /* @__PURE__ */ k("div", {
200
- className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",
201
- children: [/* @__PURE__ */ k("div", {
202
- className: "flex items-start gap-3",
203
- children: [/* @__PURE__ */ O("div", {
204
- "aria-hidden": "true",
205
- className: t("w-3 h-3 rounded-full mt-1 shrink-0", W.isOpen ? "bg-status-success-text motion-safe:animate-vc-glow-pulse" : "bg-status-error-text")
206
- }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("h3", {
207
- className: "font-semibold text-text-primary text-sm",
208
- children: ["Service Status: ", W.isOpen ? "Open" : "Closed"]
209
- }), /* @__PURE__ */ k("div", {
210
- className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 mt-1 text-xs text-text-secondary",
211
- children: [/* @__PURE__ */ k("span", {
212
- className: "flex items-center gap-1",
213
- children: [/* @__PURE__ */ O(v, { className: "h-3 w-3 shrink-0" }), W.currentLocation]
214
- }), /* @__PURE__ */ k("span", {
215
- className: "flex items-center gap-1",
216
- children: [/* @__PURE__ */ O(p, { className: "h-3 w-3 shrink-0" }), W.operatingHours]
217
- })]
218
- })] })]
219
- }), /* @__PURE__ */ k("div", {
220
- className: "flex gap-2",
221
- children: [/* @__PURE__ */ k("button", {
222
- type: "button",
223
- onClick: () => i("/cart-owner/settings"),
224
- className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
225
- children: [/* @__PURE__ */ O(v, { className: "h-3 w-3" }), "Update Location"]
226
- }), /* @__PURE__ */ O("button", {
227
- type: "button",
228
- onClick: () => {
229
- G((e) => e && {
230
- ...e,
231
- isOpen: !e.isOpen
232
- });
233
- },
234
- className: t("inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", W.isOpen ? "bg-status-error-bg-subtle/10 text-status-error-text hover:bg-status-error-bg-subtle/20" : "bg-status-success-bg-subtle/10 text-status-success-text hover:bg-status-success-bg-subtle/20"),
235
- children: W.isOpen ? "Close Service" : "Open Service"
236
- })]
237
- })]
238
- })
239
- }),
240
- /* @__PURE__ */ k(A, { children: [/* @__PURE__ */ O("h2", {
241
- className: "text-base font-semibold text-text-primary mb-3",
242
- children: "Today's Performance"
243
- }), /* @__PURE__ */ O("div", {
244
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
245
- children: [
246
- {
247
- label: "Daily Revenue",
248
- value: r(M.dailyRevenue, { minimumFractionDigits: 0 }),
249
- icon: _,
250
- trend: "+15.2% vs yesterday",
251
- trendUp: !0
252
- },
253
- {
254
- label: "Orders Today",
255
- value: String(M.ordersToday),
256
- icon: S,
257
- trend: "+8.5% vs yesterday",
258
- trendUp: !0
259
- },
260
- {
261
- label: "Avg Order Value",
262
- value: r(M.averageOrderValue, { minimumFractionDigits: 0 }),
263
- icon: T,
264
- trend: "+3.2% vs last week",
265
- trendUp: !0
266
- },
267
- {
268
- label: "Service Rating",
269
- value: M.rating.toFixed(1),
270
- icon: C,
271
- trend: "Based on 342 reviews",
272
- trendUp: !0
273
- }
274
- ].map((e) => {
275
- let t = e.icon;
276
- return /* @__PURE__ */ k("div", {
277
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
278
- children: [
279
- /* @__PURE__ */ k("div", {
280
- className: "flex items-center justify-between",
281
- children: [/* @__PURE__ */ O("div", {
282
- className: "rounded-md bg-accent p-2",
283
- children: /* @__PURE__ */ O(t, { className: "h-5 w-5 text-text-secondary" })
284
- }), /* @__PURE__ */ k("div", {
285
- className: "flex items-center gap-1 text-xs text-text-secondary",
286
- children: [e.trendUp ? /* @__PURE__ */ O(T, { className: "h-3 w-3 text-status-success-text" }) : /* @__PURE__ */ O(w, { className: "h-3 w-3 text-status-error-text" }), /* @__PURE__ */ O("span", { children: e.trend })]
287
- })]
288
- }),
289
- /* @__PURE__ */ O("p", {
290
- className: "mt-3 text-2xl font-bold text-text-primary",
291
- children: e.value
292
- }),
293
- /* @__PURE__ */ O("p", {
294
- className: "mt-1 text-sm text-text-secondary",
295
- children: e.label
296
- })
297
- ]
298
- }, e.label);
299
- })
300
- })] }),
301
- /* @__PURE__ */ O(j, {
302
- storageKey: "adaptercloud-cartowner-dashboard",
303
- steps: [
304
- {
305
- id: "manage-orders",
306
- label: "Work your live order queue",
307
- description: "Accept and progress incoming orders so customers stay updated.",
308
- onClick: () => i("/cart-owner/orders")
309
- },
310
- {
311
- id: "update-offerings",
312
- label: "Update your offerings",
313
- description: "Add products, set prices, and keep availability current.",
314
- onClick: () => i("/cart-owner/inventory")
315
- },
316
- {
317
- id: "check-analytics",
318
- label: "Review your analytics",
319
- description: "See what sells and when to staff up.",
320
- onClick: () => i("/cart-owner/analytics")
321
- }
322
- ]
323
- }),
324
- /* @__PURE__ */ k("div", {
325
- className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
326
- children: [/* @__PURE__ */ k("div", {
327
- className: "lg:col-span-2 space-y-6",
328
- children: [
329
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", {
330
- className: "text-base font-semibold mb-3 text-text-primary",
331
- children: "Quick Actions"
332
- }), /* @__PURE__ */ O("div", {
333
- className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3",
334
- children: [
335
- {
336
- label: "Service Config",
337
- icon: x,
338
- color: "bg-accent-orange-subtle/10 text-accent-orange",
339
- path: "/cart-owner/service-config"
340
- },
341
- {
342
- label: "Manage Offerings",
343
- icon: y,
344
- color: "bg-accent-blue-subtle/10 text-accent-blue",
345
- path: "/cart-owner/inventory"
346
- },
347
- {
348
- label: "View Orders",
349
- icon: S,
350
- color: "bg-status-success-bg-subtle/10 text-status-success-text",
351
- path: "/cart-owner/orders"
352
- },
353
- {
354
- label: "Analytics",
355
- icon: l,
356
- color: "bg-accent-purple-subtle/10 text-accent-purple",
357
- path: "/cart-owner/analytics"
358
- },
359
- {
360
- label: "Staff",
361
- icon: E,
362
- color: "bg-accent-pink-subtle/10 text-accent-pink",
363
- path: "/cart-owner/staff"
364
- }
365
- ].map((e) => {
366
- let n = e.icon;
367
- return /* @__PURE__ */ k("button", {
368
- type: "button",
369
- onClick: () => i(e.path),
370
- className: t("flex flex-col items-center gap-2 rounded-lg p-4 transition-colors hover:opacity-80", e.color),
371
- children: [/* @__PURE__ */ O(n, { className: "h-5 w-5" }), /* @__PURE__ */ O("span", {
372
- className: "text-xs font-medium text-center",
373
- children: e.label
374
- })]
375
- }, e.label);
376
- })
377
- })] }),
378
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("div", {
379
- className: "flex items-center justify-between mb-3",
380
- children: [/* @__PURE__ */ O("h3", {
381
- className: "text-base font-semibold text-text-primary",
382
- children: "Recent Orders"
383
- }), /* @__PURE__ */ O("button", {
384
- type: "button",
385
- onClick: () => i("/cart-owner/orders"),
386
- className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
387
- children: "View All Orders"
388
- })]
389
- }), /* @__PURE__ */ O("div", {
390
- className: "space-y-3",
391
- children: H.map((e) => /* @__PURE__ */ O("div", {
392
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
393
- children: /* @__PURE__ */ k("div", {
394
- className: "flex flex-col lg:flex-row lg:items-start lg:justify-between gap-3",
395
- children: [/* @__PURE__ */ k("div", {
396
- className: "flex-1 min-w-0",
397
- children: [
398
- /* @__PURE__ */ k("div", {
399
- className: "flex flex-wrap items-center gap-2 mb-1",
400
- children: [
401
- /* @__PURE__ */ k("h4", {
402
- className: "font-semibold text-text-primary text-sm",
403
- children: ["#", e.id]
404
- }),
405
- /* @__PURE__ */ O("span", {
406
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium capitalize", z[e.status] || "bg-bg-sunken text-text-secondary"),
407
- children: e.status
408
- }),
409
- e.priority === "urgent" && /* @__PURE__ */ O(s, { className: "h-4 w-4 text-status-error-text" })
410
- ]
411
- }),
412
- /* @__PURE__ */ k("p", {
413
- className: "text-xs text-text-secondary mb-1",
414
- children: ["Customer: ", e.customerName]
415
- }),
416
- /* @__PURE__ */ k("p", {
417
- className: "text-xs text-text-secondary mb-1 truncate",
418
- children: ["Items: ", e.items.join(", ")]
419
- }),
420
- /* @__PURE__ */ k("div", {
421
- className: "flex flex-wrap items-center gap-3 text-xs text-text-secondary",
422
- children: [/* @__PURE__ */ O("span", {
423
- className: "font-semibold text-text-primary",
424
- children: r(e.total, { minimumFractionDigits: 0 })
425
- }), /* @__PURE__ */ k("span", {
426
- className: "flex items-center gap-1",
427
- children: [/* @__PURE__ */ O(p, { className: "h-3 w-3" }), e.timestamp]
428
- })]
429
- })
430
- ]
431
- }), /* @__PURE__ */ k("div", {
432
- className: "flex gap-2",
433
- children: [
434
- /* @__PURE__ */ k("button", {
435
- type: "button",
436
- onClick: () => i("/cart-owner/orders"),
437
- className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
438
- children: [/* @__PURE__ */ O(h, { className: "h-3 w-3" }), "View"]
439
- }),
440
- e.status === "pending" && /* @__PURE__ */ k("button", {
441
- type: "button",
442
- onClick: () => K(e.id),
443
- className: "inline-flex items-center gap-1 rounded-md bg-status-success-bg-subtle/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
444
- children: [/* @__PURE__ */ O(d, { className: "h-3 w-3" }), "Accept"]
445
- }),
446
- e.status === "preparing" && /* @__PURE__ */ k("button", {
447
- type: "button",
448
- onClick: () => q(e.id),
449
- className: "inline-flex items-center gap-1 rounded-md bg-accent-blue-subtle/10 px-3 py-1.5 text-xs font-medium text-accent-blue hover:bg-accent-blue-subtle/20 transition-colors",
450
- children: [/* @__PURE__ */ O(d, { className: "h-3 w-3" }), "Mark Ready"]
451
- })
452
- ]
453
- })]
454
- })
455
- }, e.id))
456
- })] }),
457
- /* @__PURE__ */ k("div", {
458
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
459
- children: [/* @__PURE__ */ k("div", {
460
- className: "flex items-center justify-between border-b border-border-subtle px-5 py-4",
461
- children: [/* @__PURE__ */ O("h3", {
462
- className: "text-base font-semibold text-text-primary",
463
- children: "Revenue (Last 7 Days)"
464
- }), /* @__PURE__ */ O("button", {
465
- type: "button",
466
- onClick: () => i("/cart-owner/analytics"),
467
- className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
468
- children: "View Analytics"
469
- })]
470
- }), /* @__PURE__ */ O("div", {
471
- className: "overflow-x-auto",
472
- children: /* @__PURE__ */ k("table", {
473
- className: "w-full text-sm",
474
- children: [/* @__PURE__ */ O("thead", { children: /* @__PURE__ */ k("tr", {
475
- className: "border-b border-border-subtle",
476
- children: [
477
- /* @__PURE__ */ O("th", {
478
- className: "px-5 py-3 text-left font-medium text-text-secondary",
479
- children: "Date"
480
- }),
481
- /* @__PURE__ */ O("th", {
482
- className: "px-5 py-3 text-right font-medium text-text-secondary",
483
- children: "Orders"
484
- }),
485
- /* @__PURE__ */ O("th", {
486
- className: "px-5 py-3 text-right font-medium text-text-secondary",
487
- children: "Revenue"
488
- }),
489
- /* @__PURE__ */ O("th", {
490
- className: "px-5 py-3 text-left font-medium text-text-secondary",
491
- children: "Trend"
492
- })
493
- ]
494
- }) }), /* @__PURE__ */ O("tbody", { children: L.map((e, t) => {
495
- let n = Math.max(...L.map((e) => e.revenue)), i = e.revenue / n * 100;
496
- return /* @__PURE__ */ k("tr", {
497
- className: "border-b border-border-subtle last:border-0",
498
- children: [
499
- /* @__PURE__ */ O("td", {
500
- className: "px-5 py-3 text-text-primary text-xs",
501
- children: new Date(e.date).toLocaleDateString("en-IN", {
502
- day: "2-digit",
503
- month: "short",
504
- weekday: "short"
505
- })
506
- }),
507
- /* @__PURE__ */ O("td", {
508
- className: "px-5 py-3 text-right text-text-primary",
509
- children: e.orders
510
- }),
511
- /* @__PURE__ */ O("td", {
512
- className: "px-5 py-3 text-right font-medium text-text-primary",
513
- children: r(e.revenue, { minimumFractionDigits: 0 })
514
- }),
515
- /* @__PURE__ */ O("td", {
516
- className: "px-5 py-3 w-40",
517
- children: /* @__PURE__ */ O("div", {
518
- className: "h-4 rounded bg-bg-sunken overflow-hidden",
519
- children: /* @__PURE__ */ O("div", {
520
- className: "h-full rounded bg-accent-blue-subtle/60",
521
- style: { width: `${i}%` }
522
- })
523
- })
524
- })
525
- ]
526
- }, e.date);
527
- }) })]
528
- })
529
- })]
530
- }),
531
- /* @__PURE__ */ k("div", {
532
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
533
- children: [/* @__PURE__ */ O("h3", {
534
- className: "text-base font-semibold text-text-primary mb-4",
535
- children: "This Month Summary"
536
- }), /* @__PURE__ */ k("div", {
537
- className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
538
- children: [
539
- /* @__PURE__ */ k("div", {
540
- className: "text-center p-3 rounded-lg bg-bg-sunken/50",
541
- children: [/* @__PURE__ */ O("div", {
542
- className: "text-xl font-bold text-text-primary",
543
- children: r(M.totalRevenue, { minimumFractionDigits: 0 })
544
- }), /* @__PURE__ */ O("div", {
545
- className: "text-xs text-text-secondary mt-1",
546
- children: "Total Revenue"
547
- })]
548
- }),
549
- /* @__PURE__ */ k("div", {
550
- className: "text-center p-3 rounded-lg bg-bg-sunken/50",
551
- children: [/* @__PURE__ */ O("div", {
552
- className: "text-xl font-bold text-text-primary",
553
- children: M.totalOrders
554
- }), /* @__PURE__ */ O("div", {
555
- className: "text-xs text-text-secondary mt-1",
556
- children: "Total Orders"
557
- })]
558
- }),
559
- /* @__PURE__ */ k("div", {
560
- className: "text-center p-3 rounded-lg bg-bg-sunken/50",
561
- children: [/* @__PURE__ */ O("div", {
562
- className: "text-xl font-bold text-text-primary",
563
- children: M.customerCount
564
- }), /* @__PURE__ */ O("div", {
565
- className: "text-xs text-text-secondary mt-1",
566
- children: "Unique Customers"
567
- })]
568
- })
569
- ]
570
- })]
571
- })
572
- ]
573
- }), /* @__PURE__ */ k("div", {
574
- className: "space-y-6",
575
- children: [
576
- /* @__PURE__ */ k("div", {
577
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
578
- children: [/* @__PURE__ */ k("div", {
579
- className: "flex items-center justify-between mb-4",
580
- children: [/* @__PURE__ */ k("h3", {
581
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
582
- children: [/* @__PURE__ */ O(u, { className: "h-4 w-4" }), "Notifications"]
583
- }), /* @__PURE__ */ O("span", {
584
- className: "inline-flex items-center justify-center rounded-full bg-status-error-bg-subtle text-white text-[10px] font-bold h-5 w-5",
585
- children: I.length
586
- })]
587
- }), /* @__PURE__ */ O("div", {
588
- className: "space-y-3",
589
- children: I.map((e) => /* @__PURE__ */ k("div", {
590
- className: "flex items-start gap-2",
591
- children: [/* @__PURE__ */ O(o, { className: t("h-4 w-4 mt-0.5 shrink-0", V[e.type]) }), /* @__PURE__ */ k("div", {
592
- className: "min-w-0",
593
- children: [/* @__PURE__ */ O("p", {
594
- className: "text-xs text-text-primary leading-tight",
595
- children: e.message
596
- }), /* @__PURE__ */ O("p", {
597
- className: "text-[10px] text-text-secondary mt-0.5",
598
- children: e.time
599
- })]
600
- })]
601
- }, e.id))
602
- })]
603
- }),
604
- /* @__PURE__ */ k("div", {
605
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
606
- children: [/* @__PURE__ */ k("h3", {
607
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
608
- children: [/* @__PURE__ */ O(g, { className: "h-4 w-4 text-accent-orange" }), "Top Selling Items"]
609
- }), /* @__PURE__ */ O("div", {
610
- className: "space-y-3",
611
- children: P.map((e, t) => /* @__PURE__ */ k("div", {
612
- className: "flex items-center justify-between",
613
- children: [/* @__PURE__ */ k("div", {
614
- className: "flex items-center gap-2 min-w-0",
615
- children: [/* @__PURE__ */ O("span", {
616
- className: "text-sm font-bold text-text-secondary w-5",
617
- children: t + 1
618
- }), /* @__PURE__ */ k("div", {
619
- className: "min-w-0",
620
- children: [/* @__PURE__ */ O("p", {
621
- className: "text-xs font-medium text-text-primary truncate",
622
- children: e.name
623
- }), /* @__PURE__ */ k("p", {
624
- className: "text-[10px] text-text-secondary",
625
- children: [e.quantity, " sold"]
626
- })]
627
- })]
628
- }), /* @__PURE__ */ O("span", {
629
- className: "text-xs font-semibold text-text-primary",
630
- children: r(e.revenue, { minimumFractionDigits: 0 })
631
- })]
632
- }, e.name))
633
- })]
634
- }),
635
- /* @__PURE__ */ k("div", {
636
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
637
- children: [/* @__PURE__ */ k("div", {
638
- className: "flex items-center justify-between mb-4",
639
- children: [/* @__PURE__ */ k("h3", {
640
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
641
- children: [/* @__PURE__ */ O(D, { className: "h-4 w-4" }), "Staff Overview"]
642
- }), /* @__PURE__ */ O("button", {
643
- type: "button",
644
- onClick: () => i("/cart-owner/staff"),
645
- className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
646
- children: "Manage"
647
- })]
648
- }), /* @__PURE__ */ O("div", {
649
- className: "space-y-3",
650
- children: F.map((e) => /* @__PURE__ */ k("div", {
651
- className: "flex items-center justify-between",
652
- children: [/* @__PURE__ */ k("div", {
653
- className: "flex items-center gap-2",
654
- children: [/* @__PURE__ */ O("div", { className: t("w-2 h-2 rounded-full", B[e.status]) }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
655
- className: "text-xs font-medium text-text-primary",
656
- children: e.name
657
- }), /* @__PURE__ */ O("p", {
658
- className: "text-[10px] text-text-secondary",
659
- children: e.role
660
- })] })]
661
- }), /* @__PURE__ */ O("span", {
662
- className: "text-[10px] capitalize text-text-secondary",
663
- children: e.status.replace("-", " ")
664
- })]
665
- }, e.name))
666
- })]
667
- }),
668
- /* @__PURE__ */ k("div", {
669
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
670
- children: [/* @__PURE__ */ O("h3", {
671
- className: "text-base font-semibold text-text-primary mb-4",
672
- children: "Quick Stats"
673
- }), /* @__PURE__ */ k("div", {
674
- className: "space-y-3",
675
- children: [
676
- /* @__PURE__ */ k("div", {
677
- className: "flex items-center justify-between",
678
- children: [/* @__PURE__ */ O("span", {
679
- className: "text-xs text-text-secondary",
680
- children: "Active Offerings"
681
- }), /* @__PURE__ */ O("span", {
682
- className: "text-sm font-semibold text-text-primary",
683
- children: M.activeOfferings
684
- })]
685
- }),
686
- /* @__PURE__ */ k("div", {
687
- className: "flex items-center justify-between",
688
- children: [/* @__PURE__ */ O("span", {
689
- className: "text-xs text-text-secondary",
690
- children: "Customer Rating"
691
- }), /* @__PURE__ */ k("span", {
692
- className: "text-sm font-semibold text-text-primary flex items-center gap-1",
693
- children: [/* @__PURE__ */ O(C, { className: "h-3 w-3 text-status-warning-text fill-status-warning-text" }), M.rating]
694
- })]
695
- }),
696
- /* @__PURE__ */ k("div", {
697
- className: "flex items-center justify-between",
698
- children: [/* @__PURE__ */ O("span", {
699
- className: "text-xs text-text-secondary",
700
- children: "Total Customers"
701
- }), /* @__PURE__ */ O("span", {
702
- className: "text-sm font-semibold text-text-primary",
703
- children: M.customerCount
704
- })]
705
- })
706
- ]
707
- })]
708
- }),
709
- /* @__PURE__ */ k("div", {
710
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
711
- children: [/* @__PURE__ */ O("h3", {
712
- className: "text-base font-semibold text-text-primary mb-3",
713
- children: "Business Settings"
714
- }), /* @__PURE__ */ O("div", {
715
- className: "space-y-2",
716
- children: [
717
- {
718
- label: "Service Settings",
719
- icon: x,
720
- path: "/cart-owner/settings"
721
- },
722
- {
723
- label: "Business Profile",
724
- icon: m,
725
- path: "/cart-owner/profile"
726
- },
727
- {
728
- label: "Add Offerings",
729
- icon: b,
730
- path: "/cart-owner/inventory"
731
- }
732
- ].map((e) => {
733
- let t = e.icon;
734
- return /* @__PURE__ */ k("button", {
735
- type: "button",
736
- onClick: () => i(e.path),
737
- className: "w-full flex items-center justify-between rounded-md border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
738
- children: [/* @__PURE__ */ k("span", {
739
- className: "flex items-center gap-2",
740
- children: [/* @__PURE__ */ O(t, { className: "h-3.5 w-3.5" }), e.label]
741
- }), /* @__PURE__ */ O(f, { className: "h-3 w-3 text-text-secondary" })]
742
- }, e.label);
743
- })
744
- })]
745
- }),
746
- /* @__PURE__ */ k("div", {
747
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
748
- children: [/* @__PURE__ */ O("h3", {
749
- className: "text-base font-semibold text-text-primary mb-3",
750
- children: "Recent Activity"
751
- }), /* @__PURE__ */ k("div", {
752
- className: "space-y-2 text-xs",
753
- children: [
754
- /* @__PURE__ */ k("div", {
755
- className: "flex items-center gap-2",
756
- children: [/* @__PURE__ */ O(o, { className: "h-3.5 w-3.5 text-status-success-text" }), /* @__PURE__ */ O("span", {
757
- className: "text-text-secondary",
758
- children: "Order #ORD-003 delivered"
759
- })]
760
- }),
761
- /* @__PURE__ */ k("div", {
762
- className: "flex items-center gap-2",
763
- children: [/* @__PURE__ */ O(o, { className: "h-3.5 w-3.5 text-accent-blue" }), /* @__PURE__ */ O("span", {
764
- className: "text-text-secondary",
765
- children: "Inventory updated"
766
- })]
767
- }),
768
- /* @__PURE__ */ k("div", {
769
- className: "flex items-center gap-2",
770
- children: [/* @__PURE__ */ O(o, { className: "h-3.5 w-3.5 text-status-warning-text" }), /* @__PURE__ */ O("span", {
771
- className: "text-text-secondary",
772
- children: "New customer review"
773
- })]
774
- })
775
- ]
776
- })]
777
- })
778
- ]
779
- })]
780
- })
781
- ]
782
- })
783
- });
784
- };
785
- //#endregion
786
- export { H as CartOwnerDashboard };
787
-
788
- //# sourceMappingURL=CartOwnerDashboard.js.map