From 28795effc3818601f02ca2c3ad010d01652dcdcc Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Fri, 2 Jun 2023 21:38:41 +0100 Subject: [PATCH] Clarify named vouchers in UI --- app/views/split_checkout/_summary.html.haml | 8 +++++--- app/views/spree/orders/_totals_footer.html.haml | 2 ++ config/locales/en.yml | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/views/split_checkout/_summary.html.haml b/app/views/split_checkout/_summary.html.haml index 0317ee6232..e1e230043d 100644 --- a/app/views/split_checkout/_summary.html.haml +++ b/app/views/split_checkout/_summary.html.haml @@ -91,10 +91,12 @@ - checkout_adjustments_for(@order, exclude: [:line_item]).reverse_each do |adjustment| .summary-right-line - -if adjustment.originator_type == 'Voucher' - .summary-right-line-label.voucher= adjustment.label + - if adjustment.originator_type == 'Voucher' + .summary-right-line-label.voucher + = "#{t(:voucher)}:" + = adjustment.label .summary-right-line-value.voucher= adjustment.display_amount.to_html - -else + - else .summary-right-line-label= adjustment.label .summary-right-line-value= adjustment.display_amount.to_html diff --git a/app/views/spree/orders/_totals_footer.html.haml b/app/views/spree/orders/_totals_footer.html.haml index ab8130210e..556160804b 100644 --- a/app/views/spree/orders/_totals_footer.html.haml +++ b/app/views/spree/orders/_totals_footer.html.haml @@ -12,6 +12,8 @@ %tr.total %td.text-right{:colspan => "3"} %strong + - if adjustment.originator_type == "Voucher" + = "#{t(:voucher)}:" = adjustment.label %td.text-right.total %span= adjustment.display_amount.to_html diff --git a/config/locales/en.yml b/config/locales/en.yml index 5f39fb8b57..ababeaa9df 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -450,6 +450,7 @@ en: none: None notes: Notes error: Error + voucher: Voucher processing_payment: "Processing payment..." no_pending_payments: "No pending payments" invalid_payment_state: "Invalid payment state: %{state}"