From c706c620981cccd1839d6c28f8d94c0b08b08d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Ign=C3=A1cio=20Fontoura=20Solla?= Date: Sat, 25 Jul 2026 14:52:17 -0300 Subject: [PATCH] Pass 2 W2: components/campaign em subpastas por dominio 106 arquivos flat -> 15 dominios (actionPlan, advisor, auth, dashboard, demand, invite, leadership, map, municipality, organization, stateDeputy, supporter, votePledge, shared, shell) via git mv; imports absolutos reescritos em 98 arquivos; excecao de lint do campaign-logo e paths dos specs de contrato (campaignInviteUi, campaignComponents) atualizados. Sem mudanca de conteudo nos componentes. --- eslint.config.mjs | 2 +- .../campanha/(app)/apoiadores/[id]/page.tsx | 10 +++---- .../(app)/apoiadores/importar/page.tsx | 4 +-- .../campanha/(app)/apoiadores/loading.tsx | 2 +- .../campanha/(app)/apoiadores/novo/page.tsx | 4 +-- .../campanha/(app)/apoiadores/page.tsx | 16 +++++----- .../campanha/(app)/assessores/[id]/page.tsx | 6 ++-- .../campanha/(app)/assessores/page.tsx | 10 +++---- .../campanha/(app)/conceitos/page.tsx | 2 +- .../campanha/(app)/demandas/[slug]/page.tsx | 4 +-- .../campanha/(app)/demandas/nova/page.tsx | 4 +-- .../campanha/(app)/demandas/page.tsx | 12 ++++---- .../(app)/dobradinhas/[slug]/page.tsx | 4 +-- .../campanha/(app)/dobradinhas/nova/page.tsx | 4 +-- .../campanha/(app)/dobradinhas/page.tsx | 12 ++++---- src/app/(campaign)/campanha/(app)/layout.tsx | 6 ++-- .../campanha/(app)/liderancas/[id]/page.tsx | 10 +++---- .../campanha/(app)/liderancas/nova/page.tsx | 4 +-- .../campanha/(app)/liderancas/page.tsx | 14 ++++----- src/app/(campaign)/campanha/(app)/loading.tsx | 2 +- .../(app)/municipios/[slug]/editar/page.tsx | 6 ++-- .../campanha/(app)/municipios/[slug]/page.tsx | 30 +++++++++---------- .../campanha/(app)/municipios/loading.tsx | 2 +- .../campanha/(app)/municipios/page.tsx | 18 +++++------ .../(app)/organizacoes/[slug]/page.tsx | 4 +-- .../campanha/(app)/organizacoes/nova/page.tsx | 4 +-- .../campanha/(app)/organizacoes/page.tsx | 12 ++++---- src/app/(campaign)/campanha/(app)/page.tsx | 12 ++++---- .../(campaign)/campanha/(app)/perfil/page.tsx | 2 +- .../(app)/planos/[slug]/editar/page.tsx | 2 +- .../campanha/(app)/planos/[slug]/page.tsx | 14 ++++----- .../(app)/planos/contactSearchActions.ts | 2 +- .../campanha/(app)/planos/formActions.ts | 2 +- .../campanha/(app)/planos/novo/page.tsx | 2 +- .../(campaign)/campanha/(app)/planos/page.tsx | 12 ++++---- .../campanha/convite/[token]/page.tsx | 6 ++-- .../esqueci-senha/ForgotPasswordForm.tsx | 4 +-- .../campanha/esqueci-senha/page.tsx | 2 +- .../(campaign)/campanha/login/LoginForm.tsx | 2 +- src/app/(campaign)/campanha/login/page.tsx | 2 +- .../redefinir-senha/ResetPasswordForm.tsx | 4 +-- .../campanha/redefinir-senha/page.tsx | 4 +-- src/app/(campaign)/layout.tsx | 2 +- .../{ => actionPlan}/ActionPlanCard.tsx | 2 +- .../ActionPlanDemandFields.tsx | 0 .../{ => actionPlan}/ActionPlanFilters.tsx | 4 +-- .../{ => actionPlan}/ActionPlanForm.tsx | 10 +++---- .../ActionPlanLifecycleDialog.tsx | 0 .../{ => actionPlan}/ActionPlanList.tsx | 2 +- .../{ => actionPlan}/ActionPlanResultForm.tsx | 0 .../ActionPlanStatusBadge.tsx | 0 .../{ => actionPlan}/ActionPlanTabNav.tsx | 0 .../ActionPlanTaskChecklist.tsx | 0 .../{ => actionPlan}/ActionPlanTaskFields.tsx | 2 +- .../{ => actionPlan}/ActionPlanUpdateFeed.tsx | 0 .../{ => actionPlan}/ActionPlanUpdateForm.tsx | 0 .../AdvisorDebouncedTextCell.tsx | 0 .../{ => advisor}/AdvisorMunicipalityCell.tsx | 0 .../AdvisorPasswordResetButton.tsx | 0 .../campaign/{ => advisor}/AdvisorsTable.tsx | 8 ++--- .../CampaignAuthBackToLoginLink.tsx | 0 .../{ => auth}/CampaignAuthCardHeader.tsx | 0 .../{ => auth}/CampaignAuthPageShell.tsx | 2 +- .../{ => auth}/CampaignProfileSettings.tsx | 2 +- .../{ => dashboard}/CampaignDashboard.tsx | 6 ++-- .../{ => dashboard}/CampaignDataFreshness.tsx | 0 .../{ => dashboard}/RecentVisitTracker.tsx | 0 .../{ => dashboard}/RecentlyVisitedCard.tsx | 0 .../campaign/{ => demand}/DemandForm.tsx | 2 +- .../{ => demand}/DemandWorkflowCard.tsx | 0 .../{ => invite}/CampaignInviteForm.tsx | 0 .../{ => invite}/InvalidCampaignInvite.tsx | 0 .../{ => invite}/LeadershipInviteButtons.tsx | 0 .../{ => leadership}/LeaderContactForm.tsx | 4 +-- .../{ => leadership}/LeaderContactsPanel.tsx | 6 ++-- .../{ => leadership}/LeadershipForm.tsx | 2 +- .../LeadershipInternalForm.tsx | 2 +- .../{ => leadership}/SupportStatusBadge.tsx | 0 .../campaign/{ => map}/BahiaMap.tsx | 0 .../{ => map}/CandidateComparePicker.tsx | 0 .../campaign/{ => map}/ChoroplethLegend.tsx | 0 .../campaign/{ => map}/MapFeatureReadout.tsx | 2 +- .../{ => map}/MunicipalityMapPanel.tsx | 10 +++---- .../{ => map}/MunicipalityMapPanelDynamic.tsx | 2 +- .../MunicipalityAdvisorAvatarStack.tsx | 0 .../MunicipalityAdvisorsForm.tsx | 0 .../MunicipalityBaselineCard.tsx | 2 +- .../MunicipalityCandidateComparisonTable.tsx | 0 .../MunicipalityDossier.tsx | 10 +++---- .../MunicipalityEstimateScenarioContext.tsx | 0 .../MunicipalityFilters.tsx | 4 +-- .../MunicipalityGoalAccountCard.tsx | 6 ++-- .../MunicipalityHeaderFilter.tsx | 2 +- .../MunicipalityHoverTooltip.tsx | 0 .../MunicipalityLeadershipsPanel.tsx | 4 +-- .../{ => municipality}/MunicipalityList.tsx | 16 +++++----- .../MunicipalityListAdvisorsControl.tsx | 2 +- .../MunicipalityListExpectedVotesControl.tsx | 6 ++-- .../MunicipalityListGoalCoverageCell.tsx | 2 +- .../MunicipalityListOverview.tsx | 12 ++++---- .../MunicipalityListTrendControl.tsx | 0 .../MunicipalityPledgesPanel.tsx | 2 +- .../MunicipalitySortableHead.tsx | 6 ++-- .../MunicipalityStrategyCard.tsx | 2 +- .../MunicipalityStrategyForm.tsx | 4 +-- .../{ => municipality}/MunicipalityTabNav.tsx | 0 .../MunicipalityUpdateFeed.tsx | 0 .../MunicipalityUpdateForm.tsx | 0 .../MunicipalityZoneNeighborhoodsCard.tsx | 0 .../TerritoryOverviewTable.tsx | 0 .../{ => municipality}/TseZoneBadge.tsx | 0 .../{ => organization}/OrganizationForm.tsx | 2 +- .../{ => shared}/AsyncSearchCombobox.tsx | 0 .../{ => shared}/CampaignFilterChips.tsx | 2 +- .../{ => shared}/CampaignInfoHint.tsx | 0 .../{ => shared}/CampaignListEmptyState.tsx | 0 .../{ => shared}/CampaignListFooter.tsx | 2 +- .../{ => shared}/CampaignListPagination.tsx | 2 +- .../{ => shared}/CampaignListPending.tsx | 0 .../{ => shared}/CampaignMetricStrip.tsx | 0 .../{ => shared}/CampaignScopeBadge.tsx | 0 .../{ => shared}/CampaignSearchForm.tsx | 2 +- .../{ => shared}/CampaignSearchInput.tsx | 0 .../campaign/{ => shared}/CampaignTable.tsx | 0 .../{ => shared}/CampaignUserAvatar.tsx | 0 .../campaign/{ => shared}/ConsentText.tsx | 0 .../campaign/{ => shared}/ContactCombobox.tsx | 2 +- .../{ => shared}/RelationMultiSelect.tsx | 0 .../campaign/{ => shared}/StrictCombobox.tsx | 0 .../{ => shell}/CampaignBottomNav.tsx | 2 +- .../{ => shell}/CampaignPageShell.tsx | 0 .../campaign/{ => shell}/CampaignSidebar.tsx | 8 ++--- .../campaign/{ => shell}/InstallPwaToast.tsx | 0 .../{ => shell}/RegisterServiceWorker.tsx | 0 .../campaign/{ => shell}/campaign-logo.tsx | 0 src/components/campaign/{ => shell}/nav.ts | 0 .../{ => stateDeputy}/StateDeputyChips.tsx | 0 .../{ => stateDeputy}/StateDeputyForm.tsx | 0 .../RemoveSupporterDataButton.tsx | 0 .../{ => supporter}/SupporterFilters.tsx | 8 ++--- .../{ => supporter}/SupporterForm.tsx | 4 +-- .../{ => supporter}/SupporterImportWizard.tsx | 0 .../{ => supporter}/SupporterList.tsx | 2 +- .../{ => supporter}/SupporterListOverview.tsx | 4 +-- .../{ => supporter}/SupporterShareKit.tsx | 0 .../{ => supporter}/VoteIntentionControl.tsx | 0 .../{ => votePledge}/DeclareVotesForm.tsx | 0 .../{ => votePledge}/PledgeEstimateForm.tsx | 2 +- .../StaffMunicipalityVotesDisplay.tsx | 2 +- .../VoteEstimateScenarioField.tsx | 2 +- .../VoteEstimateScenarioInputs.tsx | 2 +- .../VoteEstimateScenarioStrip.tsx | 0 src/utilities/campaignRelationOptions.ts | 2 +- src/utilities/leaderContactsPageData.ts | 2 +- src/utilities/supporterPageData.ts | 2 +- tests/int/campaignInviteUi.int.spec.ts | 12 ++++---- tests/unit/campaignComponents.unit.spec.ts | 12 ++++---- .../campaignIntelligenceConcepts.unit.spec.ts | 2 +- .../campaignInviteInteractions.unit.spec.ts | 2 +- tests/unit/campaignSearchInput.unit.spec.ts | 2 +- 160 files changed, 257 insertions(+), 257 deletions(-) rename src/components/campaign/{ => actionPlan}/ActionPlanCard.tsx (96%) rename src/components/campaign/{ => actionPlan}/ActionPlanDemandFields.tsx (100%) rename src/components/campaign/{ => actionPlan}/ActionPlanFilters.tsx (97%) rename src/components/campaign/{ => actionPlan}/ActionPlanForm.tsx (98%) rename src/components/campaign/{ => actionPlan}/ActionPlanLifecycleDialog.tsx (100%) rename src/components/campaign/{ => actionPlan}/ActionPlanList.tsx (80%) rename src/components/campaign/{ => actionPlan}/ActionPlanResultForm.tsx (100%) rename src/components/campaign/{ => actionPlan}/ActionPlanStatusBadge.tsx (100%) rename src/components/campaign/{ => actionPlan}/ActionPlanTabNav.tsx (100%) rename src/components/campaign/{ => actionPlan}/ActionPlanTaskChecklist.tsx (100%) rename src/components/campaign/{ => actionPlan}/ActionPlanTaskFields.tsx (99%) rename src/components/campaign/{ => actionPlan}/ActionPlanUpdateFeed.tsx (100%) rename src/components/campaign/{ => actionPlan}/ActionPlanUpdateForm.tsx (100%) rename src/components/campaign/{ => advisor}/AdvisorDebouncedTextCell.tsx (100%) rename src/components/campaign/{ => advisor}/AdvisorMunicipalityCell.tsx (100%) rename src/components/campaign/{ => advisor}/AdvisorPasswordResetButton.tsx (100%) rename src/components/campaign/{ => advisor}/AdvisorsTable.tsx (98%) rename src/components/campaign/{ => auth}/CampaignAuthBackToLoginLink.tsx (100%) rename src/components/campaign/{ => auth}/CampaignAuthCardHeader.tsx (100%) rename src/components/campaign/{ => auth}/CampaignAuthPageShell.tsx (90%) rename src/components/campaign/{ => auth}/CampaignProfileSettings.tsx (98%) rename src/components/campaign/{ => dashboard}/CampaignDashboard.tsx (96%) rename src/components/campaign/{ => dashboard}/CampaignDataFreshness.tsx (100%) rename src/components/campaign/{ => dashboard}/RecentVisitTracker.tsx (100%) rename src/components/campaign/{ => dashboard}/RecentlyVisitedCard.tsx (100%) rename src/components/campaign/{ => demand}/DemandForm.tsx (98%) rename src/components/campaign/{ => demand}/DemandWorkflowCard.tsx (100%) rename src/components/campaign/{ => invite}/CampaignInviteForm.tsx (100%) rename src/components/campaign/{ => invite}/InvalidCampaignInvite.tsx (100%) rename src/components/campaign/{ => invite}/LeadershipInviteButtons.tsx (100%) rename src/components/campaign/{ => leadership}/LeaderContactForm.tsx (98%) rename src/components/campaign/{ => leadership}/LeaderContactsPanel.tsx (94%) rename src/components/campaign/{ => leadership}/LeadershipForm.tsx (99%) rename src/components/campaign/{ => leadership}/LeadershipInternalForm.tsx (99%) rename src/components/campaign/{ => leadership}/SupportStatusBadge.tsx (100%) rename src/components/campaign/{ => map}/BahiaMap.tsx (100%) rename src/components/campaign/{ => map}/CandidateComparePicker.tsx (100%) rename src/components/campaign/{ => map}/ChoroplethLegend.tsx (100%) rename src/components/campaign/{ => map}/MapFeatureReadout.tsx (99%) rename src/components/campaign/{ => map}/MunicipalityMapPanel.tsx (98%) rename src/components/campaign/{ => map}/MunicipalityMapPanelDynamic.tsx (85%) rename src/components/campaign/{ => municipality}/MunicipalityAdvisorAvatarStack.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityAdvisorsForm.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityBaselineCard.tsx (99%) rename src/components/campaign/{ => municipality}/MunicipalityCandidateComparisonTable.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityDossier.tsx (97%) rename src/components/campaign/{ => municipality}/MunicipalityEstimateScenarioContext.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityFilters.tsx (98%) rename src/components/campaign/{ => municipality}/MunicipalityGoalAccountCard.tsx (98%) rename src/components/campaign/{ => municipality}/MunicipalityHeaderFilter.tsx (99%) rename src/components/campaign/{ => municipality}/MunicipalityHoverTooltip.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityLeadershipsPanel.tsx (95%) rename src/components/campaign/{ => municipality}/MunicipalityList.tsx (98%) rename src/components/campaign/{ => municipality}/MunicipalityListAdvisorsControl.tsx (98%) rename src/components/campaign/{ => municipality}/MunicipalityListExpectedVotesControl.tsx (97%) rename src/components/campaign/{ => municipality}/MunicipalityListGoalCoverageCell.tsx (97%) rename src/components/campaign/{ => municipality}/MunicipalityListOverview.tsx (95%) rename src/components/campaign/{ => municipality}/MunicipalityListTrendControl.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityPledgesPanel.tsx (98%) rename src/components/campaign/{ => municipality}/MunicipalitySortableHead.tsx (97%) rename src/components/campaign/{ => municipality}/MunicipalityStrategyCard.tsx (98%) rename src/components/campaign/{ => municipality}/MunicipalityStrategyForm.tsx (99%) rename src/components/campaign/{ => municipality}/MunicipalityTabNav.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityUpdateFeed.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityUpdateForm.tsx (100%) rename src/components/campaign/{ => municipality}/MunicipalityZoneNeighborhoodsCard.tsx (100%) rename src/components/campaign/{ => municipality}/TerritoryOverviewTable.tsx (100%) rename src/components/campaign/{ => municipality}/TseZoneBadge.tsx (100%) rename src/components/campaign/{ => organization}/OrganizationForm.tsx (98%) rename src/components/campaign/{ => shared}/AsyncSearchCombobox.tsx (100%) rename src/components/campaign/{ => shared}/CampaignFilterChips.tsx (95%) rename src/components/campaign/{ => shared}/CampaignInfoHint.tsx (100%) rename src/components/campaign/{ => shared}/CampaignListEmptyState.tsx (100%) rename src/components/campaign/{ => shared}/CampaignListFooter.tsx (89%) rename src/components/campaign/{ => shared}/CampaignListPagination.tsx (99%) rename src/components/campaign/{ => shared}/CampaignListPending.tsx (100%) rename src/components/campaign/{ => shared}/CampaignMetricStrip.tsx (100%) rename src/components/campaign/{ => shared}/CampaignScopeBadge.tsx (100%) rename src/components/campaign/{ => shared}/CampaignSearchForm.tsx (95%) rename src/components/campaign/{ => shared}/CampaignSearchInput.tsx (100%) rename src/components/campaign/{ => shared}/CampaignTable.tsx (100%) rename src/components/campaign/{ => shared}/CampaignUserAvatar.tsx (100%) rename src/components/campaign/{ => shared}/ConsentText.tsx (100%) rename src/components/campaign/{ => shared}/ContactCombobox.tsx (95%) rename src/components/campaign/{ => shared}/RelationMultiSelect.tsx (100%) rename src/components/campaign/{ => shared}/StrictCombobox.tsx (100%) rename src/components/campaign/{ => shell}/CampaignBottomNav.tsx (98%) rename src/components/campaign/{ => shell}/CampaignPageShell.tsx (100%) rename src/components/campaign/{ => shell}/CampaignSidebar.tsx (94%) rename src/components/campaign/{ => shell}/InstallPwaToast.tsx (100%) rename src/components/campaign/{ => shell}/RegisterServiceWorker.tsx (100%) rename src/components/campaign/{ => shell}/campaign-logo.tsx (100%) rename src/components/campaign/{ => shell}/nav.ts (100%) rename src/components/campaign/{ => stateDeputy}/StateDeputyChips.tsx (100%) rename src/components/campaign/{ => stateDeputy}/StateDeputyForm.tsx (100%) rename src/components/campaign/{ => supporter}/RemoveSupporterDataButton.tsx (100%) rename src/components/campaign/{ => supporter}/SupporterFilters.tsx (95%) rename src/components/campaign/{ => supporter}/SupporterForm.tsx (98%) rename src/components/campaign/{ => supporter}/SupporterImportWizard.tsx (100%) rename src/components/campaign/{ => supporter}/SupporterList.tsx (99%) rename src/components/campaign/{ => supporter}/SupporterListOverview.tsx (85%) rename src/components/campaign/{ => supporter}/SupporterShareKit.tsx (100%) rename src/components/campaign/{ => supporter}/VoteIntentionControl.tsx (100%) rename src/components/campaign/{ => votePledge}/DeclareVotesForm.tsx (100%) rename src/components/campaign/{ => votePledge}/PledgeEstimateForm.tsx (98%) rename src/components/campaign/{ => votePledge}/StaffMunicipalityVotesDisplay.tsx (98%) rename src/components/campaign/{ => votePledge}/VoteEstimateScenarioField.tsx (95%) rename src/components/campaign/{ => votePledge}/VoteEstimateScenarioInputs.tsx (99%) rename src/components/campaign/{ => votePledge}/VoteEstimateScenarioStrip.tsx (100%) diff --git a/eslint.config.mjs b/eslint.config.mjs index cf8b4432..865cb819 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -20,7 +20,7 @@ const frameworkComponentFiles = [ // These predate the naming convention. Keep them linted by Next's rules while // requiring new component files to use PascalCase. const legacyComponentFilenameIgnores = [ - 'src/components/campaign/campaign-logo.tsx', + 'src/components/campaign/shell/campaign-logo.tsx', 'src/components/socialIcons.tsx', 'src/components/socialLinks.tsx', 'src/components/ui/breadcrumb.tsx', diff --git a/src/app/(campaign)/campanha/(app)/apoiadores/[id]/page.tsx b/src/app/(campaign)/campanha/(app)/apoiadores/[id]/page.tsx index 9460a666..0afedcb0 100644 --- a/src/app/(campaign)/campanha/(app)/apoiadores/[id]/page.tsx +++ b/src/app/(campaign)/campanha/(app)/apoiadores/[id]/page.tsx @@ -5,11 +5,11 @@ import { notFound, redirect } from 'next/navigation' import { getPayload } from 'payload' import { setSupporterVoteIntentionFormAction } from '@/app/(campaign)/campanha/(app)/apoiadores/[id]/formActions' -import { CampaignScopeBadge } from '@/components/campaign/CampaignScopeBadge' -import { ConsentText } from '@/components/campaign/ConsentText' -import { RemoveSupporterDataButton } from '@/components/campaign/RemoveSupporterDataButton' -import { SupporterShareKit } from '@/components/campaign/SupporterShareKit' -import { VoteIntentionControl } from '@/components/campaign/VoteIntentionControl' +import { CampaignScopeBadge } from '@/components/campaign/shared/CampaignScopeBadge' +import { ConsentText } from '@/components/campaign/shared/ConsentText' +import { RemoveSupporterDataButton } from '@/components/campaign/supporter/RemoveSupporterDataButton' +import { SupporterShareKit } from '@/components/campaign/supporter/SupporterShareKit' +import { VoteIntentionControl } from '@/components/campaign/supporter/VoteIntentionControl' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' diff --git a/src/app/(campaign)/campanha/(app)/apoiadores/importar/page.tsx b/src/app/(campaign)/campanha/(app)/apoiadores/importar/page.tsx index af1ec7e0..8ed0698f 100644 --- a/src/app/(campaign)/campanha/(app)/apoiadores/importar/page.tsx +++ b/src/app/(campaign)/campanha/(app)/apoiadores/importar/page.tsx @@ -1,8 +1,8 @@ import Link from 'next/link' import { redirect } from 'next/navigation' -import { CampaignScopeBadge } from '@/components/campaign/CampaignScopeBadge' -import { SupporterImportWizard } from '@/components/campaign/SupporterImportWizard' +import { CampaignScopeBadge } from '@/components/campaign/shared/CampaignScopeBadge' +import { SupporterImportWizard } from '@/components/campaign/supporter/SupporterImportWizard' import { Button } from '@/components/ui/button' import { getCampaignUser } from '@/utilities/campaignAuth' import { isCampaignCoordinator } from '@/utilities/campaignAccess' diff --git a/src/app/(campaign)/campanha/(app)/apoiadores/loading.tsx b/src/app/(campaign)/campanha/(app)/apoiadores/loading.tsx index 5550cdf6..cd913895 100644 --- a/src/app/(campaign)/campanha/(app)/apoiadores/loading.tsx +++ b/src/app/(campaign)/campanha/(app)/apoiadores/loading.tsx @@ -1,4 +1,4 @@ -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' import { Skeleton } from '@/components/ui/skeleton' /** List-shaped skeleton for /apoiadores and its detail routes. */ diff --git a/src/app/(campaign)/campanha/(app)/apoiadores/novo/page.tsx b/src/app/(campaign)/campanha/(app)/apoiadores/novo/page.tsx index 73785b44..d7a39fec 100644 --- a/src/app/(campaign)/campanha/(app)/apoiadores/novo/page.tsx +++ b/src/app/(campaign)/campanha/(app)/apoiadores/novo/page.tsx @@ -4,8 +4,8 @@ import { redirect } from 'next/navigation' import { getPayload } from 'payload' import { createSupporterFormAction } from '@/app/(campaign)/campanha/(app)/apoiadores/novo/formActions' -import { CampaignScopeBadge } from '@/components/campaign/CampaignScopeBadge' -import { SupporterForm } from '@/components/campaign/SupporterForm' +import { CampaignScopeBadge } from '@/components/campaign/shared/CampaignScopeBadge' +import { SupporterForm } from '@/components/campaign/supporter/SupporterForm' import { Button } from '@/components/ui/button' import { campaignRoleLabels } from '@/utilities/campaignUserProfile' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/apoiadores/page.tsx b/src/app/(campaign)/campanha/(app)/apoiadores/page.tsx index 8b8bf8d6..9b8bf9f9 100644 --- a/src/app/(campaign)/campanha/(app)/apoiadores/page.tsx +++ b/src/app/(campaign)/campanha/(app)/apoiadores/page.tsx @@ -1,20 +1,20 @@ import { CampaignListPendingBoundary, CampaignListResults, -} from '@/components/campaign/CampaignListPending' +} from '@/components/campaign/shared/CampaignListPending' import config from '@payload-config' import { FileUpIcon, PlusIcon, SearchXIcon } from 'lucide-react' import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignListEmptyState } from '@/components/campaign/CampaignListEmptyState' -import { CampaignListFooter } from '@/components/campaign/CampaignListFooter' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { CampaignScopeBadge } from '@/components/campaign/CampaignScopeBadge' -import { SupporterFilters } from '@/components/campaign/SupporterFilters' -import { SupporterList } from '@/components/campaign/SupporterList' -import { SupporterListOverview } from '@/components/campaign/SupporterListOverview' +import { CampaignListEmptyState } from '@/components/campaign/shared/CampaignListEmptyState' +import { CampaignListFooter } from '@/components/campaign/shared/CampaignListFooter' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { CampaignScopeBadge } from '@/components/campaign/shared/CampaignScopeBadge' +import { SupporterFilters } from '@/components/campaign/supporter/SupporterFilters' +import { SupporterList } from '@/components/campaign/supporter/SupporterList' +import { SupporterListOverview } from '@/components/campaign/supporter/SupporterListOverview' import { Button } from '@/components/ui/button' import { isCampaignCoordinator, isCampaignUnrestricted } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/assessores/[id]/page.tsx b/src/app/(campaign)/campanha/(app)/assessores/[id]/page.tsx index efcb9257..d41d6140 100644 --- a/src/app/(campaign)/campanha/(app)/assessores/[id]/page.tsx +++ b/src/app/(campaign)/campanha/(app)/assessores/[id]/page.tsx @@ -4,9 +4,9 @@ import Link from 'next/link' import { notFound, redirect } from 'next/navigation' import { getPayload } from 'payload' -import { AdvisorDebouncedTextCell } from '@/components/campaign/AdvisorDebouncedTextCell' -import { AdvisorPasswordResetButton } from '@/components/campaign/AdvisorPasswordResetButton' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' +import { AdvisorDebouncedTextCell } from '@/components/campaign/advisor/AdvisorDebouncedTextCell' +import { AdvisorPasswordResetButton } from '@/components/campaign/advisor/AdvisorPasswordResetButton' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { isPlanilhaPlaceholderEmail } from '@/lib/schemas/advisor' diff --git a/src/app/(campaign)/campanha/(app)/assessores/page.tsx b/src/app/(campaign)/campanha/(app)/assessores/page.tsx index 574e9d3b..db4383f0 100644 --- a/src/app/(campaign)/campanha/(app)/assessores/page.tsx +++ b/src/app/(campaign)/campanha/(app)/assessores/page.tsx @@ -5,11 +5,11 @@ import { getPayload } from 'payload' import { CampaignListPendingBoundary, CampaignListResults, -} from '@/components/campaign/CampaignListPending' -import { CampaignListFooter } from '@/components/campaign/CampaignListFooter' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { CampaignSearchForm } from '@/components/campaign/CampaignSearchForm' -import { AdvisorsTable } from '@/components/campaign/AdvisorsTable' +} from '@/components/campaign/shared/CampaignListPending' +import { CampaignListFooter } from '@/components/campaign/shared/CampaignListFooter' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { CampaignSearchForm } from '@/components/campaign/shared/CampaignSearchForm' +import { AdvisorsTable } from '@/components/campaign/advisor/AdvisorsTable' import { advisorListHrefForPage, loadAdvisorListPageData, diff --git a/src/app/(campaign)/campanha/(app)/conceitos/page.tsx b/src/app/(campaign)/campanha/(app)/conceitos/page.tsx index 3454c6f3..465c61db 100644 --- a/src/app/(campaign)/campanha/(app)/conceitos/page.tsx +++ b/src/app/(campaign)/campanha/(app)/conceitos/page.tsx @@ -1,7 +1,7 @@ import type { Metadata } from 'next' import { redirect } from 'next/navigation' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' import { CAMPAIGN_CONCEPT_CATEGORIES, campaignConceptsByCategory, diff --git a/src/app/(campaign)/campanha/(app)/demandas/[slug]/page.tsx b/src/app/(campaign)/campanha/(app)/demandas/[slug]/page.tsx index d2077e22..eb7d6915 100644 --- a/src/app/(campaign)/campanha/(app)/demandas/[slug]/page.tsx +++ b/src/app/(campaign)/campanha/(app)/demandas/[slug]/page.tsx @@ -4,8 +4,8 @@ import Link from 'next/link' import { notFound, redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { DemandWorkflowCard } from '@/components/campaign/DemandWorkflowCard' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { DemandWorkflowCard } from '@/components/campaign/demand/DemandWorkflowCard' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { diff --git a/src/app/(campaign)/campanha/(app)/demandas/nova/page.tsx b/src/app/(campaign)/campanha/(app)/demandas/nova/page.tsx index 6d8e6496..cfdead48 100644 --- a/src/app/(campaign)/campanha/(app)/demandas/nova/page.tsx +++ b/src/app/(campaign)/campanha/(app)/demandas/nova/page.tsx @@ -4,8 +4,8 @@ import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { DemandForm } from '@/components/campaign/DemandForm' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { DemandForm } from '@/components/campaign/demand/DemandForm' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/demandas/page.tsx b/src/app/(campaign)/campanha/(app)/demandas/page.tsx index def7a68e..31861e98 100644 --- a/src/app/(campaign)/campanha/(app)/demandas/page.tsx +++ b/src/app/(campaign)/campanha/(app)/demandas/page.tsx @@ -4,19 +4,19 @@ import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignFilterChips } from '@/components/campaign/CampaignFilterChips' -import { CampaignListEmptyState } from '@/components/campaign/CampaignListEmptyState' -import { CampaignListFooter } from '@/components/campaign/CampaignListFooter' +import { CampaignFilterChips } from '@/components/campaign/shared/CampaignFilterChips' +import { CampaignListEmptyState } from '@/components/campaign/shared/CampaignListEmptyState' +import { CampaignListFooter } from '@/components/campaign/shared/CampaignListFooter' import { CampaignListPendingBoundary, CampaignListResults, -} from '@/components/campaign/CampaignListPending' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' +} from '@/components/campaign/shared/CampaignListPending' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' import { CampaignTable, CampaignTableHead, type CampaignTableColumn, -} from '@/components/campaign/CampaignTable' +} from '@/components/campaign/shared/CampaignTable' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { diff --git a/src/app/(campaign)/campanha/(app)/dobradinhas/[slug]/page.tsx b/src/app/(campaign)/campanha/(app)/dobradinhas/[slug]/page.tsx index c8fb77c9..18b04b73 100644 --- a/src/app/(campaign)/campanha/(app)/dobradinhas/[slug]/page.tsx +++ b/src/app/(campaign)/campanha/(app)/dobradinhas/[slug]/page.tsx @@ -4,8 +4,8 @@ import Link from 'next/link' import { notFound, redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { StateDeputyForm } from '@/components/campaign/StateDeputyForm' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { StateDeputyForm } from '@/components/campaign/stateDeputy/StateDeputyForm' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' diff --git a/src/app/(campaign)/campanha/(app)/dobradinhas/nova/page.tsx b/src/app/(campaign)/campanha/(app)/dobradinhas/nova/page.tsx index 86df6742..bcb11f06 100644 --- a/src/app/(campaign)/campanha/(app)/dobradinhas/nova/page.tsx +++ b/src/app/(campaign)/campanha/(app)/dobradinhas/nova/page.tsx @@ -2,8 +2,8 @@ import { ArrowLeftIcon } from 'lucide-react' import Link from 'next/link' import { redirect } from 'next/navigation' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { StateDeputyForm } from '@/components/campaign/StateDeputyForm' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { StateDeputyForm } from '@/components/campaign/stateDeputy/StateDeputyForm' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/dobradinhas/page.tsx b/src/app/(campaign)/campanha/(app)/dobradinhas/page.tsx index c315c333..27929058 100644 --- a/src/app/(campaign)/campanha/(app)/dobradinhas/page.tsx +++ b/src/app/(campaign)/campanha/(app)/dobradinhas/page.tsx @@ -4,19 +4,19 @@ import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignListEmptyState } from '@/components/campaign/CampaignListEmptyState' -import { CampaignListFooter } from '@/components/campaign/CampaignListFooter' +import { CampaignListEmptyState } from '@/components/campaign/shared/CampaignListEmptyState' +import { CampaignListFooter } from '@/components/campaign/shared/CampaignListFooter' import { CampaignListPendingBoundary, CampaignListResults, -} from '@/components/campaign/CampaignListPending' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { CampaignSearchForm } from '@/components/campaign/CampaignSearchForm' +} from '@/components/campaign/shared/CampaignListPending' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { CampaignSearchForm } from '@/components/campaign/shared/CampaignSearchForm' import { CampaignTable, CampaignTableHead, type CampaignTableColumn, -} from '@/components/campaign/CampaignTable' +} from '@/components/campaign/shared/CampaignTable' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/layout.tsx b/src/app/(campaign)/campanha/(app)/layout.tsx index a23da9f1..d817adfa 100644 --- a/src/app/(campaign)/campanha/(app)/layout.tsx +++ b/src/app/(campaign)/campanha/(app)/layout.tsx @@ -1,9 +1,9 @@ import { redirect } from 'next/navigation' import React from 'react' -import { CampaignBottomNav } from '@/components/campaign/CampaignBottomNav' -import { CampaignSidebar } from '@/components/campaign/CampaignSidebar' -import { InstallPwaToast } from '@/components/campaign/InstallPwaToast' +import { CampaignBottomNav } from '@/components/campaign/shell/CampaignBottomNav' +import { CampaignSidebar } from '@/components/campaign/shell/CampaignSidebar' +import { InstallPwaToast } from '@/components/campaign/shell/InstallPwaToast' import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/components/ui/Sidebar' import { Toaster } from '@/components/ui/Toaster' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/liderancas/[id]/page.tsx b/src/app/(campaign)/campanha/(app)/liderancas/[id]/page.tsx index 5894df42..339726e4 100644 --- a/src/app/(campaign)/campanha/(app)/liderancas/[id]/page.tsx +++ b/src/app/(campaign)/campanha/(app)/liderancas/[id]/page.tsx @@ -4,11 +4,11 @@ import Link from 'next/link' import { notFound, redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { LeadershipInternalForm } from '@/components/campaign/LeadershipInternalForm' -import { LeadershipInviteButtons } from '@/components/campaign/LeadershipInviteButtons' -import { StateDeputyChips } from '@/components/campaign/StateDeputyChips' -import { SupportStatusBadge } from '@/components/campaign/SupportStatusBadge' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { LeadershipInternalForm } from '@/components/campaign/leadership/LeadershipInternalForm' +import { LeadershipInviteButtons } from '@/components/campaign/invite/LeadershipInviteButtons' +import { StateDeputyChips } from '@/components/campaign/stateDeputy/StateDeputyChips' +import { SupportStatusBadge } from '@/components/campaign/leadership/SupportStatusBadge' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' diff --git a/src/app/(campaign)/campanha/(app)/liderancas/nova/page.tsx b/src/app/(campaign)/campanha/(app)/liderancas/nova/page.tsx index ab04eb3c..59fa46fb 100644 --- a/src/app/(campaign)/campanha/(app)/liderancas/nova/page.tsx +++ b/src/app/(campaign)/campanha/(app)/liderancas/nova/page.tsx @@ -4,8 +4,8 @@ import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { LeadershipForm } from '@/components/campaign/LeadershipForm' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { LeadershipForm } from '@/components/campaign/leadership/LeadershipForm' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/liderancas/page.tsx b/src/app/(campaign)/campanha/(app)/liderancas/page.tsx index 3bdd7503..b5bd1d67 100644 --- a/src/app/(campaign)/campanha/(app)/liderancas/page.tsx +++ b/src/app/(campaign)/campanha/(app)/liderancas/page.tsx @@ -4,20 +4,20 @@ import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignListEmptyState } from '@/components/campaign/CampaignListEmptyState' -import { CampaignListFooter } from '@/components/campaign/CampaignListFooter' +import { CampaignListEmptyState } from '@/components/campaign/shared/CampaignListEmptyState' +import { CampaignListFooter } from '@/components/campaign/shared/CampaignListFooter' import { CampaignListPendingBoundary, CampaignListResults, -} from '@/components/campaign/CampaignListPending' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { CampaignSearchForm } from '@/components/campaign/CampaignSearchForm' +} from '@/components/campaign/shared/CampaignListPending' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { CampaignSearchForm } from '@/components/campaign/shared/CampaignSearchForm' import { CampaignTable, CampaignTableHead, type CampaignTableColumn, -} from '@/components/campaign/CampaignTable' -import { SupportStatusBadge } from '@/components/campaign/SupportStatusBadge' +} from '@/components/campaign/shared/CampaignTable' +import { SupportStatusBadge } from '@/components/campaign/leadership/SupportStatusBadge' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' diff --git a/src/app/(campaign)/campanha/(app)/loading.tsx b/src/app/(campaign)/campanha/(app)/loading.tsx index 8910d92b..7593710b 100644 --- a/src/app/(campaign)/campanha/(app)/loading.tsx +++ b/src/app/(campaign)/campanha/(app)/loading.tsx @@ -1,4 +1,4 @@ -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' import { Skeleton } from '@/components/ui/skeleton' export default function CampaignDashboardLoading() { diff --git a/src/app/(campaign)/campanha/(app)/municipios/[slug]/editar/page.tsx b/src/app/(campaign)/campanha/(app)/municipios/[slug]/editar/page.tsx index 8009540c..43155d6c 100644 --- a/src/app/(campaign)/campanha/(app)/municipios/[slug]/editar/page.tsx +++ b/src/app/(campaign)/campanha/(app)/municipios/[slug]/editar/page.tsx @@ -4,9 +4,9 @@ import Link from 'next/link' import { notFound, redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { MunicipalityAdvisorsForm } from '@/components/campaign/MunicipalityAdvisorsForm' -import { MunicipalityStrategyForm } from '@/components/campaign/MunicipalityStrategyForm' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { MunicipalityAdvisorsForm } from '@/components/campaign/municipality/MunicipalityAdvisorsForm' +import { MunicipalityStrategyForm } from '@/components/campaign/municipality/MunicipalityStrategyForm' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/municipios/[slug]/page.tsx b/src/app/(campaign)/campanha/(app)/municipios/[slug]/page.tsx index 1317f42a..8690cbe4 100644 --- a/src/app/(campaign)/campanha/(app)/municipios/[slug]/page.tsx +++ b/src/app/(campaign)/campanha/(app)/municipios/[slug]/page.tsx @@ -4,21 +4,21 @@ import Link from 'next/link' import { notFound, redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignListPagination } from '@/components/campaign/CampaignListPagination' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { CandidateComparePicker } from '@/components/campaign/CandidateComparePicker' -import { MunicipalityBaselineCard } from '@/components/campaign/MunicipalityBaselineCard' -import { MunicipalityCandidateComparisonTable } from '@/components/campaign/MunicipalityCandidateComparisonTable' -import { MunicipalityDossier } from '@/components/campaign/MunicipalityDossier' -import { MunicipalityGoalAccountCard } from '@/components/campaign/MunicipalityGoalAccountCard' -import { MunicipalityLeadershipsPanel } from '@/components/campaign/MunicipalityLeadershipsPanel' -import { MunicipalityPledgesPanel } from '@/components/campaign/MunicipalityPledgesPanel' -import { MunicipalityStrategyCard } from '@/components/campaign/MunicipalityStrategyCard' -import { MunicipalityTabNav } from '@/components/campaign/MunicipalityTabNav' -import { MunicipalityUpdateFeed } from '@/components/campaign/MunicipalityUpdateFeed' -import { MunicipalityUpdateForm } from '@/components/campaign/MunicipalityUpdateForm' -import { MunicipalityZoneNeighborhoodsCard } from '@/components/campaign/MunicipalityZoneNeighborhoodsCard' -import { RecentVisitTracker } from '@/components/campaign/RecentVisitTracker' +import { CampaignListPagination } from '@/components/campaign/shared/CampaignListPagination' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { CandidateComparePicker } from '@/components/campaign/map/CandidateComparePicker' +import { MunicipalityBaselineCard } from '@/components/campaign/municipality/MunicipalityBaselineCard' +import { MunicipalityCandidateComparisonTable } from '@/components/campaign/municipality/MunicipalityCandidateComparisonTable' +import { MunicipalityDossier } from '@/components/campaign/municipality/MunicipalityDossier' +import { MunicipalityGoalAccountCard } from '@/components/campaign/municipality/MunicipalityGoalAccountCard' +import { MunicipalityLeadershipsPanel } from '@/components/campaign/municipality/MunicipalityLeadershipsPanel' +import { MunicipalityPledgesPanel } from '@/components/campaign/municipality/MunicipalityPledgesPanel' +import { MunicipalityStrategyCard } from '@/components/campaign/municipality/MunicipalityStrategyCard' +import { MunicipalityTabNav } from '@/components/campaign/municipality/MunicipalityTabNav' +import { MunicipalityUpdateFeed } from '@/components/campaign/municipality/MunicipalityUpdateFeed' +import { MunicipalityUpdateForm } from '@/components/campaign/municipality/MunicipalityUpdateForm' +import { MunicipalityZoneNeighborhoodsCard } from '@/components/campaign/municipality/MunicipalityZoneNeighborhoodsCard' +import { RecentVisitTracker } from '@/components/campaign/dashboard/RecentVisitTracker' import { Badge } from '@/components/ui/Badge' import { isCampaignLeader } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/municipios/loading.tsx b/src/app/(campaign)/campanha/(app)/municipios/loading.tsx index 767b720b..f17c08fc 100644 --- a/src/app/(campaign)/campanha/(app)/municipios/loading.tsx +++ b/src/app/(campaign)/campanha/(app)/municipios/loading.tsx @@ -1,4 +1,4 @@ -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' import { Skeleton } from '@/components/ui/skeleton' /** List-shaped skeleton for /municipios and its detail routes. */ diff --git a/src/app/(campaign)/campanha/(app)/municipios/page.tsx b/src/app/(campaign)/campanha/(app)/municipios/page.tsx index 1ec5d89b..79a9a3af 100644 --- a/src/app/(campaign)/campanha/(app)/municipios/page.tsx +++ b/src/app/(campaign)/campanha/(app)/municipios/page.tsx @@ -1,19 +1,19 @@ import { CampaignListPendingBoundary, CampaignListResults, -} from '@/components/campaign/CampaignListPending' +} from '@/components/campaign/shared/CampaignListPending' import config from '@payload-config' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignListFooter } from '@/components/campaign/CampaignListFooter' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { CampaignScopeBadge } from '@/components/campaign/CampaignScopeBadge' -import { MunicipalityEstimateScenarioProvider } from '@/components/campaign/MunicipalityEstimateScenarioContext' -import { MunicipalityFilters } from '@/components/campaign/MunicipalityFilters' -import { MunicipalityList } from '@/components/campaign/MunicipalityList' -import { MunicipalityListOverview } from '@/components/campaign/MunicipalityListOverview' -import { RecentVisitTracker } from '@/components/campaign/RecentVisitTracker' +import { CampaignListFooter } from '@/components/campaign/shared/CampaignListFooter' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { CampaignScopeBadge } from '@/components/campaign/shared/CampaignScopeBadge' +import { MunicipalityEstimateScenarioProvider } from '@/components/campaign/municipality/MunicipalityEstimateScenarioContext' +import { MunicipalityFilters } from '@/components/campaign/municipality/MunicipalityFilters' +import { MunicipalityList } from '@/components/campaign/municipality/MunicipalityList' +import { MunicipalityListOverview } from '@/components/campaign/municipality/MunicipalityListOverview' +import { RecentVisitTracker } from '@/components/campaign/dashboard/RecentVisitTracker' import { isCampaignCoordinator, isCampaignLeader, diff --git a/src/app/(campaign)/campanha/(app)/organizacoes/[slug]/page.tsx b/src/app/(campaign)/campanha/(app)/organizacoes/[slug]/page.tsx index 3af4ba23..dc5043d4 100644 --- a/src/app/(campaign)/campanha/(app)/organizacoes/[slug]/page.tsx +++ b/src/app/(campaign)/campanha/(app)/organizacoes/[slug]/page.tsx @@ -4,8 +4,8 @@ import Link from 'next/link' import { notFound, redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { OrganizationForm } from '@/components/campaign/OrganizationForm' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { OrganizationForm } from '@/components/campaign/organization/OrganizationForm' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { actionPlanStatusLabels, actionPlanStatuses } from '@/lib/schemas/actionPlan' diff --git a/src/app/(campaign)/campanha/(app)/organizacoes/nova/page.tsx b/src/app/(campaign)/campanha/(app)/organizacoes/nova/page.tsx index 6af8e539..cc6454e0 100644 --- a/src/app/(campaign)/campanha/(app)/organizacoes/nova/page.tsx +++ b/src/app/(campaign)/campanha/(app)/organizacoes/nova/page.tsx @@ -4,8 +4,8 @@ import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { OrganizationForm } from '@/components/campaign/OrganizationForm' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { OrganizationForm } from '@/components/campaign/organization/OrganizationForm' import { Button } from '@/components/ui/button' import { isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/organizacoes/page.tsx b/src/app/(campaign)/campanha/(app)/organizacoes/page.tsx index df1289b6..99d88375 100644 --- a/src/app/(campaign)/campanha/(app)/organizacoes/page.tsx +++ b/src/app/(campaign)/campanha/(app)/organizacoes/page.tsx @@ -4,19 +4,19 @@ import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { CampaignListEmptyState } from '@/components/campaign/CampaignListEmptyState' -import { CampaignListFooter } from '@/components/campaign/CampaignListFooter' +import { CampaignListEmptyState } from '@/components/campaign/shared/CampaignListEmptyState' +import { CampaignListFooter } from '@/components/campaign/shared/CampaignListFooter' import { CampaignListPendingBoundary, CampaignListResults, -} from '@/components/campaign/CampaignListPending' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { CampaignSearchForm } from '@/components/campaign/CampaignSearchForm' +} from '@/components/campaign/shared/CampaignListPending' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { CampaignSearchForm } from '@/components/campaign/shared/CampaignSearchForm' import { CampaignTable, CampaignTableHead, type CampaignTableColumn, -} from '@/components/campaign/CampaignTable' +} from '@/components/campaign/shared/CampaignTable' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { organizationKindLabels } from '@/lib/schemas/organization' diff --git a/src/app/(campaign)/campanha/(app)/page.tsx b/src/app/(campaign)/campanha/(app)/page.tsx index 9148e696..d6c2bf61 100644 --- a/src/app/(campaign)/campanha/(app)/page.tsx +++ b/src/app/(campaign)/campanha/(app)/page.tsx @@ -3,12 +3,12 @@ import { redirect } from 'next/navigation' import { getPayload, type Payload } from 'payload' import { Suspense } from 'react' -import { CampaignDashboard } from '@/components/campaign/CampaignDashboard' -import { LeaderContactsPanel } from '@/components/campaign/LeaderContactsPanel' -import { MunicipalityEstimateScenarioProvider } from '@/components/campaign/MunicipalityEstimateScenarioContext' -import { MunicipalityMapPanelDynamic } from '@/components/campaign/MunicipalityMapPanelDynamic' -import { TerritoryOverviewTable } from '@/components/campaign/TerritoryOverviewTable' -import { campaignPrioritySurfaceClassName } from '@/components/campaign/CampaignPageShell' +import { CampaignDashboard } from '@/components/campaign/dashboard/CampaignDashboard' +import { LeaderContactsPanel } from '@/components/campaign/leadership/LeaderContactsPanel' +import { MunicipalityEstimateScenarioProvider } from '@/components/campaign/municipality/MunicipalityEstimateScenarioContext' +import { MunicipalityMapPanelDynamic } from '@/components/campaign/map/MunicipalityMapPanelDynamic' +import { TerritoryOverviewTable } from '@/components/campaign/municipality/TerritoryOverviewTable' +import { campaignPrioritySurfaceClassName } from '@/components/campaign/shell/CampaignPageShell' import type { CampaignUser } from '@/payload-types' import { isCampaignLeader, isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' diff --git a/src/app/(campaign)/campanha/(app)/perfil/page.tsx b/src/app/(campaign)/campanha/(app)/perfil/page.tsx index 81739038..243b6d85 100644 --- a/src/app/(campaign)/campanha/(app)/perfil/page.tsx +++ b/src/app/(campaign)/campanha/(app)/perfil/page.tsx @@ -1,7 +1,7 @@ import type { Metadata } from 'next' import { redirect } from 'next/navigation' -import { CampaignProfileSettings } from '@/components/campaign/CampaignProfileSettings' +import { CampaignProfileSettings } from '@/components/campaign/auth/CampaignProfileSettings' import { getCampaignUser } from '@/utilities/campaignAuth' import { campaignUserShellView } from '@/utilities/campaignUserProfile' diff --git a/src/app/(campaign)/campanha/(app)/planos/[slug]/editar/page.tsx b/src/app/(campaign)/campanha/(app)/planos/[slug]/editar/page.tsx index 98cf1d01..34bc0eb0 100644 --- a/src/app/(campaign)/campanha/(app)/planos/[slug]/editar/page.tsx +++ b/src/app/(campaign)/campanha/(app)/planos/[slug]/editar/page.tsx @@ -7,7 +7,7 @@ import { searchActionPlanLeadershipOptionsAction, } from '@/app/(campaign)/campanha/(app)/planos/contactSearchActions' import { updateActionPlanFormAction } from '@/app/(campaign)/campanha/(app)/planos/formActions' -import { ActionPlanForm } from '@/components/campaign/ActionPlanForm' +import { ActionPlanForm } from '@/components/campaign/actionPlan/ActionPlanForm' import { isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' import { diff --git a/src/app/(campaign)/campanha/(app)/planos/[slug]/page.tsx b/src/app/(campaign)/campanha/(app)/planos/[slug]/page.tsx index d5e927e9..cfdb3859 100644 --- a/src/app/(campaign)/campanha/(app)/planos/[slug]/page.tsx +++ b/src/app/(campaign)/campanha/(app)/planos/[slug]/page.tsx @@ -7,13 +7,13 @@ import { getPayload } from 'payload' import { CancelActionPlanDialog, MarkActionPlanRealizedDialog, -} from '@/components/campaign/ActionPlanLifecycleDialog' -import { ActionPlanResultForm } from '@/components/campaign/ActionPlanResultForm' -import { ActionPlanStatusBadge } from '@/components/campaign/ActionPlanStatusBadge' -import { ActionPlanTabNav } from '@/components/campaign/ActionPlanTabNav' -import { ActionPlanTaskChecklist } from '@/components/campaign/ActionPlanTaskChecklist' -import { ActionPlanUpdateFeed } from '@/components/campaign/ActionPlanUpdateFeed' -import { ActionPlanUpdateForm } from '@/components/campaign/ActionPlanUpdateForm' +} from '@/components/campaign/actionPlan/ActionPlanLifecycleDialog' +import { ActionPlanResultForm } from '@/components/campaign/actionPlan/ActionPlanResultForm' +import { ActionPlanStatusBadge } from '@/components/campaign/actionPlan/ActionPlanStatusBadge' +import { ActionPlanTabNav } from '@/components/campaign/actionPlan/ActionPlanTabNav' +import { ActionPlanTaskChecklist } from '@/components/campaign/actionPlan/ActionPlanTaskChecklist' +import { ActionPlanUpdateFeed } from '@/components/campaign/actionPlan/ActionPlanUpdateFeed' +import { ActionPlanUpdateForm } from '@/components/campaign/actionPlan/ActionPlanUpdateForm' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' diff --git a/src/app/(campaign)/campanha/(app)/planos/contactSearchActions.ts b/src/app/(campaign)/campanha/(app)/planos/contactSearchActions.ts index 5ec6d03f..e19d2906 100644 --- a/src/app/(campaign)/campanha/(app)/planos/contactSearchActions.ts +++ b/src/app/(campaign)/campanha/(app)/planos/contactSearchActions.ts @@ -3,7 +3,7 @@ import config from '@payload-config' import { getPayload } from 'payload' -import type { ContactComboboxOption } from '@/components/campaign/ContactCombobox' +import type { ContactComboboxOption } from '@/components/campaign/shared/ContactCombobox' import { isContactSearchQueryReady, normalizeContactSearchQuery, diff --git a/src/app/(campaign)/campanha/(app)/planos/formActions.ts b/src/app/(campaign)/campanha/(app)/planos/formActions.ts index 68d5fd7d..a76fc8b2 100644 --- a/src/app/(campaign)/campanha/(app)/planos/formActions.ts +++ b/src/app/(campaign)/campanha/(app)/planos/formActions.ts @@ -5,7 +5,7 @@ import { getPayload } from 'payload' import { redirect } from 'next/navigation' import { createActionPlan, updateActionPlan } from '@/app/(campaign)/campanha/actions/actionPlan' -import type { ActionPlanFormState } from '@/components/campaign/ActionPlanForm' +import type { ActionPlanFormState } from '@/components/campaign/actionPlan/ActionPlanForm' import { optionalFormText } from '@/lib/formData' import { getCampaignUser } from '@/utilities/campaignAuth' import { mapCampaignFormActionError } from '@/utilities/campaignFormActionError' diff --git a/src/app/(campaign)/campanha/(app)/planos/novo/page.tsx b/src/app/(campaign)/campanha/(app)/planos/novo/page.tsx index 751a8674..5524caa7 100644 --- a/src/app/(campaign)/campanha/(app)/planos/novo/page.tsx +++ b/src/app/(campaign)/campanha/(app)/planos/novo/page.tsx @@ -7,7 +7,7 @@ import { searchActionPlanLeadershipOptionsAction, } from '@/app/(campaign)/campanha/(app)/planos/contactSearchActions' import { createActionPlanFormAction } from '@/app/(campaign)/campanha/(app)/planos/formActions' -import { ActionPlanForm } from '@/components/campaign/ActionPlanForm' +import { ActionPlanForm } from '@/components/campaign/actionPlan/ActionPlanForm' import { isCampaignStaff } from '@/utilities/campaignAccess' import { getCampaignUser } from '@/utilities/campaignAuth' import { loadOrganizationOptions, loadMunicipalityOptions } from '@/utilities/campaignRelationOptions' diff --git a/src/app/(campaign)/campanha/(app)/planos/page.tsx b/src/app/(campaign)/campanha/(app)/planos/page.tsx index ba9ae72b..eddf0599 100644 --- a/src/app/(campaign)/campanha/(app)/planos/page.tsx +++ b/src/app/(campaign)/campanha/(app)/planos/page.tsx @@ -1,18 +1,18 @@ import { CampaignListPendingBoundary, CampaignListResults, -} from '@/components/campaign/CampaignListPending' +} from '@/components/campaign/shared/CampaignListPending' import config from '@payload-config' import { PlusIcon, SearchXIcon } from 'lucide-react' import Link from 'next/link' import { redirect } from 'next/navigation' import { getPayload } from 'payload' -import { ActionPlanFilters } from '@/components/campaign/ActionPlanFilters' -import { ActionPlanList } from '@/components/campaign/ActionPlanList' -import { CampaignListEmptyState } from '@/components/campaign/CampaignListEmptyState' -import { CampaignListFooter } from '@/components/campaign/CampaignListFooter' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' +import { ActionPlanFilters } from '@/components/campaign/actionPlan/ActionPlanFilters' +import { ActionPlanList } from '@/components/campaign/actionPlan/ActionPlanList' +import { CampaignListEmptyState } from '@/components/campaign/shared/CampaignListEmptyState' +import { CampaignListFooter } from '@/components/campaign/shared/CampaignListFooter' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' import { Button } from '@/components/ui/button' import type { ActionPlan } from '@/payload-types' import { loadActionPlanListPageData } from '@/utilities/actionPlanPageData' diff --git a/src/app/(campaign)/campanha/convite/[token]/page.tsx b/src/app/(campaign)/campanha/convite/[token]/page.tsx index 0061fd5c..b104831c 100644 --- a/src/app/(campaign)/campanha/convite/[token]/page.tsx +++ b/src/app/(campaign)/campanha/convite/[token]/page.tsx @@ -7,9 +7,9 @@ import { redeemCampaignInviteAutofillFormAction, redeemCampaignInviteLoginFormAction, } from '@/app/(campaign)/campanha/convite/[token]/formActions' -import { CampaignInviteForm } from '@/components/campaign/CampaignInviteForm' -import { ConsentText } from '@/components/campaign/ConsentText' -import { InvalidCampaignInvite } from '@/components/campaign/InvalidCampaignInvite' +import { CampaignInviteForm } from '@/components/campaign/invite/CampaignInviteForm' +import { ConsentText } from '@/components/campaign/shared/ConsentText' +import { InvalidCampaignInvite } from '@/components/campaign/invite/InvalidCampaignInvite' import { getCampaignInvitePageData } from '@/utilities/campaignInvitePageData' export const dynamic = 'force-dynamic' diff --git a/src/app/(campaign)/campanha/esqueci-senha/ForgotPasswordForm.tsx b/src/app/(campaign)/campanha/esqueci-senha/ForgotPasswordForm.tsx index e9197fa6..8e31d084 100644 --- a/src/app/(campaign)/campanha/esqueci-senha/ForgotPasswordForm.tsx +++ b/src/app/(campaign)/campanha/esqueci-senha/ForgotPasswordForm.tsx @@ -3,8 +3,8 @@ import { useActionState } from 'react' import { requestCampaignPasswordResetFormAction } from '@/app/(campaign)/campanha/actions/password' -import { CampaignAuthBackToLoginLink } from '@/components/campaign/CampaignAuthBackToLoginLink' -import { CampaignAuthCardHeader } from '@/components/campaign/CampaignAuthCardHeader' +import { CampaignAuthBackToLoginLink } from '@/components/campaign/auth/CampaignAuthBackToLoginLink' +import { CampaignAuthCardHeader } from '@/components/campaign/auth/CampaignAuthCardHeader' import { Button } from '@/components/ui/button' import { Card, CardContent } from '@/components/ui/card' import { Field, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field' diff --git a/src/app/(campaign)/campanha/esqueci-senha/page.tsx b/src/app/(campaign)/campanha/esqueci-senha/page.tsx index 80148927..995cf5c8 100644 --- a/src/app/(campaign)/campanha/esqueci-senha/page.tsx +++ b/src/app/(campaign)/campanha/esqueci-senha/page.tsx @@ -2,7 +2,7 @@ import type { Metadata } from 'next' import { redirect } from 'next/navigation' import { ForgotPasswordForm } from '@/app/(campaign)/campanha/esqueci-senha/ForgotPasswordForm' -import { CampaignAuthPageShell } from '@/components/campaign/CampaignAuthPageShell' +import { CampaignAuthPageShell } from '@/components/campaign/auth/CampaignAuthPageShell' import { getCampaignUser } from '@/utilities/campaignAuth' export const metadata: Metadata = { diff --git a/src/app/(campaign)/campanha/login/LoginForm.tsx b/src/app/(campaign)/campanha/login/LoginForm.tsx index f6ebfe6c..12026a41 100644 --- a/src/app/(campaign)/campanha/login/LoginForm.tsx +++ b/src/app/(campaign)/campanha/login/LoginForm.tsx @@ -4,7 +4,7 @@ import Link from 'next/link' import { useActionState, useState } from 'react' import { loginCampaignFormAction, type LoginResult } from '@/app/(campaign)/campanha/actions/auth' -import { CampaignAuthCardHeader } from '@/components/campaign/CampaignAuthCardHeader' +import { CampaignAuthCardHeader } from '@/components/campaign/auth/CampaignAuthCardHeader' import { Button } from '@/components/ui/button' import { Card, CardContent } from '@/components/ui/card' import { Field, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field' diff --git a/src/app/(campaign)/campanha/login/page.tsx b/src/app/(campaign)/campanha/login/page.tsx index 913a25c7..5bab2972 100644 --- a/src/app/(campaign)/campanha/login/page.tsx +++ b/src/app/(campaign)/campanha/login/page.tsx @@ -1,7 +1,7 @@ import type { Metadata } from 'next' import { redirect } from 'next/navigation' -import { CampaignAuthPageShell } from '@/components/campaign/CampaignAuthPageShell' +import { CampaignAuthPageShell } from '@/components/campaign/auth/CampaignAuthPageShell' import { getCampaignUser } from '@/utilities/campaignAuth' import { LoginForm } from './LoginForm' diff --git a/src/app/(campaign)/campanha/redefinir-senha/ResetPasswordForm.tsx b/src/app/(campaign)/campanha/redefinir-senha/ResetPasswordForm.tsx index 98983a77..1fc37422 100644 --- a/src/app/(campaign)/campanha/redefinir-senha/ResetPasswordForm.tsx +++ b/src/app/(campaign)/campanha/redefinir-senha/ResetPasswordForm.tsx @@ -3,8 +3,8 @@ import { useActionState } from 'react' import { resetCampaignPasswordFormAction } from '@/app/(campaign)/campanha/actions/password' -import { CampaignAuthBackToLoginLink } from '@/components/campaign/CampaignAuthBackToLoginLink' -import { CampaignAuthCardHeader } from '@/components/campaign/CampaignAuthCardHeader' +import { CampaignAuthBackToLoginLink } from '@/components/campaign/auth/CampaignAuthBackToLoginLink' +import { CampaignAuthCardHeader } from '@/components/campaign/auth/CampaignAuthCardHeader' import { Button } from '@/components/ui/button' import { Card, CardContent } from '@/components/ui/card' import { Field, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field' diff --git a/src/app/(campaign)/campanha/redefinir-senha/page.tsx b/src/app/(campaign)/campanha/redefinir-senha/page.tsx index d2a90d71..3d1f7d18 100644 --- a/src/app/(campaign)/campanha/redefinir-senha/page.tsx +++ b/src/app/(campaign)/campanha/redefinir-senha/page.tsx @@ -3,8 +3,8 @@ import Link from 'next/link' import { redirect } from 'next/navigation' import { ResetPasswordForm } from '@/app/(campaign)/campanha/redefinir-senha/ResetPasswordForm' -import { CampaignAuthCardHeader } from '@/components/campaign/CampaignAuthCardHeader' -import { CampaignAuthPageShell } from '@/components/campaign/CampaignAuthPageShell' +import { CampaignAuthCardHeader } from '@/components/campaign/auth/CampaignAuthCardHeader' +import { CampaignAuthPageShell } from '@/components/campaign/auth/CampaignAuthPageShell' import { Button } from '@/components/ui/button' import { Card, CardContent } from '@/components/ui/card' import { CAMPAIGN_PASSWORD_RESET_TOKEN_MIN_LENGTH } from '@/lib/schemas/campaignPassword' diff --git a/src/app/(campaign)/layout.tsx b/src/app/(campaign)/layout.tsx index d0597864..1acd6028 100644 --- a/src/app/(campaign)/layout.tsx +++ b/src/app/(campaign)/layout.tsx @@ -2,7 +2,7 @@ import type { Metadata, Viewport } from 'next' import { Inter } from 'next/font/google' import React from 'react' -import { RegisterServiceWorker } from '@/components/campaign/RegisterServiceWorker' +import { RegisterServiceWorker } from '@/components/campaign/shell/RegisterServiceWorker' import { CAMPAIGN_PWA_MANIFEST_PATH, CAMPAIGN_PWA_THEME_COLOR } from '@/utilities/campaignPwa' import '../(frontend)/styles.css' diff --git a/src/components/campaign/ActionPlanCard.tsx b/src/components/campaign/actionPlan/ActionPlanCard.tsx similarity index 96% rename from src/components/campaign/ActionPlanCard.tsx rename to src/components/campaign/actionPlan/ActionPlanCard.tsx index 1816d1c2..17779ed9 100644 --- a/src/components/campaign/ActionPlanCard.tsx +++ b/src/components/campaign/actionPlan/ActionPlanCard.tsx @@ -1,7 +1,7 @@ import Link from 'next/link' import { CalendarIcon, MapPinIcon, UserIcon } from 'lucide-react' -import { ActionPlanStatusBadge } from '@/components/campaign/ActionPlanStatusBadge' +import { ActionPlanStatusBadge } from '@/components/campaign/actionPlan/ActionPlanStatusBadge' import { Badge } from '@/components/ui/Badge' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { actionPlanKindLabels } from '@/lib/schemas/actionPlan' diff --git a/src/components/campaign/ActionPlanDemandFields.tsx b/src/components/campaign/actionPlan/ActionPlanDemandFields.tsx similarity index 100% rename from src/components/campaign/ActionPlanDemandFields.tsx rename to src/components/campaign/actionPlan/ActionPlanDemandFields.tsx diff --git a/src/components/campaign/ActionPlanFilters.tsx b/src/components/campaign/actionPlan/ActionPlanFilters.tsx similarity index 97% rename from src/components/campaign/ActionPlanFilters.tsx rename to src/components/campaign/actionPlan/ActionPlanFilters.tsx index bbac25cc..e066ebab 100644 --- a/src/components/campaign/ActionPlanFilters.tsx +++ b/src/components/campaign/actionPlan/ActionPlanFilters.tsx @@ -1,12 +1,12 @@ 'use client' -import { useCampaignListPending } from '@/components/campaign/CampaignListPending' +import { useCampaignListPending } from '@/components/campaign/shared/CampaignListPending' import { useRef, useState, useTransition } from 'react' import Link from 'next/link' import { usePathname, useRouter } from 'next/navigation' import { ChevronDownIcon, FilterIcon, XIcon } from 'lucide-react' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import { Button } from '@/components/ui/button' import { Field, FieldLabel } from '@/components/ui/field' import { NativeSelect, NativeSelectOption } from '@/components/ui/native-select' diff --git a/src/components/campaign/ActionPlanForm.tsx b/src/components/campaign/actionPlan/ActionPlanForm.tsx similarity index 98% rename from src/components/campaign/ActionPlanForm.tsx rename to src/components/campaign/actionPlan/ActionPlanForm.tsx index 3246e710..58c7dba9 100644 --- a/src/components/campaign/ActionPlanForm.tsx +++ b/src/components/campaign/actionPlan/ActionPlanForm.tsx @@ -3,11 +3,11 @@ import { useActionState, useState } from 'react' import Link from 'next/link' -import { AsyncSearchCombobox } from '@/components/campaign/AsyncSearchCombobox' -import { ActionPlanDemandFields } from '@/components/campaign/ActionPlanDemandFields' -import { ContactCombobox, type ContactComboboxOption } from '@/components/campaign/ContactCombobox' -import { ActionPlanTaskFields } from '@/components/campaign/ActionPlanTaskFields' -import { RelationMultiSelect, type RelationOption } from '@/components/campaign/RelationMultiSelect' +import { AsyncSearchCombobox } from '@/components/campaign/shared/AsyncSearchCombobox' +import { ActionPlanDemandFields } from '@/components/campaign/actionPlan/ActionPlanDemandFields' +import { ContactCombobox, type ContactComboboxOption } from '@/components/campaign/shared/ContactCombobox' +import { ActionPlanTaskFields } from '@/components/campaign/actionPlan/ActionPlanTaskFields' +import { RelationMultiSelect, type RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' diff --git a/src/components/campaign/ActionPlanLifecycleDialog.tsx b/src/components/campaign/actionPlan/ActionPlanLifecycleDialog.tsx similarity index 100% rename from src/components/campaign/ActionPlanLifecycleDialog.tsx rename to src/components/campaign/actionPlan/ActionPlanLifecycleDialog.tsx diff --git a/src/components/campaign/ActionPlanList.tsx b/src/components/campaign/actionPlan/ActionPlanList.tsx similarity index 80% rename from src/components/campaign/ActionPlanList.tsx rename to src/components/campaign/actionPlan/ActionPlanList.tsx index a0111b70..85e772b8 100644 --- a/src/components/campaign/ActionPlanList.tsx +++ b/src/components/campaign/actionPlan/ActionPlanList.tsx @@ -1,4 +1,4 @@ -import { ActionPlanCard } from '@/components/campaign/ActionPlanCard' +import { ActionPlanCard } from '@/components/campaign/actionPlan/ActionPlanCard' import type { ActionPlanListViewModel } from '@/utilities/actionPlanViewModels' export const ActionPlanList = ({ plans }: { plans: ActionPlanListViewModel[] }) => ( diff --git a/src/components/campaign/ActionPlanResultForm.tsx b/src/components/campaign/actionPlan/ActionPlanResultForm.tsx similarity index 100% rename from src/components/campaign/ActionPlanResultForm.tsx rename to src/components/campaign/actionPlan/ActionPlanResultForm.tsx diff --git a/src/components/campaign/ActionPlanStatusBadge.tsx b/src/components/campaign/actionPlan/ActionPlanStatusBadge.tsx similarity index 100% rename from src/components/campaign/ActionPlanStatusBadge.tsx rename to src/components/campaign/actionPlan/ActionPlanStatusBadge.tsx diff --git a/src/components/campaign/ActionPlanTabNav.tsx b/src/components/campaign/actionPlan/ActionPlanTabNav.tsx similarity index 100% rename from src/components/campaign/ActionPlanTabNav.tsx rename to src/components/campaign/actionPlan/ActionPlanTabNav.tsx diff --git a/src/components/campaign/ActionPlanTaskChecklist.tsx b/src/components/campaign/actionPlan/ActionPlanTaskChecklist.tsx similarity index 100% rename from src/components/campaign/ActionPlanTaskChecklist.tsx rename to src/components/campaign/actionPlan/ActionPlanTaskChecklist.tsx diff --git a/src/components/campaign/ActionPlanTaskFields.tsx b/src/components/campaign/actionPlan/ActionPlanTaskFields.tsx similarity index 99% rename from src/components/campaign/ActionPlanTaskFields.tsx rename to src/components/campaign/actionPlan/ActionPlanTaskFields.tsx index 2bcc39c9..5980536c 100644 --- a/src/components/campaign/ActionPlanTaskFields.tsx +++ b/src/components/campaign/actionPlan/ActionPlanTaskFields.tsx @@ -3,7 +3,7 @@ import { useId, useState } from 'react' import { PlusIcon, Trash2Icon } from 'lucide-react' -import { ContactCombobox, type ContactComboboxOption } from '@/components/campaign/ContactCombobox' +import { ContactCombobox, type ContactComboboxOption } from '@/components/campaign/shared/ContactCombobox' import { Button } from '@/components/ui/button' import { Field, FieldError, FieldLabel } from '@/components/ui/field' import { Input } from '@/components/ui/input' diff --git a/src/components/campaign/ActionPlanUpdateFeed.tsx b/src/components/campaign/actionPlan/ActionPlanUpdateFeed.tsx similarity index 100% rename from src/components/campaign/ActionPlanUpdateFeed.tsx rename to src/components/campaign/actionPlan/ActionPlanUpdateFeed.tsx diff --git a/src/components/campaign/ActionPlanUpdateForm.tsx b/src/components/campaign/actionPlan/ActionPlanUpdateForm.tsx similarity index 100% rename from src/components/campaign/ActionPlanUpdateForm.tsx rename to src/components/campaign/actionPlan/ActionPlanUpdateForm.tsx diff --git a/src/components/campaign/AdvisorDebouncedTextCell.tsx b/src/components/campaign/advisor/AdvisorDebouncedTextCell.tsx similarity index 100% rename from src/components/campaign/AdvisorDebouncedTextCell.tsx rename to src/components/campaign/advisor/AdvisorDebouncedTextCell.tsx diff --git a/src/components/campaign/AdvisorMunicipalityCell.tsx b/src/components/campaign/advisor/AdvisorMunicipalityCell.tsx similarity index 100% rename from src/components/campaign/AdvisorMunicipalityCell.tsx rename to src/components/campaign/advisor/AdvisorMunicipalityCell.tsx diff --git a/src/components/campaign/AdvisorPasswordResetButton.tsx b/src/components/campaign/advisor/AdvisorPasswordResetButton.tsx similarity index 100% rename from src/components/campaign/AdvisorPasswordResetButton.tsx rename to src/components/campaign/advisor/AdvisorPasswordResetButton.tsx diff --git a/src/components/campaign/AdvisorsTable.tsx b/src/components/campaign/advisor/AdvisorsTable.tsx similarity index 98% rename from src/components/campaign/AdvisorsTable.tsx rename to src/components/campaign/advisor/AdvisorsTable.tsx index 0084cedc..ce70c4be 100644 --- a/src/components/campaign/AdvisorsTable.tsx +++ b/src/components/campaign/advisor/AdvisorsTable.tsx @@ -14,10 +14,10 @@ import { useRouter } from 'next/navigation' import { useState, useTransition } from 'react' import { toast } from 'sonner' -import { AdvisorDebouncedTextCell } from '@/components/campaign/AdvisorDebouncedTextCell' -import { AdvisorMunicipalityCell } from '@/components/campaign/AdvisorMunicipalityCell' -import { AdvisorPasswordResetButton } from '@/components/campaign/AdvisorPasswordResetButton' -import { CampaignListEmptyState } from '@/components/campaign/CampaignListEmptyState' +import { AdvisorDebouncedTextCell } from '@/components/campaign/advisor/AdvisorDebouncedTextCell' +import { AdvisorMunicipalityCell } from '@/components/campaign/advisor/AdvisorMunicipalityCell' +import { AdvisorPasswordResetButton } from '@/components/campaign/advisor/AdvisorPasswordResetButton' +import { CampaignListEmptyState } from '@/components/campaign/shared/CampaignListEmptyState' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { Spinner } from '@/components/ui/Spinner' diff --git a/src/components/campaign/CampaignAuthBackToLoginLink.tsx b/src/components/campaign/auth/CampaignAuthBackToLoginLink.tsx similarity index 100% rename from src/components/campaign/CampaignAuthBackToLoginLink.tsx rename to src/components/campaign/auth/CampaignAuthBackToLoginLink.tsx diff --git a/src/components/campaign/CampaignAuthCardHeader.tsx b/src/components/campaign/auth/CampaignAuthCardHeader.tsx similarity index 100% rename from src/components/campaign/CampaignAuthCardHeader.tsx rename to src/components/campaign/auth/CampaignAuthCardHeader.tsx diff --git a/src/components/campaign/CampaignAuthPageShell.tsx b/src/components/campaign/auth/CampaignAuthPageShell.tsx similarity index 90% rename from src/components/campaign/CampaignAuthPageShell.tsx rename to src/components/campaign/auth/CampaignAuthPageShell.tsx index 3f7e8ebf..79e31ec4 100644 --- a/src/components/campaign/CampaignAuthPageShell.tsx +++ b/src/components/campaign/auth/CampaignAuthPageShell.tsx @@ -1,6 +1,6 @@ import type { ComponentProps, ReactNode } from 'react' -import { CampaignLogo } from '@/components/campaign/campaign-logo' +import { CampaignLogo } from '@/components/campaign/shell/campaign-logo' import { cn } from '@/lib/utils' type CampaignAuthPageShellProps = { diff --git a/src/components/campaign/CampaignProfileSettings.tsx b/src/components/campaign/auth/CampaignProfileSettings.tsx similarity index 98% rename from src/components/campaign/CampaignProfileSettings.tsx rename to src/components/campaign/auth/CampaignProfileSettings.tsx index 23316783..c8a58f7f 100644 --- a/src/components/campaign/CampaignProfileSettings.tsx +++ b/src/components/campaign/auth/CampaignProfileSettings.tsx @@ -7,7 +7,7 @@ import { removeCampaignAvatarFormAction, updateCampaignAvatarFormAction, } from '@/app/(campaign)/campanha/actions/profile' -import { CampaignUserAvatar } from '@/components/campaign/CampaignUserAvatar' +import { CampaignUserAvatar } from '@/components/campaign/shared/CampaignUserAvatar' import { Button } from '@/components/ui/button' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Field, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field' diff --git a/src/components/campaign/CampaignDashboard.tsx b/src/components/campaign/dashboard/CampaignDashboard.tsx similarity index 96% rename from src/components/campaign/CampaignDashboard.tsx rename to src/components/campaign/dashboard/CampaignDashboard.tsx index f553c73e..a02ee555 100644 --- a/src/components/campaign/CampaignDashboard.tsx +++ b/src/components/campaign/dashboard/CampaignDashboard.tsx @@ -3,12 +3,12 @@ import Link from 'next/link' import type { ReactNode } from 'react' -import { CampaignMetricStrip } from '@/components/campaign/CampaignMetricStrip' +import { CampaignMetricStrip } from '@/components/campaign/shared/CampaignMetricStrip' import { CampaignPageShell, campaignPrioritySurfaceClassName, -} from '@/components/campaign/CampaignPageShell' -import { RecentlyVisitedCard } from '@/components/campaign/RecentlyVisitedCard' +} from '@/components/campaign/shell/CampaignPageShell' +import { RecentlyVisitedCard } from '@/components/campaign/dashboard/RecentlyVisitedCard' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { formatElectionNumber } from '@/lib/electionInsights' diff --git a/src/components/campaign/CampaignDataFreshness.tsx b/src/components/campaign/dashboard/CampaignDataFreshness.tsx similarity index 100% rename from src/components/campaign/CampaignDataFreshness.tsx rename to src/components/campaign/dashboard/CampaignDataFreshness.tsx diff --git a/src/components/campaign/RecentVisitTracker.tsx b/src/components/campaign/dashboard/RecentVisitTracker.tsx similarity index 100% rename from src/components/campaign/RecentVisitTracker.tsx rename to src/components/campaign/dashboard/RecentVisitTracker.tsx diff --git a/src/components/campaign/RecentlyVisitedCard.tsx b/src/components/campaign/dashboard/RecentlyVisitedCard.tsx similarity index 100% rename from src/components/campaign/RecentlyVisitedCard.tsx rename to src/components/campaign/dashboard/RecentlyVisitedCard.tsx diff --git a/src/components/campaign/DemandForm.tsx b/src/components/campaign/demand/DemandForm.tsx similarity index 98% rename from src/components/campaign/DemandForm.tsx rename to src/components/campaign/demand/DemandForm.tsx index cec55496..293647df 100644 --- a/src/components/campaign/DemandForm.tsx +++ b/src/components/campaign/demand/DemandForm.tsx @@ -2,7 +2,7 @@ import { useActionState, useState } from 'react' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import { Alert, AlertDescription } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' import { Field, FieldDescription, FieldError, FieldLabel } from '@/components/ui/field' diff --git a/src/components/campaign/DemandWorkflowCard.tsx b/src/components/campaign/demand/DemandWorkflowCard.tsx similarity index 100% rename from src/components/campaign/DemandWorkflowCard.tsx rename to src/components/campaign/demand/DemandWorkflowCard.tsx diff --git a/src/components/campaign/CampaignInviteForm.tsx b/src/components/campaign/invite/CampaignInviteForm.tsx similarity index 100% rename from src/components/campaign/CampaignInviteForm.tsx rename to src/components/campaign/invite/CampaignInviteForm.tsx diff --git a/src/components/campaign/InvalidCampaignInvite.tsx b/src/components/campaign/invite/InvalidCampaignInvite.tsx similarity index 100% rename from src/components/campaign/InvalidCampaignInvite.tsx rename to src/components/campaign/invite/InvalidCampaignInvite.tsx diff --git a/src/components/campaign/LeadershipInviteButtons.tsx b/src/components/campaign/invite/LeadershipInviteButtons.tsx similarity index 100% rename from src/components/campaign/LeadershipInviteButtons.tsx rename to src/components/campaign/invite/LeadershipInviteButtons.tsx diff --git a/src/components/campaign/LeaderContactForm.tsx b/src/components/campaign/leadership/LeaderContactForm.tsx similarity index 98% rename from src/components/campaign/LeaderContactForm.tsx rename to src/components/campaign/leadership/LeaderContactForm.tsx index d5e944b0..a4dcf9bb 100644 --- a/src/components/campaign/LeaderContactForm.tsx +++ b/src/components/campaign/leadership/LeaderContactForm.tsx @@ -8,8 +8,8 @@ import { createLeaderSupporterFormAction, type LeaderSupporterFormState, } from '@/app/(campaign)/campanha/actions/leaderSupporter' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' -import { StrictCombobox } from '@/components/campaign/StrictCombobox' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' +import { StrictCombobox } from '@/components/campaign/shared/StrictCombobox' import { FormattedInput } from '@/components/FormattedInput' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' diff --git a/src/components/campaign/LeaderContactsPanel.tsx b/src/components/campaign/leadership/LeaderContactsPanel.tsx similarity index 94% rename from src/components/campaign/LeaderContactsPanel.tsx rename to src/components/campaign/leadership/LeaderContactsPanel.tsx index dfe64e4d..f158c17e 100644 --- a/src/components/campaign/LeaderContactsPanel.tsx +++ b/src/components/campaign/leadership/LeaderContactsPanel.tsx @@ -1,8 +1,8 @@ import { PhoneIcon } from 'lucide-react' -import { CampaignPageShell } from '@/components/campaign/CampaignPageShell' -import { LeaderContactForm } from '@/components/campaign/LeaderContactForm' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' +import { CampaignPageShell } from '@/components/campaign/shell/CampaignPageShell' +import { LeaderContactForm } from '@/components/campaign/leadership/LeaderContactForm' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import { Table, TableBody, diff --git a/src/components/campaign/LeadershipForm.tsx b/src/components/campaign/leadership/LeadershipForm.tsx similarity index 99% rename from src/components/campaign/LeadershipForm.tsx rename to src/components/campaign/leadership/LeadershipForm.tsx index 1733a4a2..6efb3384 100644 --- a/src/components/campaign/LeadershipForm.tsx +++ b/src/components/campaign/leadership/LeadershipForm.tsx @@ -2,7 +2,7 @@ import { useActionState } from 'react' -import { RelationMultiSelect, type RelationOption } from '@/components/campaign/RelationMultiSelect' +import { RelationMultiSelect, type RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import { Alert, AlertDescription } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' import { Field, FieldError, FieldLabel } from '@/components/ui/field' diff --git a/src/components/campaign/LeadershipInternalForm.tsx b/src/components/campaign/leadership/LeadershipInternalForm.tsx similarity index 99% rename from src/components/campaign/LeadershipInternalForm.tsx rename to src/components/campaign/leadership/LeadershipInternalForm.tsx index 6b33cdbd..7c5ba6f0 100644 --- a/src/components/campaign/LeadershipInternalForm.tsx +++ b/src/components/campaign/leadership/LeadershipInternalForm.tsx @@ -2,7 +2,7 @@ import { useActionState } from 'react' -import { RelationMultiSelect, type RelationOption } from '@/components/campaign/RelationMultiSelect' +import { RelationMultiSelect, type RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import { Alert, AlertDescription } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' import { Field, FieldLabel } from '@/components/ui/field' diff --git a/src/components/campaign/SupportStatusBadge.tsx b/src/components/campaign/leadership/SupportStatusBadge.tsx similarity index 100% rename from src/components/campaign/SupportStatusBadge.tsx rename to src/components/campaign/leadership/SupportStatusBadge.tsx diff --git a/src/components/campaign/BahiaMap.tsx b/src/components/campaign/map/BahiaMap.tsx similarity index 100% rename from src/components/campaign/BahiaMap.tsx rename to src/components/campaign/map/BahiaMap.tsx diff --git a/src/components/campaign/CandidateComparePicker.tsx b/src/components/campaign/map/CandidateComparePicker.tsx similarity index 100% rename from src/components/campaign/CandidateComparePicker.tsx rename to src/components/campaign/map/CandidateComparePicker.tsx diff --git a/src/components/campaign/ChoroplethLegend.tsx b/src/components/campaign/map/ChoroplethLegend.tsx similarity index 100% rename from src/components/campaign/ChoroplethLegend.tsx rename to src/components/campaign/map/ChoroplethLegend.tsx diff --git a/src/components/campaign/MapFeatureReadout.tsx b/src/components/campaign/map/MapFeatureReadout.tsx similarity index 99% rename from src/components/campaign/MapFeatureReadout.tsx rename to src/components/campaign/map/MapFeatureReadout.tsx index fa9b0c47..2603a94a 100644 --- a/src/components/campaign/MapFeatureReadout.tsx +++ b/src/components/campaign/map/MapFeatureReadout.tsx @@ -1,6 +1,6 @@ import Link from 'next/link' -import type { BahiaMapFeatureInfo } from '@/components/campaign/BahiaMap' +import type { BahiaMapFeatureInfo } from '@/components/campaign/map/BahiaMap' import { Button } from '@/components/ui/button' import { formatElectionNumber } from '@/lib/electionInsights' import type { MunicipalityMapNavigation } from '@/utilities/municipalityMapNavigation' diff --git a/src/components/campaign/MunicipalityMapPanel.tsx b/src/components/campaign/map/MunicipalityMapPanel.tsx similarity index 98% rename from src/components/campaign/MunicipalityMapPanel.tsx rename to src/components/campaign/map/MunicipalityMapPanel.tsx index ca346240..46c24337 100644 --- a/src/components/campaign/MunicipalityMapPanel.tsx +++ b/src/components/campaign/map/MunicipalityMapPanel.tsx @@ -4,14 +4,14 @@ import Link from 'next/link' import { usePathname, useRouter, useSearchParams } from 'next/navigation' import { useCallback, useMemo, useRef, useState, useTransition } from 'react' -import { BahiaMap, type BahiaMapFeatureInfo } from '@/components/campaign/BahiaMap' -import { ChoroplethLegend } from '@/components/campaign/ChoroplethLegend' -import { MapFeatureReadout } from '@/components/campaign/MapFeatureReadout' -import { useMunicipalityEstimateScenarioOptional } from '@/components/campaign/MunicipalityEstimateScenarioContext' +import { BahiaMap, type BahiaMapFeatureInfo } from '@/components/campaign/map/BahiaMap' +import { ChoroplethLegend } from '@/components/campaign/map/ChoroplethLegend' +import { MapFeatureReadout } from '@/components/campaign/map/MapFeatureReadout' +import { useMunicipalityEstimateScenarioOptional } from '@/components/campaign/municipality/MunicipalityEstimateScenarioContext' import { VOTE_ESTIMATE_SCENARIO_MAP_HINT, VoteEstimateScenarioField, -} from '@/components/campaign/VoteEstimateScenarioField' +} from '@/components/campaign/votePledge/VoteEstimateScenarioField' import { Field, FieldLabel } from '@/components/ui/field' import { NativeSelect, NativeSelectOption } from '@/components/ui/native-select' import { computeChoroplethMax } from '@/lib/bahiaMapStyle' diff --git a/src/components/campaign/MunicipalityMapPanelDynamic.tsx b/src/components/campaign/map/MunicipalityMapPanelDynamic.tsx similarity index 85% rename from src/components/campaign/MunicipalityMapPanelDynamic.tsx rename to src/components/campaign/map/MunicipalityMapPanelDynamic.tsx index 29373254..3177a874 100644 --- a/src/components/campaign/MunicipalityMapPanelDynamic.tsx +++ b/src/components/campaign/map/MunicipalityMapPanelDynamic.tsx @@ -6,7 +6,7 @@ import type { FederalCandidateOption } from '@/utilities/electionCandidateOption import type { MunicipalityMapBundle } from '@/utilities/municipalityMapContract' const MunicipalityMapPanelLazy = dynamic( - () => import('@/components/campaign/MunicipalityMapPanel').then((module) => module.MunicipalityMapPanel), + () => import('@/components/campaign/map/MunicipalityMapPanel').then((module) => module.MunicipalityMapPanel), { ssr: false, loading: () => ( diff --git a/src/components/campaign/MunicipalityAdvisorAvatarStack.tsx b/src/components/campaign/municipality/MunicipalityAdvisorAvatarStack.tsx similarity index 100% rename from src/components/campaign/MunicipalityAdvisorAvatarStack.tsx rename to src/components/campaign/municipality/MunicipalityAdvisorAvatarStack.tsx diff --git a/src/components/campaign/MunicipalityAdvisorsForm.tsx b/src/components/campaign/municipality/MunicipalityAdvisorsForm.tsx similarity index 100% rename from src/components/campaign/MunicipalityAdvisorsForm.tsx rename to src/components/campaign/municipality/MunicipalityAdvisorsForm.tsx diff --git a/src/components/campaign/MunicipalityBaselineCard.tsx b/src/components/campaign/municipality/MunicipalityBaselineCard.tsx similarity index 99% rename from src/components/campaign/MunicipalityBaselineCard.tsx rename to src/components/campaign/municipality/MunicipalityBaselineCard.tsx index ec66b029..3c4bf834 100644 --- a/src/components/campaign/MunicipalityBaselineCard.tsx +++ b/src/components/campaign/municipality/MunicipalityBaselineCard.tsx @@ -1,4 +1,4 @@ -import { MunicipalityHoverTooltip } from '@/components/campaign/MunicipalityHoverTooltip' +import { MunicipalityHoverTooltip } from '@/components/campaign/municipality/MunicipalityHoverTooltip' import { computeVoteTrend, formatElectionNumber } from '@/lib/electionInsights' import { DEFAULT_VOTE_RANK_YEAR, diff --git a/src/components/campaign/MunicipalityCandidateComparisonTable.tsx b/src/components/campaign/municipality/MunicipalityCandidateComparisonTable.tsx similarity index 100% rename from src/components/campaign/MunicipalityCandidateComparisonTable.tsx rename to src/components/campaign/municipality/MunicipalityCandidateComparisonTable.tsx diff --git a/src/components/campaign/MunicipalityDossier.tsx b/src/components/campaign/municipality/MunicipalityDossier.tsx similarity index 97% rename from src/components/campaign/MunicipalityDossier.tsx rename to src/components/campaign/municipality/MunicipalityDossier.tsx index 3f33e0a5..450544c0 100644 --- a/src/components/campaign/MunicipalityDossier.tsx +++ b/src/components/campaign/municipality/MunicipalityDossier.tsx @@ -1,10 +1,10 @@ import Link from 'next/link' -import { ActionPlanStatusBadge } from '@/components/campaign/ActionPlanStatusBadge' -import { MunicipalityBaselineCard } from '@/components/campaign/MunicipalityBaselineCard' -import { MunicipalityStrategyCard } from '@/components/campaign/MunicipalityStrategyCard' -import { MunicipalityUpdateFeed } from '@/components/campaign/MunicipalityUpdateFeed' -import { SupportStatusBadge } from '@/components/campaign/SupportStatusBadge' +import { ActionPlanStatusBadge } from '@/components/campaign/actionPlan/ActionPlanStatusBadge' +import { MunicipalityBaselineCard } from '@/components/campaign/municipality/MunicipalityBaselineCard' +import { MunicipalityStrategyCard } from '@/components/campaign/municipality/MunicipalityStrategyCard' +import { MunicipalityUpdateFeed } from '@/components/campaign/municipality/MunicipalityUpdateFeed' +import { SupportStatusBadge } from '@/components/campaign/leadership/SupportStatusBadge' import { Badge } from '@/components/ui/Badge' import type { MunicipalityAgeBandKey } from '@/lib/bahiaMunicipalityDemographics' import { formatElectionNumber } from '@/lib/electionInsights' diff --git a/src/components/campaign/MunicipalityEstimateScenarioContext.tsx b/src/components/campaign/municipality/MunicipalityEstimateScenarioContext.tsx similarity index 100% rename from src/components/campaign/MunicipalityEstimateScenarioContext.tsx rename to src/components/campaign/municipality/MunicipalityEstimateScenarioContext.tsx diff --git a/src/components/campaign/MunicipalityFilters.tsx b/src/components/campaign/municipality/MunicipalityFilters.tsx similarity index 98% rename from src/components/campaign/MunicipalityFilters.tsx rename to src/components/campaign/municipality/MunicipalityFilters.tsx index e877eeff..02a1d17c 100644 --- a/src/components/campaign/MunicipalityFilters.tsx +++ b/src/components/campaign/municipality/MunicipalityFilters.tsx @@ -1,10 +1,10 @@ 'use client' -import { useCampaignListPending } from '@/components/campaign/CampaignListPending' +import { useCampaignListPending } from '@/components/campaign/shared/CampaignListPending' import { useRouter } from 'next/navigation' import { useEffect, useRef, useState, useTransition } from 'react' -import { CampaignSearchInput } from '@/components/campaign/CampaignSearchInput' +import { CampaignSearchInput } from '@/components/campaign/shared/CampaignSearchInput' import { Button } from '@/components/ui/button' import { Field, FieldLabel } from '@/components/ui/field' import { NativeSelect, NativeSelectOption } from '@/components/ui/native-select' diff --git a/src/components/campaign/MunicipalityGoalAccountCard.tsx b/src/components/campaign/municipality/MunicipalityGoalAccountCard.tsx similarity index 98% rename from src/components/campaign/MunicipalityGoalAccountCard.tsx rename to src/components/campaign/municipality/MunicipalityGoalAccountCard.tsx index ad8a6045..2ea0b324 100644 --- a/src/components/campaign/MunicipalityGoalAccountCard.tsx +++ b/src/components/campaign/municipality/MunicipalityGoalAccountCard.tsx @@ -1,9 +1,9 @@ import Link from 'next/link' import type { ReactNode } from 'react' -import { CampaignInfoHint } from '@/components/campaign/CampaignInfoHint' -import { MunicipalityHoverTooltip } from '@/components/campaign/MunicipalityHoverTooltip' -import { MunicipalityListExpectedVotesControl } from '@/components/campaign/MunicipalityListExpectedVotesControl' +import { CampaignInfoHint } from '@/components/campaign/shared/CampaignInfoHint' +import { MunicipalityHoverTooltip } from '@/components/campaign/municipality/MunicipalityHoverTooltip' +import { MunicipalityListExpectedVotesControl } from '@/components/campaign/municipality/MunicipalityListExpectedVotesControl' import { Progress } from '@/components/ui/Progress' import { CAMPAIGN_CONCEPTS_PATH, diff --git a/src/components/campaign/MunicipalityHeaderFilter.tsx b/src/components/campaign/municipality/MunicipalityHeaderFilter.tsx similarity index 99% rename from src/components/campaign/MunicipalityHeaderFilter.tsx rename to src/components/campaign/municipality/MunicipalityHeaderFilter.tsx index 73a83135..2808b6c4 100644 --- a/src/components/campaign/MunicipalityHeaderFilter.tsx +++ b/src/components/campaign/municipality/MunicipalityHeaderFilter.tsx @@ -3,7 +3,7 @@ import { FunnelIcon, FunnelPlusIcon } from 'lucide-react' import { useMemo, useOptimistic, useState, type ReactNode } from 'react' -import { CampaignTransitionAnchor } from '@/components/campaign/CampaignListPending' +import { CampaignTransitionAnchor } from '@/components/campaign/shared/CampaignListPending' import { Checkbox } from '@/components/ui/Checkbox' import { Input } from '@/components/ui/input' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/Popover' diff --git a/src/components/campaign/MunicipalityHoverTooltip.tsx b/src/components/campaign/municipality/MunicipalityHoverTooltip.tsx similarity index 100% rename from src/components/campaign/MunicipalityHoverTooltip.tsx rename to src/components/campaign/municipality/MunicipalityHoverTooltip.tsx diff --git a/src/components/campaign/MunicipalityLeadershipsPanel.tsx b/src/components/campaign/municipality/MunicipalityLeadershipsPanel.tsx similarity index 95% rename from src/components/campaign/MunicipalityLeadershipsPanel.tsx rename to src/components/campaign/municipality/MunicipalityLeadershipsPanel.tsx index 73515763..ca13b97a 100644 --- a/src/components/campaign/MunicipalityLeadershipsPanel.tsx +++ b/src/components/campaign/municipality/MunicipalityLeadershipsPanel.tsx @@ -1,8 +1,8 @@ import { PlusIcon } from 'lucide-react' import Link from 'next/link' -import { DeclareVotesForm } from '@/components/campaign/DeclareVotesForm' -import { SupportStatusBadge } from '@/components/campaign/SupportStatusBadge' +import { DeclareVotesForm } from '@/components/campaign/votePledge/DeclareVotesForm' +import { SupportStatusBadge } from '@/components/campaign/leadership/SupportStatusBadge' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import type { CampaignFormActionState } from '@/utilities/campaignFormActionError' diff --git a/src/components/campaign/MunicipalityList.tsx b/src/components/campaign/municipality/MunicipalityList.tsx similarity index 98% rename from src/components/campaign/MunicipalityList.tsx rename to src/components/campaign/municipality/MunicipalityList.tsx index b7c6aff9..ef912640 100644 --- a/src/components/campaign/MunicipalityList.tsx +++ b/src/components/campaign/municipality/MunicipalityList.tsx @@ -1,17 +1,17 @@ import { CircleAlertIcon, SearchXIcon } from 'lucide-react' import Link from 'next/link' -import { CampaignTransitionAnchor } from '@/components/campaign/CampaignListPending' -import { CampaignTable, type CampaignTableColumn } from '@/components/campaign/CampaignTable' +import { CampaignTransitionAnchor } from '@/components/campaign/shared/CampaignListPending' +import { CampaignTable, type CampaignTableColumn } from '@/components/campaign/shared/CampaignTable' import { MissingAdvisorBadge, MunicipalityAdvisorAvatarStack, -} from '@/components/campaign/MunicipalityAdvisorAvatarStack' -import { MunicipalityListAdvisorsControl } from '@/components/campaign/MunicipalityListAdvisorsControl' -import { MunicipalityListExpectedVotesControl } from '@/components/campaign/MunicipalityListExpectedVotesControl' -import { MunicipalityListGoalCoverageCell } from '@/components/campaign/MunicipalityListGoalCoverageCell' -import { MunicipalityListTrendControl } from '@/components/campaign/MunicipalityListTrendControl' -import { MunicipalitySortableHead } from '@/components/campaign/MunicipalitySortableHead' +} from '@/components/campaign/municipality/MunicipalityAdvisorAvatarStack' +import { MunicipalityListAdvisorsControl } from '@/components/campaign/municipality/MunicipalityListAdvisorsControl' +import { MunicipalityListExpectedVotesControl } from '@/components/campaign/municipality/MunicipalityListExpectedVotesControl' +import { MunicipalityListGoalCoverageCell } from '@/components/campaign/municipality/MunicipalityListGoalCoverageCell' +import { MunicipalityListTrendControl } from '@/components/campaign/municipality/MunicipalityListTrendControl' +import { MunicipalitySortableHead } from '@/components/campaign/municipality/MunicipalitySortableHead' import { Badge } from '@/components/ui/Badge' import { Button, buttonVariants } from '@/components/ui/button' import { diff --git a/src/components/campaign/MunicipalityListAdvisorsControl.tsx b/src/components/campaign/municipality/MunicipalityListAdvisorsControl.tsx similarity index 98% rename from src/components/campaign/MunicipalityListAdvisorsControl.tsx rename to src/components/campaign/municipality/MunicipalityListAdvisorsControl.tsx index 32437812..260d606b 100644 --- a/src/components/campaign/MunicipalityListAdvisorsControl.tsx +++ b/src/components/campaign/municipality/MunicipalityListAdvisorsControl.tsx @@ -9,7 +9,7 @@ import { Checkbox } from '@/components/ui/Checkbox' import { Label } from '@/components/ui/label' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/Popover' import { Spinner } from '@/components/ui/Spinner' -import { MunicipalityAdvisorAvatarStack } from '@/components/campaign/MunicipalityAdvisorAvatarStack' +import { MunicipalityAdvisorAvatarStack } from '@/components/campaign/municipality/MunicipalityAdvisorAvatarStack' import type { CampaignFormActionState } from '@/utilities/campaignFormActionError' import type { EligibleAdvisorOption, MunicipalityAdvisorSummary } from '@/utilities/municipalityViewModels' diff --git a/src/components/campaign/MunicipalityListExpectedVotesControl.tsx b/src/components/campaign/municipality/MunicipalityListExpectedVotesControl.tsx similarity index 97% rename from src/components/campaign/MunicipalityListExpectedVotesControl.tsx rename to src/components/campaign/municipality/MunicipalityListExpectedVotesControl.tsx index bc0abe0f..a47d7f6d 100644 --- a/src/components/campaign/MunicipalityListExpectedVotesControl.tsx +++ b/src/components/campaign/municipality/MunicipalityListExpectedVotesControl.tsx @@ -3,9 +3,9 @@ import { useEffect, useRef, useState } from 'react' import type { MunicipalityListExpectedVotesResponse } from '@/app/(campaign)/campanha/(app)/municipios/expected-votes/types' -import { useMunicipalityEstimateScenarioOptional } from '@/components/campaign/MunicipalityEstimateScenarioContext' -import { StaffMunicipalityVotesDisplay } from '@/components/campaign/StaffMunicipalityVotesDisplay' -import { VoteEstimateScenarioInputs } from '@/components/campaign/VoteEstimateScenarioInputs' +import { useMunicipalityEstimateScenarioOptional } from '@/components/campaign/municipality/MunicipalityEstimateScenarioContext' +import { StaffMunicipalityVotesDisplay } from '@/components/campaign/votePledge/StaffMunicipalityVotesDisplay' +import { VoteEstimateScenarioInputs } from '@/components/campaign/votePledge/VoteEstimateScenarioInputs' import { Alert, AlertDescription } from '@/components/ui/Alert' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/Popover' import { Spinner } from '@/components/ui/Spinner' diff --git a/src/components/campaign/MunicipalityListGoalCoverageCell.tsx b/src/components/campaign/municipality/MunicipalityListGoalCoverageCell.tsx similarity index 97% rename from src/components/campaign/MunicipalityListGoalCoverageCell.tsx rename to src/components/campaign/municipality/MunicipalityListGoalCoverageCell.tsx index c2c5727b..63fee639 100644 --- a/src/components/campaign/MunicipalityListGoalCoverageCell.tsx +++ b/src/components/campaign/municipality/MunicipalityListGoalCoverageCell.tsx @@ -1,6 +1,6 @@ 'use client' -import { useMunicipalityEstimateScenarioOptional } from '@/components/campaign/MunicipalityEstimateScenarioContext' +import { useMunicipalityEstimateScenarioOptional } from '@/components/campaign/municipality/MunicipalityEstimateScenarioContext' import { formatGoalCoverageDeficitLabel, formatGoalCoverageDeficitShortLabel, diff --git a/src/components/campaign/MunicipalityListOverview.tsx b/src/components/campaign/municipality/MunicipalityListOverview.tsx similarity index 95% rename from src/components/campaign/MunicipalityListOverview.tsx rename to src/components/campaign/municipality/MunicipalityListOverview.tsx index edbeaa50..0595fb26 100644 --- a/src/components/campaign/MunicipalityListOverview.tsx +++ b/src/components/campaign/municipality/MunicipalityListOverview.tsx @@ -3,15 +3,15 @@ import { CircleAlertIcon } from 'lucide-react' import { useEffect, useRef, useState } from 'react' -import { CampaignTransitionAnchor } from '@/components/campaign/CampaignListPending' -import { CampaignMetricStrip } from '@/components/campaign/CampaignMetricStrip' -import { campaignPrioritySurfaceClassName } from '@/components/campaign/CampaignPageShell' -import { useMunicipalityEstimateScenario } from '@/components/campaign/MunicipalityEstimateScenarioContext' +import { CampaignTransitionAnchor } from '@/components/campaign/shared/CampaignListPending' +import { CampaignMetricStrip } from '@/components/campaign/shared/CampaignMetricStrip' +import { campaignPrioritySurfaceClassName } from '@/components/campaign/shell/CampaignPageShell' +import { useMunicipalityEstimateScenario } from '@/components/campaign/municipality/MunicipalityEstimateScenarioContext' import { VOTE_ESTIMATE_SCENARIO_OVERVIEW_HINT, VoteEstimateScenarioField, -} from '@/components/campaign/VoteEstimateScenarioField' -import { VoteEstimateScenarioStrip } from '@/components/campaign/VoteEstimateScenarioStrip' +} from '@/components/campaign/votePledge/VoteEstimateScenarioField' +import { VoteEstimateScenarioStrip } from '@/components/campaign/votePledge/VoteEstimateScenarioStrip' import { formatElectionNumber } from '@/lib/electionInsights' import { cn } from '@/lib/utils' import { diff --git a/src/components/campaign/MunicipalityListTrendControl.tsx b/src/components/campaign/municipality/MunicipalityListTrendControl.tsx similarity index 100% rename from src/components/campaign/MunicipalityListTrendControl.tsx rename to src/components/campaign/municipality/MunicipalityListTrendControl.tsx diff --git a/src/components/campaign/MunicipalityPledgesPanel.tsx b/src/components/campaign/municipality/MunicipalityPledgesPanel.tsx similarity index 98% rename from src/components/campaign/MunicipalityPledgesPanel.tsx rename to src/components/campaign/municipality/MunicipalityPledgesPanel.tsx index 33180dcf..1da932e5 100644 --- a/src/components/campaign/MunicipalityPledgesPanel.tsx +++ b/src/components/campaign/municipality/MunicipalityPledgesPanel.tsx @@ -1,4 +1,4 @@ -import { PledgeEstimateForm } from '@/components/campaign/PledgeEstimateForm' +import { PledgeEstimateForm } from '@/components/campaign/votePledge/PledgeEstimateForm' import { Badge } from '@/components/ui/Badge' import type { CampaignFormActionState } from '@/utilities/campaignFormActionError' import { diff --git a/src/components/campaign/MunicipalitySortableHead.tsx b/src/components/campaign/municipality/MunicipalitySortableHead.tsx similarity index 97% rename from src/components/campaign/MunicipalitySortableHead.tsx rename to src/components/campaign/municipality/MunicipalitySortableHead.tsx index 26c9a1a3..cd331d22 100644 --- a/src/components/campaign/MunicipalitySortableHead.tsx +++ b/src/components/campaign/municipality/MunicipalitySortableHead.tsx @@ -3,9 +3,9 @@ import { ChevronDownIcon, ChevronsUpDownIcon, ChevronUpIcon } from 'lucide-react' import type { ReactNode } from 'react' -import { CampaignTransitionAnchor } from '@/components/campaign/CampaignListPending' -import { MunicipalityHeaderFilter } from '@/components/campaign/MunicipalityHeaderFilter' -import { MunicipalityHoverTooltip } from '@/components/campaign/MunicipalityHoverTooltip' +import { CampaignTransitionAnchor } from '@/components/campaign/shared/CampaignListPending' +import { MunicipalityHeaderFilter } from '@/components/campaign/municipality/MunicipalityHeaderFilter' +import { MunicipalityHoverTooltip } from '@/components/campaign/municipality/MunicipalityHoverTooltip' import { TableHead } from '@/components/ui/Table' import { cn } from '@/lib/utils' import type { diff --git a/src/components/campaign/MunicipalityStrategyCard.tsx b/src/components/campaign/municipality/MunicipalityStrategyCard.tsx similarity index 98% rename from src/components/campaign/MunicipalityStrategyCard.tsx rename to src/components/campaign/municipality/MunicipalityStrategyCard.tsx index 11eb68cd..de49134c 100644 --- a/src/components/campaign/MunicipalityStrategyCard.tsx +++ b/src/components/campaign/municipality/MunicipalityStrategyCard.tsx @@ -1,7 +1,7 @@ import { PencilIcon } from 'lucide-react' import Link from 'next/link' -import { StateDeputyChips } from '@/components/campaign/StateDeputyChips' +import { StateDeputyChips } from '@/components/campaign/stateDeputy/StateDeputyChips' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { diff --git a/src/components/campaign/MunicipalityStrategyForm.tsx b/src/components/campaign/municipality/MunicipalityStrategyForm.tsx similarity index 99% rename from src/components/campaign/MunicipalityStrategyForm.tsx rename to src/components/campaign/municipality/MunicipalityStrategyForm.tsx index cb80ea11..0781a2e2 100644 --- a/src/components/campaign/MunicipalityStrategyForm.tsx +++ b/src/components/campaign/municipality/MunicipalityStrategyForm.tsx @@ -2,8 +2,8 @@ import { useActionState, useState } from 'react' -import { RelationMultiSelect, type RelationOption } from '@/components/campaign/RelationMultiSelect' -import { VoteEstimateScenarioInputs } from '@/components/campaign/VoteEstimateScenarioInputs' +import { RelationMultiSelect, type RelationOption } from '@/components/campaign/shared/RelationMultiSelect' +import { VoteEstimateScenarioInputs } from '@/components/campaign/votePledge/VoteEstimateScenarioInputs' import { Alert, AlertDescription } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' import { Field, FieldError, FieldLabel } from '@/components/ui/field' diff --git a/src/components/campaign/MunicipalityTabNav.tsx b/src/components/campaign/municipality/MunicipalityTabNav.tsx similarity index 100% rename from src/components/campaign/MunicipalityTabNav.tsx rename to src/components/campaign/municipality/MunicipalityTabNav.tsx diff --git a/src/components/campaign/MunicipalityUpdateFeed.tsx b/src/components/campaign/municipality/MunicipalityUpdateFeed.tsx similarity index 100% rename from src/components/campaign/MunicipalityUpdateFeed.tsx rename to src/components/campaign/municipality/MunicipalityUpdateFeed.tsx diff --git a/src/components/campaign/MunicipalityUpdateForm.tsx b/src/components/campaign/municipality/MunicipalityUpdateForm.tsx similarity index 100% rename from src/components/campaign/MunicipalityUpdateForm.tsx rename to src/components/campaign/municipality/MunicipalityUpdateForm.tsx diff --git a/src/components/campaign/MunicipalityZoneNeighborhoodsCard.tsx b/src/components/campaign/municipality/MunicipalityZoneNeighborhoodsCard.tsx similarity index 100% rename from src/components/campaign/MunicipalityZoneNeighborhoodsCard.tsx rename to src/components/campaign/municipality/MunicipalityZoneNeighborhoodsCard.tsx diff --git a/src/components/campaign/TerritoryOverviewTable.tsx b/src/components/campaign/municipality/TerritoryOverviewTable.tsx similarity index 100% rename from src/components/campaign/TerritoryOverviewTable.tsx rename to src/components/campaign/municipality/TerritoryOverviewTable.tsx diff --git a/src/components/campaign/TseZoneBadge.tsx b/src/components/campaign/municipality/TseZoneBadge.tsx similarity index 100% rename from src/components/campaign/TseZoneBadge.tsx rename to src/components/campaign/municipality/TseZoneBadge.tsx diff --git a/src/components/campaign/OrganizationForm.tsx b/src/components/campaign/organization/OrganizationForm.tsx similarity index 98% rename from src/components/campaign/OrganizationForm.tsx rename to src/components/campaign/organization/OrganizationForm.tsx index b8b76d00..e017466a 100644 --- a/src/components/campaign/OrganizationForm.tsx +++ b/src/components/campaign/organization/OrganizationForm.tsx @@ -2,7 +2,7 @@ import { useActionState } from 'react' -import { RelationMultiSelect, type RelationOption } from '@/components/campaign/RelationMultiSelect' +import { RelationMultiSelect, type RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import { Alert, AlertDescription } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' import { Field, FieldError, FieldLabel } from '@/components/ui/field' diff --git a/src/components/campaign/AsyncSearchCombobox.tsx b/src/components/campaign/shared/AsyncSearchCombobox.tsx similarity index 100% rename from src/components/campaign/AsyncSearchCombobox.tsx rename to src/components/campaign/shared/AsyncSearchCombobox.tsx diff --git a/src/components/campaign/CampaignFilterChips.tsx b/src/components/campaign/shared/CampaignFilterChips.tsx similarity index 95% rename from src/components/campaign/CampaignFilterChips.tsx rename to src/components/campaign/shared/CampaignFilterChips.tsx index 2f79be33..72987ba1 100644 --- a/src/components/campaign/CampaignFilterChips.tsx +++ b/src/components/campaign/shared/CampaignFilterChips.tsx @@ -4,7 +4,7 @@ import Link from 'next/link' import { useRouter } from 'next/navigation' import { useState, useTransition, type MouseEvent } from 'react' -import { useCampaignListPending } from '@/components/campaign/CampaignListPending' +import { useCampaignListPending } from '@/components/campaign/shared/CampaignListPending' import { Button } from '@/components/ui/button' export type CampaignFilterChip = { diff --git a/src/components/campaign/CampaignInfoHint.tsx b/src/components/campaign/shared/CampaignInfoHint.tsx similarity index 100% rename from src/components/campaign/CampaignInfoHint.tsx rename to src/components/campaign/shared/CampaignInfoHint.tsx diff --git a/src/components/campaign/CampaignListEmptyState.tsx b/src/components/campaign/shared/CampaignListEmptyState.tsx similarity index 100% rename from src/components/campaign/CampaignListEmptyState.tsx rename to src/components/campaign/shared/CampaignListEmptyState.tsx diff --git a/src/components/campaign/CampaignListFooter.tsx b/src/components/campaign/shared/CampaignListFooter.tsx similarity index 89% rename from src/components/campaign/CampaignListFooter.tsx rename to src/components/campaign/shared/CampaignListFooter.tsx index 16c5d9d9..599ec734 100644 --- a/src/components/campaign/CampaignListFooter.tsx +++ b/src/components/campaign/shared/CampaignListFooter.tsx @@ -1,4 +1,4 @@ -import { CampaignListPagination } from '@/components/campaign/CampaignListPagination' +import { CampaignListPagination } from '@/components/campaign/shared/CampaignListPagination' /** * The count line + pagination every campaign list renders under its results. diff --git a/src/components/campaign/CampaignListPagination.tsx b/src/components/campaign/shared/CampaignListPagination.tsx similarity index 99% rename from src/components/campaign/CampaignListPagination.tsx rename to src/components/campaign/shared/CampaignListPagination.tsx index bc39bbea..8a8fa034 100644 --- a/src/components/campaign/CampaignListPagination.tsx +++ b/src/components/campaign/shared/CampaignListPagination.tsx @@ -1,6 +1,6 @@ import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react' -import { CampaignTransitionAnchor } from '@/components/campaign/CampaignListPending' +import { CampaignTransitionAnchor } from '@/components/campaign/shared/CampaignListPending' import { Button } from '@/components/ui/button' import { Pagination, diff --git a/src/components/campaign/CampaignListPending.tsx b/src/components/campaign/shared/CampaignListPending.tsx similarity index 100% rename from src/components/campaign/CampaignListPending.tsx rename to src/components/campaign/shared/CampaignListPending.tsx diff --git a/src/components/campaign/CampaignMetricStrip.tsx b/src/components/campaign/shared/CampaignMetricStrip.tsx similarity index 100% rename from src/components/campaign/CampaignMetricStrip.tsx rename to src/components/campaign/shared/CampaignMetricStrip.tsx diff --git a/src/components/campaign/CampaignScopeBadge.tsx b/src/components/campaign/shared/CampaignScopeBadge.tsx similarity index 100% rename from src/components/campaign/CampaignScopeBadge.tsx rename to src/components/campaign/shared/CampaignScopeBadge.tsx diff --git a/src/components/campaign/CampaignSearchForm.tsx b/src/components/campaign/shared/CampaignSearchForm.tsx similarity index 95% rename from src/components/campaign/CampaignSearchForm.tsx rename to src/components/campaign/shared/CampaignSearchForm.tsx index fb338aa5..ad65bfe7 100644 --- a/src/components/campaign/CampaignSearchForm.tsx +++ b/src/components/campaign/shared/CampaignSearchForm.tsx @@ -3,7 +3,7 @@ import { useRouter } from 'next/navigation' import { useState, useTransition } from 'react' -import { useCampaignListPending } from '@/components/campaign/CampaignListPending' +import { useCampaignListPending } from '@/components/campaign/shared/CampaignListPending' import { Button } from '@/components/ui/button' /** diff --git a/src/components/campaign/CampaignSearchInput.tsx b/src/components/campaign/shared/CampaignSearchInput.tsx similarity index 100% rename from src/components/campaign/CampaignSearchInput.tsx rename to src/components/campaign/shared/CampaignSearchInput.tsx diff --git a/src/components/campaign/CampaignTable.tsx b/src/components/campaign/shared/CampaignTable.tsx similarity index 100% rename from src/components/campaign/CampaignTable.tsx rename to src/components/campaign/shared/CampaignTable.tsx diff --git a/src/components/campaign/CampaignUserAvatar.tsx b/src/components/campaign/shared/CampaignUserAvatar.tsx similarity index 100% rename from src/components/campaign/CampaignUserAvatar.tsx rename to src/components/campaign/shared/CampaignUserAvatar.tsx diff --git a/src/components/campaign/ConsentText.tsx b/src/components/campaign/shared/ConsentText.tsx similarity index 100% rename from src/components/campaign/ConsentText.tsx rename to src/components/campaign/shared/ConsentText.tsx diff --git a/src/components/campaign/ContactCombobox.tsx b/src/components/campaign/shared/ContactCombobox.tsx similarity index 95% rename from src/components/campaign/ContactCombobox.tsx rename to src/components/campaign/shared/ContactCombobox.tsx index 64e5983a..aca74257 100644 --- a/src/components/campaign/ContactCombobox.tsx +++ b/src/components/campaign/shared/ContactCombobox.tsx @@ -2,7 +2,7 @@ import { useRef } from 'react' -import { AsyncSearchCombobox } from '@/components/campaign/AsyncSearchCombobox' +import { AsyncSearchCombobox } from '@/components/campaign/shared/AsyncSearchCombobox' import { isContactSearchQueryReady } from '@/lib/contactSearchQuery' export type ContactComboboxOption = { diff --git a/src/components/campaign/RelationMultiSelect.tsx b/src/components/campaign/shared/RelationMultiSelect.tsx similarity index 100% rename from src/components/campaign/RelationMultiSelect.tsx rename to src/components/campaign/shared/RelationMultiSelect.tsx diff --git a/src/components/campaign/StrictCombobox.tsx b/src/components/campaign/shared/StrictCombobox.tsx similarity index 100% rename from src/components/campaign/StrictCombobox.tsx rename to src/components/campaign/shared/StrictCombobox.tsx diff --git a/src/components/campaign/CampaignBottomNav.tsx b/src/components/campaign/shell/CampaignBottomNav.tsx similarity index 98% rename from src/components/campaign/CampaignBottomNav.tsx rename to src/components/campaign/shell/CampaignBottomNav.tsx index fcb3e217..360405c9 100644 --- a/src/components/campaign/CampaignBottomNav.tsx +++ b/src/components/campaign/shell/CampaignBottomNav.tsx @@ -3,7 +3,7 @@ import Link from 'next/link' import { usePathname } from 'next/navigation' -import { getCampaignBottomNav, isCampaignNavActive } from '@/components/campaign/nav' +import { getCampaignBottomNav, isCampaignNavActive } from '@/components/campaign/shell/nav' import { cn } from '@/lib/utils' import type { CampaignUser } from '@/payload-types' diff --git a/src/components/campaign/CampaignPageShell.tsx b/src/components/campaign/shell/CampaignPageShell.tsx similarity index 100% rename from src/components/campaign/CampaignPageShell.tsx rename to src/components/campaign/shell/CampaignPageShell.tsx diff --git a/src/components/campaign/CampaignSidebar.tsx b/src/components/campaign/shell/CampaignSidebar.tsx similarity index 94% rename from src/components/campaign/CampaignSidebar.tsx rename to src/components/campaign/shell/CampaignSidebar.tsx index 21bfb7d1..882e5d2d 100644 --- a/src/components/campaign/CampaignSidebar.tsx +++ b/src/components/campaign/shell/CampaignSidebar.tsx @@ -5,15 +5,15 @@ import Link from 'next/link' import { usePathname } from 'next/navigation' import { logoutCampaign } from '@/app/(campaign)/campanha/actions/auth' -import { CampaignLogo } from '@/components/campaign/campaign-logo' -import { CampaignScopeBadge } from '@/components/campaign/CampaignScopeBadge' -import { CampaignUserAvatar } from '@/components/campaign/CampaignUserAvatar' +import { CampaignLogo } from '@/components/campaign/shell/campaign-logo' +import { CampaignScopeBadge } from '@/components/campaign/shared/CampaignScopeBadge' +import { CampaignUserAvatar } from '@/components/campaign/shared/CampaignUserAvatar' import { getCampaignNav, getCampaignSecondaryNav, isCampaignNavActive, type CampaignNavItem, -} from '@/components/campaign/nav' +} from '@/components/campaign/shell/nav' import { Button } from '@/components/ui/button' import { Spinner } from '@/components/ui/Spinner' import { diff --git a/src/components/campaign/InstallPwaToast.tsx b/src/components/campaign/shell/InstallPwaToast.tsx similarity index 100% rename from src/components/campaign/InstallPwaToast.tsx rename to src/components/campaign/shell/InstallPwaToast.tsx diff --git a/src/components/campaign/RegisterServiceWorker.tsx b/src/components/campaign/shell/RegisterServiceWorker.tsx similarity index 100% rename from src/components/campaign/RegisterServiceWorker.tsx rename to src/components/campaign/shell/RegisterServiceWorker.tsx diff --git a/src/components/campaign/campaign-logo.tsx b/src/components/campaign/shell/campaign-logo.tsx similarity index 100% rename from src/components/campaign/campaign-logo.tsx rename to src/components/campaign/shell/campaign-logo.tsx diff --git a/src/components/campaign/nav.ts b/src/components/campaign/shell/nav.ts similarity index 100% rename from src/components/campaign/nav.ts rename to src/components/campaign/shell/nav.ts diff --git a/src/components/campaign/StateDeputyChips.tsx b/src/components/campaign/stateDeputy/StateDeputyChips.tsx similarity index 100% rename from src/components/campaign/StateDeputyChips.tsx rename to src/components/campaign/stateDeputy/StateDeputyChips.tsx diff --git a/src/components/campaign/StateDeputyForm.tsx b/src/components/campaign/stateDeputy/StateDeputyForm.tsx similarity index 100% rename from src/components/campaign/StateDeputyForm.tsx rename to src/components/campaign/stateDeputy/StateDeputyForm.tsx diff --git a/src/components/campaign/RemoveSupporterDataButton.tsx b/src/components/campaign/supporter/RemoveSupporterDataButton.tsx similarity index 100% rename from src/components/campaign/RemoveSupporterDataButton.tsx rename to src/components/campaign/supporter/RemoveSupporterDataButton.tsx diff --git a/src/components/campaign/SupporterFilters.tsx b/src/components/campaign/supporter/SupporterFilters.tsx similarity index 95% rename from src/components/campaign/SupporterFilters.tsx rename to src/components/campaign/supporter/SupporterFilters.tsx index 01151ab6..89ef55eb 100644 --- a/src/components/campaign/SupporterFilters.tsx +++ b/src/components/campaign/supporter/SupporterFilters.tsx @@ -1,13 +1,13 @@ 'use client' -import { useCampaignListPending } from '@/components/campaign/CampaignListPending' +import { useCampaignListPending } from '@/components/campaign/shared/CampaignListPending' import { type FormEvent, useRef, useState, useTransition } from 'react' import { usePathname, useRouter } from 'next/navigation' import { ChevronDownIcon, FilterIcon, XIcon } from 'lucide-react' -import { CampaignSearchInput } from '@/components/campaign/CampaignSearchInput' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' -import { StrictCombobox } from '@/components/campaign/StrictCombobox' +import { CampaignSearchInput } from '@/components/campaign/shared/CampaignSearchInput' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' +import { StrictCombobox } from '@/components/campaign/shared/StrictCombobox' import { Button } from '@/components/ui/button' import { Field, FieldLabel } from '@/components/ui/field' import { NativeSelect, NativeSelectOption } from '@/components/ui/native-select' diff --git a/src/components/campaign/SupporterForm.tsx b/src/components/campaign/supporter/SupporterForm.tsx similarity index 98% rename from src/components/campaign/SupporterForm.tsx rename to src/components/campaign/supporter/SupporterForm.tsx index 68d8409d..a4ff1851 100644 --- a/src/components/campaign/SupporterForm.tsx +++ b/src/components/campaign/supporter/SupporterForm.tsx @@ -6,8 +6,8 @@ import { toast } from 'sonner' import type { SupporterFormState } from '@/app/(campaign)/campanha/(app)/apoiadores/novo/formActions' import { FormattedInput } from '@/components/FormattedInput' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' -import { StrictCombobox } from '@/components/campaign/StrictCombobox' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' +import { StrictCombobox } from '@/components/campaign/shared/StrictCombobox' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' import { Checkbox } from '@/components/ui/Checkbox' diff --git a/src/components/campaign/SupporterImportWizard.tsx b/src/components/campaign/supporter/SupporterImportWizard.tsx similarity index 100% rename from src/components/campaign/SupporterImportWizard.tsx rename to src/components/campaign/supporter/SupporterImportWizard.tsx diff --git a/src/components/campaign/SupporterList.tsx b/src/components/campaign/supporter/SupporterList.tsx similarity index 99% rename from src/components/campaign/SupporterList.tsx rename to src/components/campaign/supporter/SupporterList.tsx index 1801f2c6..d2f34800 100644 --- a/src/components/campaign/SupporterList.tsx +++ b/src/components/campaign/supporter/SupporterList.tsx @@ -5,7 +5,7 @@ import { CampaignTable, CampaignTableHead, type CampaignTableColumn, -} from '@/components/campaign/CampaignTable' +} from '@/components/campaign/shared/CampaignTable' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' diff --git a/src/components/campaign/SupporterListOverview.tsx b/src/components/campaign/supporter/SupporterListOverview.tsx similarity index 85% rename from src/components/campaign/SupporterListOverview.tsx rename to src/components/campaign/supporter/SupporterListOverview.tsx index dd4c4aa6..5c2b50e3 100644 --- a/src/components/campaign/SupporterListOverview.tsx +++ b/src/components/campaign/supporter/SupporterListOverview.tsx @@ -1,5 +1,5 @@ -import { CampaignDataFreshness } from '@/components/campaign/CampaignDataFreshness' -import { CampaignMetricStrip } from '@/components/campaign/CampaignMetricStrip' +import { CampaignDataFreshness } from '@/components/campaign/dashboard/CampaignDataFreshness' +import { CampaignMetricStrip } from '@/components/campaign/shared/CampaignMetricStrip' import type { SupporterListOverviewViewModel } from '@/utilities/supporterViewModels' const numberFormatter = new Intl.NumberFormat('pt-BR') diff --git a/src/components/campaign/SupporterShareKit.tsx b/src/components/campaign/supporter/SupporterShareKit.tsx similarity index 100% rename from src/components/campaign/SupporterShareKit.tsx rename to src/components/campaign/supporter/SupporterShareKit.tsx diff --git a/src/components/campaign/VoteIntentionControl.tsx b/src/components/campaign/supporter/VoteIntentionControl.tsx similarity index 100% rename from src/components/campaign/VoteIntentionControl.tsx rename to src/components/campaign/supporter/VoteIntentionControl.tsx diff --git a/src/components/campaign/DeclareVotesForm.tsx b/src/components/campaign/votePledge/DeclareVotesForm.tsx similarity index 100% rename from src/components/campaign/DeclareVotesForm.tsx rename to src/components/campaign/votePledge/DeclareVotesForm.tsx diff --git a/src/components/campaign/PledgeEstimateForm.tsx b/src/components/campaign/votePledge/PledgeEstimateForm.tsx similarity index 98% rename from src/components/campaign/PledgeEstimateForm.tsx rename to src/components/campaign/votePledge/PledgeEstimateForm.tsx index e353621c..97b05210 100644 --- a/src/components/campaign/PledgeEstimateForm.tsx +++ b/src/components/campaign/votePledge/PledgeEstimateForm.tsx @@ -2,7 +2,7 @@ import { useActionState } from 'react' -import { VoteEstimateScenarioInputs } from '@/components/campaign/VoteEstimateScenarioInputs' +import { VoteEstimateScenarioInputs } from '@/components/campaign/votePledge/VoteEstimateScenarioInputs' import { Alert, AlertDescription } from '@/components/ui/Alert' import { Button } from '@/components/ui/button' import { Field, FieldError, FieldLabel } from '@/components/ui/field' diff --git a/src/components/campaign/StaffMunicipalityVotesDisplay.tsx b/src/components/campaign/votePledge/StaffMunicipalityVotesDisplay.tsx similarity index 98% rename from src/components/campaign/StaffMunicipalityVotesDisplay.tsx rename to src/components/campaign/votePledge/StaffMunicipalityVotesDisplay.tsx index 42425358..fc091a6e 100644 --- a/src/components/campaign/StaffMunicipalityVotesDisplay.tsx +++ b/src/components/campaign/votePledge/StaffMunicipalityVotesDisplay.tsx @@ -1,6 +1,6 @@ import { UsersIcon } from 'lucide-react' -import { VoteEstimateScenarioStrip } from '@/components/campaign/VoteEstimateScenarioStrip' +import { VoteEstimateScenarioStrip } from '@/components/campaign/votePledge/VoteEstimateScenarioStrip' import { cn } from '@/lib/utils' import { formatVoteEstimateScenarioAriaLabel, diff --git a/src/components/campaign/VoteEstimateScenarioField.tsx b/src/components/campaign/votePledge/VoteEstimateScenarioField.tsx similarity index 95% rename from src/components/campaign/VoteEstimateScenarioField.tsx rename to src/components/campaign/votePledge/VoteEstimateScenarioField.tsx index a78526e9..369cd8e8 100644 --- a/src/components/campaign/VoteEstimateScenarioField.tsx +++ b/src/components/campaign/votePledge/VoteEstimateScenarioField.tsx @@ -1,6 +1,6 @@ 'use client' -import { CampaignInfoHint } from '@/components/campaign/CampaignInfoHint' +import { CampaignInfoHint } from '@/components/campaign/shared/CampaignInfoHint' import { Field, FieldLabel } from '@/components/ui/field' import { NativeSelect, NativeSelectOption } from '@/components/ui/native-select' import { cn } from '@/lib/utils' diff --git a/src/components/campaign/VoteEstimateScenarioInputs.tsx b/src/components/campaign/votePledge/VoteEstimateScenarioInputs.tsx similarity index 99% rename from src/components/campaign/VoteEstimateScenarioInputs.tsx rename to src/components/campaign/votePledge/VoteEstimateScenarioInputs.tsx index 1e2e8e7d..52b27b53 100644 --- a/src/components/campaign/VoteEstimateScenarioInputs.tsx +++ b/src/components/campaign/votePledge/VoteEstimateScenarioInputs.tsx @@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from 'react' -import { VoteEstimateScenarioStrip } from '@/components/campaign/VoteEstimateScenarioStrip' +import { VoteEstimateScenarioStrip } from '@/components/campaign/votePledge/VoteEstimateScenarioStrip' import { Field, FieldLabel } from '@/components/ui/field' import { Input } from '@/components/ui/input' import { cn } from '@/lib/utils' diff --git a/src/components/campaign/VoteEstimateScenarioStrip.tsx b/src/components/campaign/votePledge/VoteEstimateScenarioStrip.tsx similarity index 100% rename from src/components/campaign/VoteEstimateScenarioStrip.tsx rename to src/components/campaign/votePledge/VoteEstimateScenarioStrip.tsx diff --git a/src/utilities/campaignRelationOptions.ts b/src/utilities/campaignRelationOptions.ts index ab035c67..5bd82f26 100644 --- a/src/utilities/campaignRelationOptions.ts +++ b/src/utilities/campaignRelationOptions.ts @@ -2,7 +2,7 @@ import 'server-only' import type { Payload } from 'payload' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import type { CampaignUser } from '@/payload-types' import { relationshipId } from '@/utilities/relationship' diff --git a/src/utilities/leaderContactsPageData.ts b/src/utilities/leaderContactsPageData.ts index a3213ef9..aa508cdc 100644 --- a/src/utilities/leaderContactsPageData.ts +++ b/src/utilities/leaderContactsPageData.ts @@ -2,7 +2,7 @@ import 'server-only' import type { Payload } from 'payload' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import type { CampaignUser, Contact, Municipality } from '@/payload-types' import { getEngagedLeaderMunicipalityIds } from '@/utilities/campaignAccess' import { getSupporterRegistrationConsent } from '@/utilities/campaignConsent' diff --git a/src/utilities/supporterPageData.ts b/src/utilities/supporterPageData.ts index 01e8c333..39ba0fa2 100644 --- a/src/utilities/supporterPageData.ts +++ b/src/utilities/supporterPageData.ts @@ -2,7 +2,7 @@ import 'server-only' import type { Payload } from 'payload' -import type { RelationOption } from '@/components/campaign/RelationMultiSelect' +import type { RelationOption } from '@/components/campaign/shared/RelationMultiSelect' import type { CampaignUser, Consent, Supporter } from '@/payload-types' import { getAdvisorMunicipalityIds } from '@/utilities/campaignAccess' import { diff --git a/tests/int/campaignInviteUi.int.spec.ts b/tests/int/campaignInviteUi.int.spec.ts index 77eaedf7..8bd27a25 100644 --- a/tests/int/campaignInviteUi.int.spec.ts +++ b/tests/int/campaignInviteUi.int.spec.ts @@ -11,9 +11,9 @@ import { redeemCampaignInviteAutofillFormAction, redeemCampaignInviteLoginFormAction, } from '@/app/(campaign)/campanha/convite/[token]/formActions' -import { CampaignInviteForm } from '@/components/campaign/CampaignInviteForm' -import { ConsentText } from '@/components/campaign/ConsentText' -import { InvalidCampaignInvite } from '@/components/campaign/InvalidCampaignInvite' +import { CampaignInviteForm } from '@/components/campaign/invite/CampaignInviteForm' +import { ConsentText } from '@/components/campaign/shared/ConsentText' +import { InvalidCampaignInvite } from '@/components/campaign/invite/InvalidCampaignInvite' import type { Consent } from '@/payload-types' import config from '@/payload.config' import { @@ -186,15 +186,15 @@ describe('campaign invite UI contracts', () => { it('keeps consent rendering and invalid-state markup outside the client module graph', () => { const clientSource = readFileSync( - resolve(process.cwd(), 'src/components/campaign/CampaignInviteForm.tsx'), + resolve(process.cwd(), 'src/components/campaign/invite/CampaignInviteForm.tsx'), 'utf8', ) const consentSource = readFileSync( - resolve(process.cwd(), 'src/components/campaign/ConsentText.tsx'), + resolve(process.cwd(), 'src/components/campaign/shared/ConsentText.tsx'), 'utf8', ) const invalidSource = readFileSync( - resolve(process.cwd(), 'src/components/campaign/InvalidCampaignInvite.tsx'), + resolve(process.cwd(), 'src/components/campaign/invite/InvalidCampaignInvite.tsx'), 'utf8', ) diff --git a/tests/unit/campaignComponents.unit.spec.ts b/tests/unit/campaignComponents.unit.spec.ts index 628c1258..8d43b9ba 100644 --- a/tests/unit/campaignComponents.unit.spec.ts +++ b/tests/unit/campaignComponents.unit.spec.ts @@ -6,10 +6,10 @@ import { describe, expect, it, vi } from 'vitest' import { AppRouterContext } from 'next/dist/shared/lib/app-router-context.shared-runtime' -import { CampaignScopeBadge } from '@/components/campaign/CampaignScopeBadge' -import { MunicipalityList } from '@/components/campaign/MunicipalityList' -import { SupportStatusBadge } from '@/components/campaign/SupportStatusBadge' -import { TseZoneBadge } from '@/components/campaign/TseZoneBadge' +import { CampaignScopeBadge } from '@/components/campaign/shared/CampaignScopeBadge' +import { MunicipalityList } from '@/components/campaign/municipality/MunicipalityList' +import { SupportStatusBadge } from '@/components/campaign/leadership/SupportStatusBadge' +import { TseZoneBadge } from '@/components/campaign/municipality/TseZoneBadge' import { Progress } from '@/components/ui/Progress' import { Toggle } from '@/components/ui/Toggle' import { ToggleGroup, ToggleGroupItem } from '@/components/ui/ToggleGroup' @@ -104,7 +104,7 @@ describe('campaign visual foundation', () => { 'utf8', ) const sidebarSource = readFileSync( - resolve(process.cwd(), 'src/components/campaign/CampaignSidebar.tsx'), + resolve(process.cwd(), 'src/components/campaign/shell/CampaignSidebar.tsx'), 'utf8', ) @@ -119,7 +119,7 @@ describe('campaign visual foundation', () => { it('uses light sidebar tokens and readable logout states', () => { const styles = readFileSync(resolve(process.cwd(), 'src/app/(frontend)/styles.css'), 'utf8') const sidebarSource = readFileSync( - resolve(process.cwd(), 'src/components/campaign/CampaignSidebar.tsx'), + resolve(process.cwd(), 'src/components/campaign/shell/CampaignSidebar.tsx'), 'utf8', ) diff --git a/tests/unit/campaignIntelligenceConcepts.unit.spec.ts b/tests/unit/campaignIntelligenceConcepts.unit.spec.ts index e9429a4b..a61b09f8 100644 --- a/tests/unit/campaignIntelligenceConcepts.unit.spec.ts +++ b/tests/unit/campaignIntelligenceConcepts.unit.spec.ts @@ -6,7 +6,7 @@ import { getCampaignBottomNav, getCampaignNav, getCampaignSecondaryNav, -} from '@/components/campaign/nav' +} from '@/components/campaign/shell/nav' import { CAMPAIGN_CONCEPT_CATEGORIES, CAMPAIGN_CONCEPTS_PATH, diff --git a/tests/unit/campaignInviteInteractions.unit.spec.ts b/tests/unit/campaignInviteInteractions.unit.spec.ts index 19edc3ac..c597bb7d 100644 --- a/tests/unit/campaignInviteInteractions.unit.spec.ts +++ b/tests/unit/campaignInviteInteractions.unit.spec.ts @@ -10,7 +10,7 @@ vi.mock('@/app/(campaign)/campanha/actions/invite', () => ({ createCampaignInvite: inviteActionState.createCampaignInvite, })) -import { LeadershipInviteButtons } from '@/components/campaign/LeadershipInviteButtons' +import { LeadershipInviteButtons } from '@/components/campaign/invite/LeadershipInviteButtons' describe('campaign invite interactions', () => { afterEach(() => { diff --git a/tests/unit/campaignSearchInput.unit.spec.ts b/tests/unit/campaignSearchInput.unit.spec.ts index 40d427ef..34a5faca 100644 --- a/tests/unit/campaignSearchInput.unit.spec.ts +++ b/tests/unit/campaignSearchInput.unit.spec.ts @@ -2,7 +2,7 @@ import { createElement } from 'react' import { renderToStaticMarkup } from 'react-dom/server' import { describe, expect, it } from 'vitest' -import { CampaignSearchInput } from '@/components/campaign/CampaignSearchInput' +import { CampaignSearchInput } from '@/components/campaign/shared/CampaignSearchInput' describe('CampaignSearchInput', () => { it('renders the shared accessible 44px campaign search composition', () => {