mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix issues raised by linter
This commit is contained in:
committed by
Matt-Yorkley
parent
debbf9b361
commit
ac69bef459
@@ -1,47 +0,0 @@
|
||||
@import '../admin/variables';
|
||||
|
||||
// payment list, used in both invoice pdfs and order confirmation emails
|
||||
|
||||
table.payment-list {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
tbody tr td {
|
||||
padding: 5px;
|
||||
border-bottom: 1px solid $medium-grey;
|
||||
|
||||
.payment-method-name {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.payment-method-description {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
thead tr th {
|
||||
border-bottom: 1px solid $medium-grey;
|
||||
padding: 10px 5px 5px;
|
||||
text-transform: uppercase;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th.amount, td.amount {
|
||||
text-align: right;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
th.payment-state {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
td.payment-state {
|
||||
text-align: right;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
45
app/assets/stylesheets/mail/payments_list.scss
Normal file
45
app/assets/stylesheets/mail/payments_list.scss
Normal file
@@ -0,0 +1,45 @@
|
||||
@import "../admin/variables";
|
||||
|
||||
// payment list, used in both invoice pdfs and order confirmation emails
|
||||
|
||||
.payments-list {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
tbody tr td {
|
||||
padding: 5px;
|
||||
border-bottom: 1px solid $medium-grey;
|
||||
|
||||
.payment-method-name {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.payment-method-description {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
thead tr th {
|
||||
border-bottom: 1px solid $medium-grey;
|
||||
padding: 10px 5px 5px;
|
||||
text-transform: uppercase;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.amount {
|
||||
text-align: right;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.payment-state {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.payment-state-value {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,6 @@ module OrderHelper
|
||||
end
|
||||
|
||||
def outstanding_balance_label(order)
|
||||
order.outstanding_balance < 0 ? t(:credit_owed) : t(:balance_due)
|
||||
order.outstanding_balance.negative? ? t(:credit_owed) : t(:balance_due)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
%table.payment-list
|
||||
%table.payments-list
|
||||
%thead
|
||||
%tr
|
||||
%th= t('.date_time')
|
||||
@@ -10,5 +10,5 @@
|
||||
%tr
|
||||
%td= l(payment.created_at, format: "%b %d, %Y %H:%M")
|
||||
%td.payment-method-name= payment_method_name(payment)
|
||||
%td.payment-state= t(payment.state, scope: :payment_states, default: payment.state.capitalize)
|
||||
%td.payment-state.payment-state-value= t(payment.state, scope: :payment_states, default: payment.state.capitalize)
|
||||
%td.amount= payment.display_amount.to_html
|
||||
|
||||
Reference in New Issue
Block a user