From 135e7b097ed68551dd3ea82d9da53d34c5b08ca7 Mon Sep 17 00:00:00 2001 From: EwelinaLasowy Date: Tue, 17 May 2022 14:34:45 +0200 Subject: [PATCH] #134 - fix --- resources/css/app.css | 3 ++- resources/js/Pages/Resumes/Create.vue | 14 ++++++++++++-- resources/js/Pages/Resumes/Edit.vue | 4 ++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 3f550f6..bb1f555 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -29,7 +29,8 @@ .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, -.flatpickr-day.endRange.nextMonthDay { +.flatpickr-day.endRange.nextMonthDay, +.flatpickr-monthSelect-month.selected { background: #527ABA; -webkit-box-shadow: none; box-shadow: none; diff --git a/resources/js/Pages/Resumes/Create.vue b/resources/js/Pages/Resumes/Create.vue index cd50e0f..a70c461 100644 --- a/resources/js/Pages/Resumes/Create.vue +++ b/resources/js/Pages/Resumes/Create.vue @@ -583,6 +583,7 @@ function addProject() { tasks: null, startDate: null, endDate: null, + current: false, }) } @@ -600,6 +601,7 @@ function addEducation() { fieldOfStudy: null, startDate: null, endDate: null, + current: false, }) } @@ -621,7 +623,11 @@ function submitResume() { .transform((data) => ({ user: data.user?.id, name: data.name, - education: data.educations, + education: data.educations.map(education => ({ + ...education, + current: !!education.current, + endDate: education.current ? null: education.endDate, + })), languages: data.languages.map(language => ({ name: language.name, level: language.level.level, @@ -630,7 +636,11 @@ function submitResume() { name: technology.name, level: technology.level.level, })), - projects: data.projects, + projects: data.projects.map(project => ({ + ...project, + current: !!project.current, + endDate: project.current ? null : project.endDate, + })), })) .post('/resumes') } diff --git a/resources/js/Pages/Resumes/Edit.vue b/resources/js/Pages/Resumes/Edit.vue index 7f3d91e..2476cab 100644 --- a/resources/js/Pages/Resumes/Edit.vue +++ b/resources/js/Pages/Resumes/Edit.vue @@ -590,6 +590,7 @@ function addProject() { tasks: null, startDate: null, endDate: null, + current: false, }) } @@ -607,6 +608,7 @@ function addEducation() { fieldOfStudy: null, startDate: null, endDate: null, + current: false, }) } @@ -630,6 +632,7 @@ function submitResume() { name: data.name, education: data.educations.map(education => ({ ...education, + current: !!education.current, endDate: education.current ? null: education.endDate, })), languages: data.languages.map(language => ({ @@ -642,6 +645,7 @@ function submitResume() { })), projects: data.projects.map(project => ({ ...project, + current: !!project.current, endDate: project.current ? null : project.endDate, })), }))