From 24fd399c170b1b86b9a07a71c50c2430df40777d Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Fri, 28 Jul 2017 11:30:35 +0630 Subject: [PATCH] update view --- .../transactions/manual_sales_controller.rb | 1 + app/views/oqs/home/index.html.erb | 2 +- app/views/origami/home/index.html.erb | 9 ++++ app/views/origami/home/show.html.erb | 42 +++++++++---------- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/app/controllers/transactions/manual_sales_controller.rb b/app/controllers/transactions/manual_sales_controller.rb index 77dd4371..d7f26f39 100644 --- a/app/controllers/transactions/manual_sales_controller.rb +++ b/app/controllers/transactions/manual_sales_controller.rb @@ -3,6 +3,7 @@ class Transactions::ManualSalesController < ApplicationController def void @sale = params[:sale_id] @reason = Lookup.where("lookup_type = 'void_reason'") + respond_to do |format| format.html # index.html.erb format.json { render json: @sales } diff --git a/app/views/oqs/home/index.html.erb b/app/views/oqs/home/index.html.erb index 3e068b12..71077ec4 100644 --- a/app/views/oqs/home/index.html.erb +++ b/app/views/oqs/home/index.html.erb @@ -192,7 +192,7 @@ - + Back diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb index 77d85f10..04c12262 100644 --- a/app/views/origami/home/index.html.erb +++ b/app/views/origami/home/index.html.erb @@ -110,6 +110,12 @@ + + <%if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %> + + <%end%> + @@ -218,4 +224,7 @@ $('#cash_out').on('click',function(){ $('#close_cashier').on('click',function(){ window.location.href = '/origami/shift/close'; }) +$('#back').on('click',function(){ + window.location.href = '/dashboard'; +}) diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 709ed7ca..891524ec 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -305,27 +305,27 @@ <% if @dining.bookings.length >= 1 %> - <% if @status_order == 'order' && @status_sale != 'sale' %> - - - - - - - - - - <% else %> - - - - - - - - - - <% end %> + <% if @status_order == 'order' && @status_sale != 'sale' %> + + + + + + + + + + <% else %> + + + + + + + + + + <% end %>