fix: format + wire WIZARD_TREND_SAVED_MESSAGE for knip
This commit is contained in:
parent
f0f3d4534d
commit
fcbc463990
6 changed files with 13 additions and 19 deletions
|
|
@ -15,6 +15,7 @@ import {
|
|||
parseWizardEntryActionParam,
|
||||
parseWizardMunicipioParam,
|
||||
resolveWizardSignalTypeParam,
|
||||
resolveWizardTrendStatusParam,
|
||||
WIZARD_ENTRY_ACTION_QUERY_KEY,
|
||||
WIZARD_MUNICIPIO_QUERY_KEY,
|
||||
WIZARD_NOTE_PREFILL_QUERY_KEY,
|
||||
|
|
@ -27,7 +28,6 @@ import {
|
|||
wizardActionHref,
|
||||
wizardSignalHref,
|
||||
wizardTrendHref,
|
||||
resolveWizardTrendStatusParam,
|
||||
} from '@/lib/campaignActionRoutes'
|
||||
import { CAMPAIGN_HOME } from '@/lib/campaignPaths'
|
||||
import {
|
||||
|
|
@ -171,7 +171,9 @@ export default async function CampaignActionWizardPage({
|
|||
trendStatus === currentStatus ||
|
||||
!selectablePoliticalTrendStatuses(currentStatus).includes(trendStatus)
|
||||
) {
|
||||
redirect(wizardTrendHref(slug, municipalitySlug, undefined, entryAction, prefillExtraParams))
|
||||
redirect(
|
||||
wizardTrendHref(slug, municipalitySlug, undefined, entryAction, prefillExtraParams),
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import {
|
|||
requiredRelationshipFormValue,
|
||||
voteEstimateScenarioFromForm,
|
||||
} from '@/lib/formData'
|
||||
import { WIZARD_TREND_SAVED_MESSAGE } from '@/lib/politicalTrendWizardUi'
|
||||
import {
|
||||
MUNICIPALITY_ADVISOR_MEMBERSHIP_UNRESTRICTED_MESSAGE,
|
||||
parsePoliticalTrendStatusFormValue,
|
||||
|
|
@ -61,7 +62,7 @@ export const setMunicipalityPoliticalTrendFormAction = async (
|
|||
note: nullableFormText(formData, 'trendNote'),
|
||||
})
|
||||
revalidateMunicipalityListPaths({ slug: optionalMunicipalitySlugFromForm(formData) })
|
||||
return { message: 'Tendência política registrada.' }
|
||||
return { message: WIZARD_TREND_SAVED_MESSAGE }
|
||||
},
|
||||
safeMessages: municipalityStaffEditSafeMessages,
|
||||
genericMessage:
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ export const WizardTrendChoiceStep = ({
|
|||
<Icon className="size-5 shrink-0" aria-hidden />
|
||||
<div className="flex flex-col gap-0.5">
|
||||
<span className="text-sm font-medium">{entry.label}</span>
|
||||
<span className="line-clamp-2 text-xs opacity-80">{entry.changeDescription}</span>
|
||||
<span className="line-clamp-2 text-xs opacity-80">
|
||||
{entry.changeDescription}
|
||||
</span>
|
||||
</div>
|
||||
</Link>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
import {
|
||||
Minus,
|
||||
ThumbsDown,
|
||||
ThumbsUp,
|
||||
type LucideIcon,
|
||||
} from 'lucide-react'
|
||||
import { Minus, ThumbsDown, ThumbsUp, type LucideIcon } from 'lucide-react'
|
||||
|
||||
import {
|
||||
politicalTrendStatuses,
|
||||
type PoliticalTrendStatusValue,
|
||||
} from '@/lib/schemas/municipality'
|
||||
import { politicalTrendStatuses, type PoliticalTrendStatusValue } from '@/lib/schemas/municipality'
|
||||
|
||||
const politicalTrendDisplayLabels: Record<PoliticalTrendStatusValue, string> = {
|
||||
favoravel: 'Favorável',
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
import type { CampaignWizardActionId } from '@/lib/campaignActionRoutes'
|
||||
import { CAMPAIGN_HOME } from '@/lib/campaignPaths'
|
||||
import {
|
||||
politicalTrendStatuses,
|
||||
type PoliticalTrendStatusValue,
|
||||
} from '@/lib/schemas/municipality'
|
||||
import { politicalTrendStatuses, type PoliticalTrendStatusValue } from '@/lib/schemas/municipality'
|
||||
import {
|
||||
municipalitySignalTypeLabels,
|
||||
type MunicipalitySignalType,
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import {
|
|||
resolvePoliticalTrendNotePrefillSource,
|
||||
resolveWizardTrendSkip,
|
||||
selectablePoliticalTrendStatuses,
|
||||
wizardTrendChoiceStepTitle,
|
||||
WIZARD_TREND_SKIP_LABEL,
|
||||
WIZARD_TREND_UNREGISTERED_TITLE,
|
||||
wizardTrendChoiceStepTitle,
|
||||
} from '@/lib/politicalTrendWizardUi'
|
||||
import { politicalTrendStatuses } from '@/lib/schemas/municipality'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue