mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +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 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 { API_URL, errorHandler, type Fetch } from '.';
|
||||
import DOMPurify from 'isomorphic-dompurify';
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
<script lang="ts">
|
||||
export let linkOk: boolean = false;
|
||||
export let linkError: boolean = false;
|
||||
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 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`;
|
||||
}
|
||||
|
||||
|
||||
$: console.log(linkOk, linkError);
|
||||
|
||||
export let error: string = '';
|
||||
|
||||
const switchSelection = (id: number) => {
|
||||
if (id === 0) {
|
||||
linkOk = true;
|
||||
linkError = false;
|
||||
} else {
|
||||
linkOk = false;
|
||||
linkError = true;
|
||||
}
|
||||
linkOk = true;
|
||||
linkError = false;
|
||||
} else {
|
||||
linkOk = false;
|
||||
linkError = true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
@ -41,9 +39,9 @@
|
|||
<label for="linkOk" class="peer-checked:border-sspsBlue peer-checked:text-gray-600" class:error>
|
||||
<div class="block">
|
||||
<span class="text-2xl">📜</span>
|
||||
|
||||
|
||||
<div class="w-full text-lg font-semibold">
|
||||
{title1}
|
||||
{title1}
|
||||
</div>
|
||||
<div class="w-full text-sm">Vše je v pořádku</div>
|
||||
</div>
|
||||
|
|
@ -58,10 +56,7 @@
|
|||
checked={linkError}
|
||||
class="peer hidden"
|
||||
/>
|
||||
<label
|
||||
for="linkError"
|
||||
class="peer-checked:border-sspsBlue peer-checked:text-gray-600"
|
||||
>
|
||||
<label for="linkError" class="peer-checked:border-sspsBlue peer-checked:text-gray-600">
|
||||
<div class="block">
|
||||
<span class="text-2xl">📜</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@
|
|||
};
|
||||
|
||||
const getField = (id: number) => {
|
||||
if (id.toString().startsWith("101")) {
|
||||
if (id.toString().startsWith('101')) {
|
||||
return 'G';
|
||||
} else if (id.toString().startsWith("102")) {
|
||||
} else if (id.toString().startsWith('102')) {
|
||||
return 'IT';
|
||||
} else {
|
||||
} else {
|
||||
return 'KB';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const editDetails = async () => {
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
>
|
||||
{#if $baseCandidateData.applications.length > 1}
|
||||
<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
|
||||
>
|
||||
{/if}
|
||||
|
|
@ -173,9 +173,17 @@
|
|||
>{$candidateData.candidate.personalIdNumber}</span
|
||||
></span
|
||||
>
|
||||
<span>IČO/Název školy: <span class="font-bold">{$candidateData.candidate.schoolName}</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>
|
||||
<span
|
||||
>IČO/Název školy: <span class="font-bold">{$candidateData.candidate.schoolName}</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
|
||||
use:tippy={{
|
||||
|
|
|
|||
|
|
@ -38,9 +38,6 @@
|
|||
let details = data.candidate;
|
||||
let baseCandidateDetails = data.whoami;
|
||||
|
||||
let detailsFilledByAnotherAccount = baseCandidateDetails.encryptedBy !== null &&
|
||||
baseCandidateDetails.currentApplication !== baseCandidateDetails.encryptedBy;
|
||||
|
||||
const formInitialValues = {
|
||||
gdpr: false,
|
||||
linkOk: false,
|
||||
|
|
@ -61,7 +58,7 @@
|
|||
citizenship: '',
|
||||
personalIdNumber: '',
|
||||
schoolName: '',
|
||||
healthInsurance: '',
|
||||
healthInsurance: ''
|
||||
},
|
||||
parents: [
|
||||
{
|
||||
|
|
@ -108,7 +105,7 @@
|
|||
citizenship: yup.string().required(),
|
||||
personalIdNumber: yup.string().required(),
|
||||
schoolName: yup.string().required(),
|
||||
healthInsurance: yup.number().required(),
|
||||
healthInsurance: yup.number().required()
|
||||
}),
|
||||
parents: yup.array().of(
|
||||
yup.object().shape({
|
||||
|
|
@ -251,7 +248,7 @@
|
|||
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(',');
|
||||
// @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);
|
||||
goto('/dashboard');
|
||||
|
|
@ -397,8 +394,8 @@
|
|||
<form on:submit={handleSubmit}>
|
||||
<h1 class="title mt-8">Propojení účtů</h1>
|
||||
<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.
|
||||
Potvrďte, že jste jste k nám skutečně podali dvě přihlášky.
|
||||
Elektronickou přihlášky stačí vyplnit jen jednou i v případě, že jste podali dvě
|
||||
přihlášky. Potvrďte, že jste jste k nám skutečně podali dvě přihlášky.
|
||||
</p>
|
||||
<div class="field">
|
||||
<AccountLinkCheckBox
|
||||
|
|
@ -468,16 +465,16 @@
|
|||
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>
|
||||
<div class="flex field">
|
||||
<div class="field flex">
|
||||
<span class="w-[66%]">
|
||||
<NameField
|
||||
error={$typedErrors['candidate']['street'] || $typedErrors['candidate']['houseNumber']}
|
||||
error={$typedErrors['candidate']['street'] ||
|
||||
$typedErrors['candidate']['houseNumber']}
|
||||
on:change={handleChange}
|
||||
bind:valueName={$form.candidate.street}
|
||||
bind:valueSurname={$form.candidate.houseNumber}
|
||||
placeholder="Ulice a č. p."
|
||||
helperText="Uveďte ulici a číslo popisné (např. Preslova 72)."
|
||||
|
||||
/>
|
||||
</span>
|
||||
<span class="ml-2 w-[33%]">
|
||||
|
|
@ -491,7 +488,7 @@
|
|||
/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex field">
|
||||
<div class="field flex">
|
||||
<span>
|
||||
<TextField
|
||||
error={$typedErrors['candidate']['city']}
|
||||
|
|
@ -619,7 +616,6 @@
|
|||
/>
|
||||
</span>
|
||||
<div class="field flex flex-row">
|
||||
|
||||
<span>
|
||||
{#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship}
|
||||
<TextField
|
||||
|
|
@ -639,7 +635,7 @@
|
|||
/>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
|
||||
<span class="ml-2">
|
||||
<TextField
|
||||
error={$typedErrors['candidate']['healthInsurance']}
|
||||
|
|
@ -649,7 +645,6 @@
|
|||
placeholder="Číslo zdravotní pojišťovny"
|
||||
/>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="field flex items-center justify-center">
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@
|
|||
input {
|
||||
@apply text-sspsBlue text-center font-semibold;
|
||||
@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 {
|
||||
@apply bg-sspsBlue mr-2 hidden h-2 w-8 md:block;
|
||||
|
|
|
|||
Loading…
Reference in a new issue