WIP EmployeesList подтягивается из Schedules

This commit is contained in:
Daria Golova
2022-12-22 17:26:05 +03:00
parent 4aecbbca36
commit 79faa743fb
5 changed files with 123 additions and 55 deletions

View File

@@ -94,7 +94,7 @@ export default {
},
},
sidebarWidth: String,
ownersData: {
schedulesData: {
type: Array,
default() {
return [];
@@ -168,15 +168,16 @@ export default {
},
filteredOwners() {
let filteredArray = [];
this.ownersData.forEach((elem) => {
this.schedulesData.forEach((elem) => {
filteredArray.push({
id: elem.id,
last_name: elem.last_name,
first_name: elem.first_name,
patronymic: elem.patronymic,
color: elem.color,
photo: elem.photo,
schedule: elem.schedule,
id: elem.employee.id,
last_name: elem.employee.last_name,
first_name: elem.employee.first_name,
patronymic: elem.employee.patronymic,
color: elem.employee.color,
photo: elem.employee.photo,
end_time: elem.end_time.slice(0, elem.end_time.length - 3),
start_time: elem.start_time.slice(0, elem.start_time.length - 3),
});
});
return filteredArray;