Add option to send mails when an order has been received

This commit is contained in:
lentschi 2021-02-27 17:24:25 +01:00 committed by GitHub
parent d45256145d
commit 9a7d4bf07d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 89 additions and 2 deletions

View file

@ -138,6 +138,7 @@ class OrdersController < ApplicationController
flash[:notice] = (s ? I18n.t('orders.receive.notice', :msg => s) : I18n.t('orders.receive.notice_none'))
end
Resque.enqueue(UserNotifier, FoodsoftConfig.scope, 'received_order', @order.id)
if current_user.role_orders? || current_user.role_finance?
redirect_to @order
elsif current_user.role_pickup?