[Blockers] Implemented homeoffice, adhoc, vacation blockers

This commit is contained in:
Matej Glasnák committed 2023-04-11 15:14:57 +02:00
1 parent 4a9dfc6520
commit b6f2249440
4 files changed
+26 -23

No files matched your search

@@ -26,7 +26,7 @@
<template v-slot:split-label="{ split }">
<div class="w-100 h-100 d-flex flex-column">
<span v-if="split.date" class="d-flex align-center">
<img v-if="getHeadingDate(split.date) == 'Dnes'" :src="require('@/plugins/app/_img/icons/home.svg')" class="mr-2">
<img v-if="split.isHomeoffice" :src="require('@/plugins/app/_img/icons/home.svg')" class="mr-2">
<p class="weekday-label">{{ getHeadingDate(split.date) }}</p>
</span>
<span v-else class="d-flex align-center">
@@ -64,16 +64,16 @@
</div>
</div>
<div v-else-if="event.blocker?.type != 'home_office'" class="custom-event-body w-100 h-100 d-flex flex-column justify-space-between" :class="{'short-event' : getEventLength(event) <= 9000000, 'mini-event' : getEventLength(event) <= 5400000, 'micro-event' : getEventLength(event) <= 3600000}" :style="{backgroundColor: event.color || event.subtask.color}">
<div class="event-content" :class="event.type || 'subtask'">
<template v-if="event.type == 'blocker'">
<h3>{{ event.blocker.name }}</h3>
</template>
<template v-else>
<div v-else-if="['subtask', 'blocker', 'adhoc', 'vacation'].includes(event.type)" class="custom-event-body w-100 h-100 d-flex flex-column justify-space-between" :class="{'short-event' : getEventLength(event) <= 9000000, 'mini-event' : getEventLength(event) <= 5400000, 'micro-event' : getEventLength(event) <= 3600000}" :style="{backgroundColor: event.color || event.subtask.color}">
<div class="event-content" :class="{'is-blocker': event.isBlocker}">
<template v-if="event.type == 'subtask'">
<small v-if="event.subtask.project_code" class="project-code">{{ event.subtask.project_code }}</small>
<h3>{{ event.subtask.master_task?.name || event.subtask.master_task }}</h3>
</template>
<template v-else>
<h3>{{ event.blocker.name }}</h3>
</template>
<div class="d-flex align-center event-details event-initials-wrapper">
<div class="event-initials d-flex justify-center align-center">
@@ -209,11 +209,7 @@ export default {
},
taskClicked(subtask) {
if (subtask.type == 'non-working-hours') return
// console.log("task", task)
if (subtask.end.getTime() - subtask.start.getTime() <= 3600000) {
// console.log("ShortTask")
}
// console.log('task clicked')
},
eventFocused(event) {
@@ -385,7 +381,7 @@ export default {
padding: 20px 10px
.event-content
&.blocker
&.is-blocker
*
color: #ffffff !important