You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
774 B

<template>
<confirm-dialog
title="Delete Document"
message="Are you sure you want to delete these documents from this project?"
item-key="text"
:disabled="!isDocumentSelected"
:items="selected"
@ok="handleDeleteDocument()"
/>
</template>
<script>
import { mapState, mapGetters, mapActions } from 'vuex'
import ConfirmDialog from '@/components/organisms/ConfirmDialog'
export default {
components: {
ConfirmDialog
},
computed: {
...mapState('documents', ['selected']),
...mapGetters('documents', ['isDocumentSelected'])
},
methods: {
...mapActions('documents', ['deleteDocument']),
handleDeleteDocument() {
const projectId = this.$route.params.id
this.deleteDocument(projectId)
}
}
}
</script>