mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Refactoring]
This commit is contained in:
1 parent
26138f69b3
commit
ca1cbd723a
25 files changed
+215
-206
No files matched your search
@@ -61,7 +61,7 @@
|
||||
<v-btn class="button primary" @click="save()">Ukončiť mastertask</v-btn>
|
||||
</div>
|
||||
|
||||
<A-tasks-table :tasks="mastertask.subtasks" :employees="enrichedEmployees" />
|
||||
<A-tasks-table :subtasks="mastertask.subtasks" />
|
||||
|
||||
<div class="d-flex align-center ">
|
||||
<v-btn class="subtask-btn w-100" @click="addTask()" ><v-icon class="mx-1" icon="mdi-plus" />Pridať task</v-btn>
|
||||
@@ -125,8 +125,7 @@ export default {
|
||||
computed: {
|
||||
...mapGetters('tm', [
|
||||
'teams',
|
||||
'projects',
|
||||
'enrichedEmployees'
|
||||
'projects'
|
||||
])
|
||||
},
|
||||
|
||||
@@ -147,7 +146,7 @@ export default {
|
||||
if (mastertask?.id == this.mastertask?.id) this.closeModal()
|
||||
})
|
||||
|
||||
this.$events.on('on-task-deleted', (task) => {
|
||||
this.$events.on('on-subtask-deleted', (task) => {
|
||||
if (!this.mastertask) return
|
||||
this.mastertask.subtasks = this.mastertask.subtasks.filter((subtask) => subtask.id != task.id)
|
||||
})
|
||||
@@ -165,15 +164,15 @@ export default {
|
||||
|
||||
beforeUnmount() {
|
||||
this.$events.off('on-mastertask-deleted')
|
||||
this.$events.off('on-task-deleted')
|
||||
this.$events.off('on-subtask-deleted')
|
||||
this.$events.off('on-subtask-edited')
|
||||
},
|
||||
|
||||
methods: {
|
||||
async showModal(mastertask, editMode = false) {
|
||||
this.v$.$reset()
|
||||
async showModal({mastertask, editMode = false}) {
|
||||
this.visible = true
|
||||
this.mastertask = null
|
||||
this.$nextTick(() => this.v$.$reset())
|
||||
|
||||
try {
|
||||
if (mastertask?.id) {
|
||||
@@ -234,7 +233,7 @@ export default {
|
||||
},
|
||||
|
||||
addTask() {
|
||||
this.$events.emit('show-task-modal', { task: null, editMode: false, mastertask: this.mastertask })
|
||||
this.$events.emit('show-subtask-modal', { subtask: null, editMode: false, mastertask: this.mastertask })
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user