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.

37 lines
827 B

5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
  1. <template>
  2. <confirm-dialog
  3. :disabled="!isMemberSelected"
  4. :items="selected"
  5. :title="$t('members.removeMember')"
  6. :message="$t('members.removePrompt')"
  7. :button-true-text="$t('generic.yes')"
  8. :button-false-text="$t('generic.cancel')"
  9. item-key="username"
  10. @ok="handleRemoveMember()"
  11. />
  12. </template>
  13. <script>
  14. import { mapState, mapGetters, mapActions } from 'vuex'
  15. import ConfirmDialog from '@/components/organisms/utils/ConfirmDialog'
  16. export default {
  17. components: {
  18. ConfirmDialog
  19. },
  20. computed: {
  21. ...mapState('members', ['selected']),
  22. ...mapGetters('members', ['isMemberSelected'])
  23. },
  24. methods: {
  25. ...mapActions('members', ['removeMember']),
  26. handleRemoveMember() {
  27. const projectId = this.$route.params.id
  28. this.removeMember(projectId)
  29. }
  30. }
  31. }
  32. </script>