Календарь

This commit is contained in:
iriska-gri committed 2023-10-10 09:08:26 +03:00
1 parent a853ae29a8
commit 4579fdaaba
5 files changed
+36 -9

No files matched your search

+22 -7
View File
@@ -115,18 +115,33 @@ export default {
function f_generalvacation() {
axiosApiInstance.get('api/general_vacation/generalvacation/')
.then(data => {
for (let x in data.data) {
console.log(data.data, 'data-----------------------');
// if (x =="Отпуск") {
data.data[x].map(e=>{
let d = new Date(e.planned_date)
calendarOptions.events.push({ description: 'description for All Day Event', title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]})
// data.data[x].map(e=>{
// let d = new Date(e.planned_date)
// calendarOptions.events.push({ description: 'description for All Day Event', title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]})
}
// }
// )
// }
if (x=="План-график") {
data.data[x].map(e=>{
calendarOptions.events.push({ description: 'description for All Day Event', title: e.name, start: e.start_work_period, end: e.end_work_period})
}
)
}
}