diff --git a/src/assets/sass/variables.sass b/src/assets/sass/variables.sass index 4f6576b..6941713 100644 --- a/src/assets/sass/variables.sass +++ b/src/assets/sass/variables.sass @@ -17,4 +17,5 @@ --bg-hover-row-table: rgba(215, 217, 255, 0.25) --default-white: #fff --btn-red-color: #ff6f6f + --time-indicator-color: #E93131 --br-grey-color: #D3D4DC diff --git a/src/pages/calendar/TheCalendar.vue b/src/pages/calendar/TheCalendar.vue index a08e224..e8b57ec 100644 --- a/src/pages/calendar/TheCalendar.vue +++ b/src/pages/calendar/TheCalendar.vue @@ -1,29 +1,23 @@ + + diff --git a/src/pages/calendar/components/CalendarColumn.vue b/src/pages/calendar/components/CalendarColumn.vue index fba93bf..120697a 100644 --- a/src/pages/calendar/components/CalendarColumn.vue +++ b/src/pages/calendar/components/CalendarColumn.vue @@ -6,8 +6,9 @@ span.member-name.font-medium.text-base.mr-6 {{ info.name }} img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg") base-doc-ok-button - .body.flex.flex-col - .line.flex.items-center(v-for="hour in 10" :key="hour") + .flex.flex-col + span.block.time-indicator(v-if="isShownIndicator" :style="indicatorLocation") + .line.flex.items-center(v-for="hour in hoursArray" :key="hour") .middle-line @@ -23,6 +24,33 @@ export default { return {}; }, }, + hoursArray: Array, + currentTime: String, + }, + data() { + return { + isShownIndicator: true, + }; + }, + computed: { + indicatorLocation() { + return { + top: `${this.calculateIndicatorLocation()}px`, + }; + }, + }, + methods: { + calculateIndicatorLocation() { + let newTime = this.currentTime + .split(":") + .map((elem) => parseInt(elem, 10)); + let result = (newTime[0] - 7) * 60.5 + newTime[1]; + if (result > 666) { + this.isShownIndicator = false; + return 0; + } + return result; + }, }, }; @@ -30,7 +58,7 @@ export default { diff --git a/src/pages/calendar/components/CalendarHeader.vue b/src/pages/calendar/components/CalendarHeader.vue index 930fc1a..7b6b7b7 100644 --- a/src/pages/calendar/components/CalendarHeader.vue +++ b/src/pages/calendar/components/CalendarHeader.vue @@ -17,7 +17,7 @@ export default { name: "CalendarHeader", components: { BaseArrowButton, CalendarLayoutSwitch }, props: { - currentDay: Object, + currentDate: Object, }, data() { return { @@ -26,7 +26,7 @@ export default { }, computed: { dateString() { - let newStr = this.currentDay.format("D MMMM YYYY"); + let newStr = this.currentDate.format("D MMMM YYYY"); return newStr .split(" ") .map((elem, index) => { @@ -38,7 +38,7 @@ export default { }, methods: { changeSelectedLayout(option) { - this.$emit("selectedLayout", option); + this.$emit("selected-layout", option); }, previousHandler() { this.$emit("previous-date"); @@ -48,9 +48,9 @@ export default { }, }, watch: { - currentDay: function () { + currentDate: function () { this.isToday = - this.currentDay.format("DD.MM.YYYY") === moment().format("DD.MM.YYYY"); + this.currentDate.format("DD.MM.YYYY") === moment().format("DD.MM.YYYY"); }, }, }; diff --git a/src/pages/calendar/components/CalendarSchedule.vue b/src/pages/calendar/components/CalendarSchedule.vue new file mode 100644 index 0000000..e5c0246 --- /dev/null +++ b/src/pages/calendar/components/CalendarSchedule.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/tailwind.config.js b/tailwind.config.js index f1a6ef5..d32734c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -20,6 +20,9 @@ module.exports = { "3xl": ["60px", { lineHeight: "70px" }], "4xl": ["44px", { lineHeight: "48px" }], }, + gap: { + 43: "43px", + }, }, }, plugins: [],