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 { 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 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; @apply min-w-40;
text-align-last: center;
} }
option { option {
@apply w-full; @apply w-full;

View file

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