Merge pull request #5921 from rekonder/aj_SCI_8986

Copy shareable link when you enable sharing for task [SCI-8986]
This commit is contained in:
ajugo 2023-08-07 15:17:49 +02:00 committed by GitHub
commit c8fbdacf22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@
:disabled="true"
/>
<button class="btn btn-primary share-link-copy"
@click="copy"
@click="copy($refs.clone.value)"
:disabled="!sharedEnabled">{{ i18n.t('shareable_links.modal.copy_button') }}
</button>
</div>
@ -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();