From 4aecbbca365a02659585b2d5f1f82d6deed4e1bb Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Wed, 21 Dec 2022 19:13:01 +0300 Subject: [PATCH 1/2] =?UTF-8?q?WIP=20=D0=9E=D1=82=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B5=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=87=D0=B5=D0=B3=D0=BE=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/calendar/TheCalendar.vue | 8 +- .../calendar/components/CalendarColumn.vue | 112 ++++++++++++++++-- .../calendar/components/CalendarEventCard.vue | 2 +- .../components/CalendarFormAddEvent.vue | 16 ++- .../calendar/components/CalendarSchedule.vue | 5 +- 5 files changed, 117 insertions(+), 26 deletions(-) diff --git a/src/pages/calendar/TheCalendar.vue b/src/pages/calendar/TheCalendar.vue index aa9c410..f175704 100644 --- a/src/pages/calendar/TheCalendar.vue +++ b/src/pages/calendar/TheCalendar.vue @@ -28,7 +28,6 @@ calendar-form-add-event( v-if="isOpenForm", :close-form="closeFormCreateEvent", - :owners-data="employeesData", :selected-event-data="selectedEvent", :event-statuses="eventStatuses", :time-information="timeInformation", @@ -76,7 +75,7 @@ export default { showModal: false, timeInformation: { dayStartTime: "08:00", - dayEndTime: "20:00", + dayEndTime: "22:00", }, eventsData: [], employeesData: [], @@ -146,7 +145,7 @@ export default { }, fetchEmployeesData() { fetchWrapper - .get("general/employee/") + .get(`general/employee/?date=${this.currentDate.format("YYYY-MM-DD")}`) .then((res) => this.saveEmployeesData(res)); }, fetchEventsData() { @@ -192,6 +191,9 @@ export default { this.clearSelectedEvent(); } }, + currentDate() { + this.fetchEmployeesData(); + }, }, mounted() { this.fetchEmployeesData(); diff --git a/src/pages/calendar/components/CalendarColumn.vue b/src/pages/calendar/components/CalendarColumn.vue index 6f648a0..39ae25e 100644 --- a/src/pages/calendar/components/CalendarColumn.vue +++ b/src/pages/calendar/components/CalendarColumn.vue @@ -12,7 +12,8 @@ span.owner-name.font-medium.text-base.mr-6 {{ ownerName }} img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg") column-header-checkbox - .body.pl-1.h-full(@dblclick="clickOnBackground") + .body(@dblclick="clickOnBackground") + .nonworking-time(:style="nonworkingStartTime") transition-group(name="card") calendar-event-card( v-for="event, index in dayEvents", @@ -27,18 +28,23 @@ @delete-event="transmitDeleteEvent", :schedule-body-ref="scheduleBodyRef", ) + .nonworking-time.absolute(:style="nonworkingEndTime")