[WIP] Добавил выборку на расписании
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user