mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-14 03:51:27 +00:00
feat: school name, health insurance fill in register, show on candidate dashboard
This commit is contained in:
parent
818fa306ce
commit
3a498caeef
3 changed files with 49 additions and 12 deletions
|
|
@ -158,8 +158,9 @@
|
|||
>{$candidateData.candidate.personalIdNumber}</span
|
||||
></span
|
||||
>
|
||||
<span>Telefon: <span class="font-bold">{$candidateData.candidate.telephone}</span></span
|
||||
>
|
||||
<span>IČO/Název školy: <span class="font-bold">{$candidateData.candidate.schoolName}</span></span>
|
||||
<span>Číslo zdravotní pojišťovny: <span class="font-bold">{$candidateData.candidate.healthInsurance}</span></span>
|
||||
<span>Telefon: <span class="font-bold">{$candidateData.candidate.telephone}</span></span>
|
||||
</div>
|
||||
<div
|
||||
use:tippy={{
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ export interface CandidateData {
|
|||
sex: string;
|
||||
study: string;
|
||||
personalIdNumber: string;
|
||||
schoolName: string;
|
||||
healthInsurance: string;
|
||||
};
|
||||
parents: Array<{
|
||||
name: string;
|
||||
|
|
@ -60,7 +62,9 @@ export const candidateData = writable<CandidateData>({
|
|||
email: '',
|
||||
sex: '',
|
||||
study: '',
|
||||
personalIdNumber: ''
|
||||
personalIdNumber: '',
|
||||
schoolName: '',
|
||||
healthInsurance: ''
|
||||
},
|
||||
parents: []
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@
|
|||
zip: '',
|
||||
citizenship: '',
|
||||
personalIdNumber: '',
|
||||
schoolName: '',
|
||||
healthInsurance: '',
|
||||
study: ''
|
||||
},
|
||||
parents: [
|
||||
|
|
@ -97,6 +99,8 @@
|
|||
zip: yup.string().required(),
|
||||
citizenship: yup.string().required(),
|
||||
personalIdNumber: yup.string().required(),
|
||||
schoolName: yup.string().required(),
|
||||
healthInsurance: yup.number().required(),
|
||||
study: yup.string().required()
|
||||
}),
|
||||
parents: yup.array().of(
|
||||
|
|
@ -313,7 +317,9 @@
|
|||
if (
|
||||
$typedErrors['candidate']['citizenship'] ||
|
||||
$typedErrors['candidate']['personalIdNumber'] ||
|
||||
$typedErrors['candidate']['study']
|
||||
$typedErrors['candidate']['schoolName'] ||
|
||||
$typedErrors['candidate']['healthInsurance'] ||
|
||||
$typedErrors['candidate']['study']
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -569,7 +575,7 @@
|
|||
Zadejte prosím své občanství, rodné číslo, či jeho alternativu Vaší země a obor na který
|
||||
se hlásíte.
|
||||
</p>
|
||||
<div class="flex w-full flex-row md:flex-col">
|
||||
<div class="flex w-full flex-col">
|
||||
<span class="field">
|
||||
<SelectField
|
||||
error={$typedErrors['candidate']['citizenship']}
|
||||
|
|
@ -579,13 +585,39 @@
|
|||
options={['Česká republika', 'Slovenská republika', 'Ukrajina', 'Jiné']}
|
||||
/>
|
||||
</span>
|
||||
<span class="field ml-2 md:ml-0">
|
||||
<TextField
|
||||
on:change={handleChange}
|
||||
type="text"
|
||||
placeholder="Evidenční číslo přihlášky"
|
||||
/>
|
||||
</span>
|
||||
<div class="field flex flex-row">
|
||||
|
||||
<span>
|
||||
{#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship}
|
||||
<TextField
|
||||
error={$typedErrors['candidate']['schoolName']}
|
||||
on:change={handleChange}
|
||||
type="number"
|
||||
bind:value={$form.candidate.schoolName}
|
||||
placeholder="IZO školy"
|
||||
/>
|
||||
{:else}
|
||||
<TextField
|
||||
error={$typedErrors['candidate']['schoolName']}
|
||||
on:change={handleChange}
|
||||
type="text"
|
||||
bind:value={$form.candidate.schoolName}
|
||||
placeholder="Název školy"
|
||||
/>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<TextField
|
||||
error={$typedErrors['candidate']['healthInsurance']}
|
||||
on:change={handleChange}
|
||||
type="text"
|
||||
bind:value={$form.candidate.healthInsurance}
|
||||
placeholder="Číslo zdravotní pojišťovny"
|
||||
/>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="field flex items-center justify-center">
|
||||
{#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship}
|
||||
|
|
|
|||
Loading…
Reference in a new issue