From ababe895c1267bc449b936695e79e23603a702b9 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:58:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D1=80=D0=B5=D1=82=D0=B8=D0=B9=20=D1=8D?= =?UTF-8?q?=D1=82=D0=B0=D0=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.sqlite3 | Bin 253952 -> 253952 bytes front/src/components/UI/Calendar.vue | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 964771210ef19cf3251f211b098ae3bc9dce4944..3c316fafc9cfc0a75cedd87ead6999f44a566f4a 100644 GIT binary patch delta 96 zcmZoTz~69ye}WW~Am2n8Cm`9F(3-%wHGyf_dB%g&*)K3zFdp1&sL;s4WbHWZCX+s6 ySNrE1Oxr)-U_Qyl$TEHJeP(qT3tdAKzWib%10!Qy0}EXP6Mi7mNY}s;$OHfziyim? delta 79 zcmZoTz~69ye}WW~z|)B`PC&9Tp*4YVYXZ}<^Nfe4vtMAcU_7+hP@#!~$;xs1hnq}# hjA`wkZ!m5De1rKU8zbxVz4w{bSuJ%9EqFjoaR9hv9pL}~ diff --git a/front/src/components/UI/Calendar.vue b/front/src/components/UI/Calendar.vue index 3d3091d05..bd7529c18 100644 --- a/front/src/components/UI/Calendar.vue +++ b/front/src/components/UI/Calendar.vue @@ -50,15 +50,28 @@ export default { axiosApiInstance.get('api/general_vacation/generalvacation/') .then(data => { - + for (let x in data.data) { + + data.data[x].map(e=>{ + let d = new Date(e.planned_date) + + + + // console.log(, 'e---------d.addDays(e.count_days)--------e') + calendarOptions.events.push({ title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]}) + } + + ) + + } console.log(data.data , 'genvacation--------------------'); - calendarOptions.events = [{ title: 'Отпуск', start: '2023-09-01', end: '2023-09-25'}] + }) } onMounted(() => { f_generalvacation() - console.log(typeof(huf), 'hu--------------'); + }) // genvacation.value[0].planned_date