mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-08 17:20:52 +00:00
Merge pull request #111 from EETagent/feature_edit_details_vylepseni
This commit is contained in:
commit
d74a66832f
2 changed files with 22 additions and 15 deletions
|
|
@ -10,19 +10,25 @@
|
||||||
|
|
||||||
let value: string = '';
|
let value: string = '';
|
||||||
|
|
||||||
$: {
|
if (valueName && valueSurname) {
|
||||||
const parsed = value.trim().split(' ');
|
value = `${valueName} ${valueSurname}`;
|
||||||
if (parsed.length > 1) {
|
} else if (valueName) {
|
||||||
valueName = parsed[0];
|
value = valueName;
|
||||||
valueSurname = parsed[1];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
$: {
|
||||||
if (valueName && valueSurname) {
|
const parsed = value.trim().split(' ');
|
||||||
value = `${valueName} ${valueSurname}`;
|
if (parsed.length == 2) {
|
||||||
|
valueName = parsed[0];
|
||||||
|
valueSurname = parsed[1];
|
||||||
|
} else if (parsed.length > 2) {
|
||||||
|
valueName = parsed[0];
|
||||||
|
valueSurname = parsed[parsed.length - 1];
|
||||||
|
} else {
|
||||||
|
valueName = parsed[0];
|
||||||
|
valueSurname = '';
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
export let error: string = '';
|
export let error: string = '';
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@
|
||||||
'Zpracování osobních údajů',
|
'Zpracování osobních údajů',
|
||||||
'Registrace',
|
'Registrace',
|
||||||
'Něco o Vás',
|
'Něco o Vás',
|
||||||
'Kontakt na zákonného zástupce',
|
'Zákonný zástupce',
|
||||||
'Kontakt na druhého zákonného zástupce',
|
'Druhý zákonný zástupce',
|
||||||
'Poslední krok'
|
'Poslední krok'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -239,6 +239,7 @@
|
||||||
case 1:
|
case 1:
|
||||||
if (
|
if (
|
||||||
$typedErrors['candidate']['name'] ||
|
$typedErrors['candidate']['name'] ||
|
||||||
|
$typedErrors['candidate']['surname'] ||
|
||||||
$typedErrors['candidate']['email'] ||
|
$typedErrors['candidate']['email'] ||
|
||||||
$typedErrors['candidate']['telephone']
|
$typedErrors['candidate']['telephone']
|
||||||
) {
|
) {
|
||||||
|
|
@ -362,7 +363,7 @@
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<span class="field">
|
<span class="field">
|
||||||
<NameField
|
<NameField
|
||||||
error={$typedErrors['candidate']['name']}
|
error={$typedErrors['candidate']['name'] || $typedErrors['candidate']['surname']}
|
||||||
on:change={handleChange}
|
on:change={handleChange}
|
||||||
bind:valueName={$form.candidate.name}
|
bind:valueName={$form.candidate.name}
|
||||||
bind:valueSurname={$form.candidate.surname}
|
bind:valueSurname={$form.candidate.surname}
|
||||||
|
|
@ -391,7 +392,7 @@
|
||||||
<h1 class="title mt-8">{pageTexts[2]}</h1>
|
<h1 class="title mt-8">{pageTexts[2]}</h1>
|
||||||
<p class="description mt-8 block text-center">
|
<p class="description mt-8 block text-center">
|
||||||
Pro registraci je potřeba vyplnit několik údajů o Vás. Tyto údaje budou použity pro
|
Pro registraci je potřeba vyplnit několik údajů o Vás. Tyto údaje budou použity pro
|
||||||
přijímací řízení. Všechny údaje jsou důležité a bez nich se registrace nezdaří.
|
přijímací řízení. Všechny údaje jsou důležité.
|
||||||
</p>
|
</p>
|
||||||
<div class="flex w-full flex-col">
|
<div class="flex w-full flex-col">
|
||||||
<span class="field">
|
<span class="field">
|
||||||
|
|
@ -507,7 +508,7 @@
|
||||||
{:else if pageIndex === 5}
|
{:else if pageIndex === 5}
|
||||||
<h1 class="title mt-8">{pageTexts[5]}</h1>
|
<h1 class="title mt-8">{pageTexts[5]}</h1>
|
||||||
<p class="description mt-8 block text-center">
|
<p class="description mt-8 block text-center">
|
||||||
Zadejte prosím své občanství, rodné číslo a obor na který se hlásíte.
|
Zadejte prosím své občanství, rodné číslo, či jeho alternativu Vaší země a obor na který se hlásíte.
|
||||||
</p>
|
</p>
|
||||||
<div class="flex w-full flex-row md:flex-col">
|
<div class="flex w-full flex-row md:flex-col">
|
||||||
<span class="field">
|
<span class="field">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue