blob: 726509d055b7ea13de1c3852d4d2d656731c949b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
const DeleteButton = {
props: [ 'status' ],
methods: {
deleteStatus () {
const confirmed = confirm('Do you really want to delete this status?')
if (confirmed) {
this.$store.dispatch('deleteStatus', { id: this.status.id })
}
}
},
computed: {
currentUser () { return this.$store.state.users.currentUser },
canDelete () { return this.currentUser.rights.delete_others_notice || this.status.user.id == this.currentUser.id }
}
}
export default DeleteButton
|