fix: frontend ui and mobile support

This commit is contained in:
EETagent 2023-01-26 21:38:10 +01:00
parent 0d013366de
commit 84b8e07e07
2 changed files with 15 additions and 19 deletions

View file

@ -49,8 +49,8 @@
} }
.view { .view {
@apply z-10; @apply z-10;
@apply absolute top-0 right-0 bottom-0 m-auto md:top-auto md:bottom-auto md:left-auto md:m-0; @apply absolute top-0 right-0 bottom-0 left-0 m-auto md:top-auto md:bottom-auto md:left-auto md:m-0;
@apply md:h-screen md:w-[75vw]; @apply md:h-screen md:w-[60vw];
@apply md:my-auto; @apply md:my-auto;
@apply bg-white; @apply bg-white;
} }

View file

@ -25,10 +25,7 @@
import GradesTable from '$lib/components/grades/GradesTable.svelte'; import GradesTable from '$lib/components/grades/GradesTable.svelte';
import SchoolSelect from '$lib/components/select/SchoolSelect.svelte'; import SchoolSelect from '$lib/components/select/SchoolSelect.svelte';
import PersonalIdConfirmCheckBox from '$lib/components/checkbox/PersonalIdConfirmCheckBox.svelte'; import PersonalIdConfirmCheckBox from '$lib/components/checkbox/PersonalIdConfirmCheckBox.svelte';
import { import { isPersonalIdNumberWithBirthdateValid } from '$lib/utils/personalIdFormat';
deriveBirthdateFromPersonalId,
isPersonalIdNumberWithBirthdateValid
} from '$lib/utils/personalIdFormat';
let pageIndex = 0; let pageIndex = 0;
let pagesFilled = [false, false, false, false, false, false, false, false]; let pagesFilled = [false, false, false, false, false, false, false, false];
@ -423,12 +420,9 @@
<SvelteToast /> <SvelteToast />
<div class="form relative bg-center"> <div class="form relative bg-center">
<div class="bottom-5/24 absolute flex w-full flex-col md:h-auto"> <div class="bottom-5/24 absolute flex w-full flex-col md:h-auto">
<!-- TODO: Find different way how to display SchoolBadge --> <div class="<md:hidden self-center">
{#if pageIndex !== 0 && pageIndex !== 7} <SchoolBadge />
<div class="<md:h-24 <md:w-24 h-32 w-32 self-center"> </div>
<SchoolBadge />
</div>
{/if}
<form on:submit={handleSubmit} id="triggerForm" class="invisible hidden" /> <form on:submit={handleSubmit} id="triggerForm" class="invisible hidden" />
{#if pageIndex === 0} {#if pageIndex === 0}
<form on:submit={handleSubmit}> <form on:submit={handleSubmit}>
@ -577,13 +571,15 @@
placeholder={$LL.input.birthDate()} placeholder={$LL.input.birthDate()}
helperText="TODO: (Uveďte ve formátu DD.MM.RRRR)" helperText="TODO: (Uveďte ve formátu DD.MM.RRRR)"
/> />
<TextField <div class="ml-2">
error={$typedErrors['candidate']['birthplace']} <TextField
bind:value={$form.candidate.birthplace} error={$typedErrors['candidate']['birthplace']}
type="text" bind:value={$form.candidate.birthplace}
placeholder={$LL.input.birthPlace()} type="text"
helperText="TODO: (Místo narození)" placeholder={$LL.input.birthPlace()}
/> helperText="TODO: (Místo narození)"
/>
</div>
</div> </div>
<div class="field flex items-center justify-center"> <div class="field flex items-center justify-center">
{#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship} {#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship}