mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Binding interface for bank statements
This commit is contained in:
parent
2dfa65645b
commit
851e5368eb
15 changed files with 113 additions and 26 deletions
|
@ -11,18 +11,25 @@
|
|||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-2'}
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'created_at', t('imported_at'))
|
||||
%th{class: 'col-xs-2'}
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'bank_code')
|
||||
%th{class: 'col-xs-2'}
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'iban', t('iban').upcase)
|
||||
/ TODO: Make this searchable by caching the status to the database
|
||||
%th{class: 'col-xs-3'}
|
||||
= t('status')
|
||||
%tbody
|
||||
- @bank_statements.each do |x|
|
||||
%tr
|
||||
%td= link_to(l(x.created_at), admin_bank_statement_path(x))
|
||||
%td= x.bank_code
|
||||
%td= x.iban
|
||||
- sc = 'text-success' if x.status == BankStatement::FULLY_BINDED
|
||||
- sc = 'text-warning' if x.status == BankStatement::PARTIALLY_BINDED
|
||||
- sc = 'text-danger' if x.status == BankStatement::NOT_BINDED
|
||||
%td{class: sc}= t(x.status)
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @bank_statements
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%h2.text-center-xs= t('bank_statement')
|
||||
.col-sm-6
|
||||
%h2.text-right.text-center-xs
|
||||
= link_to(t('bind_with_invoices'), '#', class: 'btn btn-primary')
|
||||
= link_to(t('bind_invoices'), bind_invoices_admin_bank_statement_path, class: 'btn btn-primary', method: :post)
|
||||
= link_to(t('back_to_bank_statements'), admin_bank_statements_path, class: 'btn btn-default')
|
||||
%hr
|
||||
%row
|
||||
|
@ -16,9 +16,15 @@
|
|||
%dt= t('bank_code')
|
||||
%dd= @bank_statement.bank_code
|
||||
|
||||
%dt= t('iban').upcase
|
||||
%dt= t('iban')
|
||||
%dd= @bank_statement.iban
|
||||
|
||||
%dt= t('status')
|
||||
- sc = 'text-success' if @bank_statement.status == BankStatement::FULLY_BINDED
|
||||
- sc = 'text-warning' if @bank_statement.status == BankStatement::PARTIALLY_BINDED
|
||||
- sc = 'text-danger' if @bank_statement.status == BankStatement::NOT_BINDED
|
||||
%dd{class: sc}= t(@bank_statement.status)
|
||||
|
||||
%dt= t('queried_at')
|
||||
%dd= l(@bank_statement.queried_at)
|
||||
|
||||
|
@ -46,7 +52,7 @@
|
|||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'currency')
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'account_activity', t('status'))
|
||||
= sort_link(@q, 'account_activity_id', t('status'))
|
||||
%tbody
|
||||
- @bank_transactions.each do |x|
|
||||
%tr
|
||||
|
@ -54,10 +60,8 @@
|
|||
%td= x.buyer_name
|
||||
%td= x.sum
|
||||
%td= x.currency
|
||||
%td
|
||||
- c = x.binded? ? 'label-success' : 'label-danger'
|
||||
%span.label{class: c}= x.binded? ? t('binded') : t('not_binded')
|
||||
|
||||
- c = x.binded? ? 'text-success' : 'text-danger'
|
||||
%td{class: c}= x.binded? ? t('binded') : t('not_binded')
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @bank_transactions
|
||||
|
|
|
@ -16,6 +16,14 @@
|
|||
%dt= t('document_no')
|
||||
%dd= @bank_transaction.document_no
|
||||
|
||||
%dt= t('status')
|
||||
- c = @bank_transaction.binded? ? 'text-success' : 'text-danger'
|
||||
%dd{class: c}= @bank_transaction.binded? ? t('binded') : t('not_binded')
|
||||
|
||||
- if @bank_transaction.binded?
|
||||
%dt= t('binded_invoice')
|
||||
%dd= link_to(@bank_transaction.binded_invoice, '#')
|
||||
|
||||
%dt= t('bank_reference')
|
||||
%dd= @bank_transaction.bank_reference
|
||||
|
||||
|
|
|
@ -63,10 +63,7 @@
|
|||
|
||||
/ /.nav-collapse
|
||||
.container
|
||||
- display = (flash.empty?) ? 'none' : 'block'
|
||||
#flash{style: "display: #{display};"}
|
||||
- type = (flash[:notice]) ? 'bg-success' : 'bg-danger'
|
||||
.alert{class: type}= flash[:notice] || flash[:alert]
|
||||
= render 'registrar/shared/flash'
|
||||
= yield
|
||||
|
||||
.footer.text-right
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
- display = (flash[:notice] || flash[:alert]) ? 'block' : 'none'
|
||||
- display = (flash[:notice] || flash[:alert] || flash[:warning]) ? 'block' : 'none'
|
||||
#flash{style: "display: #{display};"}
|
||||
- type = (flash[:notice]) ? 'bg-success' : 'bg-danger'
|
||||
.alert{class: type}= flash[:notice] || flash[:alert]
|
||||
- type = 'bg-warning' if flash[:warning]
|
||||
.alert{class: type}= flash[:notice] || flash[:alert] || flash[:warning]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue