@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,575 +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 { formatCurrency as i, formatDate as a } from "../../utils/formatters.js";
|
|
6
|
-
import { useCallback as o, useMemo as s, useState as c } from "react";
|
|
7
|
-
import { ArrowDownCircle as l, BarChart3 as u, Briefcase as d, CreditCard as f, Eye as p, IndianRupee as m, Star as h, TrendingDown as g, TrendingUp as _, Wallet as v } from "lucide-react";
|
|
8
|
-
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
9
|
-
import { EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
10
|
-
//#region src/subscriberbot/pages/investor/InvestorPortfolioPage.tsx
|
|
11
|
-
var C = [
|
|
12
|
-
{
|
|
13
|
-
id: "inv-001",
|
|
14
|
-
cartId: "SERV-001",
|
|
15
|
-
cartName: "Quick Cuts Salon",
|
|
16
|
-
cartOwner: "Ravi Kumar",
|
|
17
|
-
investmentDate: "2023-06-15",
|
|
18
|
-
amount: 5e4,
|
|
19
|
-
currentValue: 62500,
|
|
20
|
-
returns: 12500,
|
|
21
|
-
returnsPercentage: 25,
|
|
22
|
-
ownership: 15,
|
|
23
|
-
status: "active",
|
|
24
|
-
monthlyRevenue: 185e3,
|
|
25
|
-
monthlyDividend: 2775,
|
|
26
|
-
nextPayoutDate: "2024-07-01",
|
|
27
|
-
riskLevel: "low",
|
|
28
|
-
category: "Personal Care & Beauty",
|
|
29
|
-
location: "Indiranagar, Bangalore",
|
|
30
|
-
performanceMetrics: {
|
|
31
|
-
monthlyOrders: 1250,
|
|
32
|
-
averageRating: 4.8,
|
|
33
|
-
growthRate: 12
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: "inv-002",
|
|
38
|
-
cartId: "SERV-003",
|
|
39
|
-
cartName: "Fix-It Mobile Repair",
|
|
40
|
-
cartOwner: "Amit Sharma",
|
|
41
|
-
investmentDate: "2023-08-20",
|
|
42
|
-
amount: 3e4,
|
|
43
|
-
currentValue: 35400,
|
|
44
|
-
returns: 5400,
|
|
45
|
-
returnsPercentage: 18,
|
|
46
|
-
ownership: 10,
|
|
47
|
-
status: "active",
|
|
48
|
-
monthlyRevenue: 12e4,
|
|
49
|
-
monthlyDividend: 1200,
|
|
50
|
-
nextPayoutDate: "2024-07-01",
|
|
51
|
-
riskLevel: "medium",
|
|
52
|
-
category: "Repair & Maintenance",
|
|
53
|
-
location: "Jayanagar, Bangalore",
|
|
54
|
-
performanceMetrics: {
|
|
55
|
-
monthlyOrders: 890,
|
|
56
|
-
averageRating: 4.6,
|
|
57
|
-
growthRate: 8
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: "inv-003",
|
|
62
|
-
cartId: "SERV-005",
|
|
63
|
-
cartName: "Spotless Cleaning Services",
|
|
64
|
-
cartOwner: "Priya Cleaning",
|
|
65
|
-
investmentDate: "2023-04-10",
|
|
66
|
-
amount: 4e4,
|
|
67
|
-
currentValue: 52e3,
|
|
68
|
-
returns: 12e3,
|
|
69
|
-
returnsPercentage: 30,
|
|
70
|
-
ownership: 20,
|
|
71
|
-
status: "active",
|
|
72
|
-
monthlyRevenue: 95e3,
|
|
73
|
-
monthlyDividend: 1900,
|
|
74
|
-
nextPayoutDate: "2024-07-01",
|
|
75
|
-
riskLevel: "low",
|
|
76
|
-
category: "Home Services",
|
|
77
|
-
location: "HSR Layout, Bangalore",
|
|
78
|
-
performanceMetrics: {
|
|
79
|
-
monthlyOrders: 1450,
|
|
80
|
-
averageRating: 4.7,
|
|
81
|
-
growthRate: 15
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: "inv-004",
|
|
86
|
-
cartId: "FOOD-001",
|
|
87
|
-
cartName: "Dosa Express",
|
|
88
|
-
cartOwner: "Rajesh Kumar",
|
|
89
|
-
investmentDate: "2023-10-05",
|
|
90
|
-
amount: 25e3,
|
|
91
|
-
currentValue: 27500,
|
|
92
|
-
returns: 2500,
|
|
93
|
-
returnsPercentage: 10,
|
|
94
|
-
ownership: 5,
|
|
95
|
-
status: "active",
|
|
96
|
-
monthlyRevenue: 15e4,
|
|
97
|
-
monthlyDividend: 750,
|
|
98
|
-
nextPayoutDate: "2024-07-01",
|
|
99
|
-
riskLevel: "high",
|
|
100
|
-
category: "Food & Beverage",
|
|
101
|
-
location: "Koramangala, Bangalore",
|
|
102
|
-
performanceMetrics: {
|
|
103
|
-
monthlyOrders: 780,
|
|
104
|
-
averageRating: 4.5,
|
|
105
|
-
growthRate: 5
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
], w = [
|
|
109
|
-
{
|
|
110
|
-
id: "txn-001",
|
|
111
|
-
type: "investment",
|
|
112
|
-
cartName: "Quick Cuts Salon",
|
|
113
|
-
amount: 5e4,
|
|
114
|
-
date: "2023-06-15",
|
|
115
|
-
status: "completed"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
id: "txn-002",
|
|
119
|
-
type: "dividend",
|
|
120
|
-
cartName: "Quick Cuts Salon",
|
|
121
|
-
amount: 2775,
|
|
122
|
-
date: "2024-06-01",
|
|
123
|
-
status: "completed"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: "txn-003",
|
|
127
|
-
type: "dividend",
|
|
128
|
-
cartName: "Fix-It Mobile Repair",
|
|
129
|
-
amount: 1200,
|
|
130
|
-
date: "2024-06-01",
|
|
131
|
-
status: "completed"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
id: "txn-004",
|
|
135
|
-
type: "investment",
|
|
136
|
-
cartName: "Spotless Cleaning Services",
|
|
137
|
-
amount: 4e4,
|
|
138
|
-
date: "2023-04-10",
|
|
139
|
-
status: "completed"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
id: "txn-005",
|
|
143
|
-
type: "dividend",
|
|
144
|
-
cartName: "Spotless Cleaning Services",
|
|
145
|
-
amount: 1900,
|
|
146
|
-
date: "2024-06-01",
|
|
147
|
-
status: "pending"
|
|
148
|
-
}
|
|
149
|
-
], T = [
|
|
150
|
-
"",
|
|
151
|
-
"Personal Care & Beauty",
|
|
152
|
-
"Repair & Maintenance",
|
|
153
|
-
"Home Services",
|
|
154
|
-
"Food & Beverage"
|
|
155
|
-
];
|
|
156
|
-
function E(e) {
|
|
157
|
-
let { color: n, label: r } = {
|
|
158
|
-
low: {
|
|
159
|
-
color: "bg-status-success-bg/20 text-status-success-text",
|
|
160
|
-
label: "Low Risk"
|
|
161
|
-
},
|
|
162
|
-
medium: {
|
|
163
|
-
color: "bg-status-warning-bg/20 text-status-warning-text",
|
|
164
|
-
label: "Medium Risk"
|
|
165
|
-
},
|
|
166
|
-
high: {
|
|
167
|
-
color: "bg-status-error-bg/20 text-status-error-text",
|
|
168
|
-
label: "High Risk"
|
|
169
|
-
}
|
|
170
|
-
}[e];
|
|
171
|
-
return /* @__PURE__ */ y("span", {
|
|
172
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium", n),
|
|
173
|
-
children: r
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
function D(e) {
|
|
177
|
-
return `${e > 0 ? "+" : ""}${e.toFixed(1)}%`;
|
|
178
|
-
}
|
|
179
|
-
function O() {
|
|
180
|
-
let { navigateTo: O } = e(), [k, A] = c("overview"), [j, M] = c(""), N = s(() => j ? C.filter((e) => e.category === j) : C, [j]), P = N.reduce((e, t) => e + t.amount, 0), F = N.reduce((e, t) => e + t.currentValue, 0), I = F - P, L = P > 0 ? I / P * 100 : 0, R = N.reduce((e, t) => e + t.monthlyDividend, 0), z = N.filter((e) => e.status === "active").length, B = {
|
|
181
|
-
low: 1,
|
|
182
|
-
medium: 2,
|
|
183
|
-
high: 3
|
|
184
|
-
}, V = N.length > 0 ? N.reduce((e, t) => e + B[t.riskLevel], 0) / N.length : 0, H = N.reduce((e, t) => t.returnsPercentage > e.returnsPercentage ? t : e, N[0] || {
|
|
185
|
-
cartName: "",
|
|
186
|
-
returnsPercentage: 0
|
|
187
|
-
}), U = o((e) => {
|
|
188
|
-
alert(`Withdrawal request submitted for ${e}`);
|
|
189
|
-
}, []), W = N.reduce((e, t) => (e[t.category] = (e[t.category] || 0) + t.currentValue, e), {});
|
|
190
|
-
return /* @__PURE__ */ b(n, {
|
|
191
|
-
title: "My Portfolio",
|
|
192
|
-
description: "Track your investment performance and holdings",
|
|
193
|
-
children: [
|
|
194
|
-
/* @__PURE__ */ y(S, {
|
|
195
|
-
icon: /* @__PURE__ */ y(d, { className: "h-4 w-4" }),
|
|
196
|
-
className: "mb-6",
|
|
197
|
-
children: "The full picture of everything you've invested in. See how much you've put in, what it's worth now, the returns you've earned, and your monthly dividend income. Drill into any holding to review its performance, and use these numbers to decide whether to top up, hold or diversify."
|
|
198
|
-
}),
|
|
199
|
-
/* @__PURE__ */ b(x, {
|
|
200
|
-
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
201
|
-
children: [
|
|
202
|
-
/* @__PURE__ */ y(r, {
|
|
203
|
-
icon: /* @__PURE__ */ y(v, { className: "h-5 w-5" }),
|
|
204
|
-
value: i(P, { minimumFractionDigits: 0 }),
|
|
205
|
-
label: "Total Invested",
|
|
206
|
-
trend: "up",
|
|
207
|
-
trendValue: `${z} active`
|
|
208
|
-
}),
|
|
209
|
-
/* @__PURE__ */ y(r, {
|
|
210
|
-
icon: /* @__PURE__ */ y(m, { className: "h-5 w-5" }),
|
|
211
|
-
value: i(F, { minimumFractionDigits: 0 }),
|
|
212
|
-
label: "Current Value",
|
|
213
|
-
trend: L > 0 ? "up" : "down",
|
|
214
|
-
trendValue: D(L)
|
|
215
|
-
}),
|
|
216
|
-
/* @__PURE__ */ y(r, {
|
|
217
|
-
icon: /* @__PURE__ */ y(_, { className: "h-5 w-5" }),
|
|
218
|
-
value: i(Math.abs(I), { minimumFractionDigits: 0 }),
|
|
219
|
-
label: "Total Returns",
|
|
220
|
-
trend: I >= 0 ? "up" : "down",
|
|
221
|
-
trendValue: D(L)
|
|
222
|
-
}),
|
|
223
|
-
/* @__PURE__ */ y(r, {
|
|
224
|
-
icon: /* @__PURE__ */ y(d, { className: "h-5 w-5" }),
|
|
225
|
-
value: i(R, { minimumFractionDigits: 0 }),
|
|
226
|
-
label: "Monthly Dividend",
|
|
227
|
-
trend: "up",
|
|
228
|
-
trendValue: "Next: July 1"
|
|
229
|
-
})
|
|
230
|
-
]
|
|
231
|
-
}),
|
|
232
|
-
/* @__PURE__ */ b("div", {
|
|
233
|
-
className: "mt-4 grid grid-cols-2 gap-3 lg:grid-cols-4",
|
|
234
|
-
children: [
|
|
235
|
-
/* @__PURE__ */ b("div", {
|
|
236
|
-
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
237
|
-
children: [/* @__PURE__ */ y("p", {
|
|
238
|
-
className: "text-xs text-text-secondary",
|
|
239
|
-
children: "Active Investments"
|
|
240
|
-
}), /* @__PURE__ */ y("p", {
|
|
241
|
-
className: "text-xl font-bold text-text-primary",
|
|
242
|
-
children: z
|
|
243
|
-
})]
|
|
244
|
-
}),
|
|
245
|
-
/* @__PURE__ */ b("div", {
|
|
246
|
-
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
247
|
-
children: [/* @__PURE__ */ y("p", {
|
|
248
|
-
className: "text-xs text-text-secondary",
|
|
249
|
-
children: "Avg Risk Score"
|
|
250
|
-
}), /* @__PURE__ */ b("div", {
|
|
251
|
-
className: "mt-1 flex items-center gap-2",
|
|
252
|
-
children: [/* @__PURE__ */ y("div", {
|
|
253
|
-
className: "h-2 flex-1 rounded-full bg-bg-sunken overflow-hidden",
|
|
254
|
-
children: /* @__PURE__ */ y("div", {
|
|
255
|
-
className: t("h-full rounded-full", V <= 1.5 ? "bg-status-success-text" : V <= 2.5 ? "bg-status-warning-text" : "bg-status-error-text"),
|
|
256
|
-
style: { width: `${V / 3 * 100}%` }
|
|
257
|
-
})
|
|
258
|
-
}), /* @__PURE__ */ b("span", {
|
|
259
|
-
className: "text-sm font-medium text-text-primary",
|
|
260
|
-
children: [V.toFixed(1), "/3"]
|
|
261
|
-
})]
|
|
262
|
-
})]
|
|
263
|
-
}),
|
|
264
|
-
/* @__PURE__ */ b("div", {
|
|
265
|
-
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
266
|
-
children: [
|
|
267
|
-
/* @__PURE__ */ y("p", {
|
|
268
|
-
className: "text-xs text-text-secondary",
|
|
269
|
-
children: "Best Performer"
|
|
270
|
-
}),
|
|
271
|
-
/* @__PURE__ */ y("p", {
|
|
272
|
-
className: "truncate text-sm font-bold text-text-primary",
|
|
273
|
-
children: H.cartName
|
|
274
|
-
}),
|
|
275
|
-
/* @__PURE__ */ y("p", {
|
|
276
|
-
className: "text-xs text-status-success-text",
|
|
277
|
-
children: D(H.returnsPercentage)
|
|
278
|
-
})
|
|
279
|
-
]
|
|
280
|
-
}),
|
|
281
|
-
/* @__PURE__ */ b("div", {
|
|
282
|
-
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
283
|
-
children: [
|
|
284
|
-
/* @__PURE__ */ y("p", {
|
|
285
|
-
className: "text-xs text-text-secondary",
|
|
286
|
-
children: "Next Payout"
|
|
287
|
-
}),
|
|
288
|
-
/* @__PURE__ */ y("p", {
|
|
289
|
-
className: "text-lg font-bold text-text-primary",
|
|
290
|
-
children: "July 1"
|
|
291
|
-
}),
|
|
292
|
-
/* @__PURE__ */ y("p", {
|
|
293
|
-
className: "text-xs text-text-secondary",
|
|
294
|
-
children: "In 7 days"
|
|
295
|
-
})
|
|
296
|
-
]
|
|
297
|
-
})
|
|
298
|
-
]
|
|
299
|
-
}),
|
|
300
|
-
/* @__PURE__ */ b("div", {
|
|
301
|
-
className: "mt-6 rounded-lg border border-border-seam bg-bg-surface shadow-sm",
|
|
302
|
-
children: [/* @__PURE__ */ y("div", {
|
|
303
|
-
className: "flex border-b border-border-seam overflow-x-auto",
|
|
304
|
-
children: [
|
|
305
|
-
{
|
|
306
|
-
key: "overview",
|
|
307
|
-
label: "Overview",
|
|
308
|
-
Icon: u
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
key: "investments",
|
|
312
|
-
label: `Investments (${N.length})`,
|
|
313
|
-
Icon: d
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
key: "transactions",
|
|
317
|
-
label: "Transactions",
|
|
318
|
-
Icon: f
|
|
319
|
-
}
|
|
320
|
-
].map(({ key: e, label: n, Icon: r }) => /* @__PURE__ */ b("button", {
|
|
321
|
-
type: "button",
|
|
322
|
-
onClick: () => A(e),
|
|
323
|
-
className: t("flex items-center gap-2 whitespace-nowrap px-4 py-3 text-sm font-medium transition-colors", k === e ? "border-b-2 border-primary text-text-primary" : "text-text-secondary hover:text-text-primary"),
|
|
324
|
-
children: [/* @__PURE__ */ y(r, { className: "h-4 w-4" }), n]
|
|
325
|
-
}, e))
|
|
326
|
-
}), /* @__PURE__ */ b("div", {
|
|
327
|
-
className: "p-4",
|
|
328
|
-
children: [
|
|
329
|
-
k === "overview" && /* @__PURE__ */ b("div", {
|
|
330
|
-
className: "space-y-6",
|
|
331
|
-
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
332
|
-
className: "mb-4 text-base font-semibold text-text-primary",
|
|
333
|
-
children: "Portfolio Performance"
|
|
334
|
-
}), /* @__PURE__ */ b("div", {
|
|
335
|
-
className: "rounded-lg border border-border-seam bg-bg-sunken/50 p-8 text-center",
|
|
336
|
-
children: [
|
|
337
|
-
/* @__PURE__ */ y(u, { className: "mx-auto mb-2 h-8 w-8 text-text-secondary/50" }),
|
|
338
|
-
/* @__PURE__ */ y("p", {
|
|
339
|
-
className: "text-sm text-text-secondary",
|
|
340
|
-
children: "Performance chart visualization"
|
|
341
|
-
}),
|
|
342
|
-
/* @__PURE__ */ y("p", {
|
|
343
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
344
|
-
children: "Shows portfolio value over time"
|
|
345
|
-
})
|
|
346
|
-
]
|
|
347
|
-
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
348
|
-
className: "mb-4 text-base font-semibold text-text-primary",
|
|
349
|
-
children: "Asset Allocation"
|
|
350
|
-
}), /* @__PURE__ */ y("div", {
|
|
351
|
-
className: "space-y-3",
|
|
352
|
-
children: Object.entries(W).map(([e, t]) => /* @__PURE__ */ b("div", {
|
|
353
|
-
className: "flex items-center",
|
|
354
|
-
children: [
|
|
355
|
-
/* @__PURE__ */ y("span", {
|
|
356
|
-
className: "w-40 truncate text-sm text-text-primary",
|
|
357
|
-
children: e
|
|
358
|
-
}),
|
|
359
|
-
/* @__PURE__ */ y("div", {
|
|
360
|
-
className: "mx-3 h-6 flex-1 rounded-full bg-bg-sunken overflow-hidden",
|
|
361
|
-
children: /* @__PURE__ */ y("div", {
|
|
362
|
-
className: "flex h-6 items-center justify-end rounded-full bg-action-primary-bg pr-2",
|
|
363
|
-
style: { width: `${F > 0 ? t / F * 100 : 0}%` },
|
|
364
|
-
children: /* @__PURE__ */ b("span", {
|
|
365
|
-
className: "text-xs font-medium text-action-primary-text",
|
|
366
|
-
children: [F > 0 ? (t / F * 100).toFixed(1) : 0, "%"]
|
|
367
|
-
})
|
|
368
|
-
})
|
|
369
|
-
}),
|
|
370
|
-
/* @__PURE__ */ y("span", {
|
|
371
|
-
className: "ml-2 text-sm font-medium text-text-primary",
|
|
372
|
-
children: i(t, { minimumFractionDigits: 0 })
|
|
373
|
-
})
|
|
374
|
-
]
|
|
375
|
-
}, e))
|
|
376
|
-
})] })]
|
|
377
|
-
}),
|
|
378
|
-
k === "investments" && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("div", {
|
|
379
|
-
className: "mb-4",
|
|
380
|
-
children: /* @__PURE__ */ b("select", {
|
|
381
|
-
value: j,
|
|
382
|
-
onChange: (e) => M(e.target.value),
|
|
383
|
-
className: "rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
384
|
-
children: [/* @__PURE__ */ y("option", {
|
|
385
|
-
value: "",
|
|
386
|
-
children: "All Categories"
|
|
387
|
-
}), T.filter(Boolean).map((e) => /* @__PURE__ */ y("option", {
|
|
388
|
-
value: e,
|
|
389
|
-
children: e
|
|
390
|
-
}, e))]
|
|
391
|
-
})
|
|
392
|
-
}), /* @__PURE__ */ y("div", {
|
|
393
|
-
className: "space-y-4",
|
|
394
|
-
children: N.map((e) => /* @__PURE__ */ b("div", {
|
|
395
|
-
className: "rounded-lg border border-border-seam p-4 hover:bg-accent/50 transition-colors",
|
|
396
|
-
children: [
|
|
397
|
-
/* @__PURE__ */ b("div", {
|
|
398
|
-
className: "mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
|
|
399
|
-
children: [/* @__PURE__ */ b("div", {
|
|
400
|
-
className: "flex-1",
|
|
401
|
-
children: [
|
|
402
|
-
/* @__PURE__ */ y("h4", {
|
|
403
|
-
className: "text-base font-semibold text-text-primary",
|
|
404
|
-
children: e.cartName
|
|
405
|
-
}),
|
|
406
|
-
/* @__PURE__ */ b("p", {
|
|
407
|
-
className: "text-sm text-text-secondary",
|
|
408
|
-
children: [
|
|
409
|
-
"Owned by ",
|
|
410
|
-
e.cartOwner,
|
|
411
|
-
" • ",
|
|
412
|
-
e.location
|
|
413
|
-
]
|
|
414
|
-
}),
|
|
415
|
-
/* @__PURE__ */ b("div", {
|
|
416
|
-
className: "mt-2 flex flex-wrap items-center gap-2",
|
|
417
|
-
children: [/* @__PURE__ */ y("span", {
|
|
418
|
-
className: "text-sm text-text-secondary",
|
|
419
|
-
children: e.category
|
|
420
|
-
}), E(e.riskLevel)]
|
|
421
|
-
})
|
|
422
|
-
]
|
|
423
|
-
}), /* @__PURE__ */ b("div", {
|
|
424
|
-
className: "text-left sm:text-right",
|
|
425
|
-
children: [/* @__PURE__ */ y("p", {
|
|
426
|
-
className: "text-xl font-bold text-text-primary",
|
|
427
|
-
children: i(e.currentValue, { minimumFractionDigits: 0 })
|
|
428
|
-
}), /* @__PURE__ */ b("p", {
|
|
429
|
-
className: t("text-sm", e.returns > 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
430
|
-
children: [
|
|
431
|
-
i(Math.abs(e.returns), { minimumFractionDigits: 0 }),
|
|
432
|
-
" (",
|
|
433
|
-
D(e.returnsPercentage),
|
|
434
|
-
")"
|
|
435
|
-
]
|
|
436
|
-
})]
|
|
437
|
-
})]
|
|
438
|
-
}),
|
|
439
|
-
/* @__PURE__ */ b("div", {
|
|
440
|
-
className: "mb-4 grid grid-cols-2 gap-3 lg:grid-cols-4",
|
|
441
|
-
children: [
|
|
442
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
443
|
-
className: "text-xs text-text-secondary",
|
|
444
|
-
children: "Invested"
|
|
445
|
-
}), /* @__PURE__ */ y("p", {
|
|
446
|
-
className: "text-sm font-medium text-text-primary",
|
|
447
|
-
children: i(e.amount, { minimumFractionDigits: 0 })
|
|
448
|
-
})] }),
|
|
449
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
450
|
-
className: "text-xs text-text-secondary",
|
|
451
|
-
children: "Ownership"
|
|
452
|
-
}), /* @__PURE__ */ b("p", {
|
|
453
|
-
className: "text-sm font-medium text-text-primary",
|
|
454
|
-
children: [e.ownership, "%"]
|
|
455
|
-
})] }),
|
|
456
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
457
|
-
className: "text-xs text-text-secondary",
|
|
458
|
-
children: "Monthly Dividend"
|
|
459
|
-
}), /* @__PURE__ */ y("p", {
|
|
460
|
-
className: "text-sm font-medium text-text-primary",
|
|
461
|
-
children: i(e.monthlyDividend, { minimumFractionDigits: 0 })
|
|
462
|
-
})] }),
|
|
463
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
464
|
-
className: "text-xs text-text-secondary",
|
|
465
|
-
children: "Investment Date"
|
|
466
|
-
}), /* @__PURE__ */ y("p", {
|
|
467
|
-
className: "text-sm font-medium text-text-primary",
|
|
468
|
-
children: a(e.investmentDate, {
|
|
469
|
-
hour: void 0,
|
|
470
|
-
minute: void 0
|
|
471
|
-
})
|
|
472
|
-
})] })
|
|
473
|
-
]
|
|
474
|
-
}),
|
|
475
|
-
/* @__PURE__ */ b("div", {
|
|
476
|
-
className: "border-t border-border-seam pt-4",
|
|
477
|
-
children: [/* @__PURE__ */ y("p", {
|
|
478
|
-
className: "mb-2 text-sm font-medium text-text-secondary",
|
|
479
|
-
children: "Performance Metrics"
|
|
480
|
-
}), /* @__PURE__ */ b("div", {
|
|
481
|
-
className: "grid grid-cols-3 gap-3 text-center",
|
|
482
|
-
children: [
|
|
483
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
484
|
-
className: "text-lg font-bold text-text-primary",
|
|
485
|
-
children: e.performanceMetrics.monthlyOrders
|
|
486
|
-
}), /* @__PURE__ */ y("p", {
|
|
487
|
-
className: "text-xs text-text-secondary",
|
|
488
|
-
children: "Monthly Orders"
|
|
489
|
-
})] }),
|
|
490
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("div", {
|
|
491
|
-
className: "flex items-center justify-center gap-1",
|
|
492
|
-
children: [/* @__PURE__ */ y(h, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ y("p", {
|
|
493
|
-
className: "text-lg font-bold text-text-primary",
|
|
494
|
-
children: e.performanceMetrics.averageRating
|
|
495
|
-
})]
|
|
496
|
-
}), /* @__PURE__ */ y("p", {
|
|
497
|
-
className: "text-xs text-text-secondary",
|
|
498
|
-
children: "Rating"
|
|
499
|
-
})] }),
|
|
500
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("p", {
|
|
501
|
-
className: "text-lg font-bold text-status-success-text",
|
|
502
|
-
children: [
|
|
503
|
-
"+",
|
|
504
|
-
e.performanceMetrics.growthRate,
|
|
505
|
-
"%"
|
|
506
|
-
]
|
|
507
|
-
}), /* @__PURE__ */ y("p", {
|
|
508
|
-
className: "text-xs text-text-secondary",
|
|
509
|
-
children: "Growth Rate"
|
|
510
|
-
})] })
|
|
511
|
-
]
|
|
512
|
-
})]
|
|
513
|
-
}),
|
|
514
|
-
/* @__PURE__ */ b("div", {
|
|
515
|
-
className: "mt-4 flex flex-wrap gap-2",
|
|
516
|
-
children: [/* @__PURE__ */ b("button", {
|
|
517
|
-
type: "button",
|
|
518
|
-
onClick: () => O(`/investor/investments/${e.id}`),
|
|
519
|
-
className: "flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
520
|
-
children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), "View Details"]
|
|
521
|
-
}), e.status === "active" && /* @__PURE__ */ b("button", {
|
|
522
|
-
type: "button",
|
|
523
|
-
onClick: () => U(e.id),
|
|
524
|
-
className: "flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
525
|
-
children: [/* @__PURE__ */ y(l, { className: "h-4 w-4" }), "Withdraw"]
|
|
526
|
-
})]
|
|
527
|
-
})
|
|
528
|
-
]
|
|
529
|
-
}, e.id))
|
|
530
|
-
})] }),
|
|
531
|
-
k === "transactions" && /* @__PURE__ */ y("div", {
|
|
532
|
-
className: "space-y-3",
|
|
533
|
-
children: w.map((e) => /* @__PURE__ */ b("div", {
|
|
534
|
-
className: "flex flex-col gap-3 rounded-lg border border-border-seam p-4 hover:bg-accent/50 transition-colors sm:flex-row sm:items-center sm:justify-between",
|
|
535
|
-
children: [/* @__PURE__ */ b("div", {
|
|
536
|
-
className: "flex items-center gap-3",
|
|
537
|
-
children: [/* @__PURE__ */ y("div", {
|
|
538
|
-
className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-full", e.type === "investment" ? "bg-status-info-bg/10" : e.type === "dividend" ? "bg-status-success-bg/10" : "bg-status-error-bg/10"),
|
|
539
|
-
children: e.type === "investment" ? /* @__PURE__ */ y(v, { className: "h-5 w-5 text-status-info-text" }) : e.type === "dividend" ? /* @__PURE__ */ y(_, { className: "h-5 w-5 text-status-success-text" }) : /* @__PURE__ */ y(g, { className: "h-5 w-5 text-status-error-text" })
|
|
540
|
-
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("p", {
|
|
541
|
-
className: "text-sm font-medium text-text-primary",
|
|
542
|
-
children: [
|
|
543
|
-
e.type === "investment" ? "Investment in" : e.type === "dividend" ? "Dividend from" : "Withdrawal from",
|
|
544
|
-
" ",
|
|
545
|
-
e.cartName
|
|
546
|
-
]
|
|
547
|
-
}), /* @__PURE__ */ y("p", {
|
|
548
|
-
className: "text-xs text-text-secondary",
|
|
549
|
-
children: a(e.date, {
|
|
550
|
-
hour: void 0,
|
|
551
|
-
minute: void 0
|
|
552
|
-
})
|
|
553
|
-
})] })]
|
|
554
|
-
}), /* @__PURE__ */ b("div", {
|
|
555
|
-
className: "flex items-center justify-between sm:gap-4",
|
|
556
|
-
children: [/* @__PURE__ */ b("p", {
|
|
557
|
-
className: t("text-sm font-bold", e.type === "dividend" ? "text-status-success-text" : "text-text-primary"),
|
|
558
|
-
children: [e.type === "dividend" ? "+" : "-", i(e.amount, { minimumFractionDigits: 0 })]
|
|
559
|
-
}), /* @__PURE__ */ y("span", {
|
|
560
|
-
className: t("rounded-full px-2.5 py-0.5 text-xs font-medium", e.status === "completed" ? "bg-status-success-bg/20 text-status-success-text" : e.status === "pending" ? "bg-status-warning-bg/20 text-status-warning-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
561
|
-
children: e.status
|
|
562
|
-
})]
|
|
563
|
-
})]
|
|
564
|
-
}, e.id))
|
|
565
|
-
})
|
|
566
|
-
]
|
|
567
|
-
})]
|
|
568
|
-
})
|
|
569
|
-
]
|
|
570
|
-
});
|
|
571
|
-
}
|
|
572
|
-
//#endregion
|
|
573
|
-
export { O as InvestorPortfolioPage };
|
|
574
|
-
|
|
575
|
-
//# sourceMappingURL=InvestorPortfolioPage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvestorPortfolioPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/investor/InvestorPortfolioPage.tsx"],"sourcesContent":["/**\n * Investor Portfolio Page\n * @module subscriberbot/pages/investor\n *\n * Portfolio summary cards, 3-tab UI (overview/investments/transactions),\n * asset allocation bars, category filter, transactions list, withdrawal action,\n * and performance metrics per investment.\n */\n\nimport { useState, useCallback, useMemo } from 'react';\nimport {\n Wallet,\n TrendingUp,\n TrendingDown,\n Briefcase,\n IndianRupee,\n Star,\n Eye,\n ArrowDownCircle,\n BarChart3,\n CreditCard,\n LayoutList,\n} from 'lucide-react';\nimport { PagePurpose, EmphasisPanel } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { cn } from '../../utils/cn';\nimport { formatCurrency, formatDate } from '../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types & mock data\n// ---------------------------------------------------------------------------\n\ninterface Investment {\n id: string;\n cartId: string;\n cartName: string;\n cartOwner: string;\n investmentDate: string;\n amount: number;\n currentValue: number;\n returns: number;\n returnsPercentage: number;\n ownership: number;\n status: 'active' | 'matured' | 'exited';\n monthlyRevenue: number;\n monthlyDividend: number;\n nextPayoutDate: string;\n riskLevel: 'low' | 'medium' | 'high';\n category: string;\n location: string;\n performanceMetrics: {\n monthlyOrders: number;\n averageRating: number;\n growthRate: number;\n };\n}\n\ninterface Transaction {\n id: string;\n type: 'investment' | 'dividend' | 'withdrawal';\n cartName: string;\n amount: number;\n date: string;\n status: 'completed' | 'pending' | 'failed';\n}\n\nconst mockInvestments: Investment[] = [\n {\n id: 'inv-001',\n cartId: 'SERV-001',\n cartName: 'Quick Cuts Salon',\n cartOwner: 'Ravi Kumar',\n investmentDate: '2023-06-15',\n amount: 50000,\n currentValue: 62500,\n returns: 12500,\n returnsPercentage: 25,\n ownership: 15,\n status: 'active',\n monthlyRevenue: 185000,\n monthlyDividend: 2775,\n nextPayoutDate: '2024-07-01',\n riskLevel: 'low',\n category: 'Personal Care & Beauty',\n location: 'Indiranagar, Bangalore',\n performanceMetrics: { monthlyOrders: 1250, averageRating: 4.8, growthRate: 12 },\n },\n {\n id: 'inv-002',\n cartId: 'SERV-003',\n cartName: 'Fix-It Mobile Repair',\n cartOwner: 'Amit Sharma',\n investmentDate: '2023-08-20',\n amount: 30000,\n currentValue: 35400,\n returns: 5400,\n returnsPercentage: 18,\n ownership: 10,\n status: 'active',\n monthlyRevenue: 120000,\n monthlyDividend: 1200,\n nextPayoutDate: '2024-07-01',\n riskLevel: 'medium',\n category: 'Repair & Maintenance',\n location: 'Jayanagar, Bangalore',\n performanceMetrics: { monthlyOrders: 890, averageRating: 4.6, growthRate: 8 },\n },\n {\n id: 'inv-003',\n cartId: 'SERV-005',\n cartName: 'Spotless Cleaning Services',\n cartOwner: 'Priya Cleaning',\n investmentDate: '2023-04-10',\n amount: 40000,\n currentValue: 52000,\n returns: 12000,\n returnsPercentage: 30,\n ownership: 20,\n status: 'active',\n monthlyRevenue: 95000,\n monthlyDividend: 1900,\n nextPayoutDate: '2024-07-01',\n riskLevel: 'low',\n category: 'Home Services',\n location: 'HSR Layout, Bangalore',\n performanceMetrics: { monthlyOrders: 1450, averageRating: 4.7, growthRate: 15 },\n },\n {\n id: 'inv-004',\n cartId: 'FOOD-001',\n cartName: 'Dosa Express',\n cartOwner: 'Rajesh Kumar',\n investmentDate: '2023-10-05',\n amount: 25000,\n currentValue: 27500,\n returns: 2500,\n returnsPercentage: 10,\n ownership: 5,\n status: 'active',\n monthlyRevenue: 150000,\n monthlyDividend: 750,\n nextPayoutDate: '2024-07-01',\n riskLevel: 'high',\n category: 'Food & Beverage',\n location: 'Koramangala, Bangalore',\n performanceMetrics: { monthlyOrders: 780, averageRating: 4.5, growthRate: 5 },\n },\n];\n\nconst mockTransactions: Transaction[] = [\n {\n id: 'txn-001',\n type: 'investment',\n cartName: 'Quick Cuts Salon',\n amount: 50000,\n date: '2023-06-15',\n status: 'completed',\n },\n {\n id: 'txn-002',\n type: 'dividend',\n cartName: 'Quick Cuts Salon',\n amount: 2775,\n date: '2024-06-01',\n status: 'completed',\n },\n {\n id: 'txn-003',\n type: 'dividend',\n cartName: 'Fix-It Mobile Repair',\n amount: 1200,\n date: '2024-06-01',\n status: 'completed',\n },\n {\n id: 'txn-004',\n type: 'investment',\n cartName: 'Spotless Cleaning Services',\n amount: 40000,\n date: '2023-04-10',\n status: 'completed',\n },\n {\n id: 'txn-005',\n type: 'dividend',\n cartName: 'Spotless Cleaning Services',\n amount: 1900,\n date: '2024-06-01',\n status: 'pending',\n },\n];\n\nconst categories = [\n '',\n 'Personal Care & Beauty',\n 'Repair & Maintenance',\n 'Home Services',\n 'Food & Beverage',\n];\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getRiskBadge(risk: Investment['riskLevel']) {\n const map = {\n low: { color: 'bg-status-success-bg/20 text-status-success-text', label: 'Low Risk' },\n medium: {\n color: 'bg-status-warning-bg/20 text-status-warning-text',\n label: 'Medium Risk',\n },\n high: { color: 'bg-status-error-bg/20 text-status-error-text', label: 'High Risk' },\n };\n const { color, label } = map[risk];\n return <span className={cn('rounded-full px-2 py-0.5 text-xs font-medium', color)}>{label}</span>;\n}\n\nfunction fmtPct(value: number) {\n return `${value > 0 ? '+' : ''}${value.toFixed(1)}%`;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function InvestorPortfolioPage() {\n const { navigateTo } = useSubscriberBot();\n const [activeTab, setActiveTab] = useState<'overview' | 'investments' | 'transactions'>(\n 'overview'\n );\n const [filterCategory, setFilterCategory] = useState('');\n\n const filteredInvestments = useMemo(() => {\n if (!filterCategory) return mockInvestments;\n return mockInvestments.filter((inv) => inv.category === filterCategory);\n }, [filterCategory]);\n\n const totalInvested = filteredInvestments.reduce((s, i) => s + i.amount, 0);\n const currentValue = filteredInvestments.reduce((s, i) => s + i.currentValue, 0);\n const totalReturns = currentValue - totalInvested;\n const returnsPercentage = totalInvested > 0 ? (totalReturns / totalInvested) * 100 : 0;\n const monthlyDividend = filteredInvestments.reduce((s, i) => s + i.monthlyDividend, 0);\n const activeCount = filteredInvestments.filter((i) => i.status === 'active').length;\n\n const riskScores: Record<string, number> = { low: 1, medium: 2, high: 3 };\n const avgRiskScore =\n filteredInvestments.length > 0\n ? filteredInvestments.reduce((s, i) => s + riskScores[i.riskLevel], 0) /\n filteredInvestments.length\n : 0;\n\n const bestPerformer = filteredInvestments.reduce(\n (best, inv) => (inv.returnsPercentage > best.returnsPercentage ? inv : best),\n filteredInvestments[0] || { cartName: '', returnsPercentage: 0 }\n );\n\n const handleWithdraw = useCallback((investmentId: string) => {\n alert(`Withdrawal request submitted for ${investmentId}`);\n }, []);\n\n // Asset allocation\n const allocationMap = filteredInvestments.reduce<Record<string, number>>((acc, inv) => {\n acc[inv.category] = (acc[inv.category] || 0) + inv.currentValue;\n return acc;\n }, {});\n\n return (\n <PageLayout title=\"My Portfolio\" description=\"Track your investment performance and holdings\">\n <PagePurpose icon={<Briefcase className=\"h-4 w-4\" />} className=\"mb-6\">\n The full picture of everything you've invested in. See how much you've put in,\n what it's worth now, the returns you've earned, and your monthly dividend income.\n Drill into any holding to review its performance, and use these numbers to decide\n whether to top up, hold or diversify.\n </PagePurpose>\n\n {/* Summary Cards — the ONE emphasis zone */}\n <EmphasisPanel className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n value={formatCurrency(totalInvested, { minimumFractionDigits: 0 })}\n label=\"Total Invested\"\n trend=\"up\"\n trendValue={`${activeCount} active`}\n />\n <MetricsCard\n icon={<IndianRupee className=\"h-5 w-5\" />}\n value={formatCurrency(currentValue, { minimumFractionDigits: 0 })}\n label=\"Current Value\"\n trend={returnsPercentage > 0 ? 'up' : 'down'}\n trendValue={fmtPct(returnsPercentage)}\n />\n <MetricsCard\n icon={<TrendingUp className=\"h-5 w-5\" />}\n value={formatCurrency(Math.abs(totalReturns), { minimumFractionDigits: 0 })}\n label=\"Total Returns\"\n trend={totalReturns >= 0 ? 'up' : 'down'}\n trendValue={fmtPct(returnsPercentage)}\n />\n <MetricsCard\n icon={<Briefcase className=\"h-5 w-5\" />}\n value={formatCurrency(monthlyDividend, { minimumFractionDigits: 0 })}\n label=\"Monthly Dividend\"\n trend=\"up\"\n trendValue=\"Next: July 1\"\n />\n </EmphasisPanel>\n\n {/* Additional Stats */}\n <div className=\"mt-4 grid grid-cols-2 gap-3 lg:grid-cols-4\">\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-3\">\n <p className=\"text-xs text-text-secondary\">Active Investments</p>\n <p className=\"text-xl font-bold text-text-primary\">{activeCount}</p>\n </div>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-3\">\n <p className=\"text-xs text-text-secondary\">Avg Risk Score</p>\n <div className=\"mt-1 flex items-center gap-2\">\n <div className=\"h-2 flex-1 rounded-full bg-bg-sunken overflow-hidden\">\n <div\n className={cn(\n 'h-full rounded-full',\n avgRiskScore <= 1.5\n ? 'bg-status-success-text'\n : avgRiskScore <= 2.5\n ? 'bg-status-warning-text'\n : 'bg-status-error-text'\n )}\n style={{ width: `${(avgRiskScore / 3) * 100}%` }}\n />\n </div>\n <span className=\"text-sm font-medium text-text-primary\">\n {avgRiskScore.toFixed(1)}/3\n </span>\n </div>\n </div>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-3\">\n <p className=\"text-xs text-text-secondary\">Best Performer</p>\n <p className=\"truncate text-sm font-bold text-text-primary\">{bestPerformer.cartName}</p>\n <p className=\"text-xs text-status-success-text\">\n {fmtPct(bestPerformer.returnsPercentage)}\n </p>\n </div>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-3\">\n <p className=\"text-xs text-text-secondary\">Next Payout</p>\n <p className=\"text-lg font-bold text-text-primary\">July 1</p>\n <p className=\"text-xs text-text-secondary\">In 7 days</p>\n </div>\n </div>\n\n {/* Tabs */}\n <div className=\"mt-6 rounded-lg border border-border-seam bg-bg-surface shadow-sm\">\n <div className=\"flex border-b border-border-seam overflow-x-auto\">\n {(\n [\n { key: 'overview', label: 'Overview', Icon: BarChart3 },\n {\n key: 'investments',\n label: `Investments (${filteredInvestments.length})`,\n Icon: Briefcase,\n },\n { key: 'transactions', label: 'Transactions', Icon: CreditCard },\n ] as const\n ).map(({ key, label, Icon }) => (\n <button\n key={key}\n type=\"button\"\n onClick={() => setActiveTab(key)}\n className={cn(\n 'flex items-center gap-2 whitespace-nowrap px-4 py-3 text-sm font-medium transition-colors',\n activeTab === key\n ? 'border-b-2 border-primary text-text-primary'\n : 'text-text-secondary hover:text-text-primary'\n )}\n >\n <Icon className=\"h-4 w-4\" />\n {label}\n </button>\n ))}\n </div>\n\n <div className=\"p-4\">\n {/* Overview Tab */}\n {activeTab === 'overview' && (\n <div className=\"space-y-6\">\n {/* Performance placeholder */}\n <div>\n <h3 className=\"mb-4 text-base font-semibold text-text-primary\">\n Portfolio Performance\n </h3>\n <div className=\"rounded-lg border border-border-seam bg-bg-sunken/50 p-8 text-center\">\n <BarChart3 className=\"mx-auto mb-2 h-8 w-8 text-text-secondary/50\" />\n <p className=\"text-sm text-text-secondary\">Performance chart visualization</p>\n <p className=\"mt-1 text-xs text-text-secondary\">\n Shows portfolio value over time\n </p>\n </div>\n </div>\n\n {/* Asset Allocation */}\n <div>\n <h3 className=\"mb-4 text-base font-semibold text-text-primary\">Asset Allocation</h3>\n <div className=\"space-y-3\">\n {Object.entries(allocationMap).map(([category, value]) => (\n <div key={category} className=\"flex items-center\">\n <span className=\"w-40 truncate text-sm text-text-primary\">{category}</span>\n <div className=\"mx-3 h-6 flex-1 rounded-full bg-bg-sunken overflow-hidden\">\n <div\n className=\"flex h-6 items-center justify-end rounded-full bg-action-primary-bg pr-2\"\n style={{\n width: `${currentValue > 0 ? (value / currentValue) * 100 : 0}%`,\n }}\n >\n <span className=\"text-xs font-medium text-action-primary-text\">\n {currentValue > 0 ? ((value / currentValue) * 100).toFixed(1) : 0}%\n </span>\n </div>\n </div>\n <span className=\"ml-2 text-sm font-medium text-text-primary\">\n {formatCurrency(value, { minimumFractionDigits: 0 })}\n </span>\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n\n {/* Investments Tab */}\n {activeTab === 'investments' && (\n <div>\n {/* Category filter */}\n <div className=\"mb-4\">\n <select\n value={filterCategory}\n onChange={(e) => setFilterCategory(e.target.value)}\n className=\"rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n >\n <option value=\"\">All Categories</option>\n {categories.filter(Boolean).map((cat) => (\n <option key={cat} value={cat}>\n {cat}\n </option>\n ))}\n </select>\n </div>\n\n {/* Investment list */}\n <div className=\"space-y-4\">\n {filteredInvestments.map((inv) => (\n <div\n key={inv.id}\n className=\"rounded-lg border border-border-seam p-4 hover:bg-accent/50 transition-colors\"\n >\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex-1\">\n <h4 className=\"text-base font-semibold text-text-primary\">\n {inv.cartName}\n </h4>\n <p className=\"text-sm text-text-secondary\">\n Owned by {inv.cartOwner} • {inv.location}\n </p>\n <div className=\"mt-2 flex flex-wrap items-center gap-2\">\n <span className=\"text-sm text-text-secondary\">{inv.category}</span>\n {getRiskBadge(inv.riskLevel)}\n </div>\n </div>\n <div className=\"text-left sm:text-right\">\n <p className=\"text-xl font-bold text-text-primary\">\n {formatCurrency(inv.currentValue, { minimumFractionDigits: 0 })}\n </p>\n <p\n className={cn(\n 'text-sm',\n inv.returns > 0 ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {formatCurrency(Math.abs(inv.returns), { minimumFractionDigits: 0 })} (\n {fmtPct(inv.returnsPercentage)})\n </p>\n </div>\n </div>\n\n <div className=\"mb-4 grid grid-cols-2 gap-3 lg:grid-cols-4\">\n <div>\n <p className=\"text-xs text-text-secondary\">Invested</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {formatCurrency(inv.amount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Ownership</p>\n <p className=\"text-sm font-medium text-text-primary\">{inv.ownership}%</p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Monthly Dividend</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {formatCurrency(inv.monthlyDividend, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Investment Date</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {formatDate(inv.investmentDate, { hour: undefined, minute: undefined })}\n </p>\n </div>\n </div>\n\n {/* Performance metrics */}\n <div className=\"border-t border-border-seam pt-4\">\n <p className=\"mb-2 text-sm font-medium text-text-secondary\">\n Performance Metrics\n </p>\n <div className=\"grid grid-cols-3 gap-3 text-center\">\n <div>\n <p className=\"text-lg font-bold text-text-primary\">\n {inv.performanceMetrics.monthlyOrders}\n </p>\n <p className=\"text-xs text-text-secondary\">Monthly Orders</p>\n </div>\n <div>\n <div className=\"flex items-center justify-center gap-1\">\n <Star className=\"h-4 w-4 fill-status-warning-text text-status-warning-text\" />\n <p className=\"text-lg font-bold text-text-primary\">\n {inv.performanceMetrics.averageRating}\n </p>\n </div>\n <p className=\"text-xs text-text-secondary\">Rating</p>\n </div>\n <div>\n <p className=\"text-lg font-bold text-status-success-text\">\n +{inv.performanceMetrics.growthRate}%\n </p>\n <p className=\"text-xs text-text-secondary\">Growth Rate</p>\n </div>\n </div>\n </div>\n\n {/* Actions */}\n <div className=\"mt-4 flex flex-wrap gap-2\">\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${inv.id}`)}\n className=\"flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n {inv.status === 'active' && (\n <button\n type=\"button\"\n onClick={() => handleWithdraw(inv.id)}\n className=\"flex items-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <ArrowDownCircle className=\"h-4 w-4\" />\n Withdraw\n </button>\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Transactions Tab */}\n {activeTab === 'transactions' && (\n <div className=\"space-y-3\">\n {mockTransactions.map((txn) => (\n <div\n key={txn.id}\n className=\"flex flex-col gap-3 rounded-lg border border-border-seam p-4 hover:bg-accent/50 transition-colors sm:flex-row sm:items-center sm:justify-between\"\n >\n <div className=\"flex items-center gap-3\">\n <div\n className={cn(\n 'flex h-10 w-10 shrink-0 items-center justify-center rounded-full',\n txn.type === 'investment'\n ? 'bg-status-info-bg/10'\n : txn.type === 'dividend'\n ? 'bg-status-success-bg/10'\n : 'bg-status-error-bg/10'\n )}\n >\n {txn.type === 'investment' ? (\n <Wallet className=\"h-5 w-5 text-status-info-text\" />\n ) : txn.type === 'dividend' ? (\n <TrendingUp className=\"h-5 w-5 text-status-success-text\" />\n ) : (\n <TrendingDown className=\"h-5 w-5 text-status-error-text\" />\n )}\n </div>\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {txn.type === 'investment'\n ? 'Investment in'\n : txn.type === 'dividend'\n ? 'Dividend from'\n : 'Withdrawal from'}{' '}\n {txn.cartName}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {formatDate(txn.date, { hour: undefined, minute: undefined })}\n </p>\n </div>\n </div>\n <div className=\"flex items-center justify-between sm:gap-4\">\n <p\n className={cn(\n 'text-sm font-bold',\n txn.type === 'dividend' ? 'text-status-success-text' : 'text-text-primary'\n )}\n >\n {txn.type === 'dividend' ? '+' : '-'}\n {formatCurrency(txn.amount, { minimumFractionDigits: 0 })}\n </p>\n <span\n className={cn(\n 'rounded-full px-2.5 py-0.5 text-xs font-medium',\n txn.status === 'completed'\n ? 'bg-status-success-bg/20 text-status-success-text'\n : txn.status === 'pending'\n ? 'bg-status-warning-bg/20 text-status-warning-text'\n : 'bg-status-error-bg/20 text-status-error-text'\n )}\n >\n {txn.status}\n </span>\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AAoEA,IAAM,IAAgC;CACpC;EACE,IAAI;EACJ,QAAQ;EACR,UAAU;EACV,WAAW;EACX,gBAAgB;EAChB,QAAQ;EACR,cAAc;EACd,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,QAAQ;EACR,gBAAgB;EAChB,iBAAiB;EACjB,gBAAgB;EAChB,WAAW;EACX,UAAU;EACV,UAAU;EACV,oBAAoB;GAAE,eAAe;GAAM,eAAe;GAAK,YAAY;GAAI;EAChF;CACD;EACE,IAAI;EACJ,QAAQ;EACR,UAAU;EACV,WAAW;EACX,gBAAgB;EAChB,QAAQ;EACR,cAAc;EACd,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,QAAQ;EACR,gBAAgB;EAChB,iBAAiB;EACjB,gBAAgB;EAChB,WAAW;EACX,UAAU;EACV,UAAU;EACV,oBAAoB;GAAE,eAAe;GAAK,eAAe;GAAK,YAAY;GAAG;EAC9E;CACD;EACE,IAAI;EACJ,QAAQ;EACR,UAAU;EACV,WAAW;EACX,gBAAgB;EAChB,QAAQ;EACR,cAAc;EACd,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,QAAQ;EACR,gBAAgB;EAChB,iBAAiB;EACjB,gBAAgB;EAChB,WAAW;EACX,UAAU;EACV,UAA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