@burdenoff/microfe-coolandlovely 2026.625.2 → 2026.628.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/coolandlovely/CoolAndLovelyRoot.js +66 -122
- package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
- package/dist/coolandlovely/CoolAndLovelyRoutes.js +87 -175
- package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
- package/dist/coolandlovely/components/Field.js +81 -0
- package/dist/coolandlovely/components/Field.js.map +1 -0
- package/dist/coolandlovely/components/StateViews.js +34 -0
- package/dist/coolandlovely/components/StateViews.js.map +1 -0
- package/dist/coolandlovely/components/StatusBadge.js +25 -22
- package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
- package/dist/coolandlovely/components/TagList.js +21 -0
- package/dist/coolandlovely/components/TagList.js.map +1 -0
- package/dist/coolandlovely/components/Thumbnail.js +29 -0
- package/dist/coolandlovely/components/Thumbnail.js.map +1 -0
- package/dist/coolandlovely/context/CoolAndLovelyContext.js +10 -10
- package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -1
- package/dist/coolandlovely/hooks/index.js +1 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +462 -169
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
- package/dist/coolandlovely/pages/HomePage.js +251 -845
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +319 -0
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -0
- package/dist/coolandlovely/pages/brands/BrandFormPage.js +190 -0
- package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -0
- package/dist/coolandlovely/pages/brands/BrandsListPage.js +158 -0
- package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -0
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +253 -0
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -0
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +206 -0
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -0
- package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +129 -0
- package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -0
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +217 -0
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -0
- package/dist/coolandlovely/pages/collections/CollectionFormPage.js +217 -0
- package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -0
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js +122 -0
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -0
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +230 -0
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -0
- package/dist/coolandlovely/pages/items/StyleItemFormPage.js +276 -0
- package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -0
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js +170 -0
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -0
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +124 -0
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -0
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +156 -0
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -0
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +238 -0
- package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -0
- package/dist/coolandlovely/pages/looks/LookFormPage.js +209 -0
- package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -0
- package/dist/coolandlovely/pages/looks/LooksListPage.js +181 -0
- package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -0
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js +224 -0
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -0
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +173 -0
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -0
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +172 -0
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -0
- package/dist/coolandlovely/store/coolandlovelyStore.js +2 -6
- package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -1
- package/dist/coolandlovely/utils/formatters.js +31 -23
- package/dist/coolandlovely/utils/formatters.js.map +1 -1
- package/dist/coolandlovely/utils/icons.js +34 -0
- package/dist/coolandlovely/utils/icons.js.map +1 -0
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/coolandlovely/components/InvestmentCard.js +0 -98
- package/dist/coolandlovely/components/InvestmentCard.js.map +0 -1
- package/dist/coolandlovely/components/RatingDisplay.js +0 -35
- package/dist/coolandlovely/components/RatingDisplay.js.map +0 -1
- package/dist/coolandlovely/mocks/data.js +0 -1517
- package/dist/coolandlovely/mocks/data.js.map +0 -1
- package/dist/coolandlovely/mocks/users.js +0 -34
- package/dist/coolandlovely/mocks/users.js.map +0 -1
- package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +0 -651
- package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +0 -1
- package/dist/coolandlovely/pages/admin/AdminDashboard.js +0 -673
- package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +0 -1
- package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +0 -427
- package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +0 -1
- package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +0 -665
- package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +0 -1
- package/dist/coolandlovely/pages/admin/AdminProfilePage.js +0 -264
- package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +0 -1
- package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +0 -654
- package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +0 -1
- package/dist/coolandlovely/pages/admin/CartManagementPage.js +0 -874
- package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +0 -1
- package/dist/coolandlovely/pages/admin/UserManagementPage.js +0 -898
- package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +0 -1
- package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +0 -842
- package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
- package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +0 -705
- package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
- package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +0 -802
- package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
- package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +0 -891
- package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
- package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +0 -639
- package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
- package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +0 -914
- package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +0 -1
- package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +0 -882
- package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +0 -1
- package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +0 -831
- package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +0 -1
- package/dist/coolandlovely/pages/common/HelpSupportPage.js +0 -1325
- package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +0 -1
- package/dist/coolandlovely/pages/common/NotificationCenterPage.js +0 -671
- package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +0 -1
- package/dist/coolandlovely/pages/common/SettingsPage.js +0 -973
- package/dist/coolandlovely/pages/common/SettingsPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +0 -630
- package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/CartDetailPage.js +0 -623
- package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +0 -558
- package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/CheckoutPage.js +0 -529
- package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/CustomerDashboard.js +0 -538
- package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +0 -1
- package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +0 -658
- package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +0 -632
- package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/FavoritesPage.js +0 -487
- package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +0 -447
- package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +0 -425
- package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +0 -494
- package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/ReviewsPage.js +0 -616
- package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +0 -1
- package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +0 -449
- package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +0 -1
- package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +0 -887
- package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +0 -1
- package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +0 -945
- package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
- package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +0 -687
- package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +0 -1
- package/dist/coolandlovely/pages/investor/InvestorDashboard.js +0 -455
- package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +0 -1
- package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +0 -405
- package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +0 -1
- package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +0 -602
- package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +0 -1
- package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +0 -1070
- package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +0 -1
- package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +0 -533
- package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +0 -1
- package/dist/coolandlovely/pages/worker/WorkerDashboard.js +0 -671
- package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +0 -1
- package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +0 -680
- package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +0 -1
- package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +0 -692
- package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +0 -1
- package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +0 -583
- package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvestorDashboard.js","names":[],"sources":["../../../../src/coolandlovely/pages/investor/InvestorDashboard.tsx"],"sourcesContent":["/**\n * Investor Dashboard Page\n * @module coolandlovely/pages/investor\n *\n * Portfolio overview with metrics, tab navigation (portfolio/opportunities),\n * AI insights sidebar, quick actions, market updates, and recent activity.\n */\n\nimport { useState, useEffect, useMemo } from'react';\nimport {\n Wallet,\n TrendingUp,\n PieChart,\n Briefcase,\n ArrowRight,\n Activity,\n IndianRupee,\n Target,\n Award,\n Filter,\n Eye,\n Plus,\n MapPin,\n Lightbulb,\n BarChart3,\n} from'lucide-react';\nimport { EmphasisPanel, PagePurpose, NextSteps } from'@burdenoff/fe-libs/ui';\nimport { PageLayout } from'../../components/PageLayout';\nimport { MetricsCard } from'../../components/MetricsCard';\nimport { InvestmentCard } from'../../components/InvestmentCard';\nimport { RatingDisplay } from'../../components/RatingDisplay';\nimport { EmptyState } from'../../components/EmptyState';\nimport { useCoolAndLovely } from'../../context/CoolAndLovelyContext';\nimport { useInvestmentOpportunities, useInvestments } from'../../hooks/useCoolAndLovelyApi';\nimport { cn } from'../../utils/cn';\nimport { formatCurrency } from'../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ninterface DashboardInvestment {\n id: string;\n cartName: string;\n cartOwner: string;\n investmentAmount: number;\n equityPercentage: number;\n investmentDate: string;\n currentValue: number;\n monthlyReturns: number;\n status: 'active' | 'pending' | 'completed';\n location: string;\n category: string;\n rating: number;\n riskLevel: 'low' | 'medium' | 'high';\n}\n\nconst mockAiInsights = [\n {\n id: '1',\n type: 'opportunity' as const,\n title: 'High-Potential Business Detected',\n description:\n 'Glow Beauty Services in Koramangala shows 95% growth potential based on location analytics and market demand.',\n confidence: 94,\n },\n {\n id: '2',\n type: 'suggestion' as const,\n title: 'Portfolio Diversification Recommended',\n description:\n 'Consider investing in Education & Skills to balance your services-heavy portfolio. Current allocation: 70% services, 30% retail.',\n confidence: 87,\n },\n {\n id: '3',\n type: 'trend' as const,\n title: 'Market Trend Alert',\n description:\n 'Health & Wellness businesses in tech hubs are experiencing 40% higher returns. Whitefield shows promising opportunities.',\n confidence: 91,\n },\n];\n\nconst mockRecentActivity = [\n {\n id: 'act-1',\n type: 'dividend',\n description: 'Dividend received from Quick Cuts Salon',\n amount: 4200,\n date: '2024-01-14T10:00:00Z',\n },\n {\n id: 'act-2',\n type: 'investment',\n description: 'Invested in Spotless Cleaning Services',\n amount: -40000,\n date: '2024-01-10T09:30:00Z',\n },\n {\n id: 'act-3',\n type: 'return',\n description: 'Returns from Fix-It Mobile Repair',\n amount: 6800,\n date: '2024-01-05T14:00:00Z',\n },\n {\n id: 'act-4',\n type: 'investment',\n description: 'Invested in Fix-It Mobile Repair',\n amount: -75000,\n date: '2023-12-20T11:00:00Z',\n },\n];\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getRiskBadgeColor(risk: string): string {\n switch (risk) {\n case'low':\n return'bg-status-success-bg-subtle/20 text-status-success-text';\n case'medium':\n return'bg-status-warning-bg-subtle/20 text-status-warning-text';\n case'high':\n return'bg-status-error-bg-subtle/20 text-status-error-text';\n default:\n return'bg-secondary text-secondary-foreground';\n }\n}\n\nfunction getStatusBadgeColor(status: string): string {\n switch (status) {\n case'active':\n return'bg-status-success-bg-subtle/20 text-status-success-text';\n case'pending':\n return'bg-status-warning-bg-subtle/20 text-status-warning-text';\n case'completed':\n return'bg-accent-blue-subtle/20 text-accent-blue';\n default:\n return'bg-secondary text-secondary-foreground';\n }\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function InvestorDashboard() {\n const { navigateTo, currentUser } = useCoolAndLovely();\n const [activeTab, setActiveTab] = useState<'portfolio' | 'opportunities'>('portfolio');\n\n const { data: opportunities = [], isLoading: opportunitiesLoading } =\n useInvestmentOpportunities();\n const { data: investments = [], isLoading: investmentsLoading } = useInvestments(\n currentUser?.id || ''\n );\n\n const firstName = currentUser?.firstName ?? currentUser?.name ?? 'Investor';\n\n const activeOpportunities = opportunities.filter((inv) => inv.status === 'active');\n\n const portfolioSummary = useMemo(() => {\n const totalInvested = investments.reduce((sum, inv) => sum + inv.investedAmount, 0);\n const currentValue = investments.reduce((sum, inv) => sum + inv.currentValue, 0);\n const totalReturns = investments.reduce((sum, inv) => sum + inv.returns, 0);\n const monthlyIncome = totalReturns / 12; // Simple mock derivation\n const roi = totalInvested > 0 ? (totalReturns / totalInvested) * 100 : 0;\n\n return {\n totalInvested,\n currentValue,\n totalReturns,\n monthlyIncome,\n roi,\n };\n }, [investments]);\n\n if (opportunitiesLoading || investmentsLoading) {\n return (\n <PageLayout title=\"Investment Dashboard\" description=\"Loading your portfolio...\">\n <div className=\"flex items-center justify-center py-20\">\n <div className=\"text-center\">\n <div className=\"mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary\" />\n <p className=\"text-sm text-text-secondary\">Loading your portfolio...</p>\n </div>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={`Welcome back, ${firstName}!`}\n description=\"Here's your investment portfolio overview.\"\n >\n <PagePurpose className=\"mb-6\" icon={<TrendingUp className=\"h-4 w-4\" />}>\n Your money at work across local businesses. Track what you've invested,\n what it's worth now and the income it generates, switch between your\n holdings and fresh opportunities, and act on AI insights and market\n updates to grow your portfolio.\n </PagePurpose>\n\n <NextSteps\n className=\"mb-6\"\n storageKey=\"coolandlovely-investor-dashboard\"\n steps={[\n {\n id: 'review-portfolio',\n label: 'Review your portfolio',\n description: 'See the full breakdown and performance of your holdings.',\n icon: <PieChart className=\"h-4 w-4\" />,\n onClick: () => navigateTo('/investor/portfolio'),\n done: investments.length > 0,\n },\n {\n id: 'browse',\n label: 'Browse new opportunities',\n description: 'Find businesses open for investment that fit your goals.',\n icon: <Target className=\"h-4 w-4\" />,\n onClick: () => navigateTo('/investor/opportunities'),\n },\n {\n id: 'analytics',\n label: 'Check your analytics',\n description: 'Dig into returns, allocation and trends across investments.',\n icon: <BarChart3 className=\"h-4 w-4\" />,\n onClick: () => navigateTo('/investor/analytics'),\n },\n ]}\n />\n\n {/* Portfolio Summary Metrics — primary emphasis zone */}\n <EmphasisPanel className=\"p-5\">\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">Portfolio Overview</h2>\n <div 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(portfolioSummary.totalInvested, { minimumFractionDigits: 0 })}\n label=\"Total Invested\"\n trend=\"up\"\n trendValue=\"Across all businesses\"\n />\n <MetricsCard\n icon={<IndianRupee className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.currentValue, { minimumFractionDigits: 0 })}\n label=\"Current Value\"\n trend=\"up\"\n trendValue={`+${portfolioSummary.roi.toFixed(1)}%`}\n />\n <MetricsCard\n icon={<Target className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.totalReturns, { minimumFractionDigits: 0 })}\n label=\"Total Returns\"\n trend=\"up\"\n trendValue=\"+15.2% this month\"\n />\n <MetricsCard\n icon={<Activity className=\"h-5 w-5\" />}\n value={formatCurrency(portfolioSummary.monthlyIncome, { minimumFractionDigits: 0 })}\n label=\"Monthly Income\"\n trend=\"up\"\n trendValue=\"+8.5% vs last month\"\n />\n </div>\n </EmphasisPanel>\n\n {/* Main Content + Sidebar */}\n <div className=\"mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Main Content */}\n <div className=\"lg:col-span-2\">\n {/* Tab Navigation */}\n <div className=\"mb-6 flex rounded-lg bg-bg-sunken p-1\">\n <button\n type=\"button\"\n onClick={() => setActiveTab('portfolio')}\n className={cn(\n 'flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors',\n activeTab === 'portfolio'\n ? 'bg-bg-surface text-text-primary shadow-sm'\n : 'text-text-secondary hover:text-text-primary'\n )}\n >\n My Investments\n </button>\n <button\n type=\"button\"\n onClick={() => setActiveTab('opportunities')}\n className={cn(\n 'flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors',\n activeTab === 'opportunities'\n ? 'bg-bg-surface text-text-primary shadow-sm'\n : 'text-text-secondary hover:text-text-primary'\n )}\n >\n New Opportunities\n </button>\n </div>\n\n {/* Portfolio Tab */}\n {activeTab === 'portfolio' && (\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-base font-semibold text-text-primary\">Active Investments</h3>\n <button\n type=\"button\"\n onClick={() => alert('Filter functionality coming soon!')}\n 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\"\n >\n <Filter className=\"h-4 w-4\" />\n Filter\n </button>\n </div>\n\n {investments.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n title=\"No active investments found\"\n description=\"You haven't invested in any businesses yet. Explore opportunities to put your money to work.\"\n action={\n <button\n type=\"button\"\n onClick={() => setActiveTab('opportunities')}\n 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\"\n >\n Browse opportunities\n </button>\n }\n />\n ) : (\n investments.map((investment) => (\n <div\n key={investment.id}\n className=\"rounded-lg border border-border-seam bg-bg-surface p-4 hover:shadow-md transition-shadow bg-gloss-card shadow-pop\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex-1\">\n <div className=\"mb-2 flex flex-wrap items-center gap-2\">\n <h4 className=\"text-base font-semibold text-text-primary\">\n {investment.cartName}\n </h4>\n <span\n className={cn(\n 'rounded-full px-2 py-0.5 text-xs font-medium',\n getStatusBadgeColor(investment.status)\n )}\n >\n {investment.status}\n </span>\n </div>\n <div className=\"mb-3 flex flex-wrap items-center gap-3 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <MapPin className=\"h-3.5 w-3.5\" />\n {'India'}\n </span>\n <span>{'Services'}</span>\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n 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\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <div>\n <p className=\"text-xs text-text-secondary\">Invested</p>\n <p className=\"text-sm font-semibold text-text-primary\">\n {formatCurrency(investment.investedAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Current Value</p>\n <p className=\"text-sm font-semibold text-status-success-text\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Returns</p>\n <p className=\"text-sm font-semibold text-text-primary\">\n {formatCurrency(investment.returns, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Growth</p>\n <p className=\"text-sm font-semibold text-status-success-text\">\n {investment.returnsPercentage}%\n </p>\n </div>\n </div>\n </div>\n ))\n )}\n </div>\n )}\n\n {/* Opportunities Tab */}\n {activeTab === 'opportunities' && (\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-base font-semibold text-text-primary\">\n Investment Opportunities\n </h3>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n 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\"\n >\n <Plus className=\"h-4 w-4\" />\n Browse All\n </button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {activeOpportunities.slice(0, 2).map((opp) => (\n <InvestmentCard\n key={opp.id}\n id={opp.id}\n cartName={opp.cartName}\n targetAmount={opp.targetAmount}\n raisedAmount={opp.raisedAmount}\n expectedReturns={`${opp.expectedReturns}%`}\n riskLevel={opp.riskLevel}\n status={opp.status}\n onClick={(id) => navigateTo(`/investor/opportunities/${id}`)}\n />\n ))}\n </div>\n </div>\n )}\n\n {/* Recent Activity */}\n <section className=\"mt-8\">\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">Recent Activity</h2>\n <div className=\"divide-y divide-border rounded-lg border border-border-subtle bg-bg-surface\">\n {mockRecentActivity.map((activity) => (\n <div key={activity.id} className=\"flex items-center justify-between px-4 py-3\">\n <div className=\"flex items-center gap-3\">\n <div\n className={cn(\n 'flex h-8 w-8 items-center justify-center rounded-full',\n activity.amount > 0 ? 'bg-status-success-bg-subtle/10' : 'bg-bg-sunken'\n )}\n >\n <Activity\n className={cn(\n 'h-4 w-4',\n activity.amount > 0\n ? 'text-status-success-text'\n : 'text-text-secondary'\n )}\n />\n </div>\n <div>\n <p className=\"text-sm font-medium text-text-primary\">{activity.description}</p>\n <p className=\"text-xs text-text-secondary\">\n {new Date(activity.date).toLocaleDateString('en-IN', {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n })}\n </p>\n </div>\n </div>\n <span\n className={cn(\n 'text-sm font-semibold',\n activity.amount > 0 ? 'text-status-success-text' : 'text-text-primary'\n )}\n >\n {activity.amount > 0 ? '+' : ''}\n {formatCurrency(Math.abs(activity.amount), { minimumFractionDigits: 0 })}\n </span>\n </div>\n ))}\n </div>\n </section>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* AI Insights */}\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <div className=\"mb-3 flex items-center gap-2\">\n <Lightbulb className=\"h-5 w-5 text-status-warning-text\" />\n <h3 className=\"text-base font-semibold text-text-primary\">AI Insights</h3>\n </div>\n <div className=\"space-y-3\">\n {mockAiInsights.map((insight) => (\n <div key={insight.id} className=\"rounded-lg border border-border-subtle bg-bg-sunken/50 p-3\">\n <div className=\"mb-1 flex items-center justify-between\">\n <h4 className=\"text-xs font-semibold text-text-primary\">{insight.title}</h4>\n <span className=\"rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs font-medium text-primary\">\n {insight.confidence}%\n </span>\n </div>\n <p className=\"text-xs leading-relaxed text-text-secondary\">\n {insight.description}\n </p>\n </div>\n ))}\n </div>\n </div>\n\n {/* Quick Actions */}\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <h3 className=\"mb-3 text-base font-semibold text-text-primary\">Quick Actions</h3>\n <div className=\"space-y-2\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/portfolio')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <PieChart className=\"h-4 w-4 text-text-secondary\" />\n View Full Portfolio\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Target className=\"h-4 w-4 text-text-secondary\" />\n Browse Opportunities\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/analytics')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <BarChart3 className=\"h-4 w-4 text-text-secondary\" />\n Investment Analytics\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/profile')}\n className=\"flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-left text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Award className=\"h-4 w-4 text-text-secondary\" />\n View Profile\n </button>\n </div>\n </div>\n\n {/* Market Updates */}\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <h3 className=\"mb-3 text-base font-semibold text-text-primary\">Market Updates</h3>\n <div className=\"space-y-3\">\n <div className=\"border-l-4 border-status-success-border pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n Mobile Services Market Growing\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Mobile service industry shows 35% growth in Q4 2024\n </p>\n </div>\n <div className=\"border-l-4 border-accent-blue-subtle pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n New Investment Tax Benefits\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Government announces SME investment incentives\n </p>\n </div>\n <div className=\"border-l-4 border-status-warning-border pl-3\">\n <h4 className=\"text-xs font-semibold text-text-primary\">\n Home Services Demand Surge\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-text-secondary\">\n Cleaning and maintenance businesses up 25% this quarter\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAyDA,IAAM,IAAiB;CACrB;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,aACE;EACF,YAAY;EACb;CACF,EAEK,IAAqB;CACzB;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACD;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,QAAQ;EACR,MAAM;EACP;CACF;AAmBD,SAAS,EAAoB,GAAwB;AACnD,SAAQ,GAAR;EACE,KAAI,SACF,QAAM;EACR,KAAI,UACF,QAAM;EACR,KAAI,YACF,QAAM;EACR,QACE,QAAM;;;AAQZ,SAAgB,IAAoB;CAClC,IAAM,EAAE,eAAY,mBAAgB,GAAkB,EAChD,CAAC,GAAW,KAAgB,EAAwC,YAAY,EAEhF,EAAE,MAAM,IAAgB,EAAE,EAAE,WAAW,MAC3C,GAA4B,EACxB,EAAE,MA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AAC,MAAD;WAAI,WAAU;qBAA0C;WAEnD,CAAA,EACL,kBAAC,KAAD;WAAG,WAAU;qBAAmD;WAE5D,CAAA,CACA;;SACN,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,MAAD;WAAI,WAAU;qBAA0C;WAEnD,CAAA,EACL,kBAAC,KAAD;WAAG,WAAU;qBAAmD;WAE5D,CAAA,CACA;;SACN,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,MAAD;WAAI,WAAU;qBAA0C;WAEnD,CAAA,EACL,kBAAC,KAAD;WAAG,WAAU;qBAAmD;WAE5D,CAAA,CACA;;SACF;UACF;;MACF;OACF;;GACK"}
|
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.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 { 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, TrendingUp as g, Wallet as _ } from "lucide-react";
|
|
9
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
10
|
-
import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
|
|
11
|
-
//#region src/coolandlovely/pages/investor/InvestorInvestmentsPage.tsx
|
|
12
|
-
var S = [
|
|
13
|
-
{
|
|
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
|
|
27
|
-
},
|
|
28
|
-
{
|
|
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
|
|
42
|
-
},
|
|
43
|
-
{
|
|
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
|
|
57
|
-
},
|
|
58
|
-
{
|
|
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
|
|
87
|
-
}
|
|
88
|
-
], C = {
|
|
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 w(e) {
|
|
98
|
-
switch (e) {
|
|
99
|
-
case "active": return "bg-status-success-bg-subtle/20 text-status-success-text";
|
|
100
|
-
case "pending": return "bg-status-warning-bg-subtle/20 text-status-warning-text";
|
|
101
|
-
case "matured": return "bg-accent-blue-subtle/20 text-accent-blue";
|
|
102
|
-
case "withdrawn": return "bg-secondary text-secondary-foreground";
|
|
103
|
-
default: return "bg-secondary text-secondary-foreground";
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function T(e) {
|
|
107
|
-
switch (e) {
|
|
108
|
-
case "active": return /* @__PURE__ */ v(d, { className: "h-4 w-4" });
|
|
109
|
-
case "pending": return /* @__PURE__ */ v(f, { className: "h-4 w-4" });
|
|
110
|
-
case "matured": return /* @__PURE__ */ v(d, { className: "h-4 w-4" });
|
|
111
|
-
default: return /* @__PURE__ */ v(u, { className: "h-4 w-4" });
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function E() {
|
|
115
|
-
let { navigateTo: u } = e(), [f, E] = l(!0), [D, O] = l("all");
|
|
116
|
-
s(() => {
|
|
117
|
-
let e = setTimeout(() => E(!1), 600);
|
|
118
|
-
return () => clearTimeout(e);
|
|
119
|
-
}, []);
|
|
120
|
-
let k = c(() => D === "all" ? S : S.filter((e) => e.status === D), [D]), A = [
|
|
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 j(e) {
|
|
139
|
-
return e === "all" ? S.length : S.filter((t) => t.status === e).length;
|
|
140
|
-
}
|
|
141
|
-
return f ? /* @__PURE__ */ v(n, {
|
|
142
|
-
title: "My Investments",
|
|
143
|
-
description: "Loading your investments...",
|
|
144
|
-
children: /* @__PURE__ */ v("div", {
|
|
145
|
-
className: "flex items-center justify-center py-20",
|
|
146
|
-
children: /* @__PURE__ */ y("div", {
|
|
147
|
-
className: "text-center",
|
|
148
|
-
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
|
-
className: "text-sm text-text-secondary",
|
|
150
|
-
children: "Loading your investments..."
|
|
151
|
-
})]
|
|
152
|
-
})
|
|
153
|
-
})
|
|
154
|
-
}) : /* @__PURE__ */ y(n, {
|
|
155
|
-
title: "My Investments",
|
|
156
|
-
description: "Track and manage your investment portfolio",
|
|
157
|
-
actions: /* @__PURE__ */ y("button", {
|
|
158
|
-
type: "button",
|
|
159
|
-
onClick: () => u("/investor/opportunities"),
|
|
160
|
-
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__ */ v(h, { className: "h-4 w-4" }), "New Investment"]
|
|
162
|
-
}),
|
|
163
|
-
children: [
|
|
164
|
-
/* @__PURE__ */ v(x, {
|
|
165
|
-
className: "mb-6",
|
|
166
|
-
icon: /* @__PURE__ */ v(_, { className: "h-4 w-4" }),
|
|
167
|
-
children: "A focused view of the businesses you've already backed. See total invested, current value and returns at a glance, filter by status, and open any holding to track its performance — then add a new investment whenever you're ready."
|
|
168
|
-
}),
|
|
169
|
-
/* @__PURE__ */ y(b, {
|
|
170
|
-
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4 p-4",
|
|
171
|
-
children: [
|
|
172
|
-
/* @__PURE__ */ v(r, {
|
|
173
|
-
icon: /* @__PURE__ */ v(_, { className: "h-5 w-5" }),
|
|
174
|
-
value: a(C.totalInvested, { minimumFractionDigits: 0 }),
|
|
175
|
-
label: "Total Invested",
|
|
176
|
-
trend: "up",
|
|
177
|
-
trendValue: "Total amount invested"
|
|
178
|
-
}),
|
|
179
|
-
/* @__PURE__ */ v(r, {
|
|
180
|
-
icon: /* @__PURE__ */ v(m, { className: "h-5 w-5" }),
|
|
181
|
-
value: a(C.currentValue, { minimumFractionDigits: 0 }),
|
|
182
|
-
label: "Current Value",
|
|
183
|
-
trend: C.profitLoss > 0 ? "up" : "down",
|
|
184
|
-
trendValue: `${C.profitLossPercentage > 0 ? "+" : ""}${C.profitLossPercentage}% total returns`
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ v(r, {
|
|
187
|
-
icon: /* @__PURE__ */ v(g, { className: "h-5 w-5" }),
|
|
188
|
-
value: a(C.totalReturns, { minimumFractionDigits: 0 }),
|
|
189
|
-
label: "Total Returns",
|
|
190
|
-
trend: "up",
|
|
191
|
-
trendValue: "Total profit earned"
|
|
192
|
-
}),
|
|
193
|
-
/* @__PURE__ */ v(r, {
|
|
194
|
-
icon: /* @__PURE__ */ v(d, { className: "h-5 w-5" }),
|
|
195
|
-
value: String(C.activeInvestments),
|
|
196
|
-
label: "Active Investments",
|
|
197
|
-
trend: "neutral",
|
|
198
|
-
trendValue: `${C.averageRoi}% avg ROI`
|
|
199
|
-
})
|
|
200
|
-
]
|
|
201
|
-
}),
|
|
202
|
-
/* @__PURE__ */ v("div", {
|
|
203
|
-
className: "mt-6 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
204
|
-
children: /* @__PURE__ */ v("div", {
|
|
205
|
-
className: "flex flex-wrap gap-2",
|
|
206
|
-
children: A.map((e) => /* @__PURE__ */ y("button", {
|
|
207
|
-
type: "button",
|
|
208
|
-
onClick: () => O(e.key),
|
|
209
|
-
className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", D === e.key ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"),
|
|
210
|
-
children: [e.label, /* @__PURE__ */ v("span", {
|
|
211
|
-
className: t("rounded-full px-2 py-0.5 text-xs", D === e.key ? "bg-primary-foreground/20 text-action-primary-text" : "bg-action-primary-bg/10 text-primary"),
|
|
212
|
-
children: j(e.key)
|
|
213
|
-
})]
|
|
214
|
-
}, e.key))
|
|
215
|
-
})
|
|
216
|
-
}),
|
|
217
|
-
/* @__PURE__ */ v("div", {
|
|
218
|
-
className: "mt-6 space-y-4",
|
|
219
|
-
children: k.length > 0 ? k.map((e) => /* @__PURE__ */ y("div", {
|
|
220
|
-
className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6 bg-gloss-card shadow-pop",
|
|
221
|
-
children: [/* @__PURE__ */ y("div", {
|
|
222
|
-
className: "block space-y-4 lg:hidden",
|
|
223
|
-
children: [
|
|
224
|
-
/* @__PURE__ */ y("div", {
|
|
225
|
-
className: "flex items-start justify-between",
|
|
226
|
-
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h3", {
|
|
227
|
-
className: "text-lg font-semibold text-text-primary",
|
|
228
|
-
children: e.cartName
|
|
229
|
-
}), /* @__PURE__ */ y("p", {
|
|
230
|
-
className: "text-sm text-text-secondary",
|
|
231
|
-
children: ["by ", e.cartOwner]
|
|
232
|
-
})] }), /* @__PURE__ */ y("span", {
|
|
233
|
-
className: t("flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium", w(e.status)),
|
|
234
|
-
children: [T(e.status), /* @__PURE__ */ v("span", {
|
|
235
|
-
className: "capitalize",
|
|
236
|
-
children: e.status
|
|
237
|
-
})]
|
|
238
|
-
})]
|
|
239
|
-
}),
|
|
240
|
-
/* @__PURE__ */ y("div", {
|
|
241
|
-
className: "grid grid-cols-2 gap-4",
|
|
242
|
-
children: [
|
|
243
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
244
|
-
className: "text-sm text-text-secondary",
|
|
245
|
-
children: "Invested"
|
|
246
|
-
}), /* @__PURE__ */ v("p", {
|
|
247
|
-
className: "font-semibold text-text-primary",
|
|
248
|
-
children: a(e.investmentAmount, { minimumFractionDigits: 0 })
|
|
249
|
-
})] }),
|
|
250
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
251
|
-
className: "text-sm text-text-secondary",
|
|
252
|
-
children: "Current Value"
|
|
253
|
-
}), /* @__PURE__ */ v("p", {
|
|
254
|
-
className: "font-semibold text-text-primary",
|
|
255
|
-
children: a(e.currentValue, { minimumFractionDigits: 0 })
|
|
256
|
-
})] }),
|
|
257
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
258
|
-
className: "text-sm text-text-secondary",
|
|
259
|
-
children: "P&L"
|
|
260
|
-
}), /* @__PURE__ */ y("p", {
|
|
261
|
-
className: t("font-semibold", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
262
|
-
children: [
|
|
263
|
-
e.profitLoss >= 0 ? "+" : "",
|
|
264
|
-
a(e.profitLoss, { minimumFractionDigits: 0 }),
|
|
265
|
-
" (",
|
|
266
|
-
e.profitLossPercentage >= 0 ? "+" : "",
|
|
267
|
-
e.profitLossPercentage,
|
|
268
|
-
"%)"
|
|
269
|
-
]
|
|
270
|
-
})] }),
|
|
271
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
272
|
-
className: "text-sm text-text-secondary",
|
|
273
|
-
children: "ROI"
|
|
274
|
-
}), /* @__PURE__ */ y("p", {
|
|
275
|
-
className: "font-semibold text-text-primary",
|
|
276
|
-
children: [e.roiAnnual, "% p.a."]
|
|
277
|
-
})] })
|
|
278
|
-
]
|
|
279
|
-
}),
|
|
280
|
-
/* @__PURE__ */ y("div", {
|
|
281
|
-
className: "flex items-center justify-between border-t border-border-subtle pt-2",
|
|
282
|
-
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
283
|
-
className: "text-xs text-text-secondary",
|
|
284
|
-
children: "Invested on"
|
|
285
|
-
}), /* @__PURE__ */ v("p", {
|
|
286
|
-
className: "text-sm font-medium text-text-primary",
|
|
287
|
-
children: o(e.investmentDate, {
|
|
288
|
-
hour: void 0,
|
|
289
|
-
minute: void 0
|
|
290
|
-
})
|
|
291
|
-
})] }), /* @__PURE__ */ y("button", {
|
|
292
|
-
type: "button",
|
|
293
|
-
onClick: () => u(`/investor/investments/${e.id}`),
|
|
294
|
-
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",
|
|
295
|
-
children: [/* @__PURE__ */ v(p, { className: "h-4 w-4" }), "View Details"]
|
|
296
|
-
})]
|
|
297
|
-
})
|
|
298
|
-
]
|
|
299
|
-
}), /* @__PURE__ */ y("div", {
|
|
300
|
-
className: "hidden lg:flex lg:items-center lg:justify-between",
|
|
301
|
-
children: [/* @__PURE__ */ y("div", {
|
|
302
|
-
className: "min-w-0 flex-1",
|
|
303
|
-
children: [
|
|
304
|
-
/* @__PURE__ */ y("div", {
|
|
305
|
-
className: "mb-2 flex items-center justify-between",
|
|
306
|
-
children: [/* @__PURE__ */ v("h3", {
|
|
307
|
-
className: "text-lg font-semibold text-text-primary",
|
|
308
|
-
children: e.cartName
|
|
309
|
-
}), /* @__PURE__ */ y("span", {
|
|
310
|
-
className: t("flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium", w(e.status)),
|
|
311
|
-
children: [T(e.status), /* @__PURE__ */ v("span", {
|
|
312
|
-
className: "capitalize",
|
|
313
|
-
children: e.status
|
|
314
|
-
})]
|
|
315
|
-
})]
|
|
316
|
-
}),
|
|
317
|
-
/* @__PURE__ */ y("p", {
|
|
318
|
-
className: "mb-4 text-sm text-text-secondary",
|
|
319
|
-
children: ["by ", e.cartOwner]
|
|
320
|
-
}),
|
|
321
|
-
/* @__PURE__ */ y("div", {
|
|
322
|
-
className: "grid grid-cols-5 gap-6",
|
|
323
|
-
children: [
|
|
324
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
325
|
-
className: "text-sm text-text-secondary",
|
|
326
|
-
children: "Invested"
|
|
327
|
-
}), /* @__PURE__ */ v("p", {
|
|
328
|
-
className: "font-semibold text-text-primary",
|
|
329
|
-
children: a(e.investmentAmount, { minimumFractionDigits: 0 })
|
|
330
|
-
})] }),
|
|
331
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
332
|
-
className: "text-sm text-text-secondary",
|
|
333
|
-
children: "Current Value"
|
|
334
|
-
}), /* @__PURE__ */ v("p", {
|
|
335
|
-
className: "font-semibold text-text-primary",
|
|
336
|
-
children: a(e.currentValue, { minimumFractionDigits: 0 })
|
|
337
|
-
})] }),
|
|
338
|
-
/* @__PURE__ */ y("div", { children: [
|
|
339
|
-
/* @__PURE__ */ v("p", {
|
|
340
|
-
className: "text-sm text-text-secondary",
|
|
341
|
-
children: "P&L"
|
|
342
|
-
}),
|
|
343
|
-
/* @__PURE__ */ y("p", {
|
|
344
|
-
className: t("font-semibold", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
345
|
-
children: [e.profitLoss >= 0 ? "+" : "", a(e.profitLoss, { minimumFractionDigits: 0 })]
|
|
346
|
-
}),
|
|
347
|
-
/* @__PURE__ */ y("p", {
|
|
348
|
-
className: t("text-xs", e.profitLoss >= 0 ? "text-status-success-text" : "text-status-error-text"),
|
|
349
|
-
children: [
|
|
350
|
-
"(",
|
|
351
|
-
e.profitLossPercentage >= 0 ? "+" : "",
|
|
352
|
-
e.profitLossPercentage,
|
|
353
|
-
"%)"
|
|
354
|
-
]
|
|
355
|
-
})
|
|
356
|
-
] }),
|
|
357
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
358
|
-
className: "text-sm text-text-secondary",
|
|
359
|
-
children: "ROI"
|
|
360
|
-
}), /* @__PURE__ */ y("p", {
|
|
361
|
-
className: "font-semibold text-text-primary",
|
|
362
|
-
children: [e.roiAnnual, "% p.a."]
|
|
363
|
-
})] }),
|
|
364
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
365
|
-
className: "text-sm text-text-secondary",
|
|
366
|
-
children: "Invested on"
|
|
367
|
-
}), /* @__PURE__ */ v("p", {
|
|
368
|
-
className: "font-semibold text-text-primary",
|
|
369
|
-
children: o(e.investmentDate, {
|
|
370
|
-
hour: void 0,
|
|
371
|
-
minute: void 0
|
|
372
|
-
})
|
|
373
|
-
})] })
|
|
374
|
-
]
|
|
375
|
-
})
|
|
376
|
-
]
|
|
377
|
-
}), /* @__PURE__ */ v("div", {
|
|
378
|
-
className: "ml-6",
|
|
379
|
-
children: /* @__PURE__ */ y("button", {
|
|
380
|
-
type: "button",
|
|
381
|
-
onClick: () => u(`/investor/investments/${e.id}`),
|
|
382
|
-
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",
|
|
383
|
-
children: [/* @__PURE__ */ v(p, { className: "h-4 w-4" }), "View Details"]
|
|
384
|
-
})
|
|
385
|
-
})]
|
|
386
|
-
})]
|
|
387
|
-
}, e.id)) : /* @__PURE__ */ v(i, {
|
|
388
|
-
illustration: "empty-data",
|
|
389
|
-
title: `No ${D === "all" ? "" : D} investments found`,
|
|
390
|
-
description: D === "all" ? "You haven't made any investments yet. Start exploring opportunities to grow your wealth." : `You don't have any ${D} investments at the moment.`,
|
|
391
|
-
action: /* @__PURE__ */ v("button", {
|
|
392
|
-
type: "button",
|
|
393
|
-
onClick: () => u("/investor/opportunities"),
|
|
394
|
-
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",
|
|
395
|
-
children: "Explore Investment Opportunities"
|
|
396
|
-
})
|
|
397
|
-
})
|
|
398
|
-
})
|
|
399
|
-
]
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
//#endregion
|
|
403
|
-
export { E as InvestorInvestmentsPage };
|
|
404
|
-
|
|
405
|
-
//# sourceMappingURL=InvestorInvestmentsPage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvestorInvestmentsPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/investor/InvestorInvestmentsPage.tsx"],"sourcesContent":["/**\n * Investor Investments Page\n * @module coolandlovely/pages/investor\n *\n * MetricsGrid summary cards, filter tabs (all/active/pending/matured) with counts,\n * responsive mobile/desktop layouts, P&L display, ROI display, status icons,\n * empty state.\n */\n\nimport { useState, useEffect, useMemo } from'react';\nimport {\n TrendingUp,\n Briefcase,\n Eye,\n BarChart3,\n AlertCircle,\n CheckCircle2,\n Clock,\n Wallet,\n IndianRupee,\n Plus,\n Target,\n} from'lucide-react';\nimport { EmphasisPanel, PagePurpose } from'@burdenoff/fe-libs/ui';\nimport { PageLayout } from'../../components/PageLayout';\nimport { MetricsCard } from'../../components/MetricsCard';\nimport { EmptyState } from'../../components/EmptyState';\nimport { useCoolAndLovely } from'../../context/CoolAndLovelyContext';\nimport { cn } from'../../utils/cn';\nimport { formatCurrency, formatDate } from'../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ninterface Investment {\n id: string;\n cartName: string;\n cartOwner: string;\n investmentAmount: number;\n currentValue: number;\n profitLoss: number;\n profitLossPercentage: number;\n investmentDate: string;\n status: 'active' | 'pending' | 'matured' | 'withdrawn';\n roiAnnual: number;\n duration: string;\n nextPayout: string;\n totalReturns: number;\n}\n\ninterface InvestmentSummary {\n totalInvested: number;\n currentValue: number;\n totalReturns: number;\n activeInvestments: number;\n averageRoi: number;\n profitLoss: number;\n profitLossPercentage: number;\n}\n\ntype FilterKey = 'all' | 'active' | 'pending' | 'matured';\n\n// ---------------------------------------------------------------------------\n// Mock data\n// ---------------------------------------------------------------------------\n\nconst mockInvestments: Investment[] = [\n {\n id: 'inv-001',\n cartName: 'South Indian Express',\n cartOwner: 'Raj Kumar',\n investmentAmount: 50000,\n currentValue: 58500,\n profitLoss: 8500,\n profitLossPercentage: 17.0,\n investmentDate: '2024-01-15',\n status: 'active',\n roiAnnual: 22.5,\n duration: '18 months',\n nextPayout: '2024-12-15',\n totalReturns: 8500,\n },\n {\n id: 'inv-002',\n cartName: 'Pizza Corner',\n cartOwner: 'Priya Singh',\n investmentAmount: 75000,\n currentValue: 82000,\n profitLoss: 7000,\n profitLossPercentage: 9.3,\n investmentDate: '2024-03-10',\n status: 'active',\n roiAnnual: 18.0,\n duration: '24 months',\n nextPayout: '2024-12-10',\n totalReturns: 7000,\n },\n {\n id: 'inv-003',\n cartName: 'Healthy Bites',\n cartOwner: 'Amit Patel',\n investmentAmount: 30000,\n currentValue: 31200,\n profitLoss: 1200,\n profitLossPercentage: 4.0,\n investmentDate: '2024-06-01',\n status: 'active',\n roiAnnual: 15.0,\n duration: '12 months',\n nextPayout: '2024-12-01',\n totalReturns: 1200,\n },\n {\n id: 'inv-004',\n cartName: 'Street Food Junction',\n cartOwner: 'Neha Sharma',\n investmentAmount: 40000,\n currentValue: 40000,\n profitLoss: 0,\n profitLossPercentage: 0,\n investmentDate: '2024-08-15',\n status: 'pending',\n roiAnnual: 20.0,\n duration: '15 months',\n nextPayout: '2025-01-15',\n totalReturns: 0,\n },\n {\n id: 'inv-005',\n cartName: 'Biryani House',\n cartOwner: 'Suresh Reddy',\n investmentAmount: 60000,\n currentValue: 72000,\n profitLoss: 12000,\n profitLossPercentage: 20.0,\n investmentDate: '2023-12-01',\n status: 'matured',\n roiAnnual: 25.0,\n duration: '12 months',\n nextPayout: '-',\n totalReturns: 12000,\n },\n];\n\nconst mockSummary: InvestmentSummary = {\n totalInvested: 255000,\n currentValue: 283700,\n totalReturns: 28700,\n activeInvestments: 3,\n averageRoi: 19.6,\n profitLoss: 28700,\n profitLossPercentage: 11.3,\n};\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getStatusColor(status: string): string {\n switch (status) {\n case'active':\n return'bg-status-success-bg-subtle/20 text-status-success-text';\n case'pending':\n return'bg-status-warning-bg-subtle/20 text-status-warning-text';\n case'matured':\n return'bg-accent-blue-subtle/20 text-accent-blue';\n case'withdrawn':\n return'bg-secondary text-secondary-foreground';\n default:\n return'bg-secondary text-secondary-foreground';\n }\n}\n\nfunction getStatusIcon(status: string) {\n switch (status) {\n case'active':\n return <CheckCircle2 className=\"h-4 w-4\" />;\n case'pending':\n return <Clock className=\"h-4 w-4\" />;\n case'matured':\n return <CheckCircle2 className=\"h-4 w-4\" />;\n default:\n return <AlertCircle className=\"h-4 w-4\" />;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function InvestorInvestmentsPage() {\n const { navigateTo } = useCoolAndLovely();\n const [isLoading, setIsLoading] = useState(true);\n const [filter, setFilter] = useState<FilterKey>('all');\n\n useEffect(() => {\n const timer = setTimeout(() => setIsLoading(false), 600);\n return () => clearTimeout(timer);\n }, []);\n\n const filteredInvestments = useMemo(() => {\n if (filter === 'all') return mockInvestments;\n return mockInvestments.filter((inv) => inv.status === filter);\n }, [filter]);\n\n const filterTabs: Array<{ key: FilterKey; label: string }> = [\n { key: 'all', label: 'All Investments' },\n { key: 'active', label: 'Active' },\n { key: 'pending', label: 'Pending' },\n { key: 'matured', label: 'Matured' },\n ];\n\n function getCount(key: FilterKey): number {\n if (key === 'all') return mockInvestments.length;\n return mockInvestments.filter((inv) => inv.status === key).length;\n }\n\n if (isLoading) {\n return (\n <PageLayout title=\"My Investments\" description=\"Loading your investments...\">\n <div className=\"flex items-center justify-center py-20\">\n <div className=\"text-center\">\n <div className=\"mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary\" />\n <p className=\"text-sm text-text-secondary\">Loading your investments...</p>\n </div>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title=\"My Investments\"\n description=\"Track and manage your investment portfolio\"\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n 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\"\n >\n <Plus className=\"h-4 w-4\" />\n New Investment\n </button>\n }\n >\n <PagePurpose className=\"mb-6\" icon={<Wallet className=\"h-4 w-4\" />}>\n A focused view of the businesses you've already backed. See total invested,\n current value and returns at a glance, filter by status, and open any\n holding to track its performance — then add a new investment whenever\n you're ready.\n </PagePurpose>\n\n {/* Investment Summary — primary emphasis zone */}\n <EmphasisPanel className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4 p-4\">\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.totalInvested, { minimumFractionDigits: 0 })}\n label=\"Total Invested\"\n trend=\"up\"\n trendValue=\"Total amount invested\"\n />\n <MetricsCard\n icon={<IndianRupee className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.currentValue, { minimumFractionDigits: 0 })}\n label=\"Current Value\"\n trend={mockSummary.profitLoss > 0 ? 'up' : 'down'}\n trendValue={`${mockSummary.profitLossPercentage > 0 ? '+' : ''}${mockSummary.profitLossPercentage}% total returns`}\n />\n <MetricsCard\n icon={<TrendingUp className=\"h-5 w-5\" />}\n value={formatCurrency(mockSummary.totalReturns, { minimumFractionDigits: 0 })}\n label=\"Total Returns\"\n trend=\"up\"\n trendValue=\"Total profit earned\"\n />\n <MetricsCard\n icon={<CheckCircle2 className=\"h-5 w-5\" />}\n value={String(mockSummary.activeInvestments)}\n label=\"Active Investments\"\n trend=\"neutral\"\n trendValue={`${mockSummary.averageRoi}% avg ROI`}\n />\n </EmphasisPanel>\n\n {/* Filter Tabs */}\n <div className=\"mt-6 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <div className=\"flex flex-wrap gap-2\">\n {filterTabs.map((tab) => (\n <button\n key={tab.key}\n type=\"button\"\n onClick={() => setFilter(tab.key)}\n className={cn(\n 'flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors',\n filter === tab.key\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-sunken text-text-primary hover:bg-bg-sunken/80'\n )}\n >\n {tab.label}\n <span\n className={cn(\n 'rounded-full px-2 py-0.5 text-xs',\n filter === tab.key\n ? 'bg-primary-foreground/20 text-action-primary-text'\n : 'bg-action-primary-bg/10 text-primary'\n )}\n >\n {getCount(tab.key)}\n </span>\n </button>\n ))}\n </div>\n </div>\n\n {/* Investments List */}\n <div className=\"mt-6 space-y-4\">\n {filteredInvestments.length > 0 ? (\n filteredInvestments.map((investment) => (\n <div key={investment.id} className=\"rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6 bg-gloss-card shadow-pop\">\n {/* Mobile Layout */}\n <div className=\"block space-y-4 lg:hidden\">\n <div className=\"flex items-start justify-between\">\n <div>\n <h3 className=\"text-lg font-semibold text-text-primary\">{investment.cartName}</h3>\n <p className=\"text-sm text-text-secondary\">by {investment.cartOwner}</p>\n </div>\n <span\n className={cn(\n 'flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium',\n getStatusColor(investment.status)\n )}\n >\n {getStatusIcon(investment.status)}\n <span className=\"capitalize\">{investment.status}</span>\n </span>\n </div>\n\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invested</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.investmentAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Current Value</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">P&L</p>\n <p\n className={cn(\n 'font-semibold',\n investment.profitLoss >= 0\n ? 'text-status-success-text'\n : 'text-status-error-text'\n )}\n >\n {investment.profitLoss >= 0 ? '+' : ''}\n {formatCurrency(investment.profitLoss, { minimumFractionDigits: 0 })} (\n {investment.profitLossPercentage >= 0 ? '+' : ''}\n {investment.profitLossPercentage}%)\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">ROI</p>\n <p className=\"font-semibold text-text-primary\">{investment.roiAnnual}% p.a.</p>\n </div>\n </div>\n\n <div className=\"flex items-center justify-between border-t border-border-subtle pt-2\">\n <div>\n <p className=\"text-xs text-text-secondary\">Invested on</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {formatDate(investment.investmentDate, {\n hour: undefined,\n minute: undefined,\n })}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n 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\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n </div>\n\n {/* Desktop Layout */}\n <div className=\"hidden lg:flex lg:items-center lg:justify-between\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"mb-2 flex items-center justify-between\">\n <h3 className=\"text-lg font-semibold text-text-primary\">{investment.cartName}</h3>\n <span\n className={cn(\n 'flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium',\n getStatusColor(investment.status)\n )}\n >\n {getStatusIcon(investment.status)}\n <span className=\"capitalize\">{investment.status}</span>\n </span>\n </div>\n <p className=\"mb-4 text-sm text-text-secondary\">by {investment.cartOwner}</p>\n\n <div className=\"grid grid-cols-5 gap-6\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invested</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.investmentAmount, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Current Value</p>\n <p className=\"font-semibold text-text-primary\">\n {formatCurrency(investment.currentValue, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">P&L</p>\n <p\n className={cn(\n 'font-semibold',\n investment.profitLoss >= 0\n ? 'text-status-success-text'\n : 'text-status-error-text'\n )}\n >\n {investment.profitLoss >= 0 ? '+' : ''}\n {formatCurrency(investment.profitLoss, { minimumFractionDigits: 0 })}\n </p>\n <p\n className={cn(\n 'text-xs',\n investment.profitLoss >= 0\n ? 'text-status-success-text'\n : 'text-status-error-text'\n )}\n >\n ({investment.profitLossPercentage >= 0 ? '+' : ''}\n {investment.profitLossPercentage}%)\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">ROI</p>\n <p className=\"font-semibold text-text-primary\">{investment.roiAnnual}% p.a.</p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Invested on</p>\n <p className=\"font-semibold text-text-primary\">\n {formatDate(investment.investmentDate, {\n hour: undefined,\n minute: undefined,\n })}\n </p>\n </div>\n </div>\n </div>\n\n <div className=\"ml-6\">\n <button\n type=\"button\"\n onClick={() => navigateTo(`/investor/investments/${investment.id}`)}\n 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\"\n >\n <Eye className=\"h-4 w-4\" />\n View Details\n </button>\n </div>\n </div>\n </div>\n ))\n ) : (\n <EmptyState\n illustration=\"empty-data\"\n title={`No ${filter !== 'all' ? filter : ''} investments found`}\n description={\n filter === 'all'\n ? \"You haven't made any investments yet. Start exploring opportunities to grow your wealth.\"\n : `You don't have any ${filter} investments at the moment.`\n }\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/investor/opportunities')}\n 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\"\n >\n Explore Investment Opportunities\n </button>\n }\n />\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAmEA,IAAM,IAAgC;CACpC;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,sBAAsB;EACtB,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,cAAc;EACf;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,kBA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