@burdenoff/microfe-kadaikodi 2026.704.1 → 2026.704.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +77 -26
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
  4. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
  8. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  10. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  12. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  18. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  19. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  20. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +323 -422
  22. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -383
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  26. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  32. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  34. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  36. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  38. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  39. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  41. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  42. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  43. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  48. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  51. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  52. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  53. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  54. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +232 -343
  55. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  56. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  57. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +127 -294
  59. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  60. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +204 -290
  61. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  63. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +399 -487
  65. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  66. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +13 -13
  67. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +192 -296
  69. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  70. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +245 -397
  71. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +85 -117
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  74. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +177 -395
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  76. package/package.json +1 -1
@@ -3,396 +3,310 @@ import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { MetricsCard as r } from "../../components/MetricsCard.js";
5
5
  import { EmptyState as i } from "../../components/EmptyState.js";
6
- import { formatCurrency as a, formatDate as o } from "../../utils/formatters.js";
7
- import { useEffect as s, useMemo as c, useState as l } from "react";
8
- import { AlertCircle as u, CheckCircle2 as d, Clock as f, Eye as p, IndianRupee as m, Plus as h, TrendingDown as g, TrendingUp as _, Wallet as v } from "lucide-react";
9
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
10
- import { EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
6
+ import { useInvestments as a } from "../../hooks/useKadaikodiApi.js";
7
+ import { formatCurrency as o, formatDate as s } from "../../utils/formatters.js";
8
+ import { useMemo as c, useState as l } from "react";
9
+ import { CheckCircle2 as u, Clock as d, Eye as f, IndianRupee as p, Plus as m, TrendingDown as h, TrendingUp as g, Wallet as _ } from "lucide-react";
10
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
11
+ import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
11
12
  //#region src/kadaikodi/pages/investor/InvestorInvestmentsPage.tsx
12
- var C = [
13
+ var S = [
13
14
  {
14
- id: "inv-001",
15
- cartName: "South Indian Express",
16
- cartOwner: "Raj Kumar",
17
- investmentAmount: 5e4,
18
- currentValue: 58500,
19
- profitLoss: 8500,
20
- profitLossPercentage: 17,
21
- investmentDate: "2024-01-15",
22
- status: "active",
23
- roiAnnual: 22.5,
24
- duration: "18 months",
25
- nextPayout: "2024-12-15",
26
- totalReturns: 8500
15
+ key: "all",
16
+ label: "All Investments"
27
17
  },
28
18
  {
29
- id: "inv-002",
30
- cartName: "Pizza Corner",
31
- cartOwner: "Priya Singh",
32
- investmentAmount: 75e3,
33
- currentValue: 82e3,
34
- profitLoss: 7e3,
35
- profitLossPercentage: 9.3,
36
- investmentDate: "2024-03-10",
37
- status: "active",
38
- roiAnnual: 18,
39
- duration: "24 months",
40
- nextPayout: "2024-12-10",
41
- totalReturns: 7e3
19
+ key: "active",
20
+ label: "Active"
42
21
  },
43
22
  {
44
- id: "inv-003",
45
- cartName: "Healthy Bites",
46
- cartOwner: "Amit Patel",
47
- investmentAmount: 3e4,
48
- currentValue: 31200,
49
- profitLoss: 1200,
50
- profitLossPercentage: 4,
51
- investmentDate: "2024-06-01",
52
- status: "active",
53
- roiAnnual: 15,
54
- duration: "12 months",
55
- nextPayout: "2024-12-01",
56
- totalReturns: 1200
23
+ key: "completed",
24
+ label: "Completed"
57
25
  },
58
26
  {
59
- id: "inv-004",
60
- cartName: "Street Food Junction",
61
- cartOwner: "Neha Sharma",
62
- investmentAmount: 4e4,
63
- currentValue: 4e4,
64
- profitLoss: 0,
65
- profitLossPercentage: 0,
66
- investmentDate: "2024-08-15",
67
- status: "pending",
68
- roiAnnual: 20,
69
- duration: "15 months",
70
- nextPayout: "2025-01-15",
71
- totalReturns: 0
72
- },
73
- {
74
- id: "inv-005",
75
- cartName: "Biryani House",
76
- cartOwner: "Suresh Reddy",
77
- investmentAmount: 6e4,
78
- currentValue: 72e3,
79
- profitLoss: 12e3,
80
- profitLossPercentage: 20,
81
- investmentDate: "2023-12-01",
82
- status: "matured",
83
- roiAnnual: 25,
84
- duration: "12 months",
85
- nextPayout: "-",
86
- totalReturns: 12e3
27
+ key: "exited",
28
+ label: "Exited"
87
29
  }
88
- ], w = {
89
- totalInvested: 255e3,
90
- currentValue: 283700,
91
- totalReturns: 28700,
92
- activeInvestments: 3,
93
- averageRoi: 19.6,
94
- profitLoss: 28700,
95
- profitLossPercentage: 11.3
96
- };
97
- function T(e) {
30
+ ];
31
+ function C(e) {
98
32
  switch (e) {
99
33
  case "active": return "bg-status-success-bg-subtle text-status-success-text";
100
- case "pending": return "bg-status-warning-bg-subtle text-status-warning-text";
101
- case "matured": return "bg-[var(--color-accent-soft)] text-text-primary";
102
- case "withdrawn": return "bg-bg-sunken text-text-secondary";
34
+ case "completed": return "bg-[var(--color-accent-soft)] text-text-primary";
35
+ case "exited": return "bg-bg-sunken text-text-secondary";
103
36
  default: return "bg-bg-sunken text-text-secondary";
104
37
  }
105
38
  }
106
- function E(e) {
39
+ function w(e) {
107
40
  switch (e) {
108
- case "active": return /* @__PURE__ */ y(d, { className: "h-4 w-4" });
109
- case "pending": return /* @__PURE__ */ y(f, { className: "h-4 w-4" });
110
- case "matured": return /* @__PURE__ */ y(d, { className: "h-4 w-4" });
111
- default: return /* @__PURE__ */ y(u, { className: "h-4 w-4" });
41
+ case "active": return /* @__PURE__ */ v(u, { className: "h-4 w-4" });
42
+ case "completed": return /* @__PURE__ */ v(u, { className: "h-4 w-4" });
43
+ default: return /* @__PURE__ */ v(d, { className: "h-4 w-4" });
112
44
  }
113
45
  }
46
+ function T(e) {
47
+ return e.currentValue - e.investedAmount;
48
+ }
49
+ function E(e) {
50
+ return e.investedAmount > 0 ? T(e) / e.investedAmount * 100 : 0;
51
+ }
114
52
  function D() {
115
- let { navigateTo: u } = e(), [f, D] = l(!0), [O, k] = l("all");
116
- s(() => {
117
- let e = setTimeout(() => D(!1), 600);
118
- return () => clearTimeout(e);
119
- }, []);
120
- let A = c(() => O === "all" ? C : C.filter((e) => e.status === O), [O]), j = [
121
- {
122
- key: "all",
123
- label: "All Investments"
124
- },
125
- {
126
- key: "active",
127
- label: "Active"
128
- },
129
- {
130
- key: "pending",
131
- label: "Pending"
132
- },
133
- {
134
- key: "matured",
135
- label: "Matured"
136
- }
137
- ];
138
- function M(e) {
139
- return e === "all" ? C.length : C.filter((t) => t.status === e).length;
53
+ let { navigateTo: d, currentUser: D } = e(), { data: O = [], isLoading: k } = a(D?.id || ""), [A, j] = l("all"), M = c(() => A === "all" ? O : O.filter((e) => e.status === A), [A, O]), N = c(() => {
54
+ let e = O.reduce((e, t) => e + t.investedAmount, 0), t = O.reduce((e, t) => e + t.currentValue, 0), n = O.reduce((e, t) => e + t.returns, 0), r = t - e;
55
+ return {
56
+ totalInvested: e,
57
+ currentValue: t,
58
+ totalReturns: n,
59
+ pl: r,
60
+ plPct: e > 0 ? r / e * 100 : 0,
61
+ activeInvestments: O.filter((e) => e.status === "active").length
62
+ };
63
+ }, [O]);
64
+ function P(e) {
65
+ return e === "all" ? O.length : O.filter((t) => t.status === e).length;
140
66
  }
141
- return f ? /* @__PURE__ */ y(n, {
67
+ return k ? /* @__PURE__ */ v(n, {
142
68
  title: "My Investments",
143
69
  description: "Loading your investments...",
144
- children: /* @__PURE__ */ y("div", {
70
+ children: /* @__PURE__ */ v("div", {
145
71
  className: "flex items-center justify-center py-20",
146
- children: /* @__PURE__ */ b("div", {
72
+ children: /* @__PURE__ */ y("div", {
147
73
  className: "text-center",
148
- children: [/* @__PURE__ */ y("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ y("p", {
74
+ children: [/* @__PURE__ */ v("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ v("p", {
149
75
  className: "text-sm text-text-secondary",
150
76
  children: "Loading your investments..."
151
77
  })]
152
78
  })
153
79
  })
154
- }) : /* @__PURE__ */ b(n, {
80
+ }) : /* @__PURE__ */ y(n, {
155
81
  title: "My Investments",
156
82
  description: "Track and manage your investment portfolio",
157
- actions: /* @__PURE__ */ b("button", {
83
+ actions: /* @__PURE__ */ y("button", {
158
84
  type: "button",
159
- onClick: () => u("/investor/opportunities"),
85
+ onClick: () => d("/investor/opportunities"),
160
86
  className: "flex items-center gap-2 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",
161
- children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), "New Investment"]
87
+ children: [/* @__PURE__ */ v(m, { className: "h-4 w-4" }), "New Investment"]
162
88
  }),
163
89
  children: [
164
- /* @__PURE__ */ y(S, {
90
+ /* @__PURE__ */ v(x, {
165
91
  className: "mb-6",
166
92
  children: "Your active holdings in one place. Use this page to track every cart you've backed — what you put in, what it's worth now, the returns you've earned, and which investments are still active. Filter by status to focus, open any investment for the full picture, or start a New Investment when you're ready to grow your portfolio."
167
93
  }),
168
- /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y("h2", {
94
+ /* @__PURE__ */ y(b, { children: [/* @__PURE__ */ v("h2", {
169
95
  className: "mb-4 text-base font-semibold text-text-primary",
170
96
  children: "Portfolio Summary"
171
- }), /* @__PURE__ */ b("div", {
97
+ }), /* @__PURE__ */ y("div", {
172
98
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
173
99
  children: [
174
- /* @__PURE__ */ y(r, {
175
- icon: /* @__PURE__ */ y(v, { className: "h-5 w-5" }),
176
- value: a(w.totalInvested, { minimumFractionDigits: 0 }),
177
- label: "Total Invested",
178
- trend: "up",
179
- trendValue: "Total amount invested"
100
+ /* @__PURE__ */ v(r, {
101
+ icon: /* @__PURE__ */ v(_, { className: "h-5 w-5" }),
102
+ value: o(N.totalInvested, { minimumFractionDigits: 0 }),
103
+ label: "Total Invested"
180
104
  }),
181
- /* @__PURE__ */ y(r, {
182
- icon: /* @__PURE__ */ y(m, { className: "h-5 w-5" }),
183
- value: a(w.currentValue, { minimumFractionDigits: 0 }),
105
+ /* @__PURE__ */ v(r, {
106
+ icon: /* @__PURE__ */ v(p, { className: "h-5 w-5" }),
107
+ value: o(N.currentValue, { minimumFractionDigits: 0 }),
184
108
  label: "Current Value",
185
- trend: w.profitLoss > 0 ? "up" : "down",
186
- trendValue: `${w.profitLossPercentage > 0 ? "+" : ""}${w.profitLossPercentage}% total returns`
109
+ trend: N.pl >= 0 ? "up" : "down",
110
+ trendValue: `${N.plPct >= 0 ? "+" : ""}${N.plPct.toFixed(1)}%`
187
111
  }),
188
- /* @__PURE__ */ y(r, {
189
- icon: /* @__PURE__ */ y(_, { className: "h-5 w-5" }),
190
- value: a(w.totalReturns, { minimumFractionDigits: 0 }),
191
- label: "Total Returns",
192
- trend: "up",
193
- trendValue: "Total profit earned"
112
+ /* @__PURE__ */ v(r, {
113
+ icon: /* @__PURE__ */ v(g, { className: "h-5 w-5" }),
114
+ value: o(N.totalReturns, { minimumFractionDigits: 0 }),
115
+ label: "Total Returns"
194
116
  }),
195
- /* @__PURE__ */ y(r, {
196
- icon: /* @__PURE__ */ y(d, { className: "h-5 w-5" }),
197
- value: String(w.activeInvestments),
117
+ /* @__PURE__ */ v(r, {
118
+ icon: /* @__PURE__ */ v(u, { className: "h-5 w-5" }),
119
+ value: String(N.activeInvestments),
198
120
  label: "Active Investments",
199
- trend: "neutral",
200
- trendValue: `${w.averageRoi}% avg ROI`
121
+ trend: "neutral"
201
122
  })
202
123
  ]
203
124
  })] }),
204
- /* @__PURE__ */ y("div", {
125
+ /* @__PURE__ */ v("div", {
205
126
  className: "mt-6 rounded-lg border border-border-subtle bg-bg-surface p-4",
206
- children: /* @__PURE__ */ y("div", {
127
+ children: /* @__PURE__ */ v("div", {
207
128
  className: "flex flex-wrap gap-2",
208
- children: j.map((e) => /* @__PURE__ */ b("button", {
129
+ children: S.map((e) => /* @__PURE__ */ y("button", {
209
130
  type: "button",
210
- onClick: () => k(e.key),
211
- className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", O === e.key ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"),
212
- children: [e.label, /* @__PURE__ */ y("span", {
213
- className: t("rounded-full px-2 py-0.5 text-xs", O === e.key ? "bg-primary-foreground/20 text-action-primary-text" : "bg-action-primary-bg/10 text-primary"),
214
- children: M(e.key)
131
+ onClick: () => j(e.key),
132
+ className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", A === e.key ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"),
133
+ children: [e.label, /* @__PURE__ */ v("span", {
134
+ className: t("rounded-full px-2 py-0.5 text-xs", A === e.key ? "bg-primary-foreground/20 text-action-primary-text" : "bg-action-primary-bg/10 text-primary"),
135
+ children: P(e.key)
215
136
  })]
216
137
  }, e.key))
217
138
  })
218
139
  }),
219
- /* @__PURE__ */ y("div", {
140
+ /* @__PURE__ */ v("div", {
220
141
  className: "mt-6 space-y-4",
221
- children: A.length > 0 ? A.map((e) => /* @__PURE__ */ b("div", {
222
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
223
- children: [/* @__PURE__ */ b("div", {
224
- className: "block space-y-4 lg:hidden",
225
- children: [
226
- /* @__PURE__ */ b("div", {
227
- className: "flex items-start justify-between",
228
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
229
- className: "text-lg font-semibold text-text-primary",
230
- children: e.cartName
231
- }), /* @__PURE__ */ b("p", {
232
- className: "text-sm text-text-secondary",
233
- children: ["by ", e.cartOwner]
234
- })] }), /* @__PURE__ */ b("span", {
235
- className: t("flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium", T(e.status)),
236
- children: [E(e.status), /* @__PURE__ */ y("span", {
237
- className: "capitalize",
238
- children: e.status
239
- })]
240
- })]
241
- }),
242
- /* @__PURE__ */ b("div", {
243
- className: "grid grid-cols-2 gap-4",
244
- children: [
245
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
246
- className: "text-sm text-text-secondary",
247
- children: "Invested"
248
- }), /* @__PURE__ */ y("p", {
249
- className: "font-semibold text-text-primary",
250
- children: a(e.investmentAmount, { minimumFractionDigits: 0 })
251
- })] }),
252
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
253
- className: "text-sm text-text-secondary",
254
- children: "Current Value"
255
- }), /* @__PURE__ */ y("p", {
256
- className: "font-semibold text-text-primary",
257
- children: a(e.currentValue, { minimumFractionDigits: 0 })
258
- })] }),
259
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
260
- className: "text-sm text-text-secondary",
261
- children: "P&L"
262
- }), /* @__PURE__ */ b("p", {
263
- className: t("font-semibold", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
264
- children: [
265
- e.profitLoss >= 0 ? "+" : "",
266
- a(e.profitLoss, { minimumFractionDigits: 0 }),
267
- " (",
268
- e.profitLossPercentage >= 0 ? "+" : "",
269
- e.profitLossPercentage,
270
- "%)"
271
- ]
272
- })] }),
273
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
274
- className: "text-sm text-text-secondary",
275
- children: "ROI"
276
- }), /* @__PURE__ */ b("p", {
277
- className: "font-semibold text-text-primary",
278
- children: [e.roiAnnual, "% p.a."]
279
- })] })
280
- ]
281
- }),
282
- /* @__PURE__ */ b("div", {
283
- className: "flex items-center justify-between border-t border-border-subtle pt-2",
284
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
285
- className: "text-xs text-text-secondary",
286
- children: "Invested on"
287
- }), /* @__PURE__ */ y("p", {
288
- className: "text-sm font-medium text-text-primary",
289
- children: o(e.investmentDate, {
290
- hour: void 0,
291
- minute: void 0
292
- })
293
- })] }), /* @__PURE__ */ b("button", {
294
- type: "button",
295
- onClick: () => u(`/investor/investments/${e.id}`),
296
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
297
- children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), "View Details"]
298
- })]
299
- })
300
- ]
301
- }), /* @__PURE__ */ b("div", {
302
- className: "hidden lg:flex lg:items-center lg:justify-between",
303
- children: [/* @__PURE__ */ b("div", {
304
- className: "min-w-0 flex-1",
142
+ children: M.length > 0 ? M.map((e) => {
143
+ let n = T(e), r = E(e);
144
+ return /* @__PURE__ */ y("div", {
145
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
146
+ children: [/* @__PURE__ */ y("div", {
147
+ className: "block space-y-4 lg:hidden",
305
148
  children: [
306
- /* @__PURE__ */ b("div", {
307
- className: "mb-2 flex items-center justify-between",
308
- children: [/* @__PURE__ */ y("h3", {
149
+ /* @__PURE__ */ y("div", {
150
+ className: "flex items-start justify-between",
151
+ children: [/* @__PURE__ */ v("h3", {
309
152
  className: "text-lg font-semibold text-text-primary",
310
153
  children: e.cartName
311
- }), /* @__PURE__ */ b("span", {
312
- className: t("flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium", T(e.status)),
313
- children: [E(e.status), /* @__PURE__ */ y("span", {
154
+ }), /* @__PURE__ */ y("span", {
155
+ className: t("flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium", C(e.status)),
156
+ children: [w(e.status), /* @__PURE__ */ v("span", {
314
157
  className: "capitalize",
315
158
  children: e.status
316
159
  })]
317
160
  })]
318
161
  }),
319
- /* @__PURE__ */ b("p", {
320
- className: "mb-4 text-sm text-text-secondary",
321
- children: ["by ", e.cartOwner]
162
+ /* @__PURE__ */ y("div", {
163
+ className: "grid grid-cols-2 gap-4",
164
+ children: [
165
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
166
+ className: "text-sm text-text-secondary",
167
+ children: "Invested"
168
+ }), /* @__PURE__ */ v("p", {
169
+ className: "font-semibold text-text-primary",
170
+ children: o(e.investedAmount, { minimumFractionDigits: 0 })
171
+ })] }),
172
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
173
+ className: "text-sm text-text-secondary",
174
+ children: "Current Value"
175
+ }), /* @__PURE__ */ v("p", {
176
+ className: "font-semibold text-text-primary",
177
+ children: o(e.currentValue, { minimumFractionDigits: 0 })
178
+ })] }),
179
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
180
+ className: "text-sm text-text-secondary",
181
+ children: "P&L"
182
+ }), /* @__PURE__ */ y("p", {
183
+ className: t("font-semibold", n >= 0 ? "text-status-success-text" : "text-status-error-text"),
184
+ children: [
185
+ n >= 0 ? "+" : "",
186
+ o(n, { minimumFractionDigits: 0 }),
187
+ " (",
188
+ r >= 0 ? "+" : "",
189
+ r.toFixed(1),
190
+ "%)"
191
+ ]
192
+ })] }),
193
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
194
+ className: "text-sm text-text-secondary",
195
+ children: "Expected Return"
196
+ }), /* @__PURE__ */ y("p", {
197
+ className: "font-semibold text-text-primary",
198
+ children: [e.returnsPercentage, "%"]
199
+ })] })
200
+ ]
322
201
  }),
323
- /* @__PURE__ */ b("div", {
202
+ /* @__PURE__ */ y("div", {
203
+ className: "flex items-center justify-between border-t border-border-subtle pt-2",
204
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
205
+ className: "text-xs text-text-secondary",
206
+ children: "Invested on"
207
+ }), /* @__PURE__ */ v("p", {
208
+ className: "text-sm font-medium text-text-primary",
209
+ children: s(e.investmentDate, {
210
+ hour: void 0,
211
+ minute: void 0
212
+ })
213
+ })] }), /* @__PURE__ */ y("button", {
214
+ type: "button",
215
+ onClick: () => d(`/investor/investments/${e.id}`),
216
+ className: "flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
217
+ children: [/* @__PURE__ */ v(f, { className: "h-4 w-4" }), "View Details"]
218
+ })]
219
+ })
220
+ ]
221
+ }), /* @__PURE__ */ y("div", {
222
+ className: "hidden lg:flex lg:items-center lg:justify-between",
223
+ children: [/* @__PURE__ */ y("div", {
224
+ className: "min-w-0 flex-1",
225
+ children: [/* @__PURE__ */ y("div", {
226
+ className: "mb-4 flex items-center justify-between",
227
+ children: [/* @__PURE__ */ v("h3", {
228
+ className: "text-lg font-semibold text-text-primary",
229
+ children: e.cartName
230
+ }), /* @__PURE__ */ y("span", {
231
+ className: t("flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium", C(e.status)),
232
+ children: [w(e.status), /* @__PURE__ */ v("span", {
233
+ className: "capitalize",
234
+ children: e.status
235
+ })]
236
+ })]
237
+ }), /* @__PURE__ */ y("div", {
324
238
  className: "grid grid-cols-5 gap-6",
325
239
  children: [
326
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
240
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
327
241
  className: "text-sm text-text-secondary",
328
242
  children: "Invested"
329
- }), /* @__PURE__ */ y("p", {
243
+ }), /* @__PURE__ */ v("p", {
330
244
  className: "font-semibold text-text-primary",
331
- children: a(e.investmentAmount, { minimumFractionDigits: 0 })
245
+ children: o(e.investedAmount, { minimumFractionDigits: 0 })
332
246
  })] }),
333
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
247
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
334
248
  className: "text-sm text-text-secondary",
335
249
  children: "Current Value"
336
- }), /* @__PURE__ */ y("p", {
250
+ }), /* @__PURE__ */ v("p", {
337
251
  className: "font-semibold text-text-primary",
338
- children: a(e.currentValue, { minimumFractionDigits: 0 })
252
+ children: o(e.currentValue, { minimumFractionDigits: 0 })
339
253
  })] }),
340
- /* @__PURE__ */ b("div", { children: [
341
- /* @__PURE__ */ y("p", {
254
+ /* @__PURE__ */ y("div", { children: [
255
+ /* @__PURE__ */ v("p", {
342
256
  className: "text-sm text-text-secondary",
343
257
  children: "P&L"
344
258
  }),
345
- /* @__PURE__ */ b("p", {
346
- className: t("font-semibold", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
347
- children: [e.profitLoss >= 0 ? "+" : "", a(e.profitLoss, { minimumFractionDigits: 0 })]
259
+ /* @__PURE__ */ y("p", {
260
+ className: t("font-semibold", n >= 0 ? "text-status-success-text" : "text-status-error-text"),
261
+ children: [n >= 0 ? "+" : "", o(n, { minimumFractionDigits: 0 })]
348
262
  }),
349
- /* @__PURE__ */ b("p", {
350
- className: t("text-xs", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
263
+ /* @__PURE__ */ y("p", {
264
+ className: t("text-xs", n >= 0 ? "text-status-success-text" : "text-status-error-text"),
351
265
  children: [
352
266
  "(",
353
- e.profitLossPercentage >= 0 ? "+" : "",
354
- e.profitLossPercentage,
267
+ r >= 0 ? "+" : "",
268
+ r.toFixed(1),
355
269
  "%)"
356
270
  ]
357
271
  })
358
272
  ] }),
359
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
273
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
360
274
  className: "text-sm text-text-secondary",
361
- children: "ROI"
362
- }), /* @__PURE__ */ b("p", {
275
+ children: "Expected Return"
276
+ }), /* @__PURE__ */ y("p", {
363
277
  className: "font-semibold text-text-primary",
364
- children: [e.roiAnnual, "% p.a."]
278
+ children: [e.returnsPercentage, "%"]
365
279
  })] }),
366
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
280
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
367
281
  className: "text-sm text-text-secondary",
368
282
  children: "Invested on"
369
- }), /* @__PURE__ */ y("p", {
283
+ }), /* @__PURE__ */ v("p", {
370
284
  className: "font-semibold text-text-primary",
371
- children: o(e.investmentDate, {
285
+ children: s(e.investmentDate, {
372
286
  hour: void 0,
373
287
  minute: void 0
374
288
  })
375
289
  })] })
376
290
  ]
291
+ })]
292
+ }), /* @__PURE__ */ v("div", {
293
+ className: "ml-6",
294
+ children: /* @__PURE__ */ y("button", {
295
+ type: "button",
296
+ onClick: () => d(`/investor/investments/${e.id}`),
297
+ className: "flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
298
+ children: [/* @__PURE__ */ v(f, { className: "h-4 w-4" }), "View Details"]
377
299
  })
378
- ]
379
- }), /* @__PURE__ */ y("div", {
380
- className: "ml-6",
381
- children: /* @__PURE__ */ b("button", {
382
- type: "button",
383
- onClick: () => u(`/investor/investments/${e.id}`),
384
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
385
- children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), "View Details"]
386
- })
300
+ })]
387
301
  })]
388
- })]
389
- }, e.id)) : /* @__PURE__ */ y(i, {
390
- icon: /* @__PURE__ */ y(g, { className: "h-12 w-12" }),
391
- title: `No ${O === "all" ? "" : O} investments found`,
392
- description: O === "all" ? "You haven't made any investments yet. Start exploring opportunities to grow your wealth." : `You don't have any ${O} investments at the moment.`,
393
- action: /* @__PURE__ */ y("button", {
302
+ }, e.id);
303
+ }) : /* @__PURE__ */ v(i, {
304
+ icon: /* @__PURE__ */ v(h, { className: "h-12 w-12" }),
305
+ title: `No ${A === "all" ? "" : A} investments found`,
306
+ description: A === "all" ? "You haven't made any investments yet. Start exploring opportunities to grow your wealth." : `You don't have any ${A} investments at the moment.`,
307
+ action: /* @__PURE__ */ v("button", {
394
308
  type: "button",
395
- onClick: () => u("/investor/opportunities"),
309
+ onClick: () => d("/investor/opportunities"),
396
310
  className: "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",
397
311
  children: "Explore Investment Opportunities"
398
312
  })