@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.
- package/dist/index.js +4 -4
- package/dist/subscriberbot/SubscriberBotRoot.js +61 -133
- package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
- package/dist/subscriberbot/SubscriberBotRoutes.js +56 -187
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
- package/dist/subscriberbot/components/StateViews.js +49 -0
- package/dist/subscriberbot/components/StateViews.js.map +1 -0
- package/dist/subscriberbot/components/StatusBadge.js +45 -47
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/context/SubscriberBotContext.js +22 -30
- package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +342 -195
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/index.js +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +269 -0
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -0
- package/dist/subscriberbot/pages/InboxPage.js +186 -0
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -0
- package/dist/subscriberbot/pages/InvoicesPage.js +211 -0
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -0
- package/dist/subscriberbot/pages/WorkflowsPage.js +236 -0
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -0
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +160 -0
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -0
- package/dist/subscriberbot/pages/agents/AgentNewPage.js +140 -0
- package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -0
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +178 -0
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -0
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +179 -0
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -0
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +185 -0
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -0
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +254 -0
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -0
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +306 -0
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -0
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +253 -0
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -0
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +248 -0
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -0
- package/dist/subscriberbot/utils/formatters.js +50 -32
- package/dist/subscriberbot/utils/formatters.js.map +1 -1
- package/package.json +1 -1
- package/dist/subscriberbot/components/InvestmentCard.js +0 -97
- package/dist/subscriberbot/components/InvestmentCard.js.map +0 -1
- package/dist/subscriberbot/components/RatingDisplay.js +0 -35
- package/dist/subscriberbot/components/RatingDisplay.js.map +0 -1
- package/dist/subscriberbot/mocks/data.js +0 -1517
- package/dist/subscriberbot/mocks/data.js.map +0 -1
- package/dist/subscriberbot/mocks/users.js +0 -34
- package/dist/subscriberbot/mocks/users.js.map +0 -1
- package/dist/subscriberbot/pages/HomePage.js +0 -930
- package/dist/subscriberbot/pages/HomePage.js.map +0 -1
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +0 -651
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +0 -1
- package/dist/subscriberbot/pages/admin/AdminDashboard.js +0 -679
- package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +0 -1
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +0 -427
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +0 -1
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +0 -665
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +0 -1
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js +0 -261
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +0 -1
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +0 -654
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +0 -1
- package/dist/subscriberbot/pages/admin/CartManagementPage.js +0 -874
- package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +0 -1
- package/dist/subscriberbot/pages/admin/UserManagementPage.js +0 -898
- package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +0 -1
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +0 -839
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +0 -705
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +0 -802
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +0 -891
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +0 -633
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +0 -910
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +0 -1
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +0 -879
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +0 -1
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +0 -838
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +0 -1
- package/dist/subscriberbot/pages/common/HelpSupportPage.js +0 -1323
- package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +0 -1
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js +0 -672
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +0 -1
- package/dist/subscriberbot/pages/common/SettingsPage.js +0 -973
- package/dist/subscriberbot/pages/common/SettingsPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +0 -626
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/CartDetailPage.js +0 -654
- package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +0 -555
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/CheckoutPage.js +0 -529
- package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js +0 -532
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +0 -1
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +0 -630
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +0 -633
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/FavoritesPage.js +0 -484
- package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +0 -446
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +0 -394
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +0 -495
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/ReviewsPage.js +0 -613
- package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +0 -1
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +0 -450
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +0 -1
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +0 -886
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +0 -1
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +0 -947
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +0 -687
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +0 -1
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js +0 -451
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +0 -1
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +0 -406
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +0 -1
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +0 -575
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +0 -1
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +0 -1070
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +0 -1
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +0 -535
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +0 -1
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js +0 -666
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +0 -1
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +0 -681
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +0 -1
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +0 -692
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +0 -1
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +0 -588
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +0 -1
|
@@ -1,930 +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 { MetricsCard as r } from "../components/MetricsCard.js";
|
|
5
|
-
import { StatusBadge as i } from "../components/StatusBadge.js";
|
|
6
|
-
import { EmptyState as a } from "../components/EmptyState.js";
|
|
7
|
-
import { useSubscriberBotApi as o } from "../hooks/useSubscriberBotApi.js";
|
|
8
|
-
import { formatCurrency as s, formatDistance as c, formatRelativeTime as l } from "../utils/formatters.js";
|
|
9
|
-
import { useCallback as u, useMemo as d, useState as f } from "react";
|
|
10
|
-
import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
-
import { Activity as m, AlertCircle as h, ArrowRight as g, BadgeCheck as _, BarChart3 as v, CheckCircle2 as y, ChefHat as b, ClipboardList as x, Clock as S, FileText as C, GraduationCap as w, HandCoins as T, Heart as E, Home as D, IndianRupee as O, LayoutDashboard as k, Loader2 as A, MapPin as j, Package as M, Scissors as N, Search as P, Settings as F, Shirt as I, ShoppingBag as L, ShoppingCart as R, Sparkles as z, Star as B, Store as V, TrendingUp as H, Truck as U, Users as W, Wallet as G, Wrench as K } from "lucide-react";
|
|
12
|
-
import { jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
13
|
-
import { EmphasisPanel as Y, PagePurpose as X } from "@burdenoff/fe-libs/ui";
|
|
14
|
-
//#region src/subscriberbot/pages/HomePage.tsx
|
|
15
|
-
var Z = {
|
|
16
|
-
customer: [
|
|
17
|
-
{
|
|
18
|
-
label: "Discover Services",
|
|
19
|
-
description: "Browse carts near you",
|
|
20
|
-
icon: /* @__PURE__ */ q(P, { className: "h-5 w-5" }),
|
|
21
|
-
path: "/customer/carts",
|
|
22
|
-
color: "bg-status-info-bg/10 text-status-info-text"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: "My Orders",
|
|
26
|
-
description: "Track your orders",
|
|
27
|
-
icon: /* @__PURE__ */ q(L, { className: "h-5 w-5" }),
|
|
28
|
-
path: "/customer/orders",
|
|
29
|
-
color: "bg-status-success-bg/10 text-status-success-text"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: "Favorites",
|
|
33
|
-
description: "Your saved carts",
|
|
34
|
-
icon: /* @__PURE__ */ q(E, { className: "h-5 w-5" }),
|
|
35
|
-
path: "/customer/favorites",
|
|
36
|
-
color: "bg-accent-purple-subtle text-accent-purple"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: "Settings",
|
|
40
|
-
description: "Manage preferences",
|
|
41
|
-
icon: /* @__PURE__ */ q(F, { className: "h-5 w-5" }),
|
|
42
|
-
path: "/settings",
|
|
43
|
-
color: "bg-bg-sunken text-text-secondary"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
cart_owner: [
|
|
47
|
-
{
|
|
48
|
-
label: "My Cart",
|
|
49
|
-
description: "Manage your cart",
|
|
50
|
-
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
|
|
51
|
-
path: "/owner/dashboard",
|
|
52
|
-
color: "bg-accent-purple-subtle text-accent-purple"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: "Orders",
|
|
56
|
-
description: "Incoming orders",
|
|
57
|
-
icon: /* @__PURE__ */ q(L, { className: "h-5 w-5" }),
|
|
58
|
-
path: "/owner/orders",
|
|
59
|
-
color: "bg-status-info-bg/10 text-status-info-text"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: "Analytics",
|
|
63
|
-
description: "Revenue & insights",
|
|
64
|
-
icon: /* @__PURE__ */ q(v, { className: "h-5 w-5" }),
|
|
65
|
-
path: "/owner/analytics",
|
|
66
|
-
color: "bg-status-success-bg/10 text-status-success-text"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: "Staff",
|
|
70
|
-
description: "Manage workers",
|
|
71
|
-
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" }),
|
|
72
|
-
path: "/owner/staff",
|
|
73
|
-
color: "bg-status-warning-bg/10 text-status-warning-text"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
worker: [
|
|
77
|
-
{
|
|
78
|
-
label: "My Tasks",
|
|
79
|
-
description: "View assigned tasks",
|
|
80
|
-
icon: /* @__PURE__ */ q(x, { className: "h-5 w-5" }),
|
|
81
|
-
path: "/worker/dashboard",
|
|
82
|
-
color: "bg-status-warning-bg/10 text-status-warning-text"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
label: "Schedule",
|
|
86
|
-
description: "View shifts",
|
|
87
|
-
icon: /* @__PURE__ */ q(S, { className: "h-5 w-5" }),
|
|
88
|
-
path: "/worker/schedule",
|
|
89
|
-
color: "bg-status-info-bg/10 text-status-info-text"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
label: "Earnings",
|
|
93
|
-
description: "Track pay",
|
|
94
|
-
icon: /* @__PURE__ */ q(G, { className: "h-5 w-5" }),
|
|
95
|
-
path: "/worker/earnings",
|
|
96
|
-
color: "bg-status-success-bg/10 text-status-success-text"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
label: "Performance",
|
|
100
|
-
description: "Ratings & stats",
|
|
101
|
-
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
102
|
-
path: "/worker/performance",
|
|
103
|
-
color: "bg-status-warning-bg/10 text-status-warning-text"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
investor: [
|
|
107
|
-
{
|
|
108
|
-
label: "Portfolio",
|
|
109
|
-
description: "Your investments",
|
|
110
|
-
icon: /* @__PURE__ */ q(H, { className: "h-5 w-5" }),
|
|
111
|
-
path: "/investor/dashboard",
|
|
112
|
-
color: "bg-status-success-bg/10 text-status-success-text"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: "Opportunities",
|
|
116
|
-
description: "New investments",
|
|
117
|
-
icon: /* @__PURE__ */ q(T, { className: "h-5 w-5" }),
|
|
118
|
-
path: "/investor/opportunities",
|
|
119
|
-
color: "bg-status-info-bg/10 text-status-info-text"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
label: "Returns",
|
|
123
|
-
description: "Earnings history",
|
|
124
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
125
|
-
path: "/investor/returns",
|
|
126
|
-
color: "bg-status-success-bg/10 text-status-success-text"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
label: "Reports",
|
|
130
|
-
description: "Performance reports",
|
|
131
|
-
icon: /* @__PURE__ */ q(C, { className: "h-5 w-5" }),
|
|
132
|
-
path: "/investor/reports",
|
|
133
|
-
color: "bg-accent-purple-subtle text-accent-purple"
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
admin: [
|
|
137
|
-
{
|
|
138
|
-
label: "Dashboard",
|
|
139
|
-
description: "Platform overview",
|
|
140
|
-
icon: /* @__PURE__ */ q(k, { className: "h-5 w-5" }),
|
|
141
|
-
path: "/admin/dashboard",
|
|
142
|
-
color: "bg-status-error-bg/10 text-status-error-text"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
label: "Users",
|
|
146
|
-
description: "Manage accounts",
|
|
147
|
-
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" }),
|
|
148
|
-
path: "/admin/users",
|
|
149
|
-
color: "bg-status-info-bg/10 text-status-info-text"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
label: "Carts",
|
|
153
|
-
description: "Approve & manage",
|
|
154
|
-
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
|
|
155
|
-
path: "/admin/carts",
|
|
156
|
-
color: "bg-accent-purple-subtle text-accent-purple"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
label: "Analytics",
|
|
160
|
-
description: "Revenue reports",
|
|
161
|
-
icon: /* @__PURE__ */ q(v, { className: "h-5 w-5" }),
|
|
162
|
-
path: "/admin/analytics",
|
|
163
|
-
color: "bg-status-success-bg/10 text-status-success-text"
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
};
|
|
167
|
-
function Q(e, t, n) {
|
|
168
|
-
switch (e) {
|
|
169
|
-
case "customer": return [
|
|
170
|
-
{
|
|
171
|
-
icon: /* @__PURE__ */ q(L, { className: "h-5 w-5" }),
|
|
172
|
-
value: t.length.toString(),
|
|
173
|
-
label: "Total Orders",
|
|
174
|
-
trend: "up",
|
|
175
|
-
trendValue: "+2 this week"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
|
|
179
|
-
value: (n?.activeProviders ?? 0).toString(),
|
|
180
|
-
label: "Nearby Providers",
|
|
181
|
-
trend: "up",
|
|
182
|
-
trendValue: "+3"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
186
|
-
value: (n?.avgRating ?? 0).toFixed(1),
|
|
187
|
-
label: "Avg. Rating",
|
|
188
|
-
trend: "up",
|
|
189
|
-
trendValue: "+0.1"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
193
|
-
value: s(t.reduce((e, t) => e + t.total, 0), { minimumFractionDigits: 0 }),
|
|
194
|
-
label: "Total Spent",
|
|
195
|
-
trend: "neutral",
|
|
196
|
-
trendValue: ""
|
|
197
|
-
}
|
|
198
|
-
];
|
|
199
|
-
case "cart_owner": return [
|
|
200
|
-
{
|
|
201
|
-
icon: /* @__PURE__ */ q(L, { className: "h-5 w-5" }),
|
|
202
|
-
value: "48",
|
|
203
|
-
label: "Orders Today",
|
|
204
|
-
trend: "up",
|
|
205
|
-
trendValue: "+12%"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
209
|
-
value: s(12850, { minimumFractionDigits: 0 }),
|
|
210
|
-
label: "Today's Revenue",
|
|
211
|
-
trend: "up",
|
|
212
|
-
trendValue: "+8%"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
216
|
-
value: "4.6",
|
|
217
|
-
label: "Cart Rating",
|
|
218
|
-
trend: "up",
|
|
219
|
-
trendValue: "+0.2"
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" }),
|
|
223
|
-
value: "5",
|
|
224
|
-
label: "Active Staff",
|
|
225
|
-
trend: "neutral",
|
|
226
|
-
trendValue: ""
|
|
227
|
-
}
|
|
228
|
-
];
|
|
229
|
-
case "worker": return [
|
|
230
|
-
{
|
|
231
|
-
icon: /* @__PURE__ */ q(x, { className: "h-5 w-5" }),
|
|
232
|
-
value: "5",
|
|
233
|
-
label: "Tasks Today",
|
|
234
|
-
trend: "up",
|
|
235
|
-
trendValue: "+2"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
239
|
-
value: s(425, { minimumFractionDigits: 0 }),
|
|
240
|
-
label: "Today's Earnings",
|
|
241
|
-
trend: "up",
|
|
242
|
-
trendValue: "+15%"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
246
|
-
value: "4.7",
|
|
247
|
-
label: "Rating",
|
|
248
|
-
trend: "up",
|
|
249
|
-
trendValue: "+0.1"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
icon: /* @__PURE__ */ q(y, { className: "h-5 w-5" }),
|
|
253
|
-
value: "96.8%",
|
|
254
|
-
label: "Completion Rate",
|
|
255
|
-
trend: "up",
|
|
256
|
-
trendValue: "+0.5%"
|
|
257
|
-
}
|
|
258
|
-
];
|
|
259
|
-
case "investor": return [
|
|
260
|
-
{
|
|
261
|
-
icon: /* @__PURE__ */ q(H, { className: "h-5 w-5" }),
|
|
262
|
-
value: "3",
|
|
263
|
-
label: "Active Investments",
|
|
264
|
-
trend: "up",
|
|
265
|
-
trendValue: "+1"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
269
|
-
value: s(45e4, { minimumFractionDigits: 0 }),
|
|
270
|
-
label: "Total Invested",
|
|
271
|
-
trend: "up",
|
|
272
|
-
trendValue: ""
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
icon: /* @__PURE__ */ q(T, { className: "h-5 w-5" }),
|
|
276
|
-
value: "16.5%",
|
|
277
|
-
label: "Avg. Returns",
|
|
278
|
-
trend: "up",
|
|
279
|
-
trendValue: "+2.1%"
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
icon: /* @__PURE__ */ q(v, { className: "h-5 w-5" }),
|
|
283
|
-
value: s(74250, { minimumFractionDigits: 0 }),
|
|
284
|
-
label: "Total Returns",
|
|
285
|
-
trend: "up",
|
|
286
|
-
trendValue: "+8.5%"
|
|
287
|
-
}
|
|
288
|
-
];
|
|
289
|
-
default: return [
|
|
290
|
-
{
|
|
291
|
-
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" }),
|
|
292
|
-
value: (n?.activeCustomers ?? 0).toLocaleString("en-IN"),
|
|
293
|
-
label: "Active Customers",
|
|
294
|
-
trend: "up",
|
|
295
|
-
trendValue: "+50"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
|
|
299
|
-
value: (n?.activeProviders ?? 0).toString(),
|
|
300
|
-
label: "Service Providers",
|
|
301
|
-
trend: "up",
|
|
302
|
-
trendValue: "+3"
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
icon: /* @__PURE__ */ q(L, { className: "h-5 w-5" }),
|
|
306
|
-
value: (n?.totalOrders ?? 0).toLocaleString("en-IN"),
|
|
307
|
-
label: "Total Orders",
|
|
308
|
-
trend: "up",
|
|
309
|
-
trendValue: "+12%"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
313
|
-
value: s(n?.totalRevenue ?? 0, { minimumFractionDigits: 0 }),
|
|
314
|
-
label: "Total Revenue",
|
|
315
|
-
trend: "up",
|
|
316
|
-
trendValue: "+8.5%"
|
|
317
|
-
}
|
|
318
|
-
];
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
var $ = [
|
|
322
|
-
{
|
|
323
|
-
label: "Food & Beverage",
|
|
324
|
-
icon: /* @__PURE__ */ q(b, { className: "h-6 w-6" }),
|
|
325
|
-
color: "bg-status-warning-bg/10 text-status-warning-text"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
label: "Personal Care & Beauty",
|
|
329
|
-
icon: /* @__PURE__ */ q(N, { className: "h-6 w-6" }),
|
|
330
|
-
color: "bg-accent-purple-subtle text-accent-purple"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
label: "Repair & Maintenance",
|
|
334
|
-
icon: /* @__PURE__ */ q(K, { className: "h-6 w-6" }),
|
|
335
|
-
color: "bg-status-info-bg/10 text-status-info-text"
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
label: "Home Services",
|
|
339
|
-
icon: /* @__PURE__ */ q(D, { className: "h-6 w-6" }),
|
|
340
|
-
color: "bg-status-success-bg/10 text-status-success-text"
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
label: "Clothing & Fashion",
|
|
344
|
-
icon: /* @__PURE__ */ q(I, { className: "h-6 w-6" }),
|
|
345
|
-
color: "bg-accent-purple-subtle text-accent-purple"
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
label: "Health & Wellness",
|
|
349
|
-
icon: /* @__PURE__ */ q(E, { className: "h-6 w-6" }),
|
|
350
|
-
color: "bg-status-error-bg/10 text-status-error-text"
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
label: "Education & Skills",
|
|
354
|
-
icon: /* @__PURE__ */ q(w, { className: "h-6 w-6" }),
|
|
355
|
-
color: "bg-status-warning-bg/10 text-status-warning-text"
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
label: "Retail & Merchandise",
|
|
359
|
-
icon: /* @__PURE__ */ q(M, { className: "h-6 w-6" }),
|
|
360
|
-
color: "bg-accent-indigo-subtle text-accent-indigo"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
label: "Grocery & Essentials",
|
|
364
|
-
icon: /* @__PURE__ */ q(R, { className: "h-6 w-6" }),
|
|
365
|
-
color: "bg-status-success-bg/10 text-status-success-text"
|
|
366
|
-
}
|
|
367
|
-
], ee = [
|
|
368
|
-
{
|
|
369
|
-
step: 1,
|
|
370
|
-
title: "Browse Services",
|
|
371
|
-
description: "Discover local service providers and carts near you.",
|
|
372
|
-
icon: /* @__PURE__ */ q(P, { className: "h-6 w-6" })
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
step: 2,
|
|
376
|
-
title: "Place an Order",
|
|
377
|
-
description: "Select items or services and place your order seamlessly.",
|
|
378
|
-
icon: /* @__PURE__ */ q(L, { className: "h-6 w-6" })
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
step: 3,
|
|
382
|
-
title: "Track in Real-time",
|
|
383
|
-
description: "Get live updates on your order from confirmation to delivery.",
|
|
384
|
-
icon: /* @__PURE__ */ q(U, { className: "h-6 w-6" })
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
step: 4,
|
|
388
|
-
title: "Rate & Review",
|
|
389
|
-
description: "Share your experience and help others find great services.",
|
|
390
|
-
icon: /* @__PURE__ */ q(B, { className: "h-6 w-6" })
|
|
391
|
-
}
|
|
392
|
-
], te = [
|
|
393
|
-
{
|
|
394
|
-
id: "ha-1",
|
|
395
|
-
description: "New order placed at Dosa Express",
|
|
396
|
-
time: "2 mins ago",
|
|
397
|
-
type: "order"
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
id: "ha-2",
|
|
401
|
-
description: "Quick Cuts Salon received a new review",
|
|
402
|
-
time: "15 mins ago",
|
|
403
|
-
type: "review"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
id: "ha-3",
|
|
407
|
-
description: "Investment opportunity funded: Spotless Cleaning",
|
|
408
|
-
time: "1 hour ago",
|
|
409
|
-
type: "investment"
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
id: "ha-4",
|
|
413
|
-
description: "New cart registered: Gadget Zone Brigade",
|
|
414
|
-
time: "3 hours ago",
|
|
415
|
-
type: "cart"
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
id: "ha-5",
|
|
419
|
-
description: "Order delivered: Fix-It Mobile Repair",
|
|
420
|
-
time: "5 hours ago",
|
|
421
|
-
type: "order"
|
|
422
|
-
}
|
|
423
|
-
], ne = [
|
|
424
|
-
{
|
|
425
|
-
label: "Service Providers",
|
|
426
|
-
value: "21+",
|
|
427
|
-
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" })
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
label: "Categories",
|
|
431
|
-
value: "9",
|
|
432
|
-
icon: /* @__PURE__ */ q(M, { className: "h-5 w-5" })
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
label: "Happy Customers",
|
|
436
|
-
value: "534+",
|
|
437
|
-
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" })
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
label: "Orders Completed",
|
|
441
|
-
value: "1,247+",
|
|
442
|
-
icon: /* @__PURE__ */ q(y, { className: "h-5 w-5" })
|
|
443
|
-
}
|
|
444
|
-
];
|
|
445
|
-
function re() {
|
|
446
|
-
let { navigateTo: v, currentUser: y } = e(), { t: b } = p(), [x, C] = f(""), { providers: w, orders: T, dashboardStats: E } = o(), D = u((e, t) => {
|
|
447
|
-
let n = b(e);
|
|
448
|
-
return n === e ? t : n;
|
|
449
|
-
}, [b]), k = y?.firstName ?? y?.name ?? "there", M = y?.role ?? "customer", N = {
|
|
450
|
-
customer: D("subscriberbot.home.role.customer", "Customer"),
|
|
451
|
-
cart_owner: D("subscriberbot.home.role.cartOwner", "Cart Owner"),
|
|
452
|
-
worker: D("subscriberbot.home.role.worker", "Worker"),
|
|
453
|
-
investor: D("subscriberbot.home.role.investor", "Investor"),
|
|
454
|
-
admin: D("subscriberbot.home.role.admin", "Administrator")
|
|
455
|
-
}, F = {
|
|
456
|
-
customer: D("subscriberbot.home.greeting.customer", "Discover amazing services near you"),
|
|
457
|
-
cart_owner: D("subscriberbot.home.greeting.cartOwner", "Manage your business and grow"),
|
|
458
|
-
worker: D("subscriberbot.home.greeting.worker", "Check your tasks and earnings"),
|
|
459
|
-
investor: D("subscriberbot.home.greeting.investor", "Track your investments and returns"),
|
|
460
|
-
admin: D("subscriberbot.home.greeting.admin", "Monitor and manage the platform")
|
|
461
|
-
}, I = Z[M] ?? Z.customer, L = Q(M, T.data ?? [], E.data), R = d(() => {
|
|
462
|
-
let e = (w.data ?? []).filter((e) => e.isOpen);
|
|
463
|
-
if (x) {
|
|
464
|
-
let t = x.toLowerCase();
|
|
465
|
-
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.category.toLowerCase().includes(t));
|
|
466
|
-
}
|
|
467
|
-
return e.sort((e, t) => t.rating - e.rating).slice(0, 6);
|
|
468
|
-
}, [w.data, x]), V = d(() => [...T.data ?? []].sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime()).slice(0, 3), [T.data]), H = {
|
|
469
|
-
order: "text-status-info-text",
|
|
470
|
-
review: "text-status-warning-text",
|
|
471
|
-
investment: "text-status-success-text",
|
|
472
|
-
cart: "text-accent-purple"
|
|
473
|
-
}, U = (T.data ?? []).length === 0 && !T.isLoading, W = w.isLoading || T.isLoading || E.isLoading, G = w.isError || T.isError || E.isError;
|
|
474
|
-
return W ? /* @__PURE__ */ q(n, {
|
|
475
|
-
title: D("subscriberbot.common.loading", "Loading..."),
|
|
476
|
-
children: /* @__PURE__ */ q("div", {
|
|
477
|
-
className: "flex h-[60vh] items-center justify-center",
|
|
478
|
-
children: /* @__PURE__ */ q(A, { className: "h-8 w-8 animate-spin text-primary" })
|
|
479
|
-
})
|
|
480
|
-
}) : G ? /* @__PURE__ */ q(n, {
|
|
481
|
-
title: D("subscriberbot.common.error", "Error"),
|
|
482
|
-
children: /* @__PURE__ */ J("div", {
|
|
483
|
-
className: "flex h-[60vh] flex-col items-center justify-center gap-4",
|
|
484
|
-
children: [
|
|
485
|
-
/* @__PURE__ */ q(h, { className: "h-12 w-12 text-status-error-text" }),
|
|
486
|
-
/* @__PURE__ */ q("h2", {
|
|
487
|
-
className: "text-xl font-semibold",
|
|
488
|
-
children: D("subscriberbot.common.errorLoading", "Error loading data")
|
|
489
|
-
}),
|
|
490
|
-
/* @__PURE__ */ q("p", {
|
|
491
|
-
className: "text-text-secondary",
|
|
492
|
-
children: D("subscriberbot.common.tryAgain", "Please try again later.")
|
|
493
|
-
})
|
|
494
|
-
]
|
|
495
|
-
})
|
|
496
|
-
}) : /* @__PURE__ */ J(n, {
|
|
497
|
-
title: `${D("subscriberbot.home.hello", "Hello")}, ${k}!`,
|
|
498
|
-
description: F[M],
|
|
499
|
-
titleGradient: !0,
|
|
500
|
-
aurora: !0,
|
|
501
|
-
children: [
|
|
502
|
-
U && /* @__PURE__ */ q(Y, {
|
|
503
|
-
className: "mb-6",
|
|
504
|
-
children: /* @__PURE__ */ J("div", {
|
|
505
|
-
className: "flex items-start gap-4",
|
|
506
|
-
children: [/* @__PURE__ */ q("div", {
|
|
507
|
-
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10",
|
|
508
|
-
children: /* @__PURE__ */ q(z, { className: "h-6 w-6 text-primary" })
|
|
509
|
-
}), /* @__PURE__ */ J("div", {
|
|
510
|
-
className: "flex-1",
|
|
511
|
-
children: [
|
|
512
|
-
/* @__PURE__ */ q("h2", {
|
|
513
|
-
className: "text-lg font-semibold text-text-primary",
|
|
514
|
-
children: D("subscriberbot.home.welcomeTitle", "Welcome to SubscriberBot!")
|
|
515
|
-
}),
|
|
516
|
-
/* @__PURE__ */ q("p", {
|
|
517
|
-
className: "mt-1 text-sm text-text-secondary",
|
|
518
|
-
children: D("subscriberbot.home.welcomeDescription", "Your local services marketplace. Start by exploring service providers near you or browse categories to find what you need.")
|
|
519
|
-
}),
|
|
520
|
-
/* @__PURE__ */ J("button", {
|
|
521
|
-
type: "button",
|
|
522
|
-
onClick: () => v("/customer/carts"),
|
|
523
|
-
className: "mt-3 inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors min-h-11",
|
|
524
|
-
children: [/* @__PURE__ */ q(P, { className: "h-4 w-4" }), D("subscriberbot.home.exploreServices", "Explore Services")]
|
|
525
|
-
})
|
|
526
|
-
]
|
|
527
|
-
})]
|
|
528
|
-
})
|
|
529
|
-
}),
|
|
530
|
-
/* @__PURE__ */ q(X, {
|
|
531
|
-
icon: /* @__PURE__ */ q(z, { className: "h-4 w-4" }),
|
|
532
|
-
className: "mb-6",
|
|
533
|
-
children: D("subscriberbot.home.purpose", "Your home base on SubscriberBot — a marketplace of local service carts and providers. Search for what you need, browse by category, reorder from carts you love, and keep an eye on your recent orders. Everything below is tailored to your role.")
|
|
534
|
-
}),
|
|
535
|
-
/* @__PURE__ */ q("section", {
|
|
536
|
-
className: "mb-6 rounded-xl border border-border-seam bg-bg-surface p-6",
|
|
537
|
-
children: /* @__PURE__ */ J("div", {
|
|
538
|
-
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
539
|
-
children: [/* @__PURE__ */ J("div", { children: [
|
|
540
|
-
/* @__PURE__ */ q("div", {
|
|
541
|
-
className: "flex items-center gap-2 mb-1",
|
|
542
|
-
children: /* @__PURE__ */ J("span", {
|
|
543
|
-
className: "inline-flex items-center rounded-full bg-action-primary-bg/10 px-2.5 py-0.5 text-xs font-medium text-primary",
|
|
544
|
-
children: [/* @__PURE__ */ q(_, { className: "mr-1 h-3 w-3" }), N[M]]
|
|
545
|
-
})
|
|
546
|
-
}),
|
|
547
|
-
/* @__PURE__ */ J("h2", {
|
|
548
|
-
className: "text-xl font-bold text-text-primary",
|
|
549
|
-
children: [
|
|
550
|
-
D("subscriberbot.home.good", "Good"),
|
|
551
|
-
" ",
|
|
552
|
-
(/* @__PURE__ */ new Date()).getHours() < 12 ? D("subscriberbot.home.time.morning", "morning") : (/* @__PURE__ */ new Date()).getHours() < 17 ? D("subscriberbot.home.time.afternoon", "afternoon") : D("subscriberbot.home.time.evening", "evening"),
|
|
553
|
-
", ",
|
|
554
|
-
k
|
|
555
|
-
]
|
|
556
|
-
}),
|
|
557
|
-
/* @__PURE__ */ q("p", {
|
|
558
|
-
className: "mt-1 text-sm text-text-secondary",
|
|
559
|
-
children: F[M]
|
|
560
|
-
})
|
|
561
|
-
] }), /* @__PURE__ */ J("div", {
|
|
562
|
-
className: "relative w-full sm:w-72",
|
|
563
|
-
children: [/* @__PURE__ */ q(P, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ q("input", {
|
|
564
|
-
type: "text",
|
|
565
|
-
placeholder: D("subscriberbot.home.searchPlaceholder", "Search services, carts..."),
|
|
566
|
-
value: x,
|
|
567
|
-
onChange: (e) => C(e.target.value),
|
|
568
|
-
className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2.5 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
569
|
-
})]
|
|
570
|
-
})]
|
|
571
|
-
})
|
|
572
|
-
}),
|
|
573
|
-
/* @__PURE__ */ J("section", {
|
|
574
|
-
className: "mb-8",
|
|
575
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
576
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
577
|
-
children: D("subscriberbot.home.quickStats", "Quick Stats")
|
|
578
|
-
}), /* @__PURE__ */ q("div", {
|
|
579
|
-
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
580
|
-
children: L.map((e) => /* @__PURE__ */ q(r, {
|
|
581
|
-
icon: e.icon,
|
|
582
|
-
value: e.value,
|
|
583
|
-
label: e.label,
|
|
584
|
-
trend: e.trend,
|
|
585
|
-
trendValue: e.trendValue
|
|
586
|
-
}, e.label))
|
|
587
|
-
})]
|
|
588
|
-
}),
|
|
589
|
-
/* @__PURE__ */ J("section", {
|
|
590
|
-
className: "mb-8",
|
|
591
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
592
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
593
|
-
children: D("subscriberbot.home.quickActions", "Quick Actions")
|
|
594
|
-
}), /* @__PURE__ */ q("div", {
|
|
595
|
-
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
596
|
-
children: I.map((e) => /* @__PURE__ */ J("button", {
|
|
597
|
-
type: "button",
|
|
598
|
-
onClick: () => v(e.path),
|
|
599
|
-
className: t("flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all", "hover:border-accent-foreground/20 hover:shadow-md"),
|
|
600
|
-
children: [
|
|
601
|
-
/* @__PURE__ */ q("div", {
|
|
602
|
-
className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg", e.color),
|
|
603
|
-
children: e.icon
|
|
604
|
-
}),
|
|
605
|
-
/* @__PURE__ */ J("div", {
|
|
606
|
-
className: "min-w-0 flex-1",
|
|
607
|
-
children: [/* @__PURE__ */ q("p", {
|
|
608
|
-
className: "text-sm font-semibold text-text-primary",
|
|
609
|
-
children: e.label
|
|
610
|
-
}), /* @__PURE__ */ q("p", {
|
|
611
|
-
className: "mt-0.5 text-xs text-text-secondary",
|
|
612
|
-
children: e.description
|
|
613
|
-
})]
|
|
614
|
-
}),
|
|
615
|
-
/* @__PURE__ */ q(g, { className: "h-4 w-4 text-text-secondary shrink-0 mt-1" })
|
|
616
|
-
]
|
|
617
|
-
}, e.label))
|
|
618
|
-
})]
|
|
619
|
-
}),
|
|
620
|
-
/* @__PURE__ */ J("section", {
|
|
621
|
-
className: "mb-8",
|
|
622
|
-
children: [/* @__PURE__ */ J("div", {
|
|
623
|
-
className: "flex items-center justify-between mb-4",
|
|
624
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
625
|
-
className: "text-lg font-semibold text-text-primary",
|
|
626
|
-
children: x ? D("subscriberbot.home.searchResults", "Search Results") : D("subscriberbot.home.featuredCarts", "Featured Carts")
|
|
627
|
-
}), /* @__PURE__ */ J("button", {
|
|
628
|
-
type: "button",
|
|
629
|
-
onClick: () => v("/customer/carts"),
|
|
630
|
-
className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
631
|
-
children: [
|
|
632
|
-
D("subscriberbot.common.viewAll", "View All"),
|
|
633
|
-
" ",
|
|
634
|
-
/* @__PURE__ */ q(g, { className: "h-3.5 w-3.5" })
|
|
635
|
-
]
|
|
636
|
-
})]
|
|
637
|
-
}), R.length === 0 ? /* @__PURE__ */ q(a, {
|
|
638
|
-
illustration: "empty-search",
|
|
639
|
-
icon: /* @__PURE__ */ q(P, { className: "h-10 w-10" }),
|
|
640
|
-
title: D("subscriberbot.home.noCartsFound", "No carts found"),
|
|
641
|
-
description: D("subscriberbot.home.noCartsDescription", "Try adjusting your search or browse all categories"),
|
|
642
|
-
action: /* @__PURE__ */ q("button", {
|
|
643
|
-
type: "button",
|
|
644
|
-
onClick: () => C(""),
|
|
645
|
-
className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
646
|
-
children: D("subscriberbot.home.clearSearch", "Clear Search")
|
|
647
|
-
})
|
|
648
|
-
}) : /* @__PURE__ */ q("div", {
|
|
649
|
-
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
650
|
-
children: R.map((e) => /* @__PURE__ */ J("div", {
|
|
651
|
-
role: "button",
|
|
652
|
-
tabIndex: 0,
|
|
653
|
-
onClick: () => v(`/customer/cart/${e.id}`),
|
|
654
|
-
onKeyDown: (t) => {
|
|
655
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(`/customer/cart/${e.id}`));
|
|
656
|
-
},
|
|
657
|
-
className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-accent-foreground/20 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
658
|
-
children: [/* @__PURE__ */ J("div", {
|
|
659
|
-
className: "relative h-40 bg-bg-sunken",
|
|
660
|
-
children: [
|
|
661
|
-
/* @__PURE__ */ q("img", {
|
|
662
|
-
src: e.image,
|
|
663
|
-
alt: e.name,
|
|
664
|
-
className: "h-full w-full object-cover",
|
|
665
|
-
loading: "lazy"
|
|
666
|
-
}),
|
|
667
|
-
/* @__PURE__ */ q("div", {
|
|
668
|
-
className: "absolute top-2 right-2",
|
|
669
|
-
children: /* @__PURE__ */ q(i, { status: e.isOpen ? "open" : "closed" })
|
|
670
|
-
}),
|
|
671
|
-
e.isVerified && /* @__PURE__ */ q("div", {
|
|
672
|
-
className: "absolute top-2 left-2",
|
|
673
|
-
children: /* @__PURE__ */ J("span", {
|
|
674
|
-
className: "inline-flex items-center gap-1 rounded-full bg-status-info-bg/90 px-2 py-0.5 text-xs font-medium text-text-inverse backdrop-blur-sm",
|
|
675
|
-
children: [
|
|
676
|
-
/* @__PURE__ */ q(_, { className: "h-3 w-3" }),
|
|
677
|
-
" ",
|
|
678
|
-
D("subscriberbot.home.verified", "Verified")
|
|
679
|
-
]
|
|
680
|
-
})
|
|
681
|
-
}),
|
|
682
|
-
/* @__PURE__ */ q("div", {
|
|
683
|
-
className: "absolute bottom-2 right-2",
|
|
684
|
-
children: /* @__PURE__ */ J("span", {
|
|
685
|
-
className: "inline-flex items-center gap-1 rounded-full bg-bg-canvas/60 px-2 py-0.5 text-xs text-text-inverse backdrop-blur-sm",
|
|
686
|
-
children: [
|
|
687
|
-
/* @__PURE__ */ q(S, { className: "h-3 w-3" }),
|
|
688
|
-
" ",
|
|
689
|
-
e.estimatedTime,
|
|
690
|
-
" min"
|
|
691
|
-
]
|
|
692
|
-
})
|
|
693
|
-
})
|
|
694
|
-
]
|
|
695
|
-
}), /* @__PURE__ */ J("div", {
|
|
696
|
-
className: "p-4",
|
|
697
|
-
children: [
|
|
698
|
-
/* @__PURE__ */ J("div", {
|
|
699
|
-
className: "flex items-start justify-between",
|
|
700
|
-
children: [/* @__PURE__ */ J("div", {
|
|
701
|
-
className: "min-w-0 flex-1",
|
|
702
|
-
children: [/* @__PURE__ */ q("h3", {
|
|
703
|
-
className: "text-base font-semibold text-text-primary truncate",
|
|
704
|
-
children: e.name
|
|
705
|
-
}), /* @__PURE__ */ q("p", {
|
|
706
|
-
className: "mt-0.5 text-sm text-text-secondary",
|
|
707
|
-
children: e.category
|
|
708
|
-
})]
|
|
709
|
-
}), /* @__PURE__ */ J("div", {
|
|
710
|
-
className: "flex items-center gap-1 rounded bg-status-success-text px-1.5 py-0.5 ml-2 shrink-0",
|
|
711
|
-
children: [/* @__PURE__ */ q(B, { className: "h-3 w-3 fill-text-inverse text-text-inverse" }), /* @__PURE__ */ q("span", {
|
|
712
|
-
className: "text-xs font-bold text-text-inverse",
|
|
713
|
-
children: e.rating
|
|
714
|
-
})]
|
|
715
|
-
})]
|
|
716
|
-
}),
|
|
717
|
-
/* @__PURE__ */ J("div", {
|
|
718
|
-
className: "mt-3 flex items-center gap-4 text-xs text-text-secondary",
|
|
719
|
-
children: [
|
|
720
|
-
/* @__PURE__ */ J("span", {
|
|
721
|
-
className: "flex items-center gap-1",
|
|
722
|
-
children: [
|
|
723
|
-
/* @__PURE__ */ q(j, { className: "h-3 w-3" }),
|
|
724
|
-
" ",
|
|
725
|
-
c(e.distance)
|
|
726
|
-
]
|
|
727
|
-
}),
|
|
728
|
-
/* @__PURE__ */ J("span", {
|
|
729
|
-
className: "flex items-center gap-1",
|
|
730
|
-
children: [
|
|
731
|
-
/* @__PURE__ */ q(B, { className: "h-3 w-3" }),
|
|
732
|
-
" ",
|
|
733
|
-
e.totalRatings,
|
|
734
|
-
" ",
|
|
735
|
-
D("subscriberbot.home.reviews", "reviews")
|
|
736
|
-
]
|
|
737
|
-
}),
|
|
738
|
-
e.averageOrderValue && /* @__PURE__ */ J("span", {
|
|
739
|
-
className: "flex items-center gap-1",
|
|
740
|
-
children: [
|
|
741
|
-
/* @__PURE__ */ q(O, { className: "h-3 w-3" }),
|
|
742
|
-
" ",
|
|
743
|
-
D("subscriberbot.home.average", "Avg."),
|
|
744
|
-
" ",
|
|
745
|
-
s(e.averageOrderValue, { minimumFractionDigits: 0 })
|
|
746
|
-
]
|
|
747
|
-
})
|
|
748
|
-
]
|
|
749
|
-
}),
|
|
750
|
-
e.serviceTypes && e.serviceTypes.length > 0 && /* @__PURE__ */ q("div", {
|
|
751
|
-
className: "mt-3 flex flex-wrap gap-1.5",
|
|
752
|
-
children: e.serviceTypes.slice(0, 3).map((e) => /* @__PURE__ */ q("span", {
|
|
753
|
-
className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
|
|
754
|
-
children: e.replace(/_/g, " ")
|
|
755
|
-
}, e))
|
|
756
|
-
})
|
|
757
|
-
]
|
|
758
|
-
})]
|
|
759
|
-
}, e.id))
|
|
760
|
-
})]
|
|
761
|
-
}),
|
|
762
|
-
V.length > 0 && /* @__PURE__ */ J("section", {
|
|
763
|
-
className: "mb-8",
|
|
764
|
-
children: [/* @__PURE__ */ J("div", {
|
|
765
|
-
className: "flex items-center justify-between mb-4",
|
|
766
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
767
|
-
className: "text-lg font-semibold text-text-primary",
|
|
768
|
-
children: D("subscriberbot.home.recentOrders", "Recent Orders")
|
|
769
|
-
}), /* @__PURE__ */ J("button", {
|
|
770
|
-
type: "button",
|
|
771
|
-
onClick: () => v("/customer/orders"),
|
|
772
|
-
className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
773
|
-
children: [
|
|
774
|
-
D("subscriberbot.common.viewAll", "View All"),
|
|
775
|
-
" ",
|
|
776
|
-
/* @__PURE__ */ q(g, { className: "h-3.5 w-3.5" })
|
|
777
|
-
]
|
|
778
|
-
})]
|
|
779
|
-
}), /* @__PURE__ */ q("div", {
|
|
780
|
-
className: "rounded-lg border border-border-seam bg-bg-surface divide-y divide-border",
|
|
781
|
-
children: V.map((e) => /* @__PURE__ */ J("div", {
|
|
782
|
-
role: "button",
|
|
783
|
-
tabIndex: 0,
|
|
784
|
-
onClick: () => v(`/customer/order/${e.id}`),
|
|
785
|
-
onKeyDown: (t) => {
|
|
786
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(`/customer/order/${e.id}`));
|
|
787
|
-
},
|
|
788
|
-
className: "flex items-center gap-4 px-4 py-3 hover:bg-accent/50 transition-colors cursor-pointer",
|
|
789
|
-
children: [
|
|
790
|
-
/* @__PURE__ */ q("img", {
|
|
791
|
-
src: e.cartImage,
|
|
792
|
-
alt: e.cartName,
|
|
793
|
-
className: "h-12 w-12 rounded-lg object-cover shrink-0"
|
|
794
|
-
}),
|
|
795
|
-
/* @__PURE__ */ J("div", {
|
|
796
|
-
className: "flex-1 min-w-0",
|
|
797
|
-
children: [/* @__PURE__ */ J("div", {
|
|
798
|
-
className: "flex items-center gap-2",
|
|
799
|
-
children: [/* @__PURE__ */ q("p", {
|
|
800
|
-
className: "text-sm font-medium text-text-primary truncate",
|
|
801
|
-
children: e.cartName
|
|
802
|
-
}), /* @__PURE__ */ q(i, { status: e.status })]
|
|
803
|
-
}), /* @__PURE__ */ q("p", {
|
|
804
|
-
className: "text-xs text-text-secondary mt-0.5",
|
|
805
|
-
children: e.items.map((e) => e.name).join(", ")
|
|
806
|
-
})]
|
|
807
|
-
}),
|
|
808
|
-
/* @__PURE__ */ J("div", {
|
|
809
|
-
className: "text-right shrink-0",
|
|
810
|
-
children: [/* @__PURE__ */ q("p", {
|
|
811
|
-
className: "text-sm font-semibold text-text-primary",
|
|
812
|
-
children: s(e.total, { minimumFractionDigits: 0 })
|
|
813
|
-
}), /* @__PURE__ */ q("p", {
|
|
814
|
-
className: "text-xs text-text-secondary",
|
|
815
|
-
children: l(e.orderDate)
|
|
816
|
-
})]
|
|
817
|
-
})
|
|
818
|
-
]
|
|
819
|
-
}, e.id))
|
|
820
|
-
})]
|
|
821
|
-
}),
|
|
822
|
-
/* @__PURE__ */ J("section", {
|
|
823
|
-
className: "mb-8",
|
|
824
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
825
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
826
|
-
children: D("subscriberbot.home.howItWorks", "How It Works")
|
|
827
|
-
}), /* @__PURE__ */ q("div", {
|
|
828
|
-
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
829
|
-
children: ee.map((e) => /* @__PURE__ */ J("div", {
|
|
830
|
-
className: "relative rounded-lg border border-border-seam bg-bg-surface p-5 text-center",
|
|
831
|
-
children: [
|
|
832
|
-
/* @__PURE__ */ q("div", {
|
|
833
|
-
className: "absolute -top-3 left-1/2 -translate-x-1/2",
|
|
834
|
-
children: /* @__PURE__ */ q("span", {
|
|
835
|
-
className: "inline-flex h-6 w-6 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
|
|
836
|
-
children: e.step
|
|
837
|
-
})
|
|
838
|
-
}),
|
|
839
|
-
/* @__PURE__ */ q("div", {
|
|
840
|
-
className: "mt-2 flex justify-center text-text-secondary mb-3",
|
|
841
|
-
children: e.icon
|
|
842
|
-
}),
|
|
843
|
-
/* @__PURE__ */ q("h3", {
|
|
844
|
-
className: "text-sm font-semibold text-text-primary",
|
|
845
|
-
children: e.title
|
|
846
|
-
}),
|
|
847
|
-
/* @__PURE__ */ q("p", {
|
|
848
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
849
|
-
children: e.description
|
|
850
|
-
})
|
|
851
|
-
]
|
|
852
|
-
}, e.step))
|
|
853
|
-
})]
|
|
854
|
-
}),
|
|
855
|
-
/* @__PURE__ */ J("section", {
|
|
856
|
-
className: "mb-8",
|
|
857
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
858
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
859
|
-
children: D("subscriberbot.home.browseByCategory", "Browse by Category")
|
|
860
|
-
}), /* @__PURE__ */ q("div", {
|
|
861
|
-
className: "grid grid-cols-3 gap-3 sm:grid-cols-4 lg:grid-cols-5",
|
|
862
|
-
children: $.map((e) => /* @__PURE__ */ J("button", {
|
|
863
|
-
type: "button",
|
|
864
|
-
onClick: () => v(`/customer/carts?category=${encodeURIComponent(e.label)}`),
|
|
865
|
-
className: "flex flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center hover:shadow-sm hover:border-accent-foreground/20 transition-all",
|
|
866
|
-
children: [/* @__PURE__ */ q("div", {
|
|
867
|
-
className: t("flex h-12 w-12 items-center justify-center rounded-full", e.color),
|
|
868
|
-
children: e.icon
|
|
869
|
-
}), /* @__PURE__ */ q("span", {
|
|
870
|
-
className: "text-xs font-medium text-text-primary leading-tight",
|
|
871
|
-
children: e.label
|
|
872
|
-
})]
|
|
873
|
-
}, e.label))
|
|
874
|
-
})]
|
|
875
|
-
}),
|
|
876
|
-
/* @__PURE__ */ J("section", {
|
|
877
|
-
className: "mb-8",
|
|
878
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
879
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
880
|
-
children: D("subscriberbot.home.platformStats", "Platform Stats")
|
|
881
|
-
}), /* @__PURE__ */ q("div", {
|
|
882
|
-
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
883
|
-
children: ne.map((e) => /* @__PURE__ */ J("div", {
|
|
884
|
-
className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
885
|
-
children: [/* @__PURE__ */ q("div", {
|
|
886
|
-
className: "flex h-10 w-10 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary shrink-0",
|
|
887
|
-
children: e.icon
|
|
888
|
-
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
889
|
-
className: "text-lg font-bold text-text-primary",
|
|
890
|
-
children: e.value
|
|
891
|
-
}), /* @__PURE__ */ q("p", {
|
|
892
|
-
className: "text-xs text-text-secondary",
|
|
893
|
-
children: e.label
|
|
894
|
-
})] })]
|
|
895
|
-
}, e.label))
|
|
896
|
-
})]
|
|
897
|
-
}),
|
|
898
|
-
/* @__PURE__ */ J("section", { children: [/* @__PURE__ */ q("h2", {
|
|
899
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
900
|
-
children: D("subscriberbot.home.recentActivity", "Recent Activity")
|
|
901
|
-
}), /* @__PURE__ */ q("div", {
|
|
902
|
-
className: "rounded-lg border border-border-seam bg-bg-surface divide-y divide-border",
|
|
903
|
-
children: te.map((e) => /* @__PURE__ */ J("div", {
|
|
904
|
-
className: "flex items-center gap-3 px-4 py-3",
|
|
905
|
-
children: [
|
|
906
|
-
/* @__PURE__ */ q("div", {
|
|
907
|
-
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken",
|
|
908
|
-
children: /* @__PURE__ */ q(m, { className: t("h-4 w-4", H[e.type] ?? "text-text-secondary") })
|
|
909
|
-
}),
|
|
910
|
-
/* @__PURE__ */ q("div", {
|
|
911
|
-
className: "flex-1 min-w-0",
|
|
912
|
-
children: /* @__PURE__ */ q("p", {
|
|
913
|
-
className: "text-sm text-text-primary truncate",
|
|
914
|
-
children: e.description
|
|
915
|
-
})
|
|
916
|
-
}),
|
|
917
|
-
/* @__PURE__ */ q("span", {
|
|
918
|
-
className: "text-xs text-text-secondary whitespace-nowrap",
|
|
919
|
-
children: e.time
|
|
920
|
-
})
|
|
921
|
-
]
|
|
922
|
-
}, e.id))
|
|
923
|
-
})] })
|
|
924
|
-
]
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
//#endregion
|
|
928
|
-
export { re as HomePage };
|
|
929
|
-
|
|
930
|
-
//# sourceMappingURL=HomePage.js.map
|