Fix label print open issue [SCI-7296]

This commit is contained in:
Andrej 2022-10-03 17:16:50 +02:00
parent e05ad97498
commit 884fe58525
2 changed files with 27 additions and 30 deletions

View file

@ -7,37 +7,35 @@ Vue.prototype.i18n = window.I18n;
function initPrintModalComponent() {
const container = $('.print-label-modal-container');
if (!window.PrintModalComponent && container.length) {
window.PrintModalComponent = new Vue({
el: '.print-label-modal-container',
name: 'PrintModalComponent',
components: {
'print-modal-container': PrintModalContainer
},
data() {
return {
showModal: false,
row_ids: [],
zebraEnabled: container.data('zebra-enabled'),
urls: {
print: container.data('print-url'),
zebraProgress: container.data('zebra-progress-url'),
printers: container.data('printers-url'),
labelTemplates: container.data('label-templates-url'),
rows: container.data('rows-url'),
fluicsInfo: container.data('fluics-info-url'),
printValidation: container.data('print-validation-url'),
labelPreview: container.data('label-preview-url')
}
};
},
methods: {
closeModal() {
this.showModal = false;
window.PrintModalComponent = new Vue({
el: '.print-label-modal-container',
name: 'PrintModalComponent',
components: {
'print-modal-container': PrintModalContainer
},
data() {
return {
showModal: false,
row_ids: [],
zebraEnabled: container.data('zebra-enabled'),
urls: {
print: container.data('print-url'),
zebraProgress: container.data('zebra-progress-url'),
printers: container.data('printers-url'),
labelTemplates: container.data('label-templates-url'),
rows: container.data('rows-url'),
fluicsInfo: container.data('fluics-info-url'),
printValidation: container.data('print-validation-url'),
labelPreview: container.data('label-preview-url')
}
};
},
methods: {
closeModal() {
this.showModal = false;
}
});
}
}
});
}
initPrintModalComponent();

View file

@ -177,5 +177,4 @@
<%= stylesheet_pack_tag 'pdfjs/pdf_js_styles' %>
<%= javascript_pack_tag 'vue/protocol' %>
<%= render partial: 'label_printers/label_printer_modal' %>