From f2d8a963de23b29a3573d407b18e5f9f9bb33355 Mon Sep 17 00:00:00 2001 From: Carlos Zillner Date: Tue, 29 Nov 2022 06:37:00 -0300 Subject: [PATCH] Box Label UI same as the Sample (#1798) --- app/views/boxes/_barcode_card.haml | 21 +++++++++++++++------ app/views/boxes/barcode.pdf.haml | 6 +++--- app/views/samples/_barcode_card.haml | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/views/boxes/_barcode_card.haml b/app/views/boxes/_barcode_card.haml index d7cebfe56..4b4685cc6 100644 --- a/app/views/boxes/_barcode_card.haml +++ b/app/views/boxes/_barcode_card.haml @@ -1,14 +1,23 @@ .barcode-card.is-box .barcode-content - .barcode(style="float:right") + .barcode = image_tag barcode_svg_data_url(@box.uuid) - - .title - = @box.institution.name .code - Box ID #{@box.uuid} + .uuid + #{@box.uuid} + .code + %strong + Box: + = @box.samples.count + samples + .code + %strong + Institution: + = @box.institution.name .code - Purpose: #{@box.purpose} + %strong + Purpose: + #{@box.purpose} .logo = image_tag 'cdx-logo-bw.png' .label https://cdx.io diff --git a/app/views/boxes/barcode.pdf.haml b/app/views/boxes/barcode.pdf.haml index 9142faff3..5c36640e9 100644 --- a/app/views/boxes/barcode.pdf.haml +++ b/app/views/boxes/barcode.pdf.haml @@ -6,11 +6,11 @@ .uuid #{box.uuid} .code -   + Box: #{box.samples.count} samples .code - Purpose: #{box.purpose} + Institution: #{box.institution.name} .code -   + Purpose: #{box.purpose} .logo = image_tag wicked_pdf_asset_base64('cdx-logo-bw.png') .label https://cdx.io diff --git a/app/views/samples/_barcode_card.haml b/app/views/samples/_barcode_card.haml index 6a32c0220..8ffd1e53e 100644 --- a/app/views/samples/_barcode_card.haml +++ b/app/views/samples/_barcode_card.haml @@ -19,7 +19,7 @@ .code %strong Production Date: - #{@sample_form.date_produced} + #{@sample_form.date_produced.try{ strftime("%m/%d/%Y")}} .logo = image_tag 'cdx-logo-bw.png' .label https://cdx.io