mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
[Refactoring]
This commit is contained in:
1 parent
26138f69b3
commit
ca1cbd723a
25 files changed
+215
-206
No files matched your search
@@ -2,7 +2,7 @@
|
||||
<v-dialog v-model="visible" max-width="750">
|
||||
<v-card>
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<h1>Ste si istý, že chcete zmazať task z mastertasku <b>{{ task.project_code }}</b>?</h1>
|
||||
<h1>Ste si istý, že chcete zmazať task z mastertasku <b>{{ subtask.project_code }}</b>?</h1>
|
||||
|
||||
<v-icon
|
||||
@click.stop="closeModal()"
|
||||
@@ -21,18 +21,18 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ['on-task-deleted'],
|
||||
emits: ['on-subtask-deleted'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
task: null
|
||||
subtask: null
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async showModal(task) {
|
||||
this.task = task
|
||||
async showModal({ subtask }) {
|
||||
this.subtask = subtask
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
@@ -42,10 +42,10 @@ export default {
|
||||
|
||||
async deleteTask() {
|
||||
try {
|
||||
await this.$axios.delete_auth(`v1/subtasks/${this.task.id}`)
|
||||
await this.$axios.delete_auth(`v1/subtasks/${this.subtask.id}`)
|
||||
|
||||
this.$store.commit('tm/delete_subtask', this.task)
|
||||
this.$emit('on-task-deleted', this.task)
|
||||
this.$store.commit('tm/delete_subtask', this.subtask)
|
||||
this.$emit('on-subtask-deleted', this.subtask)
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
|
||||
Reference in new issue
Block a user