From 5a44400fbb682497dab0010e9ab1342dfd18cbfa Mon Sep 17 00:00:00 2001 From: Soufiane Date: Fri, 21 Jul 2023 16:54:57 +0200 Subject: [PATCH] Fix zebra printer CSP issue [SCI-8859] (#5806) --- .../vue/repository_print_modal/container.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/javascript/vue/repository_print_modal/container.vue b/app/javascript/vue/repository_print_modal/container.vue index 80415230d..d4dd1b892 100644 --- a/app/javascript/vue/repository_print_modal/container.vue +++ b/app/javascript/vue/repository_print_modal/container.vue @@ -130,12 +130,11 @@ }) $(this.$refs.modal).on('hidden.bs.modal', () => { + if (this.zebraEnabled) { + this.zebraPrinters = null; + } this.$emit('close'); }); - - if (this.zebraEnabled) { - this.initZebraPrinter(); - } }, computed: { availableTemplates() { @@ -167,6 +166,9 @@ watch: { showModal() { if (this.showModal) { + if (this.zebraEnabled) { + this.initZebraPrinter(); + } $(this.$refs.modal).modal('show'); this.validateTemplate(); }