mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
81 lines
1.5 KiB
TypeScript
81 lines
1.5 KiB
TypeScript
import type { GradeBackend } from '$lib/components/grades/GradesTable.svelte';
|
|
import { writable } from 'svelte/store';
|
|
|
|
export interface CandidateData {
|
|
candidate: {
|
|
name: string;
|
|
surname: string;
|
|
birthplace: string;
|
|
birthdate: string;
|
|
address: string;
|
|
telephone: string;
|
|
citizenship: string;
|
|
email: string;
|
|
sex: string;
|
|
personalIdNumber: string;
|
|
schoolName: string;
|
|
healthInsurance: string;
|
|
grades: Array<GradeBackend>;
|
|
};
|
|
parents: Array<{
|
|
name: string;
|
|
surname: string;
|
|
telephone: string;
|
|
email: string;
|
|
}>;
|
|
}
|
|
|
|
export interface CandidatePreview {
|
|
applicationId?: number;
|
|
name?: string;
|
|
surname?: string;
|
|
fieldOfStudy?: string;
|
|
}
|
|
|
|
export interface CandidateLogin {
|
|
applicationId: number;
|
|
password: string;
|
|
}
|
|
|
|
export interface CreateCandidate {
|
|
applicationId: number;
|
|
personalIdNumber: string;
|
|
}
|
|
|
|
export interface BaseCandidate {
|
|
currentApplication: number;
|
|
applications: Array<number>;
|
|
personalIdNumber: string;
|
|
detailsFilled: boolean;
|
|
encryptedBy?: number;
|
|
}
|
|
|
|
export interface CreateCandidateLogin extends CreateCandidate {
|
|
password: string;
|
|
}
|
|
|
|
export const baseCandidateData = writable<BaseCandidate>({
|
|
currentApplication: 0,
|
|
applications: [],
|
|
personalIdNumber: '',
|
|
detailsFilled: false
|
|
});
|
|
|
|
export const candidateData = writable<CandidateData>({
|
|
candidate: {
|
|
name: '',
|
|
surname: '',
|
|
birthplace: '',
|
|
birthdate: '',
|
|
address: '',
|
|
telephone: '',
|
|
citizenship: '',
|
|
email: '',
|
|
sex: '',
|
|
personalIdNumber: '',
|
|
schoolName: '',
|
|
healthInsurance: '',
|
|
grades: []
|
|
},
|
|
parents: []
|
|
});
|