mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
[Task] Delete fix
This commit is contained in:
1 parent
388466db98
commit
ef6369714b
35 files changed
+93
-79
No files matched your search
@@ -10,7 +10,7 @@
|
||||
</v-col>
|
||||
<v-col cols="7">
|
||||
<v-sheet class="py-3">
|
||||
<p class="task-badge px-4 py-2 rounded-pill">
|
||||
<p class="task-badge px-4 py-2 rounded-pill hover" @click="openMastertask()" :style="{backgroundColor: color}">
|
||||
{{ name }}
|
||||
</p>
|
||||
</v-sheet>
|
||||
@@ -20,10 +20,29 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ['close-modal'],
|
||||
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
|
||||
id: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
|
||||
color: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
openMastertask() {
|
||||
this.$emit('close-modal')
|
||||
this.$events.emit('show-master-task-modal', {masterTask: {id: this.id}, editMode: false})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ export default {
|
||||
async _update(task) {
|
||||
try {
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${task.id}`, task)
|
||||
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
this.closeModal()
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<A-mastertask-name :name="task.master_task.name" />
|
||||
<A-mastertask-name :name="task.master_task?.name || task.master_task" :id="task.master_task.id" :color="task.master_task.color" @close-modal="$emit('close-modal')" />
|
||||
<A-mastertask-status :status="task.is_finished" />
|
||||
<A-task-timeblocks :timeblocks="task.timeblocks" :task="task" />
|
||||
<A-task-assigned-employee :employee="task.employee" />
|
||||
@@ -22,6 +22,8 @@ import ATaskDescription from './_components/a-task-description.vue'
|
||||
import ZFiles from '@/plugins/tm@modal/_components/z-files.vue'
|
||||
|
||||
export default {
|
||||
emits: ['close-modal'],
|
||||
|
||||
components: {
|
||||
ZFiles,
|
||||
AMastertaskName,
|
||||
|
||||
Reference in new issue
Block a user