mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
bugy
This commit is contained in:
1 parent
622b6ea45b
commit
8972b538ea
3 files changed
+28
-9
No files matched your search
@@ -83,9 +83,14 @@
|
|||||||
<small class="event-initials-date">{{ event.date?.toLocaleDateString('sk-SK') }}</small>
|
<small class="event-initials-date">{{ event.date?.toLocaleDateString('sk-SK') }}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="event.subtask?.deadline" class="d-flex align-center">
|
<div class="d-flex align-center">
|
||||||
<v-icon icon="mdi-skull-outline" size="small" />
|
<v-icon icon="mdi-skull-outline" size="small" />
|
||||||
<small class="ml-1" :class="`${tmUtils.isAfter(event.subtask?.deadline) ? 'text-black' : 'text-red-darken-4'}`">{{ tmUtils.formatDate(event.subtask?.deadline) }}</small>
|
<small v-if="event?.subtask.deadline" class="ml-1">{{ getDeadline(event?.subtask) }}</small>
|
||||||
|
<v-tooltip v-else text="Deadline z Mastertasku" location="bottom">
|
||||||
|
<template v-slot:activator="{ props }">
|
||||||
|
<small class="cursor-pointer ml-1" v-if="!event?.subtask?.deadline" v-bind="props">{{ getDeadline(event?.subtask) }}*</small>
|
||||||
|
</template>
|
||||||
|
</v-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -109,8 +114,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addDays } from 'date-fns'
|
import { addDays } from 'date-fns'
|
||||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -154,7 +161,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapGetters('tm', ['mastertasks'])
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getDeadline(subtask) {
|
||||||
|
if(subtask.deadline) return moment(subtask.deadline).format('DD.MM.yyyy')
|
||||||
|
else if(!this.mastertasks) return ''
|
||||||
|
const masterTask = this.mastertasks.find((mt) => mt.id === subtask.master_task_id)
|
||||||
|
return moment(masterTask).format('DD.MM.yyyy') ? moment(masterTask.deadline).format('DD.MM.yyyy') : ''
|
||||||
|
},
|
||||||
|
|
||||||
weekChanged() {
|
weekChanged() {
|
||||||
const scrollContainer = this.$el.getElementsByClassName('vuecal__scrollable-body')[0]
|
const scrollContainer = this.$el.getElementsByClassName('vuecal__scrollable-body')[0]
|
||||||
scrollContainer.scrollLeft = 0
|
scrollContainer.scrollLeft = 0
|
||||||
@@ -294,8 +312,8 @@ export default {
|
|||||||
.colWidth
|
.colWidth
|
||||||
width: 120px
|
width: 120px
|
||||||
|
|
||||||
@media (min-width: 1476px)
|
// @media (min-width: 1476px)
|
||||||
width: 100% !important
|
// width: 100% !important
|
||||||
|
|
||||||
.vuecal
|
.vuecal
|
||||||
box-shadow: none !important
|
box-shadow: none !important
|
||||||
@@ -466,7 +484,7 @@ export default {
|
|||||||
|
|
||||||
&.vuecal__event--focus
|
&.vuecal__event--focus
|
||||||
z-index: 100 !important
|
z-index: 100 !important
|
||||||
min-height: 250px !important
|
min-height: 350px !important
|
||||||
width: 100% !important
|
width: 100% !important
|
||||||
left: 0 !important
|
left: 0 !important
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleKeyDown(event) {
|
handleKeyDown(event) {
|
||||||
if (event.keyCode === 27) this.closeModal()
|
// if (event.keyCode === 27) this.closeModal()
|
||||||
|
if (event.keyCode === 27) this.visible = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ export default {
|
|||||||
|
|
||||||
async complete() {
|
async complete() {
|
||||||
try {
|
try {
|
||||||
const tempMastertask = {...this.mastertask, is_finished: this.mastertask.is_finished ? 0 : 1, duration: this.mastertask.duration }
|
const tempMastertask = {...this.mastertask, is_finished: this.mastertask.is_finished ? 0 : 1 }
|
||||||
const { mastertask } = await this.$axios.put_auth(`v1/mastertasks/${tempMastertask.id}`, tempMastertask)
|
const { mastertask } = await this.$axios.put_auth(`v1/mastertasks/${tempMastertask.id}`, tempMastertask)
|
||||||
|
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
|||||||
Reference in new issue
Block a user