From aa10259d40a1151b4eaff88778e904d2395f8bd7 Mon Sep 17 00:00:00 2001 From: ajugo Date: Tue, 27 Sep 2022 09:58:22 +0200 Subject: [PATCH] Fix loading of zebra printers to modal and some other small fixes [SCI-7244] (#4463) * Fix loading of zebra printers to modal and some other small fixes [SCI-7244] * Fix zebra printing [SCI-7244] --- app/javascript/vue/repository_print_modal/container.vue | 4 ++-- app/services/label_templates_preview_service.rb | 2 +- app/views/users/settings/account/addons/index.html.erb | 2 +- config/locales/en.yml | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/javascript/vue/repository_print_modal/container.vue b/app/javascript/vue/repository_print_modal/container.vue index af6222d58..a058c1c25 100644 --- a/app/javascript/vue/repository_print_modal/container.vue +++ b/app/javascript/vue/repository_print_modal/container.vue @@ -154,7 +154,7 @@ }, submitPrint() { if (this.selectedPrinter.attributes.type_of === 'zebra') { - zebraPrinters.print( + this.zebraPrinters.print( this.urls.zebraProgress, '.label-printing-progress-modal', '#modal-print-repository-row-label', @@ -179,7 +179,7 @@ initZebraPrinter() { this.zebraPrinters = zebraPrint.init($('#LabelPrinterSelector'), { clearSelectorOnFirstDevice: false, - appendDevice: function(device) { + appendDevice: (device) => { this.printers.push({ id: `zebra${this.printers.length}`, attributes: { diff --git a/app/services/label_templates_preview_service.rb b/app/services/label_templates_preview_service.rb index 83fc2fcf8..f253eff78 100644 --- a/app/services/label_templates_preview_service.rb +++ b/app/services/label_templates_preview_service.rb @@ -39,6 +39,6 @@ class LabelTemplatesPreviewService private def sanitize_zpl_code(zpl_code) - zpl_code.gsub!('_', '_5F') + zpl_code.gsub('_', '_5F') end end diff --git a/app/views/users/settings/account/addons/index.html.erb b/app/views/users/settings/account/addons/index.html.erb index 012e11079..38d0f67e5 100644 --- a/app/views/users/settings/account/addons/index.html.erb +++ b/app/views/users/settings/account/addons/index.html.erb @@ -35,7 +35,7 @@
<%= t('users.settings.account.addons.zebra_printer.description') %>
- <%= link_to t('users.settings.account.addons.printers.printer_details'), zebra_settings_path(), class: 'printer-details' %> + <%= link_to t('users.settings.account.addons.printers.details'), zebra_settings_path(), class: 'printer-details' %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 1e8e98f82..da8e41c0e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2252,6 +2252,7 @@ en: ready: "Ready" not_ready: "Not ready" printer_details: "Printer details" + details: "Details" enter_api_key: "Enter API key" enabled: "Enabled" fluics_printer: