From 7fbac92f9cfe358ecf6d7afe1154d77021247753 Mon Sep 17 00:00:00 2001 From: ajugo Date: Tue, 4 Oct 2022 09:57:47 +0200 Subject: [PATCH] Add status for Zebra printers in label print modal [SCI-7269] (#4492) --- .../repository_print_label_modal.scss | 18 +++++++++--------- .../vue/repository_print_modal/container.vue | 8 +++++--- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/repository/repository_print_label_modal.scss b/app/assets/stylesheets/repository/repository_print_label_modal.scss index 54d25e5f0..80d5884ae 100644 --- a/app/assets/stylesheets/repository/repository_print_label_modal.scss +++ b/app/assets/stylesheets/repository/repository_print_label_modal.scss @@ -14,27 +14,27 @@ min-height: 4em; .status-ready { - - } - - .status-ready { - color: #2DBE61; + color: $brand-success; } .status-busy { - color: #231F20; + color: $color-silver-chalice; } .status-out-of-labels { - color: #231F20; + color: $color-silver-chalice; } .status-unreachable { - color: #231F20; + color: $color-silver-chalice; } .status-error { - color: #231F20; + color: $color-silver-chalice; + } + + .status-offline { + color: $color-silver-chalice; } } diff --git a/app/javascript/vue/repository_print_modal/container.vue b/app/javascript/vue/repository_print_modal/container.vue index 239eff72c..97a1d9c32 100644 --- a/app/javascript/vue/repository_print_modal/container.vue +++ b/app/javascript/vue/repository_print_modal/container.vue @@ -245,8 +245,10 @@ this.printers.push({ id: `zebra${this.printers.length}`, attributes: { - name: device.name, - type_of: 'zebra' + display_name: device.name, + type_of: 'zebra', + status: device.status.toLowerCase(), + display_status: device.status } }) } @@ -261,7 +263,7 @@ ` }, printerOptionLabel(option) { - return `${option.label} • ${option.params.display_status}` + return `${option.label} • ${option.params.display_status}` }, initTooltip() { $('[data-toggle="tooltip"]').tooltip();