Add admin UI for SupplierCategories

This commit is contained in:
mariandl 2022-02-20 16:43:20 +01:00 committed by GitHub
parent 7e8c1d041d
commit 708f85a839
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,13 @@
%table.table.table-striped
%thead
%tr
%th= heading_helper SupplierCategory, :name
%th
%tbody
- @supplier_categories.each do |supplier_category|
%tr
%td= supplier_category.name
%td
= link_to t('ui.edit'), edit_admin_supplier_category_path(supplier_category), remote: true, class: 'btn btn-mini'
= link_to t('ui.delete'), [:admin, supplier_category], :method => :delete, :data => {:confirm => t('ui.confirm_delete', name: supplier_category.name)},
remote: true, class: 'btn btn-mini btn-danger'

View file

@ -4,6 +4,7 @@
= link_to t('.new_financial_transaction_class'), new_admin_financial_transaction_class_path, remote: true, class: 'btn btn-primary'
= link_to t('.new_bank_account'), new_admin_bank_account_path, remote: true, class: 'btn'
= link_to t('.new_bank_gateway'), new_admin_bank_gateway_path, remote: true, class: 'btn'
= link_to t('.new_supplier_category'), new_admin_supplier_category_path, remote: true, class: 'btn'
- content_for :sidebar do
%p= t('.first_paragraph').html_safe
@ -16,3 +17,6 @@
%h2= t('.bank_gateways')
#bank_gateways_table= render 'bank_gateways'
%h2= t('.supplier_categories')
#supplier_categories_table= render 'supplier_categories'

View file

@ -0,0 +1,2 @@
$('#supplier_categories_table').html('#{escape_javascript(render("admin/finances/supplier_categories"))}');
$('#modalContainer').modal('hide');