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
/** Staff Início catalog with hrefs — shared by quick-action registries (B81+). */
const staffHomeQuickActionsByRole = new Map<
CampaignRole,
readonly ResolvedCampaignHomeAction[]
>()
const staffHomeQuickActionsByRole = new Map<CampaignRole, readonly ResolvedCampaignHomeAction[]>()
export const resolveStaffHomeQuickActions = (
role: CampaignRole,

View file

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

View file

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

View file

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