diff --git a/frontend/.typesafe-i18n.json b/frontend/.typesafe-i18n.json index 12eb8a1..7511ef9 100644 --- a/frontend/.typesafe-i18n.json +++ b/frontend/.typesafe-i18n.json @@ -1,7 +1,7 @@ { - "baseLocale": "cs", - "adapter": "svelte", - "esmImports": true, - "outputPath": "./src/translations", - "$schema": "https://unpkg.com/typesafe-i18n@5.20.0/schema/typesafe-i18n.json" -} \ No newline at end of file + "baseLocale": "cs", + "adapter": "svelte", + "esmImports": true, + "outputPath": "./src/translations", + "$schema": "https://unpkg.com/typesafe-i18n@5.20.0/schema/typesafe-i18n.json" +} diff --git a/frontend/static/schoollist.txt b/frontend/src/lib/assets/schoollist.txt similarity index 100% rename from frontend/static/schoollist.txt rename to frontend/src/lib/assets/schoollist.txt diff --git a/frontend/src/lib/components/checkbox/AccountLinkCheckBox.svelte b/frontend/src/lib/components/checkbox/AccountLinkCheckBox.svelte index 55f1438..920a707 100644 --- a/frontend/src/lib/components/checkbox/AccountLinkCheckBox.svelte +++ b/frontend/src/lib/components/checkbox/AccountLinkCheckBox.svelte @@ -4,7 +4,6 @@ export let linkOk: boolean = false; export let linkError: boolean = false; export let applications: Array; - let title1 = $LL.components.checkbox.accountLinkCheckBox.multiple.title({ first: applications[0], second: applications[1] @@ -20,8 +19,6 @@ title2 = $LL.components.checkbox.accountLinkCheckBox.single.title2(); } - $: console.log(linkOk, linkError); - export let error: string = ''; const switchSelection = (id: number) => { diff --git a/frontend/src/lib/components/checkbox/GdprCheckBox.svelte b/frontend/src/lib/components/checkbox/GdprCheckBox.svelte index 90aa6cd..19a4998 100644 --- a/frontend/src/lib/components/checkbox/GdprCheckBox.svelte +++ b/frontend/src/lib/components/checkbox/GdprCheckBox.svelte @@ -13,7 +13,9 @@
{$LL.components.checkbox.gdprCheckBox.title()}
{$LL.components.checkbox.gdprCheckBox.description()}
-
{$LL.components.checkbox.gdprCheckBox.here()}
+
+ {$LL.components.checkbox.gdprCheckBox.here()} +
diff --git a/frontend/src/lib/components/checkbox/PersonalIdConfirmCheckBox.svelte b/frontend/src/lib/components/checkbox/PersonalIdConfirmCheckBox.svelte new file mode 100644 index 0000000..5d04c01 --- /dev/null +++ b/frontend/src/lib/components/checkbox/PersonalIdConfirmCheckBox.svelte @@ -0,0 +1,82 @@ + + +
+ switchSelection(0)} + class:error + on:change + type="checkbox" + id="linkOk" + checked={personalIdOk} + class="peer hidden" + /> + +
+
+ switchSelection(1)} + on:change + type="checkbox" + id="linkError" + checked={personalIdErr} + class="peer hidden" + /> + +
+ + diff --git a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte index 1dae389..ff635f4 100644 --- a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte +++ b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte @@ -160,30 +160,33 @@ {$baseCandidateData.applications[1]} {/if} - {$LL.input.address()}: {$candidateData.candidate.address} {$LL.input.birthDate()}: {$candidateData.candidate.birthdate}{$LL.input.address()}: + {$candidateData.candidate.address} {$LL.input.birthPlace()}: {$candidateData.candidate.birthplace}{$LL.input.birthDate()}: + {$candidateData.candidate.birthdate} {$LL.input.personalIdentificationNumber()}: {$candidateData.candidate.personalIdNumber}{$LL.input.birthPlace()}: + {$candidateData.candidate.birthplace} {$LL.input.schoolIzo()}: {$candidateData.candidate.schoolName}{$LL.input.personalIdentificationNumber()}: + {$candidateData.candidate.personalIdNumber} {$LL.input.insuranceNumber()}: {$candidateData.candidate.healthInsurance}{$LL.input.schoolIzo()}: + {$candidateData.candidate.schoolName} - {$LL.input.telephone()}: {$candidateData.candidate.telephone}{$LL.input.insuranceNumber()}: + {$candidateData.candidate.healthInsurance} + {$LL.input.telephone()}: + {$candidateData.candidate.telephone}
{parent.name + ' ' + parent.surname} {$LL.input.email()}: {parent.email} - {$LL.input.telephone()}: {parent.telephone} + {$LL.input.telephone()}: {parent.telephone}
{/each} diff --git a/frontend/src/lib/components/dashboard/DashboardUploadCard.svelte b/frontend/src/lib/components/dashboard/DashboardUploadCard.svelte index 9541b93..b1aefa8 100644 --- a/frontend/src/lib/components/dashboard/DashboardUploadCard.svelte +++ b/frontend/src/lib/components/dashboard/DashboardUploadCard.svelte @@ -105,7 +105,8 @@ {#if status === 'uploaded'} dispatch('delete'), 150)} + >{$LL.components.dashboard.dashboardUploadCard.delete()} {/if} @@ -133,9 +134,16 @@ > diff --git a/frontend/src/lib/components/grades/GradesTable.svelte b/frontend/src/lib/components/grades/GradesTable.svelte index 165fd4c..0628d1e 100644 --- a/frontend/src/lib/components/grades/GradesTable.svelte +++ b/frontend/src/lib/components/grades/GradesTable.svelte @@ -29,7 +29,7 @@ } return grades; }; - + let gradesLocal: Array = grades.length > 0 ? convertGradeBackendToGrade(grades) diff --git a/frontend/src/lib/components/layout/SplitLayout.svelte b/frontend/src/lib/components/layout/SplitLayout.svelte index eeb618b..779d0b6 100644 --- a/frontend/src/lib/components/layout/SplitLayout.svelte +++ b/frontend/src/lib/components/layout/SplitLayout.svelte @@ -50,7 +50,7 @@ .view { @apply z-10; @apply absolute top-0 right-0 bottom-0 left-0 m-auto md:top-auto md:bottom-auto md:left-auto md:m-0; - @apply md:h-screen md:w-[50vw]; + @apply md:h-screen md:w-[60vw]; @apply md:my-auto; @apply bg-white; } diff --git a/frontend/src/lib/components/select/SchoolSelect/School.svelte b/frontend/src/lib/components/select/SchoolSelect/School.svelte new file mode 100644 index 0000000..2153e34 --- /dev/null +++ b/frontend/src/lib/components/select/SchoolSelect/School.svelte @@ -0,0 +1,41 @@ + + +
  • + {@html itemLabel} +
  • + + diff --git a/frontend/src/lib/components/select/SchoolSelect/SchoolSelect.svelte b/frontend/src/lib/components/select/SchoolSelect/SchoolSelect.svelte new file mode 100644 index 0000000..220fcd8 --- /dev/null +++ b/frontend/src/lib/components/select/SchoolSelect/SchoolSelect.svelte @@ -0,0 +1,145 @@ + + + + +
    +
    + + +
    + {#if filteredSchools.length > 0} +
      + {#each filteredSchools as country, i} + setInputVal(country)} + /> + {/each} +
    + {/if} +
    + + diff --git a/frontend/src/lib/stores/candidate.ts b/frontend/src/lib/stores/candidate.ts index 9b94cf8..dcf9a30 100644 --- a/frontend/src/lib/stores/candidate.ts +++ b/frontend/src/lib/stores/candidate.ts @@ -1,13 +1,19 @@ import type { GradeBackend } from '$lib/components/grades/GradesTable.svelte'; import { writable } from 'svelte/store'; +export interface School { + name: string; + field: string; +} export interface CandidateData { candidate: { name: string; surname: string; + birthSurname: string; birthplace: string; birthdate: string; address: string; + letterAddress: string; telephone: string; citizenship: string; email: string; @@ -16,6 +22,8 @@ export interface CandidateData { schoolName: string; healthInsurance: string; grades: Array; + firstSchool: School; + secondSchool: School; testLanguage: string; }; parents: Array<{ @@ -66,9 +74,11 @@ export const candidateData = writable({ candidate: { name: '', surname: '', + birthSurname: '', birthplace: '', birthdate: '', address: '', + letterAddress: '', telephone: '', citizenship: '', email: '', @@ -77,6 +87,8 @@ export const candidateData = writable({ schoolName: '', healthInsurance: '', grades: [], + firstSchool: { name: '', field: '' }, + secondSchool: { name: '', field: '' }, testLanguage: '' }, parents: [] diff --git a/frontend/src/lib/utils/personalIdFormat.ts b/frontend/src/lib/utils/personalIdFormat.ts new file mode 100644 index 0000000..e3e072e --- /dev/null +++ b/frontend/src/lib/utils/personalIdFormat.ts @@ -0,0 +1,75 @@ +// TODO: nefunguje pro lidi nar. pred 1.1.1954 :D +export const isPersonalIdNumberValid = (personalIdNumber: string): boolean => { + const idFmt = personalIdNumber.split('/').join(''); + + const lastDigitCheck = + Number(idFmt.slice(0, 9)) % 11 === Number(idFmt.at(-1)) || + Number(idFmt.slice(0, 9)) % 11 === 10; // an edge case that could occur + const divisibleBy11 = Number(idFmt) % 11 === 0; + + if (lastDigitCheck && divisibleBy11) { + return true; + } else { + return false; + } +}; + +export const isPersonalIdNumberWithBirthdateValid = ( + personalIdNumber: string, + birthdate: string +): boolean => { + const dateFmt = birthdate + .split('.') + .map((x) => x.padStart(2, '0')) + .reverse() + .join('') + .slice(2); + const idFmt = personalIdNumber.split('/').join(''); + + const divisionValid = isPersonalIdNumberValid(personalIdNumber); + + const idMonth = Number(idFmt.slice(2, 4)); + const dateMonth = Number(dateFmt.slice(2, 4)); + const monthValid = + idMonth === dateMonth || + idMonth === dateMonth + 50 || + idMonth === dateMonth + 20 || + idMonth === dateMonth + 70; + + if ( + idFmt.slice(0, 2) === dateFmt.slice(0, 2) && + monthValid && + idFmt.slice(4, 6) === dateFmt.slice(4, 6) && + divisionValid + ) { + return true; + } else { + return false; + } +}; + +export const deriveBirthdateFromPersonalId = ( + personalIdNumber: string +): [birthdate: string, sex: 'MUŽ' | 'ŽENA'] => { + const year = Number(personalIdNumber.slice(0, 2)); + const idMonth = Number(personalIdNumber.slice(2, 4)); + let month; + let sex: 'MUŽ' | 'ŽENA'; + if (idMonth > 12 && idMonth <= 32) { + month = idMonth - 20; + sex = 'MUŽ'; + } else if (idMonth > 50 && idMonth <= 52) { + month = idMonth - 50; + sex = 'ŽENA'; + } else if (idMonth > 70 && idMonth <= 82) { + month = idMonth - 70; + sex = 'ŽENA'; + } else { + month = idMonth; + sex = 'MUŽ'; + } + const day = Number(personalIdNumber.slice(4, 6)); + + const birthdate = `${day}.${month}.${year}`; + return [birthdate, sex]; +}; diff --git a/frontend/src/routes/(admin)/admin/(authenticated)/candidate/[code=application]/+page.server.ts b/frontend/src/routes/(admin)/admin/(authenticated)/candidate/[code=application]/+page.server.ts index 5088c69..15c6959 100644 --- a/frontend/src/routes/(admin)/admin/(authenticated)/candidate/[code=application]/+page.server.ts +++ b/frontend/src/routes/(admin)/admin/(authenticated)/candidate/[code=application]/+page.server.ts @@ -10,9 +10,11 @@ export const load: PageServerLoad = async ({ fetch, params }) => { candidate: { name: '', surname: '', + birthSurname: '', birthplace: '', birthdate: '', address: '', + letterAddress: '', telephone: '', citizenship: '', email: '', @@ -21,6 +23,8 @@ export const load: PageServerLoad = async ({ fetch, params }) => { schoolName: '', healthInsurance: '', grades: [], + firstSchool: { name: '', field: '' }, + secondSchool: { name: '', field: '' }, testLanguage: '' }, parents: [] diff --git a/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte b/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte index 492a3fa..d88e8f7 100644 --- a/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte +++ b/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte @@ -6,7 +6,6 @@ import Submit from '$lib/components/button/Submit.svelte'; import GdprCheckBox from '$lib/components/checkbox/GdprCheckBox.svelte'; - import Home from '$lib/components/icons/Home.svelte'; import SchoolBadge from '$lib/components/icons/SchoolBadge.svelte'; import SplitLayout from '$lib/components/layout/SplitLayout.svelte'; import SelectField from '$lib/components/select/SelectField.svelte'; @@ -24,10 +23,14 @@ import type { CandidateData } from '$lib/stores/candidate'; import AccountLinkCheckBox from '$lib/components/checkbox/AccountLinkCheckBox.svelte'; import GradesTable from '$lib/components/grades/GradesTable.svelte'; + import SchoolSelect from '$lib/components/select/SchoolSelect/SchoolSelect.svelte'; + import PersonalIdConfirmCheckBox from '$lib/components/checkbox/PersonalIdConfirmCheckBox.svelte'; + import { isPersonalIdNumberWithBirthdateValid } from '$lib/utils/personalIdFormat'; - const pageCount = 7; let pageIndex = 0; - let pagesFilled = [false, false, false, false, false, false, false]; + let pagesFilled = [false, false, false, false, false, false, false, false]; + let editModePageIndex = 3; + const pageCount = pagesFilled.length; let pageTexts = [ $LL.candidate.register.second.title(), $LL.candidate.register.third.title(), @@ -42,19 +45,24 @@ let details = data.candidate; let baseCandidateDetails = data.whoami; + let personalIdBirthdateMatch = true; const formInitialValues = { gdpr: false, + personalIdOk: false, + personalIdErr: false, linkOk: false, linkError: false, candidate: { name: '', surname: '', + birthSurname: '', email: '', telephone: '', birthplace: '', birthdate: '', sex: '', address: '', + letterAddress: '', street: '', houseNumber: '', city: '', @@ -64,6 +72,8 @@ schoolName: '', healthInsurance: '', grades: [], + firstSchool: { name: '', field: '' }, + secondSchool: { name: '', field: '' }, testLanguage: '' }, parents: [ @@ -84,6 +94,8 @@ const formValidationSchema = yup.object().shape({ gdpr: yup.boolean().oneOf([true]), + personalIdOk: yup.boolean().oneOf([true]), + personalIdErr: yup.boolean().oneOf([false]), linkOk: yup.boolean().oneOf([true]), linkError: yup.boolean().oneOf([false]), candidate: yup.object().shape({ @@ -99,6 +111,7 @@ .string() .required() .matches(/^([0-3]?[0-9])\.(0?[1-9]|1[0-2])\.[0-9]{4}$/), + birthSurname: yup.string().required(), sex: yup.string(), address: yup.string(), street: yup.string().required(), @@ -126,6 +139,14 @@ .required() ) .required(), + firstSchool: yup.object().shape({ + name: yup.string().required(), + field: yup.string().required() + }), + secondSchool: yup.object().shape({ + name: yup.string().required(), + field: yup.string().required() + }), testLanguage: yup.string().required() }), parents: yup.array().of( @@ -167,7 +188,12 @@ unknown > ? { - [K2 in keyof (typeof formInitialValues)[K]]: string; + [K2 in keyof (typeof formInitialValues)[K]]: (typeof formInitialValues)[K][K2] extends Record< + string, + unknown + > + ? { [K4 in keyof (typeof formInitialValues)[K][K2]]: string } + : string; } : (typeof formInitialValues)[K] extends Array> ? Array<{ [K3 in keyof (typeof formInitialValues)[K][number]]: string }> @@ -177,80 +203,34 @@ // TODO: https://github.com/tjinauyeung/svelte-forms-lib/issues/171!! (Zatím tenhle mega typ) $: typedErrors = errors as unknown as Writable; - // TODO: validate on admin dashboard, move somewhere - // TODO: nefunguje pro lidi nar. pred 1.1.1954 :D - const isPersonalIdNumberValid = (personalIdNumber: string): boolean => { - const idFmt = personalIdNumber.split('/').join(''); - - const lastDigitCheck = - Number(idFmt.slice(0, 9)) % 11 === Number(idFmt.at(-1)) || - Number(idFmt.slice(0, 9)) % 11 === 10; // an edge case that could occur - const divisibleBy11 = Number(idFmt) % 11 === 0; - - if (lastDigitCheck && divisibleBy11) { - return true; - } else { - return false; - } - }; - - const isPersonalIdNumberWithBirthdateValid = ( - personalIdNumber: string, - birthdate: string - ): boolean => { - const dateFmt = birthdate - .split('.') - .map((x) => x.padStart(2, '0')) - .reverse() - .join('') - .slice(2); - const idFmt = personalIdNumber.split('/').join(''); - - const divisionValid = isPersonalIdNumberValid(personalIdNumber); - - const idMonth = Number(idFmt.slice(2, 4)); - const dateMonth = Number(dateFmt.slice(2, 4)); - const monthValid = - idMonth === dateMonth || - idMonth === dateMonth + 50 || - idMonth === dateMonth + 20 || - idMonth === dateMonth + 70; - - if ( - idFmt.slice(0, 2) === dateFmt.slice(0, 2) && - monthValid && - idFmt.slice(4, 6) === dateFmt.slice(4, 6) && - divisionValid - ) { - return true; - } else { - return false; - } - }; - + $: console.log($typedErrors); const onSubmit = async (values: CandidateData) => { + if (pageIndex === 3) { + if (values.candidate.citizenship === 'Česká republika') { + if ( + !isPersonalIdNumberWithBirthdateValid( + values.candidate.personalIdNumber, + values.candidate.birthdate + ) + ) { + toast.push('Rodné číslo neodpovídá oficiální specifikaci či datumu narození', { + theme: { + '--toastColor': 'mintcream', + '--toastBackground': '#b91c1c', + '--toastBarBackground': '#7f1d1d' + } + }); + personalIdBirthdateMatch = false; + throw new Error('Rodné číslo neodpovídá datumu narození'); + } + } + personalIdBirthdateMatch = true; + } if (pageIndex === pageCount) { + console.log('submitting'); // clone values to oldValues let oldValues = JSON.parse(JSON.stringify(values)); try { - if (values.candidate.citizenship === 'Česká republika') { - if ( - !isPersonalIdNumberWithBirthdateValid( - values.candidate.personalIdNumber, - values.candidate.birthdate - ) - ) { - // alert('Rodné číslo neodpovídá oficiální specifikaci či datumu narození'); // TODO: alerts - toast.push('Rodné číslo neodpovídá oficiální specifikaci či datumu narození', { - theme: { - '--toastColor': 'mintcream', - '--toastBackground': '#b91c1c', - '--toastBarBackground': '#7f1d1d' - } - }); - throw new Error('Rodné číslo neodpovídá datumu narození'); - } - } // @ts-ignore // love javascript delete values.undefined; // convert birthdate from dd.mm.yyyy to yyyy-mm-dd @@ -304,40 +284,51 @@ const isPageInvalid = (index: number): boolean => { switch (index) { case 0: - if ($typedErrors['linkOk'] || $typedErrors['linkError']) { + if ($typedErrors['personalIdOk'] || $typedErrors['personalIdErr']) { return true; } break; case 1: - if ($typedErrors['gdpr']) { + if ($typedErrors['linkOk'] || $typedErrors['linkError']) { return true; } break; case 2: + if ($typedErrors['gdpr']) { + return true; + } + break; + case 3: if ( $typedErrors['candidate']['name'] || $typedErrors['candidate']['surname'] || $typedErrors['candidate']['email'] || - $typedErrors['candidate']['telephone'] + $typedErrors['candidate']['telephone'] || + $typedErrors['candidate']['city'] || + $typedErrors['candidate']['street'] || + $typedErrors['candidate']['houseNumber'] || + $typedErrors['candidate']['zip'] ) { return true; } break; - case 3: + case 4: if ( - $typedErrors['candidate']['birthplace'] || + $typedErrors['candidate']['citizenship'] || + $typedErrors['candidate']['personalIdNumber'] || + $typedErrors['candidate']['schoolName'] || + $typedErrors['candidate']['healthInsurance'] || $typedErrors['candidate']['birthdate'] || - $typedErrors['candidate']['street'] || - $typedErrors['candidate']['houseNumber'] || - $typedErrors['candidate']['city'] || - $typedErrors['candidate']['zip'] - // $typedErrors['candidate']['address'] + $typedErrors['candidate']['birthplace'] || + $typedErrors['candidate']['personalIdNumber'] || + $typedErrors['candidate']['testLanguage'] || + !personalIdBirthdateMatch ) { return true; } break; - case 4: + case 5: if ( $typedErrors['parents'][0]['name'] || $typedErrors['parents'][0]['surname'] || @@ -347,7 +338,7 @@ return true; } break; - case 5: + case 6: if ( $typedErrors['parents'][1]['name'] || $typedErrors['parents'][1]['surname'] || @@ -357,17 +348,17 @@ return true; } break; - case 6: + case 7: if ( - $typedErrors['candidate']['citizenship'] || - $typedErrors['candidate']['personalIdNumber'] || - $typedErrors['candidate']['schoolName'] || - $typedErrors['candidate']['healthInsurance'] + $typedErrors['candidate']['firstSchool']['name'] || + $typedErrors['candidate']['firstSchool']['field'] || + $typedErrors['candidate']['secondSchool']['name'] || + $typedErrors['candidate']['secondSchool']['field'] ) { return true; } break; - case 7: + case 8: if ($typedErrors['candidate']['grades'].length > 0) return true; break; default: @@ -380,6 +371,11 @@ return '+' + telephone.match(/[0-9]{1,3}/g)!.join(' '); }; + /* $form.candidate.personalIdNumber = data.whoami.personalIdNumber; + const [birthdate, sex] = deriveBirthdateFromPersonalId(data.whoami.personalIdNumber); + $form.candidate.birthdate = birthdate; + $form.candidate.sex = sex; */ + if (details !== undefined) { details.candidate.birthdate = details.candidate.birthdate.split('-').reverse().join('.'); @@ -387,10 +383,13 @@ details.parents.map( (x) => (x.telephone = x.telephone != '' ? formatTelephone(x.telephone) : '') ); + form.set({ gdpr: true, linkOk: true, linkError: false, + personalIdOk: true, + personalIdErr: false, candidate: { ...details.candidate, street: details.candidate.address.split(',')[0].split(' ')[0], @@ -414,23 +413,35 @@ } ] }); - pageIndex = 2; // skip gdpr page + pageIndex = editModePageIndex; // skip gdpr page pageTexts[2] = $LL.candidate.register.fourth.titleEdit(); } -
    -
    - - {#if pageIndex !== 0 && pageIndex !== 7} -
    - -
    - {/if} +
    +
    +
    + +
    + {:else if pageIndex === 1}

    {$LL.candidate.register.first.title()}

    @@ -445,7 +456,7 @@ />

    - {:else if pageIndex === 1} + {:else if pageIndex === 2}

    {pageTexts[0]}

    @@ -456,89 +467,104 @@

    - {:else if pageIndex === 2} + {:else if pageIndex === 3}

    {pageTexts[1]}

    {$LL.candidate.register.third.description()}

    -
    - - - - - - - - - +
    +
    +
    + + + + + + +
    +
    + + + + + + +
    + + + +
    +
    + + + + + + +
    - {:else if pageIndex === 3} + {:else if pageIndex === 4}

    {pageTexts[2]}

    {$LL.candidate.register.fourth.description()}

    -
    - - + + - - +
    -
    - - - - - -
    - -
    -
    -
    -
    -
    +
    + +
    +
    +
    + {#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship} + + {:else} + + {/if}
    - {:else if pageIndex === 4} +
    + + {#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship} + + {:else} + + {/if} + + + + + +
    + {:else if pageIndex === 5}

    {pageTexts[3]}

    {$LL.candidate.register.fifth.description()} @@ -585,7 +663,7 @@ />

    - {:else if pageIndex === 5} + {:else if pageIndex === 6}

    {pageTexts[4]}

    {$LL.candidate.register.sixth.description()} @@ -614,75 +692,28 @@ />

    - {:else if pageIndex === 6} + {:else if pageIndex === 7}

    {pageTexts[5]}

    -

    +

    {$LL.candidate.register.seventh.description()}

    -
    -
    - - - - - - -
    -
    - - {#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship} - - {:else} - - {/if} - - - - - -
    -
    -
    - {#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship} - + + - {:else} - + + - {/if} +
    - {:else if pageIndex === 7} + {:else if pageIndex === 8}

    {pageTexts[6]}

    {$LL.candidate.register.eighth.description()} @@ -693,7 +724,7 @@ /> {/if}

    -
    +
    { @@ -711,7 +742,7 @@ />
    -
    +
    {#each Array(pageCount + 1) as _, i}