From 84233506c0529ed86ca8f5f536f53cec310d778a Mon Sep 17 00:00:00 2001 From: Andrej Date: Mon, 7 Aug 2023 09:47:44 +0200 Subject: [PATCH] Copy shareable link when you enable sharing for task [SCI-8986] --- .../shareable_links/components/shareable_link_modal.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/javascript/vue/shareable_links/components/shareable_link_modal.vue b/app/javascript/vue/shareable_links/components/shareable_link_modal.vue index bc23e37d5..c41815d2f 100644 --- a/app/javascript/vue/shareable_links/components/shareable_link_modal.vue +++ b/app/javascript/vue/shareable_links/components/shareable_link_modal.vue @@ -71,7 +71,7 @@ :disabled="true" /> @@ -158,8 +158,8 @@ hideModal() { $(this.$refs.modal).modal('hide'); }, - copy() { - navigator.clipboard.writeText(this.$refs.clone.value); + copy(value) { + navigator.clipboard.writeText(value); HelperModule.flashAlertMsg(this.i18n.t('shareable_links.modal.copy_success'), 'success'); }, saveDescription() { @@ -198,6 +198,7 @@ $.post(this.shareableLinkUrl, { description: this.description }, (result) => { this.shareableData = result.data; this.$emit('enable'); + this.copy(this.shareableData.attributes.shareable_url); }); } else { this.hideModal();