Skip to content

Commit

Permalink
Box Label UI same as the Sample (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
omelao authored Nov 29, 2022
1 parent f650cac commit f2d8a96
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
21 changes: 15 additions & 6 deletions app/views/boxes/_barcode_card.haml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions app/views/boxes/barcode.pdf.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/views/samples/_barcode_card.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2d8a96

Please sign in to comment.