[WIP] Добавил выборку на расписании

This commit is contained in:
megavrilinvv
2022-12-23 17:51:09 +03:00
parent 3773c15ad5
commit 9a6ddd2cf6
3 changed files with 162 additions and 42 deletions

View File

@@ -6,9 +6,11 @@
:employee-list="employeeList",
:schedules-employee="fetchSchedulesEmployee",
:schedule-list="scheduleList",
:serialized="serialized"
:serialized="serialized",
:data-schedule="dataSchedule",
:buttons="buttons"
)
schedule-bar
schedule-bar(:data-schedule="dataSchedule", :select-work="selectWork", :buttons="buttons")
</template>
<script>
@@ -24,6 +26,38 @@ export default {
employeeList: [],
scheduleList: [],
serialized: [],
dataSchedule: {
status: "",
date: null,
startTime: "",
endTime: "",
},
buttons: [
{
class: "button-work",
name: "Работает",
work: "WORKS",
active: false,
color: "#55CD76",
text: "Р",
},
{
class: "button-status",
name: "Отпуск/больничный",
work: "VACATION",
active: false,
color: "#D7D9FF",
text: "О",
},
{
class: "button-free",
name: "Статусы",
work: "DAY_OFF",
active: false,
color: "#9294A7",
text: "В",
},
],
};
},
methods: {
@@ -81,6 +115,9 @@ export default {
});
this.serialized = serialized;
},
selectWork(work) {
this.dataSchedule.status = work;
},
},
mounted() {
this.fetchSchedules();