diff --git a/db.sqlite3 b/db.sqlite3 index 964771210..3c316fafc 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ 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