From 9f984c22cbfd35b70473f302c5dd70f79a781f16 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 16 Apr 2026 14:15:07 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20resume=20store=20=E2=80=94=20add=20care?= =?UTF-8?q?er=5Fsummary,=20education,=20achievements,=20lastSynced=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extends the resume Pinia store with EducationEntry interface, four new refs (career_summary, education, achievements, lastSynced), education CRUD helpers, and load/save wiring for all new fields. lastSynced is set to current ISO timestamp on successful save. --- web/src/stores/settings/resume.ts | 36 +++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/web/src/stores/settings/resume.ts b/web/src/stores/settings/resume.ts index 2d909df..dbe09cb 100644 --- a/web/src/stores/settings/resume.ts +++ b/web/src/stores/settings/resume.ts @@ -8,6 +8,12 @@ export interface WorkEntry { industry: string; responsibilities: string; skills: string[] } +export interface EducationEntry { + id: string + institution: string; degree: string; field: string + start_date: string; end_date: string +} + export const useResumeStore = defineStore('settings/resume', () => { const hasResume = ref(false) const loading = ref(false) @@ -31,6 +37,11 @@ export const useResumeStore = defineStore('settings/resume', () => { const veteran_status = ref(''); const disability = ref('') // Keywords const skills = ref([]); const domains = ref([]); const keywords = ref([]) + // Extended profile fields + const career_summary = ref('') + const education = ref([]) + const achievements = ref([]) + const lastSynced = ref(null) // LLM suggestions (pending, not yet accepted) const skillSuggestions = ref([]) const domainSuggestions = ref([]) @@ -69,6 +80,9 @@ export const useResumeStore = defineStore('settings/resume', () => { skills.value = (data.skills as string[]) ?? [] domains.value = (data.domains as string[]) ?? [] keywords.value = (data.keywords as string[]) ?? [] + career_summary.value = String(data.career_summary ?? '') + education.value = ((data.education as Omit[]) ?? []).map(e => ({ ...e, id: crypto.randomUUID() })) + achievements.value = (data.achievements as string[]) ?? [] } async function save() { @@ -84,12 +98,19 @@ export const useResumeStore = defineStore('settings/resume', () => { gender: gender.value, pronouns: pronouns.value, ethnicity: ethnicity.value, veteran_status: veteran_status.value, disability: disability.value, skills: skills.value, domains: domains.value, keywords: keywords.value, + career_summary: career_summary.value, + education: education.value.map(({ id: _id, ...e }) => e), + achievements: achievements.value, } const { error } = await useApiFetch('/api/settings/resume', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), }) saving.value = false - if (error) saveError.value = 'Save failed — please try again.' + if (error) { + saveError.value = 'Save failed — please try again.' + } else { + lastSynced.value = new Date().toISOString() + } } async function createBlank() { @@ -105,6 +126,16 @@ export const useResumeStore = defineStore('settings/resume', () => { experience.value.splice(idx, 1) } + function addEducation() { + education.value.push({ + id: crypto.randomUUID(), institution: '', degree: '', field: '', start_date: '', end_date: '' + }) + } + + function removeEducation(idx: number) { + education.value.splice(idx, 1) + } + async function suggestTags(field: 'skills' | 'domains' | 'keywords') { suggestingField.value = field const current = field === 'skills' ? skills.value : field === 'domains' ? domains.value : keywords.value @@ -149,7 +180,8 @@ export const useResumeStore = defineStore('settings/resume', () => { gender, pronouns, ethnicity, veteran_status, disability, skills, domains, keywords, skillSuggestions, domainSuggestions, keywordSuggestions, suggestingField, + career_summary, education, achievements, lastSynced, syncFromProfile, load, save, createBlank, - addExperience, removeExperience, addTag, removeTag, suggestTags, acceptTagSuggestion, + addExperience, removeExperience, addEducation, removeEducation, addTag, removeTag, suggestTags, acceptTagSuggestion, } })