Commit d5793ebe authored by Sheldon Led's avatar Sheldon Led

Use membership_type condition as method

parent 99f88012
...@@ -130,6 +130,12 @@ export default { ...@@ -130,6 +130,12 @@ export default {
this.$refs.cannotRemoveModal.show(); this.$refs.cannotRemoveModal.show();
} }
}, },
isGroupInvite(item) {
return item.user.membership_type === 'group_invite';
},
isProjectInvite(item) {
return item.user.membership_type === 'project_invite';
},
}, },
i18n: { i18n: {
emailNotVisibleTooltipText: s__( emailNotVisibleTooltipText: s__(
...@@ -200,18 +206,10 @@ export default { ...@@ -200,18 +206,10 @@ export default {
:sub-label="item.user.username" :sub-label="item.user.username"
> >
<template #meta> <template #meta>
<gl-badge <gl-badge v-if="isGroupInvite(item)" size="sm" variant="muted">
v-if="item.user.membership_type === 'group_invite'"
size="sm"
variant="muted"
>
{{ s__('Billing|Group invite') }} {{ s__('Billing|Group invite') }}
</gl-badge> </gl-badge>
<gl-badge <gl-badge v-if="isProjectInvite(item)" size="sm" variant="muted">
v-if="item.user.membership_type === 'project_invite'"
size="sm"
variant="muted"
>
{{ s__('Billing|Project invite') }} {{ s__('Billing|Project invite') }}
</gl-badge> </gl-badge>
</template> </template>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment