Наладила скроллы
This commit is contained in:
@@ -26,8 +26,8 @@ export default {
|
|||||||
calendarLayout: "",
|
calendarLayout: "",
|
||||||
currentDate: moment(),
|
currentDate: moment(),
|
||||||
timeInformation: {
|
timeInformation: {
|
||||||
dayStartTime: "8:00",
|
dayStartTime: "0:00",
|
||||||
dayEndTime: "18:00",
|
dayEndTime: "20:00",
|
||||||
},
|
},
|
||||||
eventsData: [],
|
eventsData: [],
|
||||||
team: [
|
team: [
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.calendar-background-wrapper.flex.flex-col(
|
.calendar-background-wrapper.flex.flex-col(
|
||||||
ref="backgroundWrapper"
|
ref="backgroundWrapper"
|
||||||
:class="scrollPresence"
|
:class="horizontalScrollPresence"
|
||||||
)
|
)
|
||||||
|
.header-wrapper
|
||||||
|
.header(:style="backgroundExtendedWidth")
|
||||||
calendar-column(
|
calendar-column(
|
||||||
v-for="(owner, index) in filteredOwners"
|
v-for="(owner, index) in filteredOwners"
|
||||||
:key="owner.id"
|
:key="owner.id"
|
||||||
@@ -10,7 +12,6 @@
|
|||||||
:style="calculateColumnPosition(index)"
|
:style="calculateColumnPosition(index)"
|
||||||
:day-events="filterEventsByOwner(owner)"
|
:day-events="filterEventsByOwner(owner)"
|
||||||
)
|
)
|
||||||
.header(:style="backgroundExtendedWidth")
|
|
||||||
.body.flex.flex-col(
|
.body.flex.flex-col(
|
||||||
:style="backgroundExtendedWidth"
|
:style="backgroundExtendedWidth"
|
||||||
)
|
)
|
||||||
@@ -58,9 +59,9 @@ export default {
|
|||||||
backgroundHeight() {
|
backgroundHeight() {
|
||||||
return (this.hoursArray.length - 1) * this.pixelsPerHour + 48;
|
return (this.hoursArray.length - 1) * this.pixelsPerHour + 48;
|
||||||
},
|
},
|
||||||
scrollPresence() {
|
horizontalScrollPresence() {
|
||||||
return {
|
return {
|
||||||
scroll: this.ownersArrayLength > 3,
|
"scroll-x": this.ownersArrayLength > 3 && this.backgroundHeight < 855,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filteredOwners() {
|
filteredOwners() {
|
||||||
@@ -147,13 +148,16 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
.scroll
|
.scroll-x
|
||||||
overflow-x: scroll
|
overflow-x: scroll
|
||||||
|
|
||||||
.calendar-background-wrapper
|
.calendar-background-wrapper
|
||||||
width: 100%
|
width: 100%
|
||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
|
.header-wrapper
|
||||||
|
position: relative
|
||||||
|
|
||||||
.header
|
.header
|
||||||
height: 48px
|
height: 48px
|
||||||
|
|
||||||
|
|||||||
@@ -59,4 +59,6 @@ export default {
|
|||||||
width: 80px
|
width: 80px
|
||||||
height: 100%
|
height: 100%
|
||||||
color: var(--font-dark-blue-color)
|
color: var(--font-dark-blue-color)
|
||||||
|
position: sticky
|
||||||
|
left: 0
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
span.owner-name.font-medium.text-base.mr-6 {{ ownerName }}
|
span.owner-name.font-medium.text-base.mr-6 {{ ownerName }}
|
||||||
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
|
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
|
||||||
base-doc-ok-button
|
base-doc-ok-button
|
||||||
.px-1
|
.body
|
||||||
calendar-event-card(
|
calendar-event-card(
|
||||||
v-for="event in dayEvents"
|
v-for="event in dayEvents"
|
||||||
:key="event.id"
|
:key="event.id"
|
||||||
@@ -45,6 +45,16 @@ export default {
|
|||||||
|
|
||||||
.header
|
.header
|
||||||
height: 48px
|
height: 48px
|
||||||
|
position: sticky
|
||||||
|
top: 0px
|
||||||
|
z-index: 3
|
||||||
|
width: inherit
|
||||||
|
border-right: 1px solid var(--border-light-grey-color)
|
||||||
|
background-color: var(--default-white)
|
||||||
|
|
||||||
|
.body
|
||||||
|
position: relative
|
||||||
|
z-index: 3
|
||||||
|
|
||||||
.avatar-wrapper
|
.avatar-wrapper
|
||||||
width: 32px
|
width: 32px
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default {
|
|||||||
background-color: var(--bg-event-yellow-color)
|
background-color: var(--bg-event-yellow-color)
|
||||||
color: var(--font-black-color)
|
color: var(--font-black-color)
|
||||||
position: relative
|
position: relative
|
||||||
z-index: 2
|
z-index: 3
|
||||||
|
|
||||||
.header
|
.header
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.schedule.ml-2.w-full(:style="scheduleWidth")
|
.schedule.ml-2.pb-5.w-full(:style="scheduleWidth")
|
||||||
calendar-header(
|
calendar-header(
|
||||||
:current-date="currentDate"
|
:current-date="currentDate"
|
||||||
:is-current-date="isCurrentDate"
|
:is-current-date="isCurrentDate"
|
||||||
@@ -7,7 +7,9 @@
|
|||||||
@next-date="nextDate"
|
@next-date="nextDate"
|
||||||
@selected-layout="selectedLayout"
|
@selected-layout="selectedLayout"
|
||||||
)
|
)
|
||||||
.schedule-body.flex
|
.schedule-body.flex(
|
||||||
|
:class="bodyVerticalScroll"
|
||||||
|
)
|
||||||
div
|
div
|
||||||
calendar-clock-column(
|
calendar-clock-column(
|
||||||
:hours-array="hoursArray"
|
:hours-array="hoursArray"
|
||||||
@@ -115,6 +117,11 @@ export default {
|
|||||||
"--sidebar-width": this.sidebarWidth,
|
"--sidebar-width": this.sidebarWidth,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
bodyVerticalScroll() {
|
||||||
|
return {
|
||||||
|
"scroll-y": this.scheduleHeight > 855,
|
||||||
|
};
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
previousDate() {
|
previousDate() {
|
||||||
@@ -186,6 +193,11 @@ export default {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
bodyScheduleHeight() {
|
||||||
|
if (this.scheduleHeight > 855) {
|
||||||
|
return this.scheduleHeight;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
currentTime() {
|
currentTime() {
|
||||||
@@ -229,6 +241,9 @@ export default {
|
|||||||
background-color: var(--default-white)
|
background-color: var(--default-white)
|
||||||
width: calc(100% - (var(--sidebar-width) + 8px))
|
width: calc(100% - (var(--sidebar-width) + 8px))
|
||||||
|
|
||||||
|
.scroll-y
|
||||||
|
overflow-y: scroll
|
||||||
|
|
||||||
.time-line-indicator
|
.time-line-indicator
|
||||||
width: calc(100% - 80px)
|
width: calc(100% - 80px)
|
||||||
border-top: 1px solid var(--bg-event-red-color)
|
border-top: 1px solid var(--bg-event-red-color)
|
||||||
@@ -243,4 +258,5 @@ export default {
|
|||||||
|
|
||||||
.schedule-body
|
.schedule-body
|
||||||
position: relative
|
position: relative
|
||||||
|
height: 855px
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user