diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index f30297c7..29e9082a 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -10,7 +10,6 @@ class HomeController < ApplicationController @login_form.emp_id = params[:login_form][:emp_id] @login_form.password = params[:login_form][:password] @employee = Employee.login(@login_form.emp_id, @login_form.password) -<<<<<<< HEAD if @employee != nil if @employee.role == "administrator" @@ -25,17 +24,6 @@ class HomeController < ApplicationController else redirect_to origami_root_path, :notice => "Username and Password dosn't match!" end -======= - if @employee.role == "administrator" - session[:session_token] = @employee.token_session - redirect_to dashboard_path - elsif @employee.role == "cashier" - session[:session_token] = @employee.token_session - redirect_to origami_root_path - else - render :index - end ->>>>>>> 7dffd668eaee6ab82621fd4bae150525ded79df1 end diff --git a/db/seeds.rb b/db/seeds.rb index 458a0873..1245023d 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -76,6 +76,12 @@ booking_status = Lookup.create([{lookup_type:'booking_status', name: 'Available' account_type = Lookup.create([{lookup_type:'account_type', name: 'Income', value: 'income'}, {lookup_type:'account_type', name: 'Expense', value: 'expense'}]) +# sale void reason +void_reason = Lookup.create([{lookup_type:'void_reason', name: 'Approve By Manager', value: 'Approve By Manager'}, + {lookup_type:'void_reason', name: 'Customer Mistake', value: 'Customer Mistake'}, + {lookup_type:'void_reason', name: 'Cashier Mistake', value: 'Cashier Mistake'}, + {lookup_type:'void_reason', name: 'Waiter Mistake', value: 'Waiter Mistake'}]) + #WALK CUSTOMER - Default CUSTOMER (take key 1) customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_no:"000000000"}) customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contact_no:"111111111"}) diff --git a/dump.rdb b/dump.rdb index 51fd78bb..2018ec7d 100644 Binary files a/dump.rdb and b/dump.rdb differ