diff options
Diffstat (limited to 'app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue')
-rw-r--r-- | app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue b/app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue index 0c20f935d50..44d658c90a0 100644 --- a/app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue +++ b/app/assets/javascripts/members/components/action_buttons/user_action_buttons.vue @@ -1,5 +1,6 @@ <script> import { s__, sprintf } from '~/locale'; +import { parseUserDeletionObstacles } from '~/vue_shared/components/user_deletion_obstacles/utils'; import ActionButtonGroup from './action_button_group.vue'; import LeaveButton from './leave_button.vue'; import RemoveMemberButton from './remove_member_button.vue'; @@ -49,9 +50,11 @@ export default { }, ); }, - oncallScheduleUserData() { - const { user: { name, oncallSchedules: schedules } = {} } = this.member; - return { name, schedules }; + userDeletionObstaclesUserData() { + return { + name: this.member.user?.name, + obstacles: parseUserDeletionObstacles(this.member.user), + }; }, }, }; @@ -65,7 +68,7 @@ export default { v-else :member-id="member.id" :member-type="member.type" - :oncall-schedules="oncallScheduleUserData" + :user-deletion-obstacles="userDeletionObstaclesUserData" :message="message" :title="s__('Member|Remove member')" /> |