[Master task] Edit fix

This commit is contained in:
Matej Glasnák committed 2023-03-05 20:09:20 +01:00
1 parent 526b3896f5
commit c93a5c7799
5 files changed
+16 -7

No files matched your search

@@ -58,7 +58,7 @@
<A-mastertask-description :mastertask="mastertask" />
<div class="d-flex justify-start align-center mt-8">
<v-btn class="button primary" @click="save()">Ukončiť mastertask</v-btn>
<v-btn class="button primary" @click="toggleIsFinished()">{{ mastertask.is_finished ? 'Otvoriť mastertask' : 'Ukončiť mastertask'}}</v-btn>
</div>
<A-tasks-table :subtasks="mastertask.subtasks" />
@@ -125,7 +125,8 @@ export default {
computed: {
...mapGetters('tm', [
'teams',
'projects'
'projects',
'enrichedEmployees'
])
},
@@ -193,10 +194,16 @@ export default {
}
},
toggleIsFinished() {
this.mastertask.is_finished = !this.mastertask.is_finished
this.save()
},
async save() {
if (!(await this.v$.$validate())) return
this.mastertask.description = this.$refs['description'].getHTML()
if (this.$refs['description'])
this.mastertask.description = this.$refs['description'].getHTML()
// this.mastertask.subtasks = this.mastertask.subtasks.map(subtask => {
// const employee = this.mastertask.employees.find(employee => employee.id == subtask.employee_id)