События запрашиваются по текущему дню календаря

This commit is contained in:
Daria Golova
2022-12-23 12:09:25 +03:00
parent b1237fbed4
commit 48860c454f
3 changed files with 13 additions and 10 deletions

View File

@@ -185,12 +185,6 @@ export default {
ownersCount() {
return this.filteredOwners.length;
},
filteredEventsByDate() {
return this.eventsData.filter(
({ start }) =>
start.slice(0, 10) === this.currentDate.format("YYYY-MM-DD")
);
},
columnHeight() {
return (
(this.timeCoil.length - 1) * this.pixelsPerHour +
@@ -301,7 +295,7 @@ export default {
},
filterEventsByOwner(owner) {
let filteredArray = [];
this.filteredEventsByDate.forEach((item) => {
this.eventsData.forEach((item) => {
let foundEvent = item.employees.find(
(elem) => elem.employee.id === owner.id && elem.role === "owner"
);