diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-11 21:10:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-11 21:10:36 +0300 |
commit | f020d5dc9bf42fe27b1451af34e7ab3a0c38d344 (patch) | |
tree | 99216543257785d4c444047bcc28d1c1f92db645 /app/assets/javascripts/members | |
parent | e3042fc5ced749e693ccef81b3f5838c55d5480c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/members')
-rw-r--r-- | app/assets/javascripts/members/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/members/utils.js | 22 |
2 files changed, 7 insertions, 17 deletions
diff --git a/app/assets/javascripts/members/index.js b/app/assets/javascripts/members/index.js index 6376b3fa75a..6c913af8a0f 100644 --- a/app/assets/javascripts/members/index.js +++ b/app/assets/javascripts/members/index.js @@ -1,7 +1,7 @@ import { GlToast } from '@gitlab/ui'; import Vue from 'vue'; import Vuex from 'vuex'; -import { parseDataAttributes } from 'ee_else_ce/members/utils'; +import { parseDataAttributes } from '~/members/utils'; import App from './components/app.vue'; import membersStore from './store'; diff --git a/app/assets/javascripts/members/utils.js b/app/assets/javascripts/members/utils.js index 031438d6ace..be549b40885 100644 --- a/app/assets/javascripts/members/utils.js +++ b/app/assets/javascripts/members/utils.js @@ -1,9 +1,5 @@ import { isUndefined } from 'lodash'; -import { - getParameterByName, - convertObjectPropsToCamelCase, - parseBoolean, -} from '~/lib/utils/common_utils'; +import { getParameterByName, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { setUrlParams } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; import { @@ -105,18 +101,12 @@ export const buildSortHref = ({ export const canOverride = () => false; export const parseDataAttributes = (el) => { - const { members, pagination, sourceId, memberPath, canManageMembers } = el.dataset; + const { membersData } = el.dataset; - return { - members: convertObjectPropsToCamelCase(JSON.parse(members), { deep: true }), - pagination: convertObjectPropsToCamelCase(JSON.parse(pagination || '{}'), { - deep: true, - ignoreKeyNames: ['params'], - }), - sourceId: parseInt(sourceId, 10), - memberPath, - canManageMembers: parseBoolean(canManageMembers), - }; + return convertObjectPropsToCamelCase(JSON.parse(membersData), { + deep: true, + ignoreKeyNames: ['params'], + }); }; export const baseRequestFormatter = (basePropertyName, accessLevelPropertyName) => ({ |