mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[auth] Added auth guard
This commit is contained in:
1 parent
ef6369714b
commit
1e86dbbbb3
5 files changed
+44
-21
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 {{ this.subtask.is_finished ? 'znovu otvoriť' : 'dokončiť' }} task, z masterTasku <b>{{ subtask?.master_task?.name || subtask.master_task }}</b>?</h1>
|
||||
<h1>Ste si istý, že chcete {{ subtask.is_finished ? 'znovu otvoriť' : 'dokončiť' }} task, z masterTasku <b>{{ subtask?.master_task?.name || subtask.master_task }}</b>?</h1>
|
||||
<v-icon
|
||||
@click.stop="visible = false"
|
||||
icon="mdi-close"
|
||||
@@ -36,12 +36,13 @@ export default {
|
||||
|
||||
async complete() {
|
||||
try {
|
||||
const tempSubtask = {...this.subtask, is_finished: !this.subtask.is_finished}
|
||||
const tempSubtask = {...this.subtask, is_finished: this.subtask.is_finished ? 0 : 1}
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${tempSubtask.id}`, tempSubtask)
|
||||
|
||||
this.visible = false
|
||||
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
this.$store.dispatch('tm/loadMastertasks')
|
||||
this.$store.dispatch('tm/loadUnscheduledSubtasks')
|
||||
this.$store.dispatch('tm/loadOngoingSubtasks')
|
||||
this.$emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
|
||||
Reference in new issue
Block a user