Balancing: Do not update oder summary automaticly when changing group orders.
This commit is contained in:
parent
9cc98b4662
commit
c05b3e0e19
5 changed files with 12 additions and 2 deletions
|
@ -30,6 +30,10 @@ class Finance::BalancingController < Finance::BaseController
|
||||||
render layout: false if request.xhr?
|
render layout: false if request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update_summary
|
||||||
|
@order = Order.find(params[:id])
|
||||||
|
end
|
||||||
|
|
||||||
def edit_note
|
def edit_note
|
||||||
@order = Order.find(params[:id])
|
@order = Order.find(params[:id])
|
||||||
render :layout => false
|
render :layout => false
|
||||||
|
|
|
@ -25,3 +25,7 @@
|
||||||
FC Gewinn
|
FC Gewinn
|
||||||
%small mit Aufschlag:
|
%small mit Aufschlag:
|
||||||
%td#order_profit.numeric= number_to_currency(order.profit)
|
%td#order_profit.numeric= number_to_currency(order.profit)
|
||||||
|
#summaryChangedWarning.alert(style="display:none;")
|
||||||
|
%strong Daten wurden verändert!
|
||||||
|
%br/
|
||||||
|
= link_to 'Zusammenfassung neu laden', update_summary_finance_order_path(order), remote: true
|
1
app/views/finance/balancing/update_summary.js.haml
Normal file
1
app/views/finance/balancing/update_summary.js.haml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
$('#summary').html('#{j(render('finance/balancing/summary', order: @order))}');
|
|
@ -1,4 +1,4 @@
|
||||||
$('#modalContainer').modal('hide');
|
$('#modalContainer').modal('hide');
|
||||||
$('#order_article_#{@order_article.id}').html('#{j(render('finance/balancing/order_article', order_article: @order_article))}');
|
$('#order_article_#{@order_article.id}').html('#{j(render('finance/balancing/order_article', order_article: @order_article))}');
|
||||||
$('#group_order_articles_#{@order_article.id}').html('#{j(render('finance/balancing/group_order_articles', order_article: @order_article))}');
|
$('#group_order_articles_#{@order_article.id}').html('#{j(render('finance/balancing/group_order_articles', order_article: @order_article))}');
|
||||||
$('#summary').html('#{j(render('finance/balancing/summary', order: @order_article.order))}');
|
$('#summaryChangedWarning').show();
|
|
@ -129,6 +129,7 @@ Foodsoft::Application.routes.draw do
|
||||||
|
|
||||||
resources :order, controller: 'balancing', path: 'balancing' do
|
resources :order, controller: 'balancing', path: 'balancing' do
|
||||||
member do
|
member do
|
||||||
|
get :update_summary
|
||||||
get :edit_note
|
get :edit_note
|
||||||
put :update_note
|
put :update_note
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue