Skip to content

Commit

Permalink
Fixed Bug and stupid mistake of myself
Browse files Browse the repository at this point in the history
  • Loading branch information
lodewiges committed Dec 15, 2024
1 parent 1ae1066 commit 7339e39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/activities_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def product_totals
authorize Activity

activity = Activity.includes(:price_list, orders: [{ order_rows: :product }, :user]).find(params[:id])
render json: activity.count_per_product(**params.permit(:user, :paid_with_pin, :paid_with_cash).to_h.symbolize_keys)
render json: activity.count_per_product(**params.permit(:user, :paid_with_pin, :paid_with_cash, :id).to_h.symbolize_keys)
end

def sumup_callback
Expand Down
2 changes: 1 addition & 1 deletion app/views/index/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div class="container py-sm-3">
<div class="row">
<% if user&.treasurer? || user&.renting_manager? || user&.main_bartender? %>
<% if current_user&.treasurer? || current_user&.renting_manager? || current_user&.main_bartender? %>
<div class="col-12 col-md-6 mb-2">
<div class="card">
<h5 class="card-header">Welkom, <%= current_user.name %>
Expand Down

0 comments on commit 7339e39

Please sign in to comment.