mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
fix
This commit is contained in:
1 parent
b25767166d
commit
cddf44e158
2 files changed
+8
-4
No files matched your search
@@ -65,7 +65,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="['subtask', 'blocker', 'adhoc', 'vacation', 'free_day'].includes(event.type)" class="custom-event-body colWidth 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._timeblock_is_finished || event.subtask.is_finished ? '#dedfe0' : event.color || event.subtask.color}">
|
<div v-else-if="['subtask', 'blocker', 'adhoc', 'vacation', 'free_day'].includes(event.type)" class="custom-event-body colWidth 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._timeblock_is_finished || event.subtask?.is_finished ? '#dedfe0' : event.color || event.subtask.color}">
|
||||||
<div class="event-content" :class="{'is-blocker': event.isBlocker}">
|
<div class="event-content" :class="{'is-blocker': event.isBlocker}">
|
||||||
<template v-if="event.type == 'subtask'">
|
<template v-if="event.type == 'subtask'">
|
||||||
<small v-if="event.subtask.project_code" class="project-code">{{ event.subtask.project_code }}</small>
|
<small v-if="event.subtask.project_code" class="project-code">{{ event.subtask.project_code }}</small>
|
||||||
@@ -244,7 +244,7 @@ export default {
|
|||||||
const subtask = event.subtask
|
const subtask = event.subtask
|
||||||
const timeblock = subtask.timeblocks.find(originalTimeblock => originalTimeblock.id == event._timeblock_id)
|
const timeblock = subtask.timeblocks.find(originalTimeblock => originalTimeblock.id == event._timeblock_id)
|
||||||
|
|
||||||
timeblock.is_finished = timeblock.is_finished ? 0 : 1
|
timeblock.is_finished = timeblock?.is_finished ? 0 : 1
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const {data: newTimeblock} = await this.$axios.put_auth(`v1/timeblocks/${timeblock.id}`, timeblock)
|
const {data: newTimeblock} = await this.$axios.put_auth(`v1/timeblocks/${timeblock.id}`, timeblock)
|
||||||
|
|||||||
@@ -112,11 +112,14 @@ export default {
|
|||||||
if (!subtask?.is_finished) { subtask.is_finished = 0 }
|
if (!subtask?.is_finished) { subtask.is_finished = 0 }
|
||||||
|
|
||||||
subtask.timeblocks.push({
|
subtask.timeblocks.push({
|
||||||
|
end: tmUtils.formatDateTimeForBackend(end),
|
||||||
id: null,
|
id: null,
|
||||||
start: tmUtils.formatDateTimeForBackend(start),
|
is_finished: 0,
|
||||||
end: tmUtils.formatDateTimeForBackend(end)
|
start: tmUtils.formatDateTimeForBackend(start)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
subtask.deadline = tmUtils.formatDateTimeForBackend(subtask.deadline)
|
||||||
|
|
||||||
if (!subtask.id) {
|
if (!subtask.id) {
|
||||||
this.$emit('update-unfinished-subtask', subtask)
|
this.$emit('update-unfinished-subtask', subtask)
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
@@ -175,6 +178,7 @@ export default {
|
|||||||
this.closeModal()
|
this.closeModal()
|
||||||
this.$events.emit('on-subtask-edited', subtask)
|
this.$events.emit('on-subtask-edited', subtask)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
this.$toast.error(error.message || error)
|
this.$toast.error(error.message || error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user