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.

32 lines
657 B

4 years ago
  1. <template>
  2. <confirm-dialog
  3. :disabled="!isProjectSelected"
  4. :items="selected"
  5. title="Delete Project"
  6. message="Are you sure you want to delete these projects?"
  7. item-key="name"
  8. @ok="handleDeleteProject"
  9. />
  10. </template>
  11. <script>
  12. import { mapState, mapGetters } from 'vuex'
  13. import ConfirmDialog from '@/components/organisms/utils/ConfirmDialog'
  14. export default {
  15. components: {
  16. ConfirmDialog
  17. },
  18. computed: {
  19. ...mapState('projects', ['selected']),
  20. ...mapGetters('projects', ['isProjectSelected'])
  21. },
  22. methods: {
  23. handleDeleteProject() {
  24. this.$store.dispatch('projects/deleteProject')
  25. }
  26. }
  27. }
  28. </script>