diff --git a/src/app/(campaign)/campanha/(app)/atividades/[slug]/ActivityOverviewTab.tsx b/src/app/(campaign)/campanha/(app)/atividades/[slug]/ActivityOverviewTab.tsx index fbe402aa..2b53a939 100644 --- a/src/app/(campaign)/campanha/(app)/atividades/[slug]/ActivityOverviewTab.tsx +++ b/src/app/(campaign)/campanha/(app)/atividades/[slug]/ActivityOverviewTab.tsx @@ -2,6 +2,7 @@ import { PlusIcon } from 'lucide-react' import Link from 'next/link' import { ActivityResultForm } from '@/components/campaign/activity/ActivityResultForm' +import { CampaignListPagination } from '@/components/campaign/shared/CampaignListPagination' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' @@ -17,6 +18,12 @@ const currencyFormatter = new Intl.NumberFormat('pt-BR', { type ActivityDetailView = Awaited> +const hrefForLinkedDemandsPage = (activitySlug: string, page: number) => { + const params = new URLSearchParams({ tab: 'overview' }) + if (page > 1) params.set('demandsPage', String(page)) + return `/campanha/atividades/${activitySlug}?${params.toString()}` +} + /** The "Visão geral" tab: details, team/orgs, linked demands and the result block. */ export const ActivityOverviewTab = ({ view, @@ -128,47 +135,67 @@ export const ActivityOverviewTab = ({ Demandas vinculadas

Custo estimado: {currencyFormatter.format(view.demandCostTotal)} + {view.totalDocs > 0 ? ( + <> + {' '} + · {view.totalDocs} {view.totalDocs === 1 ? 'demanda' : 'demandas'} + + ) : null}

- {view.municipality ? ( - - ) : null} - - - {view.demands.length ? ( - +