Merge pull request #101 from EETagent/registration_countries_personal_id

(frontend) Personal Id only for CZ, select for countries
This commit is contained in:
Vojtěch Jungmann 2022-12-22 12:19:02 +01:00 committed by GitHub
commit 88282f2f13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 10 deletions

View file

@ -39,7 +39,6 @@
select {
@apply hover:border-sspsBlue w-full rounded-lg border border-2 bg-[#f8fafb] p-3 text-xl shadow-lg outline-none transition-colors duration-300;
@apply min-w-40;
text-align-last: center;
}
option {
@apply w-full;

View file

@ -403,12 +403,12 @@
</p>
<div class="flex w-full flex-row md:flex-col">
<span class="mt-8 w-full">
<TextField
<SelectField
error={$typedErrors['candidate']['citizenship']}
on:change={handleChange}
bind:value={$form.candidate.citizenship}
type="text"
placeholder="Občanství"
options={['Česká republika', 'Slovenská republika', 'Ukrajina', 'Jiné']}
/>
</span>
<span class="mt-8 ml-2 w-full md:ml-0">
@ -416,13 +416,21 @@
</span>
</div>
<div class="mt-8 flex w-full items-center justify-center">
<IdField
error={$typedErrors['candidate']['personalIdNumber']}
on:change={handleChange}
bind:value={$form.candidate.personalIdNumber}
placeholder="Rodné číslo"
helperText="Rodné číslo musí být ve formátu 123456/7890"
/>
{#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship}
<IdField
error={$typedErrors['candidate']['personalIdNumber']}
on:change={handleChange}
bind:value={$form.candidate.personalIdNumber}
placeholder="Rodné číslo"
/>
{:else}
<TextField
error={$typedErrors['candidate']['personalIdNumber']}
on:change={handleChange}
bind:value={$form.candidate.personalIdNumber}
placeholder="Rodné číslo"
/>
{/if}
<span class="ml-2">
<SelectField
error={$typedErrors['candidate']['study']}