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

  1. <template>
  2. <confirm-dialog
  3. title="Delete Document"
  4. message="Are you sure you want to delete these documents from this project?"
  5. item-key="text"
  6. :disabled="!isDocumentSelected"
  7. :items="selected"
  8. @ok="handleDeleteDocument()"
  9. />
  10. </template>
  11. <script>
  12. import { mapState, mapGetters, mapActions } from 'vuex'
  13. import ConfirmDialog from '@/components/organisms/ConfirmDialog'
  14. export default {
  15. components: {
  16. ConfirmDialog
  17. },
  18. computed: {
  19. ...mapState('documents', ['selected']),
  20. ...mapGetters('documents', ['isDocumentSelected'])
  21. },
  22. methods: {
  23. ...mapActions('documents', ['deleteDocument']),
  24. handleDeleteDocument() {
  25. const projectId = this.$route.params.id
  26. this.deleteDocument(projectId)
  27. }
  28. }
  29. }
  30. </script>