mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Blockers] Added blockers in tasks view
This commit is contained in:
1 parent
04c42c2762
commit
6654c32da7
9 files changed
+260
-97
No files matched your search
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<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ť <b>{{ blocker.name }}</b>?</h1>
|
||||
|
||||
<v-icon
|
||||
@click.stop="closeModal()"
|
||||
icon="mdi-close"
|
||||
size="large"
|
||||
class="mb-15"
|
||||
></v-icon>
|
||||
</div>
|
||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
||||
<v-btn class="button primary half" variant="flat" @click="deleteBlocker()">ÁNO</v-btn>
|
||||
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ['on-blocker-deleted'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
blocker: null
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async showModal({ blocker }) {
|
||||
this.blocker = blocker
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
closeModal() {
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
async deleteBlocker() {
|
||||
try {
|
||||
await this.$axios.delete_auth(`v1/blockers/${this.blocker.id}`)
|
||||
|
||||
this.$emit('on-blocker-deleted', this.blocker)
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user