diff --git a/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte b/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte index 4f01808..ca1f05f 100644 --- a/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte +++ b/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte @@ -25,7 +25,10 @@ import GradesTable from '$lib/components/grades/GradesTable.svelte'; import SchoolSelect from '$lib/components/select/SchoolSelect.svelte'; import PersonalIdConfirmCheckBox from '$lib/components/checkbox/PersonalIdConfirmCheckBox.svelte'; - import { deriveBirthdateFromPersonalId, isPersonalIdNumberWithBirthdateValid } from '$lib/utils/personalIdFormat'; + import { + deriveBirthdateFromPersonalId, + isPersonalIdNumberWithBirthdateValid + } from '$lib/utils/personalIdFormat'; let pageIndex = 0; let pagesFilled = [false, false, false, false, false, false, false, false]; @@ -72,9 +75,9 @@ schoolName: '', healthInsurance: '', grades: [], - firstSchool: {name: '', field: ''}, - secondSchool: {name: '', field: ''}, - testLanguage: '', + firstSchool: { name: '', field: '' }, + secondSchool: { name: '', field: '' }, + testLanguage: '' }, parents: [ { @@ -136,16 +139,17 @@ semester: yup.string().required() }) .required() - ).required(), + ) + .required(), firstSchool: yup.object().shape({ name: yup.string().required(), - field: yup.string().required(), + field: yup.string().required() }), secondSchool: yup.object().shape({ name: yup.string().required(), - field: yup.string().required(), + field: yup.string().required() }), - testLanguage: yup.string().required(), + testLanguage: yup.string().required() }), parents: yup.array().of( yup.object().shape({ @@ -276,8 +280,8 @@ const isPageInvalid = (index: number): boolean => { switch (index) { - case 0: - if ($typedErrors['personalIdOk'] || $typedErrors['personalIdErr']) { + case 0: + if ($typedErrors['personalIdOk'] || $typedErrors['personalIdErr']) { return true; } break; @@ -343,9 +347,12 @@ break; case 7: // @ts-ignore - if ($typedErrors["candidate"]["firstSchool"].name || $typedErrors["candidate"]["firstSchool"].field || + if ( + $typedErrors['candidate']['firstSchool'].name || + $typedErrors['candidate']['firstSchool'].field || // @ts-ignore - $typedErrors["candidate"]["secondSchool"].name || $typedErrors["candidate"]["secondSchool"].field + $typedErrors['candidate']['secondSchool'].name || + $typedErrors['candidate']['secondSchool'].field ) { return true; } @@ -363,7 +370,6 @@ 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; @@ -473,17 +479,18 @@
@@ -687,12 +693,12 @@ {:else if pageIndex === 7}