Merge branch 'UC-216' into 'master'
Отменила часть изменений See merge request andrusyakka/urban-couscous!286
This commit is contained in:
@@ -1,38 +0,0 @@
|
|||||||
<template lang="pug">
|
|
||||||
base-input.w-full(v-bind="$props", v-model="value")
|
|
||||||
.flex.items-center
|
|
||||||
q-icon(name="app:calendar" class="cursor-pointer" size="18px")
|
|
||||||
q-popup-proxy(cover transition-show="scale" transition-hide="scale")
|
|
||||||
q-date(v-model="value")
|
|
||||||
div(class="row items-center justify-end")
|
|
||||||
q-btn(v-close-popup label="Close" color="primary" flat)
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import BaseInput from "@/components/base/BaseInput.vue";
|
|
||||||
import * as moment from "moment/moment";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "BaseInputDate",
|
|
||||||
components: { BaseInput },
|
|
||||||
props: {
|
|
||||||
modelValue: {
|
|
||||||
type: Date,
|
|
||||||
default: () => new Date(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
emits: ["update:modelValue"],
|
|
||||||
computed: {
|
|
||||||
value: {
|
|
||||||
get() {
|
|
||||||
return moment(this.modelValue).format("D MMMM YYYY");
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.$emit("update:modelValue", value ? new Date(value) : null);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="sass" scoped></style>
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
|
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
|
||||||
column-header-checkbox
|
column-header-checkbox
|
||||||
.body(@dblclick="clickOnBackground")
|
.body(@dblclick="clickOnBackground")
|
||||||
.nonworking-time(:style="nonworkingStartTime")
|
//.nonworking-time(:style="nonworkingStartTime")
|
||||||
transition-group(name="card")
|
transition-group(name="card")
|
||||||
calendar-event-card(
|
calendar-event-card(
|
||||||
v-for="event, index in dayEvents",
|
v-for="event, index in dayEvents",
|
||||||
@@ -26,14 +26,14 @@
|
|||||||
@delete-event="transmitDeleteEvent",
|
@delete-event="transmitDeleteEvent",
|
||||||
:schedule-body-ref="scheduleBodyRef",
|
:schedule-body-ref="scheduleBodyRef",
|
||||||
)
|
)
|
||||||
.nonworking-time.absolute(:style="nonworkingEndTime")
|
//.nonworking-time.absolute(:style="nonworkingEndTime")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ColumnHeaderCheckbox from "./CalendarColumnHeaderCheckbox.vue";
|
import ColumnHeaderCheckbox from "./CalendarColumnHeaderCheckbox.vue";
|
||||||
import BaseAvatar from "@/components/base/BaseAvatar";
|
import BaseAvatar from "@/components/base/BaseAvatar";
|
||||||
import CalendarEventCard from "./CalendarEventCard.vue";
|
import CalendarEventCard from "./CalendarEventCard.vue";
|
||||||
import * as moment from "moment/moment";
|
//import * as moment from "moment/moment";
|
||||||
import TheNotificationProvider from "@/components/Notifications/TheNotificationProvider";
|
import TheNotificationProvider from "@/components/Notifications/TheNotificationProvider";
|
||||||
import { addNotification } from "@/components/Notifications/notificationContext";
|
import { addNotification } from "@/components/Notifications/notificationContext";
|
||||||
export default {
|
export default {
|
||||||
@@ -67,13 +67,13 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
workingShift() {
|
/*workingShift() {
|
||||||
if (!this.ownerData.id) return null;
|
if (!this.ownerData.id) return null;
|
||||||
let start = this.ownerData.start_time;
|
let start = this.ownerData.start_time;
|
||||||
let end = this.ownerData.end_time;
|
let end = this.ownerData.end_time;
|
||||||
return {
|
return {
|
||||||
start: start.split(":"),
|
start: start?.split(":"),
|
||||||
end: end.split(":"),
|
end: end?.split(":"),
|
||||||
fulltime: `${start} - ${end}`,
|
fulltime: `${start} - ${end}`,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -111,7 +111,7 @@ export default {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
height: `${position}px`,
|
height: `${position}px`,
|
||||||
};
|
};
|
||||||
},
|
},*/
|
||||||
ownerName() {
|
ownerName() {
|
||||||
if (this.ownerData.id) {
|
if (this.ownerData.id) {
|
||||||
let checkedFirstName =
|
let checkedFirstName =
|
||||||
@@ -172,7 +172,7 @@ export default {
|
|||||||
addErrorNotification(title, message) {
|
addErrorNotification(title, message) {
|
||||||
addNotification(title, title, message, "error", 5000);
|
addNotification(title, title, message, "error", 5000);
|
||||||
},
|
},
|
||||||
clickOnBackground(e) {
|
/*clickOnBackground(e) {
|
||||||
let res = String((e.offsetY / this.pixelsPerHour).toFixed(2)).split(".");
|
let res = String((e.offsetY / this.pixelsPerHour).toFixed(2)).split(".");
|
||||||
let hours = parseInt(res[0]) + this.dayStartTime;
|
let hours = parseInt(res[0]) + this.dayStartTime;
|
||||||
let minuts = Math.round(res[1] * 0.6);
|
let minuts = Math.round(res[1] * 0.6);
|
||||||
@@ -203,7 +203,7 @@ export default {
|
|||||||
)}T${hours}:${minuts}:00`,
|
)}T${hours}:${minuts}:00`,
|
||||||
end: `${this.currentDate.format("YYYY-MM-DD")}T${hours}:${minuts}:00`,
|
end: `${this.currentDate.format("YYYY-MM-DD")}T${hours}:${minuts}:00`,
|
||||||
});
|
});
|
||||||
},
|
},*/
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,59 +1,69 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.calendar-header-wrapper.flex.items-center.justify-between.py-4.pl-4.pr-6
|
.calendar-header-wrapper.flex.items-center.justify-between.py-4.pl-4.pr-6
|
||||||
.flex.items-center
|
.flex.items-center
|
||||||
//q-btn.mr-4(
|
q-btn.mr-4(
|
||||||
color="blue-grey-1",
|
color="secondary",
|
||||||
round,
|
round,
|
||||||
size="14px",
|
size="14px",
|
||||||
dense,
|
dense,
|
||||||
|
icon="arrow_back_ios_new"
|
||||||
text-color="primary",
|
text-color="primary",
|
||||||
@click="previousHandler"
|
@click="previousHandler"
|
||||||
//)
|
)
|
||||||
q-icon(name="arrow_back_ios", right)
|
q-btn.mr-4(
|
||||||
//q-btn.mr-4(
|
color="secondary",
|
||||||
color="blue-grey-1",
|
|
||||||
icon="arrow_forward_ios",
|
icon="arrow_forward_ios",
|
||||||
round,
|
round,
|
||||||
size="14px",
|
size="14px",
|
||||||
text-color="primary",
|
text-color="primary",
|
||||||
dense,
|
dense,
|
||||||
@click="nextHandler"
|
@click="nextHandler"
|
||||||
//)
|
)
|
||||||
//.text.flex.items-center
|
.text.flex.items-center
|
||||||
span.font-medium.text-base {{ dateString }}
|
span.font-medium.text-base {{ dateString }}
|
||||||
span.today.font-bold.text-xxs(v-if="isCurrentDate") Сегодня
|
span.today.font-bold.text-xxs(v-if="isCurrentDate") Сегодня
|
||||||
q-btn(
|
//q-btn(
|
||||||
color="blue-grey-1",
|
color="blue-grey-1",
|
||||||
round,
|
round,
|
||||||
size="14px",
|
size="14px",
|
||||||
text-color="primary",
|
text-color="primary",
|
||||||
@click="previousHandler"
|
@click="previousHandler"
|
||||||
icon="arrow_back_ios_new"
|
icon="arrow_back_ios_new"
|
||||||
)
|
//)
|
||||||
base-input-date.mx-4(v-model="convertedDate", outlined, disabled)
|
//.text.flex.items-center.mx-4
|
||||||
q-btn(
|
span.font-medium.text-base {{ dateString }}
|
||||||
|
span.today.font-bold.text-xxs(v-if="isCurrentDate") Сегодня
|
||||||
|
//q-btn(
|
||||||
color="blue-grey-1",
|
color="blue-grey-1",
|
||||||
icon="arrow_forward_ios",
|
icon="arrow_forward_ios",
|
||||||
round,
|
round,
|
||||||
size="14px",
|
size="14px",
|
||||||
text-color="primary",
|
text-color="primary",
|
||||||
@click="nextHandler"
|
@click="nextHandler"
|
||||||
)
|
//)
|
||||||
|
//.flex.gap-x-4.ml-5.border-2.border-green-600.bg-lime-200.items-center
|
||||||
|
.w-120.h-10.flex.items-center {{ date }}
|
||||||
|
base-date-picker(v-model="date")
|
||||||
calendar-layout-switch(@selected="changeSelectedLayout")
|
calendar-layout-switch(@selected="changeSelectedLayout")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CalendarLayoutSwitch from "./CalendarLayoutSwitch.vue";
|
import CalendarLayoutSwitch from "./CalendarLayoutSwitch.vue";
|
||||||
import BaseInputDate from "@/components/base/BaseInputDate.vue";
|
//import BaseDatePicker from "@/components/base/BaseDatePicker.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "CalendarHeader",
|
name: "CalendarHeader",
|
||||||
components: { CalendarLayoutSwitch, BaseInputDate },
|
components: { CalendarLayoutSwitch },
|
||||||
props: {
|
props: {
|
||||||
currentDate: Object,
|
currentDate: Object,
|
||||||
isCurrentDate: Boolean,
|
isCurrentDate: Boolean,
|
||||||
},
|
},
|
||||||
|
/*data() {
|
||||||
|
return {
|
||||||
|
date: new Date(),
|
||||||
|
};
|
||||||
|
},*/
|
||||||
computed: {
|
computed: {
|
||||||
/*dateString() {
|
dateString() {
|
||||||
let newStr = this.currentDate.format("D MMMM YYYY");
|
let newStr = this.currentDate.format("D MMMM YYYY");
|
||||||
return newStr
|
return newStr
|
||||||
.split(" ")
|
.split(" ")
|
||||||
@@ -62,9 +72,6 @@ export default {
|
|||||||
return elem;
|
return elem;
|
||||||
})
|
})
|
||||||
.join(" ");
|
.join(" ");
|
||||||
},*/
|
|
||||||
convertedDate() {
|
|
||||||
return new Date(this.currentDate);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -72,10 +79,10 @@ export default {
|
|||||||
this.$emit("selected-layout", option);
|
this.$emit("selected-layout", option);
|
||||||
},
|
},
|
||||||
previousHandler() {
|
previousHandler() {
|
||||||
//this.$emit("previous-date");
|
this.$emit("previous-date");
|
||||||
},
|
},
|
||||||
nextHandler() {
|
nextHandler() {
|
||||||
//this.$emit("next-date");
|
this.$emit("next-date");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -106,8 +113,8 @@ export default {
|
|||||||
.bg-blue-grey-1
|
.bg-blue-grey-1
|
||||||
background: var(--bg-light-grey) !important
|
background: var(--bg-light-grey) !important
|
||||||
|
|
||||||
.text-primary
|
//.text-primary
|
||||||
color: var(--font-dark-blue-color-0) !important
|
// color: var(--font-dark-blue-color-0) !important
|
||||||
|
|
||||||
.q-btn--round
|
.q-btn--round
|
||||||
width: 32px !important
|
width: 32px !important
|
||||||
|
|||||||
@@ -168,14 +168,14 @@ export default {
|
|||||||
let filteredArray = [];
|
let filteredArray = [];
|
||||||
this.schedulesData.forEach((elem) => {
|
this.schedulesData.forEach((elem) => {
|
||||||
filteredArray.push({
|
filteredArray.push({
|
||||||
id: elem.employee.id,
|
id: elem.employee?.id,
|
||||||
last_name: elem.employee.last_name,
|
last_name: elem.employee?.last_name,
|
||||||
first_name: elem.employee.first_name,
|
first_name: elem.employee?.first_name,
|
||||||
patronymic: elem.employee.patronymic,
|
patronymic: elem.employee?.patronymic,
|
||||||
color: elem.employee.color,
|
color: elem.employee?.color,
|
||||||
photo: elem.employee.photo,
|
photo: elem.employee?.photo,
|
||||||
end_time: elem.end_time.slice(0, elem.end_time.length - 3),
|
end_time: elem.end_time?.slice(0, elem.end_time.length - 3),
|
||||||
start_time: elem.start_time.slice(0, elem.start_time.length - 3),
|
start_time: elem.start_time?.slice(0, elem.start_time.length - 3),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return filteredArray;
|
return filteredArray;
|
||||||
|
|||||||
Reference in New Issue
Block a user