mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-04 15:20:07 +00:00
fix: formatting
This commit is contained in:
parent
af0f343518
commit
a24cc64cba
5 changed files with 43 additions and 40 deletions
|
|
@ -1,5 +1,10 @@
|
||||||
import axios, { type AxiosProgressEvent } from 'axios';
|
import axios, { type AxiosProgressEvent } from 'axios';
|
||||||
import type { BaseCandidate, CandidateData, CandidateLogin, CreateCandidate } from '$lib/stores/candidate';
|
import type {
|
||||||
|
BaseCandidate,
|
||||||
|
CandidateData,
|
||||||
|
CandidateLogin,
|
||||||
|
CreateCandidate
|
||||||
|
} from '$lib/stores/candidate';
|
||||||
import type { SubmissionProgress } from '$lib/stores/portfolio';
|
import type { SubmissionProgress } from '$lib/stores/portfolio';
|
||||||
import { API_URL, errorHandler, type Fetch } from '.';
|
import { API_URL, errorHandler, type Fetch } from '.';
|
||||||
import DOMPurify from 'isomorphic-dompurify';
|
import DOMPurify from 'isomorphic-dompurify';
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let linkOk: boolean = false;
|
export let linkOk: boolean = false;
|
||||||
export let linkError: boolean = false;
|
export let linkError: boolean = false;
|
||||||
export let applications: Array<number>;
|
export let applications: Array<number>;
|
||||||
|
|
||||||
let title1 = `Ano, podával/a jsem dvě přihlášky na dva obory SSPŠaG (${applications[0]} a ${applications[1]})`;
|
let title1 = `Ano, podával/a jsem dvě přihlášky na dva obory SSPŠaG (${applications[0]} a ${applications[1]})`;
|
||||||
let title2 = `Ne, přihlášku na SSPŠaG jsem podával/a jen jednu (${applications[0]})`;
|
let title2 = `Ne, přihlášku na SSPŠaG jsem podával/a jen jednu (${applications[0]})`;
|
||||||
|
|
||||||
|
|
@ -12,19 +11,18 @@
|
||||||
title2 = `Ne, přihlášku na SSPŠaG jsem podával více přihlášek`;
|
title2 = `Ne, přihlášku na SSPŠaG jsem podával více přihlášek`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$: console.log(linkOk, linkError);
|
$: console.log(linkOk, linkError);
|
||||||
|
|
||||||
export let error: string = '';
|
export let error: string = '';
|
||||||
|
|
||||||
const switchSelection = (id: number) => {
|
const switchSelection = (id: number) => {
|
||||||
if (id === 0) {
|
if (id === 0) {
|
||||||
linkOk = true;
|
linkOk = true;
|
||||||
linkError = false;
|
linkError = false;
|
||||||
} else {
|
} else {
|
||||||
linkOk = false;
|
linkOk = false;
|
||||||
linkError = true;
|
linkError = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -41,9 +39,9 @@
|
||||||
<label for="linkOk" class="peer-checked:border-sspsBlue peer-checked:text-gray-600" class:error>
|
<label for="linkOk" class="peer-checked:border-sspsBlue peer-checked:text-gray-600" class:error>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<span class="text-2xl">📜</span>
|
<span class="text-2xl">📜</span>
|
||||||
|
|
||||||
<div class="w-full text-lg font-semibold">
|
<div class="w-full text-lg font-semibold">
|
||||||
{title1}
|
{title1}
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full text-sm">Vše je v pořádku</div>
|
<div class="w-full text-sm">Vše je v pořádku</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -58,10 +56,7 @@
|
||||||
checked={linkError}
|
checked={linkError}
|
||||||
class="peer hidden"
|
class="peer hidden"
|
||||||
/>
|
/>
|
||||||
<label
|
<label for="linkError" class="peer-checked:border-sspsBlue peer-checked:text-gray-600">
|
||||||
for="linkError"
|
|
||||||
class="peer-checked:border-sspsBlue peer-checked:text-gray-600"
|
|
||||||
>
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<span class="text-2xl">📜</span>
|
<span class="text-2xl">📜</span>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,13 +66,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const getField = (id: number) => {
|
const getField = (id: number) => {
|
||||||
if (id.toString().startsWith("101")) {
|
if (id.toString().startsWith('101')) {
|
||||||
return 'G';
|
return 'G';
|
||||||
} else if (id.toString().startsWith("102")) {
|
} else if (id.toString().startsWith('102')) {
|
||||||
return 'IT';
|
return 'IT';
|
||||||
} else {
|
} else {
|
||||||
return 'KB';
|
return 'KB';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const editDetails = async () => {
|
const editDetails = async () => {
|
||||||
|
|
@ -155,7 +155,7 @@
|
||||||
>
|
>
|
||||||
{#if $baseCandidateData.applications.length > 1}
|
{#if $baseCandidateData.applications.length > 1}
|
||||||
<span
|
<span
|
||||||
>Ev. č. přihlášky ({getField($baseCandidateData.applications[1])}):
|
>Ev. č. přihlášky ({getField($baseCandidateData.applications[1])}):
|
||||||
<span class="font-bold">{$baseCandidateData.applications[1]}</span></span
|
<span class="font-bold">{$baseCandidateData.applications[1]}</span></span
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
@ -173,9 +173,17 @@
|
||||||
>{$candidateData.candidate.personalIdNumber}</span
|
>{$candidateData.candidate.personalIdNumber}</span
|
||||||
></span
|
></span
|
||||||
>
|
>
|
||||||
<span>IČO/Název školy: <span class="font-bold">{$candidateData.candidate.schoolName}</span></span>
|
<span
|
||||||
<span>Číslo zdravotní pojišťovny: <span class="font-bold">{$candidateData.candidate.healthInsurance}</span></span>
|
>IČO/Název školy: <span class="font-bold">{$candidateData.candidate.schoolName}</span
|
||||||
<span>Telefon: <span class="font-bold">{$candidateData.candidate.telephone}</span></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>
|
||||||
<div
|
<div
|
||||||
use:tippy={{
|
use:tippy={{
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,6 @@
|
||||||
let details = data.candidate;
|
let details = data.candidate;
|
||||||
let baseCandidateDetails = data.whoami;
|
let baseCandidateDetails = data.whoami;
|
||||||
|
|
||||||
let detailsFilledByAnotherAccount = baseCandidateDetails.encryptedBy !== null &&
|
|
||||||
baseCandidateDetails.currentApplication !== baseCandidateDetails.encryptedBy;
|
|
||||||
|
|
||||||
const formInitialValues = {
|
const formInitialValues = {
|
||||||
gdpr: false,
|
gdpr: false,
|
||||||
linkOk: false,
|
linkOk: false,
|
||||||
|
|
@ -61,7 +58,7 @@
|
||||||
citizenship: '',
|
citizenship: '',
|
||||||
personalIdNumber: '',
|
personalIdNumber: '',
|
||||||
schoolName: '',
|
schoolName: '',
|
||||||
healthInsurance: '',
|
healthInsurance: ''
|
||||||
},
|
},
|
||||||
parents: [
|
parents: [
|
||||||
{
|
{
|
||||||
|
|
@ -108,7 +105,7 @@
|
||||||
citizenship: yup.string().required(),
|
citizenship: yup.string().required(),
|
||||||
personalIdNumber: yup.string().required(),
|
personalIdNumber: yup.string().required(),
|
||||||
schoolName: yup.string().required(),
|
schoolName: yup.string().required(),
|
||||||
healthInsurance: yup.number().required(),
|
healthInsurance: yup.number().required()
|
||||||
}),
|
}),
|
||||||
parents: yup.array().of(
|
parents: yup.array().of(
|
||||||
yup.object().shape({
|
yup.object().shape({
|
||||||
|
|
@ -251,7 +248,7 @@
|
||||||
let addressArray: Array<string> = [values.candidate.street + ' ' + values.candidate.houseNumber, values.candidate.city, values.candidate.zip];
|
let addressArray: Array<string> = [values.candidate.street + ' ' + values.candidate.houseNumber, values.candidate.city, values.candidate.zip];
|
||||||
values.candidate.address = addressArray.map((x) => x.replaceAll(',', '').trim()).join(',');
|
values.candidate.address = addressArray.map((x) => x.replaceAll(',', '').trim()).join(',');
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
delete values.candidate.street;delete values.candidate.houseNumber;delete values.candidate.city;delete values.candidate.zip;
|
delete values.candidate.street; delete values.candidate.houseNumber; delete values.candidate.city; delete values.candidate.zip;
|
||||||
|
|
||||||
await apiFillDetails(values);
|
await apiFillDetails(values);
|
||||||
goto('/dashboard');
|
goto('/dashboard');
|
||||||
|
|
@ -397,8 +394,8 @@
|
||||||
<form on:submit={handleSubmit}>
|
<form on:submit={handleSubmit}>
|
||||||
<h1 class="title mt-8">Propojení účtů</h1>
|
<h1 class="title mt-8">Propojení účtů</h1>
|
||||||
<p class="description mt-8 block text-center">
|
<p class="description mt-8 block text-center">
|
||||||
Elektronickou přihlášky stačí vyplnit jen jednou i v případě, že jste podali dvě přihlášky.
|
Elektronickou přihlášky stačí vyplnit jen jednou i v případě, že jste podali dvě
|
||||||
Potvrďte, že jste jste k nám skutečně podali dvě přihlášky.
|
přihlášky. Potvrďte, že jste jste k nám skutečně podali dvě přihlášky.
|
||||||
</p>
|
</p>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<AccountLinkCheckBox
|
<AccountLinkCheckBox
|
||||||
|
|
@ -468,16 +465,16 @@
|
||||||
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é.
|
přijímací řízení. Všechny údaje jsou důležité.
|
||||||
</p>
|
</p>
|
||||||
<div class="flex field">
|
<div class="field flex">
|
||||||
<span class="w-[66%]">
|
<span class="w-[66%]">
|
||||||
<NameField
|
<NameField
|
||||||
error={$typedErrors['candidate']['street'] || $typedErrors['candidate']['houseNumber']}
|
error={$typedErrors['candidate']['street'] ||
|
||||||
|
$typedErrors['candidate']['houseNumber']}
|
||||||
on:change={handleChange}
|
on:change={handleChange}
|
||||||
bind:valueName={$form.candidate.street}
|
bind:valueName={$form.candidate.street}
|
||||||
bind:valueSurname={$form.candidate.houseNumber}
|
bind:valueSurname={$form.candidate.houseNumber}
|
||||||
placeholder="Ulice a č. p."
|
placeholder="Ulice a č. p."
|
||||||
helperText="Uveďte ulici a číslo popisné (např. Preslova 72)."
|
helperText="Uveďte ulici a číslo popisné (např. Preslova 72)."
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span class="ml-2 w-[33%]">
|
<span class="ml-2 w-[33%]">
|
||||||
|
|
@ -491,7 +488,7 @@
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex field">
|
<div class="field flex">
|
||||||
<span>
|
<span>
|
||||||
<TextField
|
<TextField
|
||||||
error={$typedErrors['candidate']['city']}
|
error={$typedErrors['candidate']['city']}
|
||||||
|
|
@ -619,7 +616,6 @@
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<div class="field flex flex-row">
|
<div class="field flex flex-row">
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
{#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship}
|
{#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship}
|
||||||
<TextField
|
<TextField
|
||||||
|
|
@ -639,7 +635,7 @@
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="ml-2">
|
<span class="ml-2">
|
||||||
<TextField
|
<TextField
|
||||||
error={$typedErrors['candidate']['healthInsurance']}
|
error={$typedErrors['candidate']['healthInsurance']}
|
||||||
|
|
@ -649,7 +645,6 @@
|
||||||
placeholder="Číslo zdravotní pojišťovny"
|
placeholder="Číslo zdravotní pojišťovny"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field flex items-center justify-center">
|
<div class="field flex items-center justify-center">
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@
|
||||||
input {
|
input {
|
||||||
@apply text-sspsBlue text-center font-semibold;
|
@apply text-sspsBlue text-center font-semibold;
|
||||||
@apply transition-colors duration-300;
|
@apply transition-colors duration-300;
|
||||||
@apply focus:border-sspsBlue hover:border-sspsBlue rounded-xl border border-2 bg-[#f8fafb] p-3 shadow-lg outline-none caret-sspsBlueDark
|
@apply focus:border-sspsBlue hover:border-sspsBlue caret-sspsBlueDark rounded-xl border border-2 bg-[#f8fafb] p-3 shadow-lg outline-none;
|
||||||
}
|
}
|
||||||
.separater {
|
.separater {
|
||||||
@apply bg-sspsBlue mr-2 hidden h-2 w-8 md:block;
|
@apply bg-sspsBlue mr-2 hidden h-2 w-8 md:block;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue