Commit 351e97d7 authored by Kev's avatar Kev Committed by Olena Horal-Koretska

Fix invite member modal dropdown checkbox styling

parent f87cff66
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
required: true, required: true,
}, },
defaultAccessLevel: { defaultAccessLevel: {
type: String, type: Number,
required: true, required: true,
}, },
helpLink: { helpLink: {
...@@ -280,6 +280,7 @@ export default { ...@@ -280,6 +280,7 @@ export default {
<gl-dropdown-item <gl-dropdown-item
:key="key" :key="key"
active-class="is-active" active-class="is-active"
is-check-item
:is-checked="key === selectedAccessLevel" :is-checked="key === selectedAccessLevel"
@click="changeSelectedItem(key)" @click="changeSelectedItem(key)"
> >
......
...@@ -20,6 +20,7 @@ export default function initInviteMembersModal() { ...@@ -20,6 +20,7 @@ export default function initInviteMembersModal() {
...el.dataset, ...el.dataset,
isProject: parseBoolean(el.dataset.isProject), isProject: parseBoolean(el.dataset.isProject),
accessLevels: JSON.parse(el.dataset.accessLevels), accessLevels: JSON.parse(el.dataset.accessLevels),
defaultAccessLevel: parseInt(el.dataset.defaultAccessLevel, 10),
}, },
}), }),
}); });
......
---
title: Fix invite member modal dropdown checkbox styling
merge_request: 55832
author: Kev @KevSlashNull
type: fixed
...@@ -10,7 +10,7 @@ const name = 'test name'; ...@@ -10,7 +10,7 @@ const name = 'test name';
const isProject = false; const isProject = false;
const inviteeType = 'members'; const inviteeType = 'members';
const accessLevels = { Guest: 10, Reporter: 20, Developer: 30, Maintainer: 40, Owner: 50 }; const accessLevels = { Guest: 10, Reporter: 20, Developer: 30, Maintainer: 40, Owner: 50 };
const defaultAccessLevel = '10'; const defaultAccessLevel = 10;
const helpLink = 'https://example.com'; const helpLink = 'https://example.com';
const user1 = { id: 1, name: 'Name One', username: 'one_1', avatar_url: '' }; const user1 = { id: 1, name: 'Name One', username: 'one_1', avatar_url: '' };
...@@ -167,7 +167,7 @@ describe('InviteMembersModal', () => { ...@@ -167,7 +167,7 @@ describe('InviteMembersModal', () => {
describe('when inviting an existing user to group by user ID', () => { describe('when inviting an existing user to group by user ID', () => {
const postData = { const postData = {
user_id: '1', user_id: '1',
access_level: '10', access_level: defaultAccessLevel,
expires_at: undefined, expires_at: undefined,
format: 'json', format: 'json',
}; };
...@@ -238,7 +238,7 @@ describe('InviteMembersModal', () => { ...@@ -238,7 +238,7 @@ describe('InviteMembersModal', () => {
describe('when inviting a new user by email address', () => { describe('when inviting a new user by email address', () => {
const postData = { const postData = {
access_level: '10', access_level: defaultAccessLevel,
expires_at: undefined, expires_at: undefined,
email: 'email@example.com', email: 'email@example.com',
format: 'json', format: 'json',
...@@ -287,7 +287,7 @@ describe('InviteMembersModal', () => { ...@@ -287,7 +287,7 @@ describe('InviteMembersModal', () => {
describe('when inviting members and non-members in same click', () => { describe('when inviting members and non-members in same click', () => {
const postData = { const postData = {
access_level: '10', access_level: defaultAccessLevel,
expires_at: undefined, expires_at: undefined,
format: 'json', format: 'json',
}; };
...@@ -348,7 +348,7 @@ describe('InviteMembersModal', () => { ...@@ -348,7 +348,7 @@ describe('InviteMembersModal', () => {
describe('when sharing the group is successful', () => { describe('when sharing the group is successful', () => {
const groupPostData = { const groupPostData = {
group_id: sharedGroup.id, group_id: sharedGroup.id,
group_access: '10', group_access: defaultAccessLevel,
expires_at: undefined, expires_at: undefined,
format: 'json', format: 'json',
}; };
......
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