teqo/src/lib/campaignWizardCopy.ts
Francisco Ignácio Fontoura Solla 34e5c6ed42 B61: wizard vote step with scenario passes and batch save.
Staff can adjust municipality expected votes through média→pessimista→otimista steps with shortcuts, coherence warnings, and a single POST on completion.
2026-07-30 01:16:19 -03:00

40 lines
1.6 KiB
TypeScript

import { CAMPAIGN_WIZARD_ACTION_SLUGS } from '@/lib/campaignActionRoutes'
/** Shared copy for UX-1 wizard steps (B60 municipality search, B61 vote adjustment). */
export const WIZARD_MUNICIPALITY_STEP_TITLE = 'Em qual município?' as const
export const WIZARD_MUNICIPALITY_SEARCH_LABEL = 'Buscar município' as const
export const WIZARD_MUNICIPALITY_SEARCH_PLACEHOLDER = 'Nome do município…' as const
export const WIZARD_MUNICIPALITY_SEARCH_EMPTY = 'Nenhum município encontrado.' as const
export const WIZARD_VOTES_SAVED_MESSAGE = 'Votos estimados atualizados.' as const
export const WIZARD_VOTES_NEXT_FLOW_PLACEHOLDER =
'Próximo passo deste fluxo (sinal, tendência ou resumo) em breve.' as const
export const WIZARD_VOTES_SAVE_ERROR_MESSAGE =
'Não foi possível salvar os votos estimados. Tente novamente.' as const
export const WIZARD_VOTES_INVALID_DRAFT_MESSAGE =
'Informe um número válido ou deixe em branco.' as const
export const wizardVoteReturnToScenarioLabel = (scenarioLabel: string): string =>
`Voltar para ${scenarioLabel.toLowerCase()}`
const WIZARD_NEXT_STEP_GENERIC_PLACEHOLDER = 'Próximo passo deste fluxo em breve.' as const
export const wizardNextStepTitle = (actionSlug: string): string => {
if (actionSlug === CAMPAIGN_WIZARD_ACTION_SLUGS['update-votes']) {
return 'Ajustar votos estimados'
}
return 'Continuar'
}
export const wizardNextStepPlaceholder = (actionSlug: string): string => {
if (actionSlug === CAMPAIGN_WIZARD_ACTION_SLUGS['update-votes']) {
return WIZARD_VOTES_NEXT_FLOW_PLACEHOLDER
}
return WIZARD_NEXT_STEP_GENERIC_PLACEHOLDER
}