Fix print button stuck as disabled when printing via a Zebra printer [SCI-9221]

This commit is contained in:
Martin Artnik 2025-02-05 16:37:36 +01:00
parent 48f0987982
commit 1c4db80d16
2 changed files with 5 additions and 2 deletions

View file

@ -182,7 +182,7 @@ var zebraPrint = (function() {
repository_id: int
}
*/
print: function(modalUrl, progressModal, printModal, printData) {
print: function(modalUrl, progressModal, printModal, printData, finishedCallback = null) {
var modal = $(progressModal);
$.ajax({
method: 'GET',
@ -224,7 +224,7 @@ var zebraPrint = (function() {
}
}).fail(() => {
HelperModule.flashAlertMsg(I18n.t('repository_row.modal_print_label.general_error'), 'danger');
});
}).always(() => { if (finishedCallback) finishedCallback(); });
}
};
}());

View file

@ -238,6 +238,9 @@ export default {
label_template_id: this.selectedTemplate.id,
row_ids: this.row_ids,
repository_id: this.repository_id
},
() => {
this.submitting = false;
}
);
} else {