@burdenoff/microfe-kadaikodi 2026.625.1 → 2026.626.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.
- package/dist/kadaikodi/pages/HomePage.js +19 -14
- package/dist/kadaikodi/pages/HomePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +118 -83
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminDashboard.js +75 -46
- package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +144 -128
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +255 -237
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js +129 -128
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +178 -150
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js +182 -159
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +325 -303
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +500 -469
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +534 -503
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +73 -48
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +103 -96
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +130 -129
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +673 -670
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +517 -514
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +140 -125
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +302 -311
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js +102 -91
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js +766 -734
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +366 -356
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +243 -213
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +200 -195
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +95 -89
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +430 -387
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +488 -478
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +523 -512
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/FavoritesPage.js +83 -75
- package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +116 -108
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +67 -61
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +90 -73
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js +80 -72
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +70 -53
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +289 -255
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +92 -84
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +63 -55
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js +339 -311
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +40 -32
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +174 -150
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +385 -381
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +302 -273
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js +87 -59
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +82 -75
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +81 -77
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +78 -71
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,8 +6,9 @@ import { formatCurrency as i, formatNumber as a } from "../../utils/formatters.j
|
|
|
6
6
|
import { useCallback as o, useEffect as s, useMemo as c, useState as l } from "react";
|
|
7
7
|
import { CheckCircle2 as u, Eye as d, FileText as f, IndianRupee as p, MapPin as m, Search as h, Star as g, X as _ } from "lucide-react";
|
|
8
8
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/kadaikodi/pages/investor/InvestmentOpportunitiesPage.tsx
|
|
10
|
-
var
|
|
11
|
+
var S = [
|
|
11
12
|
{
|
|
12
13
|
id: "opp-001",
|
|
13
14
|
cartId: "cart-005",
|
|
@@ -216,13 +217,13 @@ var b = [
|
|
|
216
217
|
}],
|
|
217
218
|
status: "active"
|
|
218
219
|
}
|
|
219
|
-
],
|
|
220
|
+
], C = {
|
|
220
221
|
totalOpportunities: 24,
|
|
221
222
|
averageReturns: 21.5,
|
|
222
223
|
totalFunded: 156e5,
|
|
223
224
|
successRate: 89
|
|
224
225
|
};
|
|
225
|
-
function
|
|
226
|
+
function w(e) {
|
|
226
227
|
switch (e) {
|
|
227
228
|
case "low": return "bg-status-success-bg-subtle text-status-success-text";
|
|
228
229
|
case "medium": return "bg-status-warning-bg-subtle text-status-warning-text";
|
|
@@ -230,7 +231,7 @@ function S(e) {
|
|
|
230
231
|
default: return "bg-secondary text-secondary-foreground";
|
|
231
232
|
}
|
|
232
233
|
}
|
|
233
|
-
function
|
|
234
|
+
function T(e) {
|
|
234
235
|
switch (e) {
|
|
235
236
|
case "low": return "Low Risk";
|
|
236
237
|
case "medium": return "Medium Risk";
|
|
@@ -238,11 +239,11 @@ function C(e) {
|
|
|
238
239
|
default: return e;
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
|
-
function
|
|
242
|
+
function E(e, t) {
|
|
242
243
|
return t > 0 ? Math.min(e / t * 100, 100) : 0;
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
-
let { navigateTo:
|
|
245
|
+
function D() {
|
|
246
|
+
let { navigateTo: D } = e(), [O, k] = l(!0), [A, j] = l(null), [M, N] = l(!1), [P, F] = l(""), [I, L] = l("idle"), [R, z] = l({
|
|
246
247
|
searchQuery: "",
|
|
247
248
|
category: "",
|
|
248
249
|
riskLevel: "",
|
|
@@ -251,25 +252,25 @@ function T() {
|
|
|
251
252
|
sortBy: "featured"
|
|
252
253
|
});
|
|
253
254
|
s(() => {
|
|
254
|
-
let e = setTimeout(() =>
|
|
255
|
+
let e = setTimeout(() => k(!1), 600);
|
|
255
256
|
return () => clearTimeout(e);
|
|
256
257
|
}, []);
|
|
257
|
-
let
|
|
258
|
-
|
|
258
|
+
let B = o((e, t) => {
|
|
259
|
+
z((n) => ({
|
|
259
260
|
...n,
|
|
260
261
|
[e]: t
|
|
261
262
|
}));
|
|
262
|
-
}, []),
|
|
263
|
-
let e = [...
|
|
264
|
-
if (
|
|
265
|
-
let t =
|
|
263
|
+
}, []), V = c(() => {
|
|
264
|
+
let e = [...S];
|
|
265
|
+
if (R.searchQuery.trim()) {
|
|
266
|
+
let t = R.searchQuery.toLowerCase();
|
|
266
267
|
e = e.filter((e) => e.cartName.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.category.toLowerCase().includes(t));
|
|
267
268
|
}
|
|
268
|
-
if (
|
|
269
|
-
let t = parseInt(
|
|
269
|
+
if (R.category && (e = e.filter((e) => e.category === R.category)), R.riskLevel && (e = e.filter((e) => e.riskLevel === R.riskLevel)), R.location && (e = e.filter((e) => e.location.includes(R.location))), R.minimumAmount) {
|
|
270
|
+
let t = parseInt(R.minimumAmount, 10);
|
|
270
271
|
e = e.filter((e) => e.minimumInvestment <= t);
|
|
271
272
|
}
|
|
272
|
-
switch (
|
|
273
|
+
switch (R.sortBy) {
|
|
273
274
|
case "returns":
|
|
274
275
|
e.sort((e, t) => t.expectedReturns - e.expectedReturns);
|
|
275
276
|
break;
|
|
@@ -285,30 +286,30 @@ function T() {
|
|
|
285
286
|
default: break;
|
|
286
287
|
}
|
|
287
288
|
return e;
|
|
288
|
-
}, [
|
|
289
|
-
if (!
|
|
290
|
-
let e = parseInt(
|
|
289
|
+
}, [R]), H = o(() => {
|
|
290
|
+
if (!A || !P) return;
|
|
291
|
+
let e = parseInt(P, 10);
|
|
291
292
|
if (!isNaN(e)) {
|
|
292
|
-
if (e <
|
|
293
|
-
|
|
293
|
+
if (e < A.minimumInvestment) {
|
|
294
|
+
L("error");
|
|
294
295
|
return;
|
|
295
296
|
}
|
|
296
|
-
if (e >
|
|
297
|
-
|
|
297
|
+
if (e > A.maximumInvestment) {
|
|
298
|
+
L("error");
|
|
298
299
|
return;
|
|
299
300
|
}
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
L("success"), setTimeout(() => {
|
|
302
|
+
N(!1), F(""), L("idle"), D("/investor/portfolio");
|
|
302
303
|
}, 1500);
|
|
303
304
|
}
|
|
304
305
|
}, [
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
]),
|
|
309
|
-
|
|
306
|
+
A,
|
|
307
|
+
P,
|
|
308
|
+
D
|
|
309
|
+
]), U = o((e) => {
|
|
310
|
+
j(e), F(""), L("idle"), N(!0);
|
|
310
311
|
}, []);
|
|
311
|
-
return
|
|
312
|
+
return O ? /* @__PURE__ */ v(n, {
|
|
312
313
|
title: "Investment Opportunities",
|
|
313
314
|
description: "Loading opportunities...",
|
|
314
315
|
children: /* @__PURE__ */ v("div", {
|
|
@@ -326,10 +327,17 @@ function T() {
|
|
|
326
327
|
description: "Discover and invest in growing local businesses",
|
|
327
328
|
actions: /* @__PURE__ */ y("span", {
|
|
328
329
|
className: "text-sm text-text-secondary",
|
|
329
|
-
children: [
|
|
330
|
+
children: [V.length, " opportunities"]
|
|
330
331
|
}),
|
|
331
332
|
children: [
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ v(x, {
|
|
334
|
+
className: "mb-6",
|
|
335
|
+
children: "The deal flow — local carts and businesses looking for funding right now. Use this page to discover opportunities that fit your strategy, compare projected returns and equity on offer, filter by category or funding stage, and back the ones you believe in. The stats up top show how the platform is performing so you can gauge typical returns and success rates before you commit."
|
|
336
|
+
}),
|
|
337
|
+
/* @__PURE__ */ y(b, { children: [/* @__PURE__ */ v("h2", {
|
|
338
|
+
className: "mb-4 text-base font-semibold text-text-primary",
|
|
339
|
+
children: "Platform Performance"
|
|
340
|
+
}), /* @__PURE__ */ y("div", {
|
|
333
341
|
className: "grid grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4",
|
|
334
342
|
children: [
|
|
335
343
|
/* @__PURE__ */ y("div", {
|
|
@@ -339,7 +347,7 @@ function T() {
|
|
|
339
347
|
children: "Active Opportunities"
|
|
340
348
|
}), /* @__PURE__ */ v("p", {
|
|
341
349
|
className: "text-lg font-bold text-text-primary sm:text-2xl",
|
|
342
|
-
children:
|
|
350
|
+
children: C.totalOpportunities
|
|
343
351
|
})]
|
|
344
352
|
}),
|
|
345
353
|
/* @__PURE__ */ y("div", {
|
|
@@ -349,7 +357,7 @@ function T() {
|
|
|
349
357
|
children: "Average Returns"
|
|
350
358
|
}), /* @__PURE__ */ y("p", {
|
|
351
359
|
className: "text-lg font-bold text-status-success-text sm:text-2xl",
|
|
352
|
-
children: [
|
|
360
|
+
children: [C.averageReturns, "%"]
|
|
353
361
|
})]
|
|
354
362
|
}),
|
|
355
363
|
/* @__PURE__ */ y("div", {
|
|
@@ -359,7 +367,7 @@ function T() {
|
|
|
359
367
|
children: "Total Funded"
|
|
360
368
|
}), /* @__PURE__ */ v("p", {
|
|
361
369
|
className: "text-lg font-bold text-text-primary sm:text-2xl",
|
|
362
|
-
children: i(
|
|
370
|
+
children: i(C.totalFunded, {
|
|
363
371
|
minimumFractionDigits: 0,
|
|
364
372
|
notation: "compact"
|
|
365
373
|
})
|
|
@@ -372,11 +380,11 @@ function T() {
|
|
|
372
380
|
children: "Success Rate"
|
|
373
381
|
}), /* @__PURE__ */ y("p", {
|
|
374
382
|
className: "text-lg font-bold text-text-primary sm:text-2xl",
|
|
375
|
-
children: [
|
|
383
|
+
children: [C.successRate, "%"]
|
|
376
384
|
})]
|
|
377
385
|
})
|
|
378
386
|
]
|
|
379
|
-
}),
|
|
387
|
+
})] }),
|
|
380
388
|
/* @__PURE__ */ v("div", {
|
|
381
389
|
className: "mt-6 rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
382
390
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -387,14 +395,14 @@ function T() {
|
|
|
387
395
|
children: [/* @__PURE__ */ v(h, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
|
|
388
396
|
type: "text",
|
|
389
397
|
placeholder: "Search opportunities...",
|
|
390
|
-
value:
|
|
391
|
-
onChange: (e) =>
|
|
398
|
+
value: R.searchQuery,
|
|
399
|
+
onChange: (e) => B("searchQuery", e.target.value),
|
|
392
400
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
393
401
|
})]
|
|
394
402
|
}),
|
|
395
403
|
/* @__PURE__ */ y("select", {
|
|
396
|
-
value:
|
|
397
|
-
onChange: (e) =>
|
|
404
|
+
value: R.category,
|
|
405
|
+
onChange: (e) => B("category", e.target.value),
|
|
398
406
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
399
407
|
children: [
|
|
400
408
|
/* @__PURE__ */ v("option", {
|
|
@@ -424,8 +432,8 @@ function T() {
|
|
|
424
432
|
]
|
|
425
433
|
}),
|
|
426
434
|
/* @__PURE__ */ y("select", {
|
|
427
|
-
value:
|
|
428
|
-
onChange: (e) =>
|
|
435
|
+
value: R.riskLevel,
|
|
436
|
+
onChange: (e) => B("riskLevel", e.target.value),
|
|
429
437
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
430
438
|
children: [
|
|
431
439
|
/* @__PURE__ */ v("option", {
|
|
@@ -447,8 +455,8 @@ function T() {
|
|
|
447
455
|
]
|
|
448
456
|
}),
|
|
449
457
|
/* @__PURE__ */ y("select", {
|
|
450
|
-
value:
|
|
451
|
-
onChange: (e) =>
|
|
458
|
+
value: R.minimumAmount,
|
|
459
|
+
onChange: (e) => B("minimumAmount", e.target.value),
|
|
452
460
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
453
461
|
children: [
|
|
454
462
|
/* @__PURE__ */ v("option", {
|
|
@@ -474,8 +482,8 @@ function T() {
|
|
|
474
482
|
]
|
|
475
483
|
}),
|
|
476
484
|
/* @__PURE__ */ y("select", {
|
|
477
|
-
value:
|
|
478
|
-
onChange: (e) =>
|
|
485
|
+
value: R.location,
|
|
486
|
+
onChange: (e) => B("location", e.target.value),
|
|
479
487
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
480
488
|
children: [
|
|
481
489
|
/* @__PURE__ */ v("option", {
|
|
@@ -501,8 +509,8 @@ function T() {
|
|
|
501
509
|
]
|
|
502
510
|
}),
|
|
503
511
|
/* @__PURE__ */ y("select", {
|
|
504
|
-
value:
|
|
505
|
-
onChange: (e) =>
|
|
512
|
+
value: R.sortBy,
|
|
513
|
+
onChange: (e) => B("sortBy", e.target.value),
|
|
506
514
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
507
515
|
children: [
|
|
508
516
|
/* @__PURE__ */ v("option", {
|
|
@@ -530,7 +538,7 @@ function T() {
|
|
|
530
538
|
]
|
|
531
539
|
})
|
|
532
540
|
}),
|
|
533
|
-
|
|
541
|
+
V.length === 0 ? /* @__PURE__ */ v("div", {
|
|
534
542
|
className: "mt-6",
|
|
535
543
|
children: /* @__PURE__ */ v(r, {
|
|
536
544
|
icon: /* @__PURE__ */ v(h, { className: "h-10 w-10" }),
|
|
@@ -538,7 +546,7 @@ function T() {
|
|
|
538
546
|
description: "Try adjusting your filters to find more opportunities",
|
|
539
547
|
action: /* @__PURE__ */ v("button", {
|
|
540
548
|
type: "button",
|
|
541
|
-
onClick: () =>
|
|
549
|
+
onClick: () => z({
|
|
542
550
|
searchQuery: "",
|
|
543
551
|
category: "",
|
|
544
552
|
riskLevel: "",
|
|
@@ -552,8 +560,8 @@ function T() {
|
|
|
552
560
|
})
|
|
553
561
|
}) : /* @__PURE__ */ v("div", {
|
|
554
562
|
className: "mt-6 grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
555
|
-
children:
|
|
556
|
-
let n =
|
|
563
|
+
children: V.map((e) => {
|
|
564
|
+
let n = E(e.raisedAmount, e.targetAmount);
|
|
557
565
|
return /* @__PURE__ */ y("div", {
|
|
558
566
|
className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm hover:shadow-md transition-shadow",
|
|
559
567
|
children: [/* @__PURE__ */ y("div", {
|
|
@@ -599,8 +607,8 @@ function T() {
|
|
|
599
607
|
className: "text-xs text-text-secondary sm:text-sm",
|
|
600
608
|
children: e.category
|
|
601
609
|
}), /* @__PURE__ */ v("span", {
|
|
602
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
603
|
-
children:
|
|
610
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", w(e.riskLevel)),
|
|
611
|
+
children: T(e.riskLevel)
|
|
604
612
|
})]
|
|
605
613
|
})
|
|
606
614
|
]
|
|
@@ -744,13 +752,13 @@ function T() {
|
|
|
744
752
|
className: "flex flex-col gap-2 sm:flex-row sm:gap-3",
|
|
745
753
|
children: [/* @__PURE__ */ v("button", {
|
|
746
754
|
type: "button",
|
|
747
|
-
onClick: () =>
|
|
755
|
+
onClick: () => U(e),
|
|
748
756
|
disabled: e.status === "funded",
|
|
749
757
|
className: t("flex-1 rounded-lg px-4 py-2.5 text-sm font-medium transition-colors", e.status === "funded" ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
|
|
750
758
|
children: e.status === "funded" ? "Fully Funded" : "Invest Now"
|
|
751
759
|
}), /* @__PURE__ */ y("button", {
|
|
752
760
|
type: "button",
|
|
753
|
-
onClick: () =>
|
|
761
|
+
onClick: () => D(`/investor/opportunities/${e.id}`),
|
|
754
762
|
className: "flex flex-1 items-center justify-center gap-2 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
755
763
|
children: [/* @__PURE__ */ v(d, { className: "h-4 w-4" }), "View Details"]
|
|
756
764
|
})]
|
|
@@ -760,7 +768,7 @@ function T() {
|
|
|
760
768
|
}, e.id);
|
|
761
769
|
})
|
|
762
770
|
}),
|
|
763
|
-
|
|
771
|
+
M && A && /* @__PURE__ */ v("div", {
|
|
764
772
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
765
773
|
children: /* @__PURE__ */ y("div", {
|
|
766
774
|
className: "relative max-h-[90vh] w-full max-w-md overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
@@ -768,16 +776,16 @@ function T() {
|
|
|
768
776
|
/* @__PURE__ */ v("button", {
|
|
769
777
|
type: "button",
|
|
770
778
|
onClick: () => {
|
|
771
|
-
|
|
779
|
+
N(!1), F(""), L("idle");
|
|
772
780
|
},
|
|
773
781
|
className: "absolute right-3 top-3 rounded-lg p-1 text-text-secondary hover:bg-accent transition-colors",
|
|
774
782
|
children: /* @__PURE__ */ v(_, { className: "h-5 w-5" })
|
|
775
783
|
}),
|
|
776
784
|
/* @__PURE__ */ y("h3", {
|
|
777
785
|
className: "mb-4 text-base font-semibold text-text-primary sm:text-lg",
|
|
778
|
-
children: ["Invest in ",
|
|
786
|
+
children: ["Invest in ", A.cartName]
|
|
779
787
|
}),
|
|
780
|
-
|
|
788
|
+
I === "success" ? /* @__PURE__ */ y("div", {
|
|
781
789
|
className: "py-8 text-center",
|
|
782
790
|
children: [
|
|
783
791
|
/* @__PURE__ */ v(u, { className: "mx-auto mb-3 h-12 w-12 text-status-success-text" }),
|
|
@@ -799,11 +807,11 @@ function T() {
|
|
|
799
807
|
}), /* @__PURE__ */ y("p", {
|
|
800
808
|
className: "text-sm font-medium text-text-primary sm:text-base",
|
|
801
809
|
children: [
|
|
802
|
-
i(
|
|
810
|
+
i(A.minimumInvestment, { minimumFractionDigits: 0 }),
|
|
803
811
|
" ",
|
|
804
812
|
"-",
|
|
805
813
|
" ",
|
|
806
|
-
i(
|
|
814
|
+
i(A.maximumInvestment, { minimumFractionDigits: 0 })
|
|
807
815
|
]
|
|
808
816
|
})] }),
|
|
809
817
|
/* @__PURE__ */ y("div", { children: [
|
|
@@ -815,28 +823,28 @@ function T() {
|
|
|
815
823
|
className: "relative",
|
|
816
824
|
children: [/* @__PURE__ */ v(p, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
|
|
817
825
|
type: "number",
|
|
818
|
-
value:
|
|
826
|
+
value: P,
|
|
819
827
|
onChange: (e) => {
|
|
820
|
-
|
|
828
|
+
F(e.target.value), L("idle");
|
|
821
829
|
},
|
|
822
830
|
placeholder: "Enter amount",
|
|
823
831
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
824
832
|
})]
|
|
825
833
|
}),
|
|
826
|
-
|
|
834
|
+
I === "error" && /* @__PURE__ */ y("p", {
|
|
827
835
|
className: "mt-1 text-xs text-status-error-text",
|
|
828
836
|
children: [
|
|
829
837
|
"Amount must be between",
|
|
830
838
|
" ",
|
|
831
|
-
i(
|
|
839
|
+
i(A.minimumInvestment, { minimumFractionDigits: 0 }),
|
|
832
840
|
" ",
|
|
833
841
|
"and",
|
|
834
842
|
" ",
|
|
835
|
-
i(
|
|
843
|
+
i(A.maximumInvestment, { minimumFractionDigits: 0 })
|
|
836
844
|
]
|
|
837
845
|
})
|
|
838
846
|
] }),
|
|
839
|
-
|
|
847
|
+
P && !isNaN(parseInt(P, 10)) && parseInt(P, 10) > 0 && /* @__PURE__ */ y("div", {
|
|
840
848
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/50 p-3 sm:p-4",
|
|
841
849
|
children: [/* @__PURE__ */ v("p", {
|
|
842
850
|
className: "mb-2 text-xs text-text-secondary sm:text-sm",
|
|
@@ -851,7 +859,7 @@ function T() {
|
|
|
851
859
|
children: "Investment:"
|
|
852
860
|
}), /* @__PURE__ */ v("span", {
|
|
853
861
|
className: "text-xs font-medium text-text-primary sm:text-sm",
|
|
854
|
-
children: i(parseInt(
|
|
862
|
+
children: i(parseInt(P, 10), { minimumFractionDigits: 0 })
|
|
855
863
|
})]
|
|
856
864
|
}),
|
|
857
865
|
/* @__PURE__ */ y("div", {
|
|
@@ -860,12 +868,12 @@ function T() {
|
|
|
860
868
|
className: "text-xs text-text-primary sm:text-sm",
|
|
861
869
|
children: [
|
|
862
870
|
"Expected Return (",
|
|
863
|
-
|
|
871
|
+
A.expectedReturns,
|
|
864
872
|
"%):"
|
|
865
873
|
]
|
|
866
874
|
}), /* @__PURE__ */ y("span", {
|
|
867
875
|
className: "text-xs font-medium text-status-success-text sm:text-sm",
|
|
868
|
-
children: ["+", i(parseInt(
|
|
876
|
+
children: ["+", i(parseInt(P, 10) * A.expectedReturns / 100, { minimumFractionDigits: 0 })]
|
|
869
877
|
})]
|
|
870
878
|
}),
|
|
871
879
|
/* @__PURE__ */ y("div", {
|
|
@@ -875,7 +883,7 @@ function T() {
|
|
|
875
883
|
children: "Total Value:"
|
|
876
884
|
}), /* @__PURE__ */ v("span", {
|
|
877
885
|
className: "text-xs font-bold text-text-primary sm:text-sm",
|
|
878
|
-
children: i(parseInt(
|
|
886
|
+
children: i(parseInt(P, 10) * (1 + A.expectedReturns / 100), { minimumFractionDigits: 0 })
|
|
879
887
|
})]
|
|
880
888
|
})
|
|
881
889
|
]
|
|
@@ -887,24 +895,24 @@ function T() {
|
|
|
887
895
|
/* @__PURE__ */ y("p", { children: [
|
|
888
896
|
"• Minimum lock-in period:",
|
|
889
897
|
" ",
|
|
890
|
-
|
|
898
|
+
A.investmentTerms.lockInPeriod,
|
|
891
899
|
" months"
|
|
892
900
|
] }),
|
|
893
901
|
/* @__PURE__ */ y("p", { children: [
|
|
894
902
|
"• Dividend frequency:",
|
|
895
903
|
" ",
|
|
896
|
-
|
|
904
|
+
A.investmentTerms.dividendFrequency
|
|
897
905
|
] }),
|
|
898
906
|
/* @__PURE__ */ y("p", { children: [
|
|
899
907
|
"• Your equity stake:",
|
|
900
908
|
" ",
|
|
901
|
-
((parseInt(
|
|
909
|
+
((parseInt(P, 10) || 0) / A.targetAmount * A.investmentTerms.equityOffered).toFixed(2),
|
|
902
910
|
"%"
|
|
903
911
|
] }),
|
|
904
912
|
/* @__PURE__ */ y("p", { children: [
|
|
905
913
|
"• Exit options:",
|
|
906
914
|
" ",
|
|
907
|
-
|
|
915
|
+
A.investmentTerms.exitOptions.join(", ")
|
|
908
916
|
] })
|
|
909
917
|
]
|
|
910
918
|
}),
|
|
@@ -913,15 +921,15 @@ function T() {
|
|
|
913
921
|
children: [/* @__PURE__ */ v("button", {
|
|
914
922
|
type: "button",
|
|
915
923
|
onClick: () => {
|
|
916
|
-
|
|
924
|
+
N(!1), F(""), L("idle");
|
|
917
925
|
},
|
|
918
926
|
className: "flex-1 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
919
927
|
children: "Cancel"
|
|
920
928
|
}), /* @__PURE__ */ v("button", {
|
|
921
929
|
type: "button",
|
|
922
|
-
onClick:
|
|
923
|
-
disabled: !
|
|
924
|
-
className: t("flex-1 rounded-lg px-4 py-2.5 text-sm font-medium transition-colors", !
|
|
930
|
+
onClick: H,
|
|
931
|
+
disabled: !P || isNaN(parseInt(P, 10)) || parseInt(P, 10) < A.minimumInvestment,
|
|
932
|
+
className: t("flex-1 rounded-lg px-4 py-2.5 text-sm font-medium transition-colors", !P || isNaN(parseInt(P, 10)) || parseInt(P, 10) < A.minimumInvestment ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
|
|
925
933
|
children: "Confirm Investment"
|
|
926
934
|
})]
|
|
927
935
|
})
|
|
@@ -934,6 +942,6 @@ function T() {
|
|
|
934
942
|
});
|
|
935
943
|
}
|
|
936
944
|
//#endregion
|
|
937
|
-
export {
|
|
945
|
+
export { D as InvestmentOpportunitiesPage };
|
|
938
946
|
|
|
939
947
|
//# sourceMappingURL=InvestmentOpportunitiesPage.js.map
|