diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-10 18:09:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-10 18:09:11 +0300 |
commit | d2091d1e924e2887eb9db4fad761965a24d024f1 (patch) | |
tree | 482fe37d97a4169895ae3ddf6d6f42e6f632cbb9 /app/assets/javascripts/access_tokens | |
parent | 152b3268d701b54cac9b615a0e29e0e5726bfd99 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/access_tokens')
-rw-r--r-- | app/assets/javascripts/access_tokens/components/projects_token_selector.vue | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/app/assets/javascripts/access_tokens/components/projects_token_selector.vue b/app/assets/javascripts/access_tokens/components/projects_token_selector.vue index 37ef3f28236..cc5532696c7 100644 --- a/app/assets/javascripts/access_tokens/components/projects_token_selector.vue +++ b/app/assets/javascripts/access_tokens/components/projects_token_selector.vue @@ -8,7 +8,7 @@ import { } from '@gitlab/ui'; import produce from 'immer'; -import { getIdFromGraphQLId, convertToGraphQLId } from '~/graphql_shared/utils'; +import { convertToGraphQLIds, convertNodeIdsFromGraphQLIds } from '~/graphql_shared/utils'; import getProjectsQuery from '../graphql/queries/get_projects.query.graphql'; @@ -51,7 +51,7 @@ export default { }, update({ projects }) { return { - list: this.formatProjectNodes(projects), + list: convertNodeIdsFromGraphQLIds(projects.nodes), pageInfo: projects.pageInfo, }; }, @@ -64,7 +64,7 @@ export default { query: getProjectsQuery, variables() { return { - ids: this.initialProjectIds.map((id) => convertToGraphQLId(GRAPHQL_ENTITY_TYPE, id)), + ids: convertToGraphQLIds(GRAPHQL_ENTITY_TYPE, this.initialProjectIds), }; }, manual: true, @@ -72,7 +72,7 @@ export default { return !this.initialProjectIds.length; }, result({ data: { projects } }) { - this.$emit('input', this.formatProjectNodes(projects)); + this.$emit('input', convertNodeIdsFromGraphQLIds(projects.nodes)); }, }, }, @@ -88,12 +88,6 @@ export default { }; }, methods: { - formatProjectNodes(projects) { - return projects.nodes.map((project) => ({ - ...project, - id: getIdFromGraphQLId(project.id), - })); - }, handleSearch(query) { this.isSearching = true; this.searchQuery = query; |