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

  1. <template>
  2. <confirm-dialog
  3. title="Delete Project"
  4. message="Are you sure you want to delete these projects?"
  5. item-key="name"
  6. :disabled="!isProjectSelected"
  7. :items="selected"
  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>