diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-20 18:08:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-20 18:08:53 +0300 |
commit | 709948b7a69597b1efe24df9b0f388cc0b493dd9 (patch) | |
tree | a6cbb0b7a1243c5308f8d5afb703d1980edb4595 /app/assets/javascripts/invite_members | |
parent | 50ea04b6c6823aa1bd8d64cd9a77dcbd03b19053 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/invite_members')
-rw-r--r-- | app/assets/javascripts/invite_members/components/invite_members_modal.vue | 1 | ||||
-rw-r--r-- | app/assets/javascripts/invite_members/components/invite_modal_base.vue | 27 |
2 files changed, 26 insertions, 2 deletions
diff --git a/app/assets/javascripts/invite_members/components/invite_members_modal.vue b/app/assets/javascripts/invite_members/components/invite_members_modal.vue index fa1aa6b0d88..d510e382e05 100644 --- a/app/assets/javascripts/invite_members/components/invite_members_modal.vue +++ b/app/assets/javascripts/invite_members/components/invite_members_modal.vue @@ -401,6 +401,7 @@ export default { :form-group-description="formGroupDescription" :invalid-feedback-message="invalidFeedbackMessage" :is-loading="isLoading" + :is-celebration="isCelebration" :new-users-to-invite="newUsersToInvite" :root-group-id="rootId" :users-limit-dataset="usersLimitDataset" diff --git a/app/assets/javascripts/invite_members/components/invite_modal_base.vue b/app/assets/javascripts/invite_members/components/invite_modal_base.vue index 2cbd681c67d..08cdad4a773 100644 --- a/app/assets/javascripts/invite_members/components/invite_modal_base.vue +++ b/app/assets/javascripts/invite_members/components/invite_modal_base.vue @@ -85,6 +85,11 @@ export default { required: false, default: false, }, + isCelebration: { + type: Boolean, + required: false, + default: false, + }, invalidFeedbackMessage: { type: String, required: false, @@ -202,11 +207,19 @@ export default { this.$emit('reset'); }, onShowModal() { + if (this.isCelebration) { + this.track('render'); + } + if (this.usersLimitDataset.reachedLimit) { this.track('render', { category: 'default', label: ON_SHOW_TRACK_LABEL }); } }, - onCloseModal(e) { + onCancel(e) { + if (this.isCelebration) { + this.track('click_cancel'); + } + if (this.preventCancelDefault) { e.preventDefault(); } else { @@ -217,6 +230,10 @@ export default { this.$emit('cancel'); }, onSubmit(e) { + if (this.isCelebration) { + this.track('click_invite'); + } + // We never want to hide when submitting e.preventDefault(); @@ -225,6 +242,11 @@ export default { expiresAt: this.selectedDate, }); }, + onClose() { + if (this.isCelebration) { + this.track('click_x'); + } + }, }, HEADER_CLOSE_LABEL, ACCESS_EXPIRE_DATE, @@ -249,7 +271,8 @@ export default { :action-cancel="actionCancel" @shown="onShowModal" @primary="onSubmit" - @cancel="onCloseModal" + @cancel="onCancel" + @close="onClose" @hidden="onReset" > <content-transition |