[task overview] blocker

This commit is contained in:
Filip Kaluža committed 2022-12-09 17:37:04 +01:00
1 parent 288ff16e7d
commit 73b21b4e42
6 files changed
+21 -33

No files matched your search

+5 -10
View File
@@ -43,8 +43,7 @@
"ends_at": "2022-12-06T09:00:00+00:00", "ends_at": "2022-12-06T09:00:00+00:00",
"title": "title", "title": "title",
"project_code": "CO-2201", "project_code": "CO-2201",
"master_task_color": "#121212", "master_task_color": "#E9FFE6"
"class": "red"
}, },
{ {
@@ -54,8 +53,7 @@
"ends_at": "2022-12-06T10:00:00+00:00", "ends_at": "2022-12-06T10:00:00+00:00",
"title": "title", "title": "title",
"project_code": "CO-2201", "project_code": "CO-2201",
"master_task_color": "#121212", "master_task_color": "#FDE1FF"
"class": "green"
}, },
{ {
@@ -65,8 +63,7 @@
"ends_at": "2022-12-06T11:00:00+00:00", "ends_at": "2022-12-06T11:00:00+00:00",
"title": "title", "title": "title",
"is_blocker": true, "is_blocker": true,
"master_task_color": null, "master_task_color": null
"class": "blue"
}, },
{ {
@@ -76,8 +73,7 @@
"ends_at": "2022-12-07T12:00:00+00:00", "ends_at": "2022-12-07T12:00:00+00:00",
"title": "title", "title": "title",
"project_code": "CO-2201", "project_code": "CO-2201",
"master_task_color": "#121212", "master_task_color": "#E9FFE6"
"class": "yellow"
}, },
{ {
@@ -87,8 +83,7 @@
"ends_at": "2022-12-07T16:00:00+00:00", "ends_at": "2022-12-07T16:00:00+00:00",
"title": "title", "title": "title",
"project_code": "CO-2201", "project_code": "CO-2201",
"master_task_color": "#121212", "master_task_color": "#E7DBF8"
"class": "green"
} }
] ]
}, },
-3
View File
@@ -31,6 +31,3 @@ th
.border-select .v-input__control .border-select .v-input__control
border: 1px solid #E5E5E5 !important border: 1px solid #E5E5E5 !important
.min-h-100
min-height: 100%
@@ -224,6 +224,7 @@ export default {
let width = 100 - (this.eventPosition * 10) let width = 100 - (this.eventPosition * 10)
let left = 10 * this.eventPosition / 2 let left = 10 * this.eventPosition / 2
let zIdnex = (this.eventPosition + 1) * 10 let zIdnex = (this.eventPosition + 1) * 10
let background = this.event.master_task_color
if (this.vuecal.minEventWidth && width < this.vuecal.minEventWidth) { if (this.vuecal.minEventWidth && width < this.vuecal.minEventWidth) {
width = this.vuecal.minEventWidth width = this.vuecal.minEventWidth
@@ -233,6 +234,7 @@ export default {
const { top, height } = this.eventDimensions const { top, height } = this.eventDimensions
return { return {
"background": background,
"z-index": `${zIdnex}`, "z-index": `${zIdnex}`,
top: `${top}px`, top: `${top}px`,
height: `${height}px`, height: `${height}px`,
@@ -247,6 +249,7 @@ export default {
return { return {
[this.event.class]: !!this.event.class, [this.event.class]: !!this.event.class,
'event-blocker': this.event.is_blocker,
'vuecal__event--focus': this.event.focused, 'vuecal__event--focus': this.event.focused,
'vuecal__event--resizing': this.event.resizing, 'vuecal__event--resizing': this.event.resizing,
'vuecal__event--background': this.event.background, 'vuecal__event--background': this.event.background,
@@ -34,10 +34,6 @@ export default {
unscheduledTime: { type: Array, default: [] } unscheduledTime: { type: Array, default: [] }
}, },
// created() {
// console.log(this.weekDays)
// },
methods: { methods: {
selectCell (date, DOMEvent) { selectCell (date, DOMEvent) {
if (date.getTime() !== this.view.selectedDate.getTime()) { if (date.getTime() !== this.view.selectedDate.getTime()) {
@@ -86,8 +82,6 @@ export default {
} : {}) } : {})
} }
}) })
console.log(headings)
return headings return headings
}, },
cellWidth () { cellWidth () {
@@ -48,9 +48,9 @@
<template v-slot:event="{ event }"> <template v-slot:event="{ event }">
<div class="event-content-wrapper w-100 h-100 d-flex flex-column justify-space-between"> <div class="event-content-wrapper w-100 h-100 d-flex flex-column justify-space-between">
<div> <div>
<small v-if="event.project_code && (event.end.getTime() - event.start.getTime() >= 7200000)" class="project-code">{{ event.project_code }}</small> <small v-if="event.project_code && (event.end.getTime() - event.start.getTime() >= 7200000) && !event.is_blocker" class="project-code">{{ event.project_code }}</small>
<h3>{{ event.title }}</h3> <h3>{{ event.title }}</h3>
<div v-if="event.end.getTime() - event.start.getTime() >= 7200000" class="d-flex align-center"> <div v-if="event.end.getTime() - event.start.getTime() >= 7200000" class="d-flex align-center event-details">
<div class="event-initials d-flex justify-center align-center"> <div class="event-initials d-flex justify-center align-center">
<small>{{ getUserInitials(event) }}</small> <small>{{ getUserInitials(event) }}</small>
</div> </div>
@@ -125,8 +125,6 @@ export default {
correctTimecolumnMargin() { correctTimecolumnMargin() {
const heightOfDayHeader = document.getElementsByClassName('vuecal__heading')[0].clientHeight const heightOfDayHeader = document.getElementsByClassName('vuecal__heading')[0].clientHeight
console.log(heightOfDayHeader)
console.log(document.getElementsByClassName('vuecal__time-column')[0].style)
document.getElementsByClassName('vuecal__time-column')[0].style.marginTop = `${heightOfDayHeader}px` document.getElementsByClassName('vuecal__time-column')[0].style.marginTop = `${heightOfDayHeader}px`
}, },
@@ -310,15 +308,18 @@ export default {
&:focus &:focus
z-index: 100 !important z-index: 100 !important
&.red &.event-blocker
background: #FFC9C9 !important background: #B00020 !important
&.green h3,
background: #E9FFE5 !important .event-details *
color: white !important
.event-details .event-initials
border: 1px solid white
.event-footer
border-top: 1px solid rgba(255, 255, 255, 0.19)
&.blue
background: #DADEF8 !important
&.yellow
background: #F6ECD3 !important
</style> </style>
@@ -69,8 +69,6 @@ export default {
time.surname = this.timelineData.surname time.surname = this.timelineData.surname
}) })
console.log(this.timelineData.unscheduled_times)
// format working hours // format working hours
this.config.startHour = Number(this.timelineData.work_hours_from.split(':')[0]) - 1 this.config.startHour = Number(this.timelineData.work_hours_from.split(':')[0]) - 1
this.config.endHour = Number(this.timelineData.work_hours_to.split(':')[0]) + 1 this.config.endHour = Number(this.timelineData.work_hours_to.split(':')[0]) + 1