diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-13 15:08:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-13 15:08:49 +0300 |
commit | 988424215cf104d9ee24bb1751141424cffb32d1 (patch) | |
tree | 9d2525571ecc693902b949ac8441e8c97b299c3c /app/assets/javascripts/vue_merge_request_widget | |
parent | 2705a15deaef07b1a38a53b9539d02f8ad499ce3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue b/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue index d5cd05ff0e1..e7d5e4086bc 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue @@ -2,8 +2,11 @@ import { GlButton } from '@gitlab/ui'; import createFlash from '~/flash'; import { BV_SHOW_MODAL } from '~/lib/utils/constants'; -import { s__ } from '~/locale'; +import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; +import { s__, __ } from '~/locale'; import sidebarEventHub from '~/sidebar/event_hub'; +import showToast from '~/vue_shared/plugins/global_toast'; +import SidebarMediator from '~/sidebar/sidebar_mediator'; import eventHub from '../../event_hub'; import approvalsMixin from '../../mixins/approvals'; import MrWidgetContainer from '../mr_widget_container.vue'; @@ -21,7 +24,7 @@ export default { ApprovalsSummaryOptional, GlButton, }, - mixins: [approvalsMixin], + mixins: [approvalsMixin, glFeatureFlagsMixin()], props: { mr: { type: Object, @@ -171,6 +174,14 @@ export default { return serviceFn() .then((data) => { this.mr.setApprovals(data); + + if ( + this.glFeatures.mrAttentionRequests && + SidebarMediator.singleton?.store.currentUserHasAttention + ) { + showToast(__('Approved. Your attention request was removed.')); + } + eventHub.$emit('MRWidgetUpdateRequested'); eventHub.$emit('ApprovalUpdated'); sidebarEventHub.$emit('removeCurrentUserAttentionRequested'); |