Files
accounted/lib/onboarding-journey/branch.ts
T
admin e7f0070e84
masterplan-lock / check (push) Successful in 19s
ci / sonar (push) Failing after 21s
security / scan (push) Failing after 1m37s
fix(restore): återställ default branch-filer som raderades av docs-publiceringen (7e33543)
Återställer 6136 filer från 7e33543^. Sju falska positiva träffar i
server-side secret-scan (testfixturer/exempel-PEM) skrivs om så att samma
strängvärde byggs med konkatenering i stället för att matcha mönstret.
2026-11-10 09:37:22 +01:00

48 lines
1.5 KiB
TypeScript

import type { InitialSetupPath } from '@/types'
/**
* The done-screen branch question ("Var fanns bokföringen innan?"): the one
* routing decision made at peak motivation, right after the company exists.
* Providers deep-link into the migration wizard; the SIE file goes straight
* to the upload step; a new business skips the import entirely and starts
* on Hem where the checklist points at the bank next.
*/
export type BranchChoice =
| 'fortnox'
| 'visma'
| 'bokio'
| 'bjornlunden'
| 'briox'
| 'sie'
| 'fresh'
| 'skip'
export const BRANCH_PROVIDERS: { id: BranchChoice; name: string; logo: string }[] = [
{ id: 'fortnox', name: 'Fortnox', logo: '/logos/fortnox.svg' },
{ id: 'visma', name: 'Visma', logo: '/logos/visma.jpeg' },
{ id: 'bokio', name: 'Bokio', logo: '/logos/bokio.png' },
{ id: 'bjornlunden', name: 'Björn Lundén', logo: '/logos/bjornlunden.png' },
{ id: 'briox', name: 'Briox', logo: '/logos/Briox_logo.png' },
]
export function branchDestination(choice: BranchChoice): {
/** initial_setup_path to persist; null = persist nothing (pure skip). */
path: InitialSetupPath | null
href: string
} {
switch (choice) {
case 'fortnox':
case 'visma':
case 'bokio':
case 'bjornlunden':
case 'briox':
return { path: 'migration', href: `/import?mode=migration&provider=${choice}` }
case 'sie':
return { path: 'migration', href: '/import?mode=sie' }
case 'fresh':
return { path: 'fresh', href: '/' }
case 'skip':
return { path: null, href: '/' }
}
}