mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-24 09:03:11 +00:00
Format B135 wizard back navigation files
This commit is contained in:
parent
28525aab4b
commit
989e3abab8
4 changed files with 12 additions and 11 deletions
|
|
@ -61,9 +61,7 @@ export const WizardTrendNoteStep = ({
|
||||||
useCampaignFormSuccessToast(state, () => {
|
useCampaignFormSuccessToast(state, () => {
|
||||||
recordLastActedMunicipality(municipalitySlug)
|
recordLastActedMunicipality(municipalitySlug)
|
||||||
const sessionEntry = resolveWizardChainEntry(entryAction, 'change-trend')
|
const sessionEntry = resolveWizardChainEntry(entryAction, 'change-trend')
|
||||||
router.push(
|
router.push(wizardChainContinueHref(sessionEntry, 'change-trend', municipalitySlug, returnPath))
|
||||||
wizardChainContinueHref(sessionEntry, 'change-trend', municipalitySlug, returnPath),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,7 @@ export const WizardExpectedVotesStep = ({
|
||||||
|
|
||||||
const continueAfterVotes = () => {
|
const continueAfterVotes = () => {
|
||||||
const sessionEntry = resolveWizardChainEntry(entryAction, 'update-votes')
|
const sessionEntry = resolveWizardChainEntry(entryAction, 'update-votes')
|
||||||
router.push(
|
router.push(wizardChainContinueHref(sessionEntry, 'update-votes', municipalitySlug, returnPath))
|
||||||
wizardChainContinueHref(sessionEntry, 'update-votes', municipalitySlug, returnPath),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleConfirm = () => {
|
const handleConfirm = () => {
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@
|
||||||
import {
|
import {
|
||||||
CAMPAIGN_WIZARD_ACTION_SLUGS,
|
CAMPAIGN_WIZARD_ACTION_SLUGS,
|
||||||
campaignWizardActionIdForSlug,
|
campaignWizardActionIdForSlug,
|
||||||
type CampaignWizardActionId,
|
|
||||||
isWizardReturnPath,
|
isWizardReturnPath,
|
||||||
wizardActionHref,
|
wizardActionHref,
|
||||||
wizardSignalHref,
|
wizardSignalHref,
|
||||||
wizardTrendHref,
|
wizardTrendHref,
|
||||||
|
type CampaignWizardActionId,
|
||||||
} from '@/lib/campaignActionRoutes'
|
} from '@/lib/campaignActionRoutes'
|
||||||
import { CAMPAIGN_HOME } from '@/lib/campaignPaths'
|
import { CAMPAIGN_HOME } from '@/lib/campaignPaths'
|
||||||
|
|
||||||
|
|
@ -198,7 +198,14 @@ export const wizardPreviousHref = (input: WizardPreviousHrefInput): string => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stepKind === 'trend-note') {
|
if (stepKind === 'trend-note') {
|
||||||
return wizardTrendHref(actionSlug, municipalitySlug, undefined, entryAction, undefined, returnPath)
|
return wizardTrendHref(
|
||||||
|
actionSlug,
|
||||||
|
municipalitySlug,
|
||||||
|
undefined,
|
||||||
|
entryAction,
|
||||||
|
undefined,
|
||||||
|
returnPath,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stepKind === 'signal-body') {
|
if (stepKind === 'signal-body') {
|
||||||
|
|
|
||||||
|
|
@ -132,9 +132,7 @@ describe('wizardActionChain', () => {
|
||||||
municipalitySlug: 'cairu',
|
municipalitySlug: 'cairu',
|
||||||
entryAction: 'update-votes',
|
entryAction: 'update-votes',
|
||||||
}),
|
}),
|
||||||
).toBe(
|
).toBe(`${CAMPAIGN_ACTIONS_HOME}/mudar-tendencia?municipio=cairu&entry=update-votes`)
|
||||||
`${CAMPAIGN_ACTIONS_HOME}/mudar-tendencia?municipio=cairu&entry=update-votes`,
|
|
||||||
)
|
|
||||||
expect(
|
expect(
|
||||||
wizardPreviousHref({
|
wizardPreviousHref({
|
||||||
actionSlug: 'atualizar-lideranca',
|
actionSlug: 'atualizar-lideranca',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue