edit login

This commit is contained in:
Nweni
2017-06-28 12:57:39 +06:30
parent bce4380d70
commit f01e1b1ce3
3 changed files with 48 additions and 24 deletions

View File

@@ -2,7 +2,7 @@ class HomeController < ApplicationController
skip_before_action :authenticate, only: [:index, :show, :create, :update, :destroy]
def index
@employees = Employee.all.order("name asc")
@employees = Employee.all_emp_except_waiter.order("name asc")
@login_form = LoginForm.new()
end
@@ -19,6 +19,8 @@ class HomeController < ApplicationController
if @employee != nil
session[:session_token] = @employee.token_session
#if cashier => already opening cahshier?
redirect_to origami_root_path
else
render :show, flash[:notice] => "Invalid PIN for Employee. Please try again!"