[subTask] v-select employee, [refactor], [masterTaskDetail] formattedDates

This commit is contained in:
romankko2 committed 2023-01-20 11:19:58 +01:00
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>