Files
cv-maker/lib/types/cv.ts
T

69 lines
1.4 KiB
TypeScript

export type CVTabId =
| "accroche"
| "etatCivil"
| "formations"
| "competences"
| "softSkills"
| "centresInteret";
export const CV_TAB_ORDER: CVTabId[] = [
"accroche",
"etatCivil",
"formations",
"competences",
"softSkills",
"centresInteret",
];
export interface CVTabMeta {
id: CVTabId;
numero: 1 | 2 | 3 | 4 | 5 | 6;
label: string;
}
export const CV_TABS: Record<CVTabId, CVTabMeta> = {
accroche: { id: "accroche", numero: 1, label: "Accroche" },
etatCivil: { id: "etatCivil", numero: 2, label: "État civil" },
formations: { id: "formations", numero: 3, label: "Formations" },
competences: { id: "competences", numero: 4, label: "Compétences" },
softSkills: { id: "softSkills", numero: 5, label: "Soft skills" },
centresInteret: {
id: "centresInteret",
numero: 6,
label: "Centres d'intérêt",
},
};
export interface Experience {
id: string;
titre: string;
contenu: string;
createdAt: number;
updatedAt: number;
}
export interface CVCareerData {
version: 1;
accroche: string;
etatCivil: string;
formations: string;
competences: string;
softSkills: string;
centresInteret: string;
experiences: Experience[];
}
export type CVStorage = CVCareerData;
export function createDefaultCVData(): CVCareerData {
return {
version: 1,
accroche: "",
etatCivil: "",
formations: "",
competences: "",
softSkills: "",
centresInteret: "",
experiences: [],
};
}