@burdenoff/microfe-subscriberbot 2026.624.1 → 2026.626.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/subscriberbot/components/EmptyState.js +17 -10
- package/dist/subscriberbot/components/EmptyState.js.map +1 -1
- package/dist/subscriberbot/components/InvestmentCard.js +23 -22
- package/dist/subscriberbot/components/InvestmentCard.js.map +1 -1
- package/dist/subscriberbot/components/MetricsCard.js +15 -12
- package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
- package/dist/subscriberbot/components/PageLayout.js +27 -15
- package/dist/subscriberbot/components/PageLayout.js.map +1 -1
- package/dist/subscriberbot/components/RatingDisplay.js +3 -3
- package/dist/subscriberbot/components/RatingDisplay.js.map +1 -1
- package/dist/subscriberbot/components/StatusBadge.js +25 -13
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
- package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
- package/dist/subscriberbot/pages/HomePage.js +72 -63
- package/dist/subscriberbot/pages/HomePage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +106 -100
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminDashboard.js +125 -85
- package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +51 -45
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +246 -241
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js +131 -129
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +247 -242
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/CartManagementPage.js +307 -302
- package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/UserManagementPage.js +308 -303
- package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +89 -84
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +269 -264
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +269 -227
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +191 -186
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +168 -166
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +344 -347
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +270 -272
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +294 -289
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/HelpSupportPage.js +156 -158
- package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js +94 -87
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/SettingsPage.js +749 -740
- package/dist/subscriberbot/pages/common/SettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +357 -324
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CartDetailPage.js +281 -247
- package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +106 -98
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CheckoutPage.js +235 -238
- package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js +426 -390
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +488 -479
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +522 -512
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/FavoritesPage.js +73 -66
- package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +75 -67
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +82 -76
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +100 -93
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/ReviewsPage.js +97 -90
- package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +86 -79
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +330 -293
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +269 -261
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +97 -91
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js +354 -322
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +118 -111
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +75 -69
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +435 -430
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +328 -289
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js +135 -103
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +120 -114
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +125 -120
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +354 -344
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -6,8 +6,9 @@ import { formatCurrency as i } from "../../utils/formatters.js";
|
|
|
6
6
|
import { useCallback as a, useEffect as o, useState as s } from "react";
|
|
7
7
|
import { Activity as c, ArrowDown as l, ArrowUp as u, BarChart3 as d, Calendar as f, Download as p, Lightbulb as m, PieChart as h, Shield as g, Target as _, TrendingUp as v, Wallet as y } from "lucide-react";
|
|
8
8
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/subscriberbot/pages/investor/InvestorAnalyticsPage.tsx
|
|
10
|
-
var
|
|
11
|
+
var w = {
|
|
11
12
|
portfolioMetrics: {
|
|
12
13
|
totalValue: 283700,
|
|
13
14
|
totalInvested: 255e3,
|
|
@@ -131,51 +132,51 @@ var S = {
|
|
|
131
132
|
]
|
|
132
133
|
}
|
|
133
134
|
};
|
|
134
|
-
function
|
|
135
|
+
function T(e) {
|
|
135
136
|
return e <= 2 ? {
|
|
136
137
|
label: "Low Risk",
|
|
137
|
-
color: "text-
|
|
138
|
+
color: "text-status-success-text"
|
|
138
139
|
} : e <= 4 ? {
|
|
139
140
|
label: "Moderate Risk",
|
|
140
|
-
color: "text-
|
|
141
|
+
color: "text-status-warning-text"
|
|
141
142
|
} : {
|
|
142
143
|
label: "High Risk",
|
|
143
|
-
color: "text-
|
|
144
|
+
color: "text-status-error-text"
|
|
144
145
|
};
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
-
return e <= 2 ? "bg-
|
|
147
|
+
function E(e) {
|
|
148
|
+
return e <= 2 ? "bg-status-success-text" : e <= 4 ? "bg-status-warning-text" : "bg-status-error-text";
|
|
148
149
|
}
|
|
149
|
-
function
|
|
150
|
+
function D(e) {
|
|
150
151
|
return e >= 8 ? {
|
|
151
152
|
label: "Well Diversified",
|
|
152
|
-
color: "text-
|
|
153
|
+
color: "text-status-success-text"
|
|
153
154
|
} : e >= 6 ? {
|
|
154
155
|
label: "Moderately Diversified",
|
|
155
|
-
color: "text-
|
|
156
|
+
color: "text-status-warning-text"
|
|
156
157
|
} : {
|
|
157
158
|
label: "Poorly Diversified",
|
|
158
|
-
color: "text-
|
|
159
|
+
color: "text-status-error-text"
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
-
return e >= 8 ? "bg-
|
|
162
|
+
function O(e) {
|
|
163
|
+
return e >= 8 ? "bg-status-success-text" : e >= 6 ? "bg-status-warning-text" : "bg-status-error-text";
|
|
163
164
|
}
|
|
164
|
-
function
|
|
165
|
-
let { navigateTo:
|
|
165
|
+
function k() {
|
|
166
|
+
let { navigateTo: k } = e(), [A, j] = s(!0), [M, N] = s("6m"), [P, F] = s(null), [I, L] = s("idle");
|
|
166
167
|
o(() => {
|
|
167
|
-
|
|
168
|
+
j(!0);
|
|
168
169
|
let e = setTimeout(() => {
|
|
169
|
-
|
|
170
|
+
F(w), j(!1);
|
|
170
171
|
}, 600);
|
|
171
172
|
return () => clearTimeout(e);
|
|
172
|
-
}, [
|
|
173
|
-
let
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
}, [M]);
|
|
174
|
+
let R = a(() => {
|
|
175
|
+
L("exporting"), setTimeout(() => {
|
|
176
|
+
L("done"), setTimeout(() => L("idle"), 2e3);
|
|
176
177
|
}, 1200);
|
|
177
178
|
}, []);
|
|
178
|
-
if (
|
|
179
|
+
if (A || !P) return /* @__PURE__ */ b(n, {
|
|
179
180
|
title: "Investment Analytics",
|
|
180
181
|
description: "Loading analytics...",
|
|
181
182
|
children: /* @__PURE__ */ b("div", {
|
|
@@ -189,16 +190,16 @@ function D() {
|
|
|
189
190
|
})
|
|
190
191
|
})
|
|
191
192
|
});
|
|
192
|
-
let
|
|
193
|
+
let z = T(P.riskAnalysis.riskScore), B = D(P.riskAnalysis.diversificationScore), V = [...P.performanceByCart].sort((e, t) => t.roi - e.roi);
|
|
193
194
|
return /* @__PURE__ */ x(n, {
|
|
194
195
|
title: "Investment Analytics",
|
|
195
196
|
description: "Comprehensive analysis of your portfolio performance",
|
|
196
197
|
actions: /* @__PURE__ */ x("div", {
|
|
197
198
|
className: "flex items-center gap-3",
|
|
198
199
|
children: [/* @__PURE__ */ x("select", {
|
|
199
|
-
value:
|
|
200
|
-
onChange: (e) =>
|
|
201
|
-
className: "rounded-lg border border-border-
|
|
200
|
+
value: M,
|
|
201
|
+
onChange: (e) => N(e.target.value),
|
|
202
|
+
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)]",
|
|
202
203
|
children: [
|
|
203
204
|
/* @__PURE__ */ b("option", {
|
|
204
205
|
value: "1m",
|
|
@@ -223,71 +224,76 @@ function D() {
|
|
|
223
224
|
]
|
|
224
225
|
}), /* @__PURE__ */ x("button", {
|
|
225
226
|
type: "button",
|
|
226
|
-
onClick:
|
|
227
|
-
disabled:
|
|
228
|
-
className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors",
|
|
229
|
-
children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }),
|
|
227
|
+
onClick: R,
|
|
228
|
+
disabled: I === "exporting",
|
|
229
|
+
className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", I === "exporting" ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : I === "done" ? "bg-status-success-text text-text-inverse" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
|
|
230
|
+
children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }), I === "exporting" ? "Exporting..." : I === "done" ? "Exported!" : "Export Report"]
|
|
230
231
|
})]
|
|
231
232
|
}),
|
|
232
233
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ b(C, {
|
|
235
|
+
icon: /* @__PURE__ */ b(d, { className: "h-4 w-4" }),
|
|
236
|
+
className: "mb-6",
|
|
237
|
+
children: "The analytical lens on your investing. Track portfolio value and growth, average ROI and your overall risk score, then see which carts are your best and worst performers. Adjust the date range to study trends, and export a report when you want to review your strategy or share it with an advisor."
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ x(S, {
|
|
234
240
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
235
241
|
children: [
|
|
236
242
|
/* @__PURE__ */ b(r, {
|
|
237
243
|
icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
|
|
238
|
-
value: i(
|
|
244
|
+
value: i(P.portfolioMetrics.totalValue, { minimumFractionDigits: 0 }),
|
|
239
245
|
label: "Portfolio Value",
|
|
240
246
|
trend: "up",
|
|
241
|
-
trendValue: `+${
|
|
247
|
+
trendValue: `+${P.portfolioMetrics.portfolioGrowth}% total growth`
|
|
242
248
|
}),
|
|
243
249
|
/* @__PURE__ */ b(r, {
|
|
244
250
|
icon: /* @__PURE__ */ b(v, { className: "h-5 w-5" }),
|
|
245
|
-
value: i(
|
|
251
|
+
value: i(P.portfolioMetrics.totalReturns, { minimumFractionDigits: 0 }),
|
|
246
252
|
label: "Total Returns",
|
|
247
253
|
trend: "up",
|
|
248
254
|
trendValue: "Profit earned so far"
|
|
249
255
|
}),
|
|
250
256
|
/* @__PURE__ */ b(r, {
|
|
251
257
|
icon: /* @__PURE__ */ b(_, { className: "h-5 w-5" }),
|
|
252
|
-
value: `${
|
|
258
|
+
value: `${P.portfolioMetrics.averageRoi}%`,
|
|
253
259
|
label: "Average ROI",
|
|
254
260
|
trend: "up",
|
|
255
261
|
trendValue: "Across all investments"
|
|
256
262
|
}),
|
|
257
263
|
/* @__PURE__ */ b(r, {
|
|
258
264
|
icon: /* @__PURE__ */ b(c, { className: "h-5 w-5" }),
|
|
259
|
-
value: `${
|
|
265
|
+
value: `${P.riskAnalysis.riskScore}/5`,
|
|
260
266
|
label: "Risk Score",
|
|
261
267
|
trend: "neutral",
|
|
262
|
-
trendValue:
|
|
268
|
+
trendValue: z.label
|
|
263
269
|
})
|
|
264
270
|
]
|
|
265
271
|
}),
|
|
266
272
|
/* @__PURE__ */ x("div", {
|
|
267
273
|
className: "mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
268
274
|
children: [/* @__PURE__ */ x("div", {
|
|
269
|
-
className: "flex items-center gap-3 rounded-lg border border-border-
|
|
275
|
+
className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
270
276
|
children: [/* @__PURE__ */ b("div", {
|
|
271
|
-
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-
|
|
272
|
-
children: /* @__PURE__ */ b(u, { className: "h-5 w-5 text-
|
|
277
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-success-bg/10",
|
|
278
|
+
children: /* @__PURE__ */ b(u, { className: "h-5 w-5 text-status-success-text" })
|
|
273
279
|
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
274
280
|
className: "text-xs text-text-secondary",
|
|
275
281
|
children: "Best Performing"
|
|
276
282
|
}), /* @__PURE__ */ b("p", {
|
|
277
|
-
className: "text-sm font-semibold text-
|
|
278
|
-
children:
|
|
283
|
+
className: "text-sm font-semibold text-status-success-text",
|
|
284
|
+
children: P.portfolioMetrics.bestPerforming
|
|
279
285
|
})] })]
|
|
280
286
|
}), /* @__PURE__ */ x("div", {
|
|
281
|
-
className: "flex items-center gap-3 rounded-lg border border-border-
|
|
287
|
+
className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4",
|
|
282
288
|
children: [/* @__PURE__ */ b("div", {
|
|
283
|
-
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-
|
|
284
|
-
children: /* @__PURE__ */ b(l, { className: "h-5 w-5 text-
|
|
289
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-error-bg/10",
|
|
290
|
+
children: /* @__PURE__ */ b(l, { className: "h-5 w-5 text-status-error-text" })
|
|
285
291
|
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
286
292
|
className: "text-xs text-text-secondary",
|
|
287
293
|
children: "Worst Performing"
|
|
288
294
|
}), /* @__PURE__ */ b("p", {
|
|
289
295
|
className: "text-sm font-semibold text-text-primary",
|
|
290
|
-
children:
|
|
296
|
+
children: P.portfolioMetrics.worstPerforming
|
|
291
297
|
})] })]
|
|
292
298
|
})]
|
|
293
299
|
}),
|
|
@@ -301,8 +307,8 @@ function D() {
|
|
|
301
307
|
})]
|
|
302
308
|
}), /* @__PURE__ */ b("div", {
|
|
303
309
|
className: "space-y-3",
|
|
304
|
-
children:
|
|
305
|
-
className: "flex items-center justify-between rounded-lg border border-border-
|
|
310
|
+
children: V.map((e, n) => /* @__PURE__ */ x("div", {
|
|
311
|
+
className: "flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
306
312
|
children: [/* @__PURE__ */ x("div", {
|
|
307
313
|
className: "flex items-center gap-3",
|
|
308
314
|
children: [/* @__PURE__ */ b("div", {
|
|
@@ -318,10 +324,10 @@ function D() {
|
|
|
318
324
|
}), /* @__PURE__ */ x("div", {
|
|
319
325
|
className: "text-right",
|
|
320
326
|
children: [/* @__PURE__ */ x("p", {
|
|
321
|
-
className: t("text-sm font-semibold", e.returns >= 0 ? "text-
|
|
327
|
+
className: t("text-sm font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
322
328
|
children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
|
|
323
329
|
}), /* @__PURE__ */ x("p", {
|
|
324
|
-
className: t("text-xs", e.roi >= 0 ? "text-
|
|
330
|
+
className: t("text-xs", e.roi >= 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
325
331
|
children: [
|
|
326
332
|
e.roi >= 0 ? "+" : "",
|
|
327
333
|
e.roi,
|
|
@@ -338,8 +344,8 @@ function D() {
|
|
|
338
344
|
})]
|
|
339
345
|
}), /* @__PURE__ */ b("div", {
|
|
340
346
|
className: "space-y-4",
|
|
341
|
-
children:
|
|
342
|
-
className: "rounded-lg border border-border-
|
|
347
|
+
children: P.performanceByCategory.map((e) => /* @__PURE__ */ x("div", {
|
|
348
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
343
349
|
children: [
|
|
344
350
|
/* @__PURE__ */ x("div", {
|
|
345
351
|
className: "mb-2 flex items-center justify-between",
|
|
@@ -364,7 +370,7 @@ function D() {
|
|
|
364
370
|
className: "text-xs text-text-secondary",
|
|
365
371
|
children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
|
|
366
372
|
}), /* @__PURE__ */ x("span", {
|
|
367
|
-
className: t("text-xs font-semibold", e.returns >= 0 ? "text-
|
|
373
|
+
className: t("text-xs font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
368
374
|
children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
|
|
369
375
|
})]
|
|
370
376
|
})
|
|
@@ -381,13 +387,13 @@ function D() {
|
|
|
381
387
|
children: "Portfolio Growth Trend"
|
|
382
388
|
})]
|
|
383
389
|
}), /* @__PURE__ */ b("div", {
|
|
384
|
-
className: "overflow-hidden rounded-lg border border-border-
|
|
390
|
+
className: "overflow-hidden rounded-lg border border-border-seam bg-bg-surface",
|
|
385
391
|
children: /* @__PURE__ */ b("div", {
|
|
386
392
|
className: "overflow-x-auto",
|
|
387
393
|
children: /* @__PURE__ */ x("table", {
|
|
388
394
|
className: "w-full",
|
|
389
395
|
children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
|
|
390
|
-
className: "border-b border-border-
|
|
396
|
+
className: "border-b border-border-seam bg-bg-sunken/50",
|
|
391
397
|
children: [
|
|
392
398
|
/* @__PURE__ */ b("th", {
|
|
393
399
|
className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
|
|
@@ -412,7 +418,7 @@ function D() {
|
|
|
412
418
|
]
|
|
413
419
|
}) }), /* @__PURE__ */ b("tbody", {
|
|
414
420
|
className: "divide-y divide-border",
|
|
415
|
-
children:
|
|
421
|
+
children: P.monthlyPerformance.map((e) => {
|
|
416
422
|
let n = e.invested > 0 ? ((e.value - e.invested) / e.invested * 100).toFixed(1) : "0.0";
|
|
417
423
|
return /* @__PURE__ */ x("tr", {
|
|
418
424
|
className: "hover:bg-accent/50 transition-colors",
|
|
@@ -432,14 +438,14 @@ function D() {
|
|
|
432
438
|
/* @__PURE__ */ b("td", {
|
|
433
439
|
className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
|
|
434
440
|
children: /* @__PURE__ */ x("span", {
|
|
435
|
-
className: t("font-semibold", e.returns >= 0 ? "text-
|
|
441
|
+
className: t("font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
436
442
|
children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
|
|
437
443
|
})
|
|
438
444
|
}),
|
|
439
445
|
/* @__PURE__ */ b("td", {
|
|
440
446
|
className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
|
|
441
447
|
children: /* @__PURE__ */ x("span", {
|
|
442
|
-
className: t("font-medium", parseFloat(n) >= 0 ? "text-
|
|
448
|
+
className: t("font-medium", parseFloat(n) >= 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
443
449
|
children: [
|
|
444
450
|
parseFloat(n) >= 0 ? "+" : "",
|
|
445
451
|
n,
|
|
@@ -464,7 +470,7 @@ function D() {
|
|
|
464
470
|
children: "Risk Analysis"
|
|
465
471
|
})]
|
|
466
472
|
}), /* @__PURE__ */ b("div", {
|
|
467
|
-
className: "rounded-lg border border-border-
|
|
473
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6",
|
|
468
474
|
children: /* @__PURE__ */ x("div", {
|
|
469
475
|
className: "space-y-5",
|
|
470
476
|
children: [
|
|
@@ -474,19 +480,19 @@ function D() {
|
|
|
474
480
|
className: "text-sm text-text-primary",
|
|
475
481
|
children: "Risk Score"
|
|
476
482
|
}), /* @__PURE__ */ x("span", {
|
|
477
|
-
className: t("text-sm font-semibold",
|
|
483
|
+
className: t("text-sm font-semibold", z.color),
|
|
478
484
|
children: [
|
|
479
|
-
|
|
485
|
+
P.riskAnalysis.riskScore,
|
|
480
486
|
"/5 (",
|
|
481
|
-
|
|
487
|
+
z.label,
|
|
482
488
|
")"
|
|
483
489
|
]
|
|
484
490
|
})]
|
|
485
491
|
}), /* @__PURE__ */ b("div", {
|
|
486
492
|
className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
487
493
|
children: /* @__PURE__ */ b("div", {
|
|
488
|
-
className: t("h-full rounded-full transition-all duration-300",
|
|
489
|
-
style: { width: `${
|
|
494
|
+
className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.riskScore)),
|
|
495
|
+
style: { width: `${P.riskAnalysis.riskScore / 5 * 100}%` }
|
|
490
496
|
})
|
|
491
497
|
})] }),
|
|
492
498
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
|
|
@@ -495,19 +501,19 @@ function D() {
|
|
|
495
501
|
className: "text-sm text-text-primary",
|
|
496
502
|
children: "Diversification"
|
|
497
503
|
}), /* @__PURE__ */ x("span", {
|
|
498
|
-
className: t("text-sm font-semibold",
|
|
504
|
+
className: t("text-sm font-semibold", B.color),
|
|
499
505
|
children: [
|
|
500
|
-
|
|
506
|
+
P.riskAnalysis.diversificationScore,
|
|
501
507
|
"/10 (",
|
|
502
|
-
|
|
508
|
+
B.label,
|
|
503
509
|
")"
|
|
504
510
|
]
|
|
505
511
|
})]
|
|
506
512
|
}), /* @__PURE__ */ b("div", {
|
|
507
513
|
className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
508
514
|
children: /* @__PURE__ */ b("div", {
|
|
509
|
-
className: t("h-full rounded-full transition-all duration-300",
|
|
510
|
-
style: { width: `${
|
|
515
|
+
className: t("h-full rounded-full transition-all duration-300", O(P.riskAnalysis.diversificationScore)),
|
|
516
|
+
style: { width: `${P.riskAnalysis.diversificationScore / 10 * 100}%` }
|
|
511
517
|
})
|
|
512
518
|
})] }),
|
|
513
519
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
|
|
@@ -516,23 +522,23 @@ function D() {
|
|
|
516
522
|
className: "text-sm text-text-primary",
|
|
517
523
|
children: "Volatility"
|
|
518
524
|
}), /* @__PURE__ */ x("span", {
|
|
519
|
-
className: t("text-sm font-semibold",
|
|
520
|
-
children: [
|
|
525
|
+
className: t("text-sm font-semibold", T(P.riskAnalysis.volatilityScore).color),
|
|
526
|
+
children: [P.riskAnalysis.volatilityScore, "/5"]
|
|
521
527
|
})]
|
|
522
528
|
}), /* @__PURE__ */ b("div", {
|
|
523
529
|
className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
524
530
|
children: /* @__PURE__ */ b("div", {
|
|
525
|
-
className: t("h-full rounded-full transition-all duration-300",
|
|
526
|
-
style: { width: `${
|
|
531
|
+
className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.volatilityScore)),
|
|
532
|
+
style: { width: `${P.riskAnalysis.volatilityScore / 5 * 100}%` }
|
|
527
533
|
})
|
|
528
534
|
})] }),
|
|
529
535
|
/* @__PURE__ */ x("div", {
|
|
530
|
-
className: "grid grid-cols-2 gap-3 border-t border-border-
|
|
536
|
+
className: "grid grid-cols-2 gap-3 border-t border-border-seam pt-4",
|
|
531
537
|
children: [/* @__PURE__ */ x("div", {
|
|
532
538
|
className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
|
|
533
539
|
children: [/* @__PURE__ */ b("p", {
|
|
534
540
|
className: "text-lg font-bold text-text-primary",
|
|
535
|
-
children:
|
|
541
|
+
children: P.performanceByCart.length
|
|
536
542
|
}), /* @__PURE__ */ b("p", {
|
|
537
543
|
className: "text-xs text-text-secondary",
|
|
538
544
|
children: "Active Investments"
|
|
@@ -541,7 +547,7 @@ function D() {
|
|
|
541
547
|
className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
|
|
542
548
|
children: [/* @__PURE__ */ b("p", {
|
|
543
549
|
className: "text-lg font-bold text-text-primary",
|
|
544
|
-
children:
|
|
550
|
+
children: P.performanceByCategory.length
|
|
545
551
|
}), /* @__PURE__ */ b("p", {
|
|
546
552
|
className: "text-xs text-text-secondary",
|
|
547
553
|
children: "Sectors Covered"
|
|
@@ -552,16 +558,16 @@ function D() {
|
|
|
552
558
|
})
|
|
553
559
|
})] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
|
|
554
560
|
className: "mb-4 flex items-center gap-2",
|
|
555
|
-
children: [/* @__PURE__ */ b(m, { className: "h-5 w-5 text-
|
|
561
|
+
children: [/* @__PURE__ */ b(m, { className: "h-5 w-5 text-status-warning-text" }), /* @__PURE__ */ b("h2", {
|
|
556
562
|
className: "text-lg font-semibold text-text-primary",
|
|
557
563
|
children: "Recommendations"
|
|
558
564
|
})]
|
|
559
565
|
}), /* @__PURE__ */ x("div", {
|
|
560
|
-
className: "rounded-lg border border-border-
|
|
566
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6",
|
|
561
567
|
children: [/* @__PURE__ */ b("div", {
|
|
562
568
|
className: "space-y-3",
|
|
563
|
-
children:
|
|
564
|
-
className: "flex items-start gap-3 rounded-lg border border-border-
|
|
569
|
+
children: P.riskAnalysis.recommendations.map((e, t) => /* @__PURE__ */ x("div", {
|
|
570
|
+
className: "flex items-start gap-3 rounded-lg border border-border-seam bg-bg-sunken/30 p-3",
|
|
565
571
|
children: [/* @__PURE__ */ b("div", {
|
|
566
572
|
className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
|
|
567
573
|
children: t + 1
|
|
@@ -571,7 +577,7 @@ function D() {
|
|
|
571
577
|
})]
|
|
572
578
|
}, t))
|
|
573
579
|
}), /* @__PURE__ */ x("div", {
|
|
574
|
-
className: "mt-5 rounded-lg border border-border-
|
|
580
|
+
className: "mt-5 rounded-lg border border-border-seam bg-bg-sunken/50 p-4",
|
|
575
581
|
children: [/* @__PURE__ */ b("h4", {
|
|
576
582
|
className: "mb-2 text-sm font-semibold text-text-primary",
|
|
577
583
|
children: "Overall Assessment"
|
|
@@ -593,7 +599,7 @@ function D() {
|
|
|
593
599
|
3,
|
|
594
600
|
4,
|
|
595
601
|
5
|
|
596
|
-
].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-
|
|
602
|
+
].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-text" : "bg-bg-sunken") }, e))
|
|
597
603
|
}), /* @__PURE__ */ b("span", {
|
|
598
604
|
className: "text-xs font-medium text-text-primary",
|
|
599
605
|
children: "4/5"
|
|
@@ -615,7 +621,7 @@ function D() {
|
|
|
615
621
|
3,
|
|
616
622
|
4,
|
|
617
623
|
5
|
|
618
|
-
].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 3 ? "bg-
|
|
624
|
+
].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 3 ? "bg-status-warning-text" : "bg-bg-sunken") }, e))
|
|
619
625
|
}), /* @__PURE__ */ b("span", {
|
|
620
626
|
className: "text-xs font-medium text-text-primary",
|
|
621
627
|
children: "3/5"
|
|
@@ -637,7 +643,7 @@ function D() {
|
|
|
637
643
|
3,
|
|
638
644
|
4,
|
|
639
645
|
5
|
|
640
|
-
].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-
|
|
646
|
+
].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-text" : "bg-bg-sunken") }, e))
|
|
641
647
|
}), /* @__PURE__ */ b("span", {
|
|
642
648
|
className: "text-xs font-medium text-text-primary",
|
|
643
649
|
children: "4/5"
|
|
@@ -654,20 +660,20 @@ function D() {
|
|
|
654
660
|
children: [
|
|
655
661
|
/* @__PURE__ */ x("button", {
|
|
656
662
|
type: "button",
|
|
657
|
-
onClick: () =>
|
|
658
|
-
className: "flex items-center gap-2 rounded-lg border border-border-
|
|
663
|
+
onClick: () => k("/investor/portfolio"),
|
|
664
|
+
className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
659
665
|
children: [/* @__PURE__ */ b(h, { className: "h-4 w-4" }), "View Portfolio"]
|
|
660
666
|
}),
|
|
661
667
|
/* @__PURE__ */ x("button", {
|
|
662
668
|
type: "button",
|
|
663
|
-
onClick: () =>
|
|
664
|
-
className: "flex items-center gap-2 rounded-lg border border-border-
|
|
669
|
+
onClick: () => k("/investor/opportunities"),
|
|
670
|
+
className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
665
671
|
children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Browse Opportunities"]
|
|
666
672
|
}),
|
|
667
673
|
/* @__PURE__ */ x("button", {
|
|
668
674
|
type: "button",
|
|
669
|
-
onClick: () =>
|
|
670
|
-
className: "flex items-center gap-2 rounded-lg border border-border-
|
|
675
|
+
onClick: () => k("/investor/investments"),
|
|
676
|
+
className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
671
677
|
children: [/* @__PURE__ */ b(y, { className: "h-4 w-4" }), "My Investments"]
|
|
672
678
|
})
|
|
673
679
|
]
|
|
@@ -676,6 +682,6 @@ function D() {
|
|
|
676
682
|
});
|
|
677
683
|
}
|
|
678
684
|
//#endregion
|
|
679
|
-
export {
|
|
685
|
+
export { k as InvestorAnalyticsPage };
|
|
680
686
|
|
|
681
687
|
//# sourceMappingURL=InvestorAnalyticsPage.js.map
|