Add UI to show and create financial transactions for the foodcoop

This commit is contained in:
Patrick Gansterer 2019-11-01 17:25:20 +01:00
parent 1a49bee42d
commit 602f663245
12 changed files with 66 additions and 29 deletions

View file

@ -868,6 +868,7 @@ de:
title: Kontotransaktionen
new:
paragraph: Hier kannst du der Bestellgruppe <b>%{name}</b> Geld gutschreiben/abziehen.
paragraph_foodcoop: Hier kannst du der <b>Foodcooop</b> Geld gutschreiben/abziehen.
title: Neue Transaktion
new_collection:
add_all_ordergroups: Alle Bestellgruppen hinzufügen
@ -916,6 +917,7 @@ de:
index:
new_transaction: Neue Überweisungen eingeben
show_all: Alle Transaktionen
show_foodcoop: Foodcoop Transaktionen
title: Konten verwalten
ordergroups:
account_statement: Kontoauszug

View file

@ -891,6 +891,7 @@ en:
title: Financial transactions
new:
paragraph: Here you can credit and debit money for the ordergroup <b>%{name}</b>.
paragraph_foodcoop: Here you can credit and debit money for the <b>foodcoop</b>.
title: New transaction
new_collection:
add_all_ordergroups: Add all ordergroups
@ -939,6 +940,7 @@ en:
index:
new_transaction: Add new transactions
show_all: All transactions
show_foodcoop: Foodcoop transaktions
title: Manage accounts
ordergroups:
account_statement: Account statement

View file

@ -191,7 +191,9 @@ Foodsoft::Application.routes.draw do
resources :ordergroups, only: [:index] do
resources :financial_transactions, as: :transactions
end
get 'transactions' => 'financial_transactions#index_collection'
resources :financial_transactions, as: :foodcoop_financial_transactions, path: 'foodcoop/financial_transactions', only: [:index, :new, :create]
get :transactions, controller: :financial_transactions, action: :index_collection
delete 'transactions/:id', controller: :financial_transactions, action: :destroy, as: :transaction
get 'transactions/new_collection' => 'financial_transactions#new_collection', as: 'new_transaction_collection'
post 'transactions/create_collection' => 'financial_transactions#create_collection', as: 'create_transaction_collection'