Copy shareable link when you enable sharing for task [SCI-8986]

This commit is contained in:
Andrej 2023-08-07 09:47:44 +02:00
parent 9a55889264
commit 84233506c0

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();