mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
fixy
This commit is contained in:
1 parent
0e8e3a8b32
commit
1032a30031
15 files changed
+56
-27
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-dialog v-model="visible" max-width="750">
|
||||
<v-dialog v-model="visible" max-width="750" persistent>
|
||||
<v-card>
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<h1>Ste si istý, že chcete zmazať <b>{{ mastertask.name }}</b>?</h1>
|
||||
@@ -12,7 +12,7 @@
|
||||
></v-icon>
|
||||
</div>
|
||||
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||
<v-btn class="button primary half" variant="flat" @click="deleteMasterTask()">ÁNO</v-btn>
|
||||
<v-btn class="button primary half" variant="flat" @click="deleteMasterTask()" :disabled="isDeleting">ÁNO</v-btn>
|
||||
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
@@ -26,7 +26,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
mastertask: null
|
||||
mastertask: null,
|
||||
isDeleting: false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -41,12 +42,18 @@ export default {
|
||||
},
|
||||
|
||||
async deleteMasterTask() {
|
||||
if (this.isDeleting) return
|
||||
|
||||
this.isDeleting = true
|
||||
|
||||
try {
|
||||
await this.$axios.delete_auth(`v1/mastertasks/${this.mastertask.id}`)
|
||||
this.$emit('on-mastertask-deleted', this.mastertask)
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
} finally {
|
||||
this.isDeleting = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user