[WIP] Фикс при добавлении нового расписания, удалил ненужные переменные
This commit is contained in:
@@ -8,11 +8,9 @@
|
||||
@switch-next-month="switchNextMonth"
|
||||
)
|
||||
schedule-body(
|
||||
:employee-list="employeeList",
|
||||
:schedules-employee="fetchSchedulesEmployee",
|
||||
:schedule-list="scheduleList",
|
||||
:serialized="serialized",
|
||||
:data-schedule="dataSchedule",
|
||||
:buttons="buttons",
|
||||
:start-month="startMonth",
|
||||
:clear-employee="clearEmployee",
|
||||
@@ -21,9 +19,7 @@
|
||||
@schedules="distributeRequest"
|
||||
)
|
||||
schedule-bar(
|
||||
:data-schedule="dataSchedule",
|
||||
:buttons="buttons",
|
||||
:clear-employee="clearEmployee",
|
||||
:times="times",
|
||||
:create-schedules="postCreateSchedules",
|
||||
)
|
||||
@@ -44,12 +40,6 @@ export default {
|
||||
scheduleList: [],
|
||||
clearEmployee: [],
|
||||
serialized: [],
|
||||
dataSchedule: {
|
||||
status: "",
|
||||
date: null,
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
},
|
||||
times: { start_time: "", end_time: "" },
|
||||
timesShift: { start_time: "", end_time: "" },
|
||||
buttons: [
|
||||
@@ -143,7 +133,6 @@ export default {
|
||||
}
|
||||
});
|
||||
this.serialized = serialized;
|
||||
|
||||
this.filterEmployee();
|
||||
},
|
||||
filterEmployee() {
|
||||
@@ -219,7 +208,7 @@ export default {
|
||||
switchNextMonth() {
|
||||
this.startMonth = this.startMonth.clone().add(1, "M");
|
||||
},
|
||||
houres() {
|
||||
setTime() {
|
||||
let now = new Date();
|
||||
let hour = now.getHours();
|
||||
let minute = now.getMinutes();
|
||||
@@ -240,7 +229,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.fetchSchedules();
|
||||
this.houres();
|
||||
this.setTime();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -39,9 +39,7 @@ export default {
|
||||
name: "ScheduleBar",
|
||||
components: { BaseButton, BaseCustomSelect, BaseInputTime, BaseInputDate },
|
||||
props: {
|
||||
dataSchedule: Object,
|
||||
buttons: Array,
|
||||
clearEmployee: Array,
|
||||
times: Object,
|
||||
createSchedules: Function,
|
||||
},
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
v-for="day in result",
|
||||
:key="day",
|
||||
:id="schedule.id + day",
|
||||
@click="choiceCell(day, schedule.id, schedule)",
|
||||
@click="choiceCell(day, schedule.id, schedule); saveEmployee()",
|
||||
:class="choiceState(day, schedule.id)",
|
||||
:style="{backgroundColor: choiceDay(day, schedule.id) ? choiceColor(day, schedule) : ''}"
|
||||
)
|
||||
@@ -74,15 +74,8 @@ export default {
|
||||
name: "ScheduleBody",
|
||||
components: { BaseModal, BaseButton, BaseCustomSelect },
|
||||
props: {
|
||||
employeeList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
scheduleList: Array,
|
||||
serialized: Array,
|
||||
dataSchedule: Object,
|
||||
buttons: Array,
|
||||
startMonth: Object,
|
||||
clearEmployee: Array,
|
||||
@@ -91,13 +84,11 @@ export default {
|
||||
return {
|
||||
days: "",
|
||||
result: [],
|
||||
showSelect: false,
|
||||
employee: [],
|
||||
currentEmployee: {
|
||||
label: "",
|
||||
id: null,
|
||||
},
|
||||
curWork: "",
|
||||
dateInterval: {
|
||||
id: "",
|
||||
start: "",
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
import * as moment from "moment";
|
||||
import BaseButton from "@/components/base/BaseButton.vue";
|
||||
import FormChangeShift from "@/pages/schedule/components/FormChangeShift.vue";
|
||||
|
||||
export default {
|
||||
name: "ScheduleHeader",
|
||||
components: { BaseButton, FormChangeShift },
|
||||
|
||||
Reference in New Issue
Block a user