[teams overview] setup, tahanie dat a ich formatovanie...

This commit is contained in:
Filip Kaluža committed 2023-01-10 15:28:33 +01:00
1 parent f5457f3ee5
commit f1e3d63fc9
5 files changed
+274 -106

No files matched your search

@@ -25,10 +25,13 @@
>
<template v-slot:split-label="{ split }">
<div class="w-100 h-100 d-flex flex-column">
<span class="d-flex align-center">
<span v-if="split.date" class="d-flex align-center">
<img v-if="getHeadingDate(split.date) == 'Dnes'" :src="require('./_img/home-icon.svg')" class="mr-2">
<p class="weekday-label">{{ getHeadingDate(split.date) }}</p>
</span>
<span v-else class="d-flex align-center">
<p class="weekday-label">{{ split.firstName }}</p>
</span>
<div v-if="split.unscheduledTime && split.initials" class="unscheduled-time d-flex align-center text-left">
<div class="unscheduled-time-initials d-flex align-center justify-center me-4">
@@ -146,7 +149,6 @@ export default {
this.$nextTick(() => {
this.scrollToYesterday()
// this._scrollToDefaultTime()
})
},
@@ -156,20 +158,9 @@ export default {
},
onReady() {
this.scrollToYesterday()
this.correctMargins()
},
scrollToYesterday() {
return
// if (!document.getElementsByClassName('yesterday-cell').length || !document.getElementsByClassName('today-cell').length) return
// const scrollContainer = document.getElementsByClassName('vuecal__scrollable-body')[0]
// const yesterdayCell = document.getElementsByClassName('yesterday-cell')[0]
// scrollContainer.scrollLeft = yesterdayCell.offsetLeft - scrollContainer.offsetLeft - 20
},
correctMargins() {
if (!document.getElementsByClassName('vuecal__split-days-headers').length) return
const heightOfDayHeader = document.getElementsByClassName('vuecal__split-days-headers')[0].clientHeight
@@ -215,17 +206,6 @@ export default {
this.focusedEventId = event.task_id
// console.log(`Focused: ${event.task_id}`)
},
_scrollToDefaultTime() {
const calendarContainer = document.querySelector('.main-content')
const defaultTimeToScrollTo = document.querySelectorAll('.vuecal__time-cell')[7]
const toolbarHeight = document.querySelector('.v-toolbar').getBoundingClientRect().height
const subheaderHeight = document.querySelector('.subheader').getBoundingClientRect().height
calendarContainer.scrollTo({
top: defaultTimeToScrollTo.getBoundingClientRect().top - toolbarHeight - subheaderHeight
})
},
}
}
</script>
@@ -288,6 +268,7 @@ export default {
z-index: 999
background: white
padding-bottom: 15px
width: calc( 100% - 20px )
.vuecal__cell-split
margin-right: 20px
@@ -51,7 +51,6 @@ export default {
this.formatData(week.firstDay)
this.generateSplits(week.firstDay)
this.generateNonWorkingHours(week.firstDay)
this.assignTasksToSplits()
} catch(error) {
this.timelineData = {}
console.error(error)
@@ -125,10 +124,6 @@ export default {
this.timelineData.tasks.push(...nonWorkingHours)
},
assignTasksToSplits() {
console.log('asasasas')
},
triggerToast(message) {
this.errorToastMessage = message
this.errorToast = true