B81 — format

This commit is contained in:
Cursor Agent 2026-08-01 04:10:16 +00:00
parent 7f2ac29368
commit 09e76ec8cb
No known key found for this signature in database
4 changed files with 7 additions and 14 deletions

View file

@ -128,10 +128,7 @@ export const UNCOVERED_MUNICIPALITIES_LIST_HREF =
'/campanha/municipios?coverage=sem_assessor&sort=votos' as const '/campanha/municipios?coverage=sem_assessor&sort=votos' as const
/** Staff Início catalog with hrefs — shared by quick-action registries (B81+). */ /** Staff Início catalog with hrefs — shared by quick-action registries (B81+). */
const staffHomeQuickActionsByRole = new Map< const staffHomeQuickActionsByRole = new Map<CampaignRole, readonly ResolvedCampaignHomeAction[]>()
CampaignRole,
readonly ResolvedCampaignHomeAction[]
>()
export const resolveStaffHomeQuickActions = ( export const resolveStaffHomeQuickActions = (
role: CampaignRole, role: CampaignRole,

View file

@ -2,13 +2,12 @@ import {
resolveStaffHomeQuickActions, resolveStaffHomeQuickActions,
type ResolvedCampaignHomeAction, type ResolvedCampaignHomeAction,
} from '@/lib/campaignHomeActions' } from '@/lib/campaignHomeActions'
import type { CampaignQuickActionContext } from '@/lib/campaignQuickActionContext'
import { CAMPAIGN_TERRITORIES_HOME } from '@/lib/campaignPaths' import { CAMPAIGN_TERRITORIES_HOME } from '@/lib/campaignPaths'
import type { CampaignQuickActionContext } from '@/lib/campaignQuickActionContext'
import type { CampaignRole } from '@/lib/campaignRoles' import type { CampaignRole } from '@/lib/campaignRoles'
const isTerritoriesListPath = (pathname: string): boolean => const isTerritoriesListPath = (pathname: string): boolean =>
pathname === CAMPAIGN_TERRITORIES_HOME || pathname === CAMPAIGN_TERRITORIES_HOME || pathname.startsWith(`${CAMPAIGN_TERRITORIES_HOME}/`)
pathname.startsWith(`${CAMPAIGN_TERRITORIES_HOME}/`)
/** /**
* Pathname + role + page context → contextual quick actions. * Pathname + role + page context → contextual quick actions.

View file

@ -73,8 +73,8 @@ describe('toHomeActionButtonProps', () => {
describe('UNCOVERED_MUNICIPALITIES_LIST_HREF', () => { describe('UNCOVERED_MUNICIPALITIES_LIST_HREF', () => {
it('matches canonical municipality list builder (client/server parity)', () => { it('matches canonical municipality list builder (client/server parity)', () => {
expect( expect(buildMunicipalityListHref({ page: 1, coverage: 'sem_assessor', sort: 'votos' }, 1)).toBe(
buildMunicipalityListHref({ page: 1, coverage: 'sem_assessor', sort: 'votos' }, 1), UNCOVERED_MUNICIPALITIES_LIST_HREF,
).toBe(UNCOVERED_MUNICIPALITIES_LIST_HREF) )
}) })
}) })

View file

@ -1,5 +1,6 @@
import { describe, expect, it } from 'vitest' import { describe, expect, it } from 'vitest'
import { UNCOVERED_MUNICIPALITIES_LIST_HREF, homeActionsForRole } from '@/lib/campaignHomeActions'
import { import {
isCampaignActionsPath, isCampaignActionsPath,
isCampaignHomePath, isCampaignHomePath,
@ -12,10 +13,6 @@ import {
QUICK_ACTIONS_SNAP_EXPANDED, QUICK_ACTIONS_SNAP_EXPANDED,
quickActionsSnapIsExpanded, quickActionsSnapIsExpanded,
} from '@/lib/campaignQuickActionSnap' } from '@/lib/campaignQuickActionSnap'
import {
UNCOVERED_MUNICIPALITIES_LIST_HREF,
homeActionsForRole,
} from '@/lib/campaignHomeActions'
describe('campaignQuickActionMount', () => { describe('campaignQuickActionMount', () => {
it('treats Início as exact match only', () => { it('treats Início as exact match only', () => {