import Badge from '@/components/ui/Badge.tsx'; import Button from '@/components/ui/Button.tsx'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card.tsx'; import { CenteredContent } from '@/components/ui/CenteredContent.tsx'; import { EmptyState } from '@/components/ui/EmptyState.tsx'; import { Flex } from '@/components/ui/layout'; import type { Proposal } from '@/types.ts'; import { Users } from 'lucide-react'; type Props = { pendingProposals: Proposal[]; onNavigate: (path: string) => void; t: (key: string) => string; }; const ActiveProposalsSection = ({ pendingProposals, onNavigate, t }: Props) => { return ( {t('dashboard.activeProposals')} {pendingProposals.length} {pendingProposals.length > 0 ? (
{pendingProposals.slice(0, 5).map((proposal: Proposal) => (
{ if (proposal.toOrgId) onNavigate(`/organization/${proposal.toOrgId}`); else if (proposal.fromOrgId) onNavigate(`/organization/${proposal.fromOrgId}`); else onNavigate('/matching'); }} >
{proposal.message}
{t('dashboard.proposalStatus')}:{' '} {t(`organizationPage.status.${proposal.status}`)}
{t(`organizationPage.status.${proposal.status}`)}
))} {pendingProposals.length > 5 && ( )}
) : ( } title={t('dashboard.noActiveProposalsTitle')} description={t('dashboard.noActiveProposalsDesc')} action={{ label: t('dashboard.exploreMap'), onClick: () => onNavigate('/map') }} /> )}
); }; export default ActiveProposalsSection;