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
741 B

  1. <template>
  2. <confirm-dialog
  3. title="Delete Label"
  4. message="Are you sure you want to remove these labels from this project?"
  5. item-key="text"
  6. :disabled="!isLabelSelected"
  7. :items="selected"
  8. @ok="handleDeleteLabel()"
  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('labels', ['selected']),
  20. ...mapGetters('labels', ['isLabelSelected'])
  21. },
  22. methods: {
  23. ...mapActions('labels', ['deleteLabel']),
  24. handleDeleteLabel() {
  25. const projectId = this.$route.params.id
  26. this.deleteLabel(projectId)
  27. }
  28. }
  29. }
  30. </script>