mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[subTask] v-select employee, [refactor], [masterTaskDetail] formattedDates
This commit is contained in:
1 parent
e941534b5e
commit
0a842dcb32
41 files changed
+558
-965
No files matched your search
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<v-dialog v-model="show" max-width="650">
|
||||
<v-dialog v-model="visible" max-width="650">
|
||||
<v-card>
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<h1>Ste si istý, že chcete zmazať tím <b>{{ team.name }}</b>?</h1>
|
||||
<v-icon
|
||||
@click.stop="show = false"
|
||||
icon="mdi-close"
|
||||
size="large"
|
||||
></v-icon>
|
||||
<h1>
|
||||
Ste si istý, že chcete zmazať tím <b>{{ team.name }}</b
|
||||
>?
|
||||
</h1>
|
||||
<v-icon @click.stop="visible = false" icon="mdi-close" size="large"></v-icon>
|
||||
</div>
|
||||
|
||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
||||
<v-btn class="z-btn" variant="flat" @click="deleteTeam()">ÁNO</v-btn>
|
||||
<v-btn class="ml-7 cancel-btn" @click.stop="show = false">ZRUŠIŤ</v-btn>
|
||||
<v-btn class="ml-7 cancel-btn" @click.stop="visible = false">ZRUŠIŤ</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
@@ -19,41 +19,31 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ['delete-team', 'close'],
|
||||
emits: ['deleted'],
|
||||
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
|
||||
team: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
show: {
|
||||
get() {
|
||||
return this.visible
|
||||
},
|
||||
|
||||
set(value) {
|
||||
if (!value) this.$emit('close')
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
team: null,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
async delete(team) {
|
||||
this.team = team
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
async deleteTeam() {
|
||||
try {
|
||||
await this.$axios.delete(`v1/teams/${this.team.id}`)
|
||||
this.show = false
|
||||
|
||||
this.visible = false
|
||||
this.$emit('deleted', this.team)
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in new issue
Block a user