diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-13 12:07:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-13 12:07:54 +0300 |
commit | 2705a15deaef07b1a38a53b9539d02f8ad499ce3 (patch) | |
tree | 33d51226e6c70efe71e5e531bb8073cb145bdc22 /app/assets/javascripts/sidebar | |
parent | 1a397155d654096edc0a900e2b69f6913bc26eb4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/sidebar')
-rw-r--r-- | app/assets/javascripts/sidebar/components/crm_contacts/crm_contacts.vue | 14 | ||||
-rw-r--r-- | app/assets/javascripts/sidebar/mount_sidebar.js | 3 |
2 files changed, 13 insertions, 4 deletions
diff --git a/app/assets/javascripts/sidebar/components/crm_contacts/crm_contacts.vue b/app/assets/javascripts/sidebar/components/crm_contacts/crm_contacts.vue index c94fe19039d..67f36f65b5d 100644 --- a/app/assets/javascripts/sidebar/components/crm_contacts/crm_contacts.vue +++ b/app/assets/javascripts/sidebar/components/crm_contacts/crm_contacts.vue @@ -2,7 +2,7 @@ import { GlIcon, GlLink, GlPopover, GlTooltipDirective } from '@gitlab/ui'; import { __, n__, sprintf } from '~/locale'; import createFlash from '~/flash'; -import { convertToGraphQLId } from '~/graphql_shared/utils'; +import { convertToGraphQLId, getIdFromGraphQLId } from '~/graphql_shared/utils'; import { TYPE_ISSUE } from '~/graphql_shared/constants'; import getIssueCrmContactsQuery from './queries/get_issue_crm_contacts.query.graphql'; import issueCrmContactsSubscription from './queries/issue_crm_contacts.subscription.graphql'; @@ -21,6 +21,10 @@ export default { type: String, required: true, }, + groupIssuesPath: { + type: String, + required: true, + }, }, data() { return { @@ -85,6 +89,10 @@ export default { Boolean, ); }, + getIssuesPath(contactId) { + const id = getIdFromGraphQLId(contactId); + return `${this.groupIssuesPath}?crm_contact_id=${id}`; + }, }, }; </script> @@ -110,8 +118,8 @@ export default { :key="index" class="gl-pr-2" > - <span :id="`contact_${index}`" class="gl-font-weight-bold" - >{{ contact.firstName }} {{ contact.lastName }}{{ divider(index) }}</span + <gl-link :id="`contact_${index}`" :href="getIssuesPath(contact.id)" + >{{ contact.firstName }} {{ contact.lastName }}{{ divider(index) }}</gl-link > <gl-popover v-if="shouldShowPopover(contact)" diff --git a/app/assets/javascripts/sidebar/mount_sidebar.js b/app/assets/javascripts/sidebar/mount_sidebar.js index 2a7d967cb61..d76782b0cec 100644 --- a/app/assets/javascripts/sidebar/mount_sidebar.js +++ b/app/assets/javascripts/sidebar/mount_sidebar.js @@ -218,7 +218,7 @@ function mountCrmContactsComponent() { if (!el) return; - const { issueId } = el.dataset; + const { issueId, groupIssuesPath } = el.dataset; // eslint-disable-next-line no-new new Vue({ el, @@ -231,6 +231,7 @@ function mountCrmContactsComponent() { createElement('crm-contacts', { props: { issueId, + groupIssuesPath, }, }), }); |