diff --git a/Gemfile.lock b/Gemfile.lock index 1c7e6534..899a471a 100755 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GEM bcrypt (3.1.11) bindex (0.5.0) builder (3.2.3) - byebug (9.1.0) + byebug (10.0.0) cancancan (1.17.0) capistrano (3.10.1) airbrussh (>= 1.0.0) @@ -66,7 +66,7 @@ GEM capistrano-rails (1.3.1) capistrano (~> 3.1) capistrano-bundler (~> 1.1) - carrierwave (1.2.1) + carrierwave (1.2.2) activemodel (>= 4.0.0) activesupport (>= 4.0.0) mime-types (>= 1.16) @@ -81,7 +81,7 @@ GEM coffee-script-source (1.12.2) concurrent-ruby (1.0.5) connection_pool (2.2.1) - crass (1.0.2) + crass (1.0.3) cups (0.1.10) database_cleaner (1.6.2) diff-lcs (1.3) @@ -92,17 +92,17 @@ GEM factory_girl_rails (4.9.0) factory_girl (~> 4.9.0) railties (>= 3.0.0) - faker (1.8.4) - i18n (~> 0.5) + faker (1.8.7) + i18n (>= 0.7) ffi (1.9.18) - filterrific (2.1.2) - font-awesome-rails (4.7.0.2) + filterrific (5.0.1) + font-awesome-rails (4.7.0.3) railties (>= 3.2, < 5.2) globalid (0.4.1) activesupport (>= 4.2.0) httparty (0.15.6) multi_xml (>= 0.5.2) - i18n (0.9.1) + i18n (0.9.3) concurrent-ruby (~> 1.0) jbuilder (2.7.0) activesupport (>= 4.2.0) @@ -142,32 +142,32 @@ GEM mini_magick (4.8.0) mini_mime (1.0.0) mini_portile2 (2.3.0) - minitest (5.10.3) + minitest (5.11.3) momentjs-rails (2.17.1) railties (>= 3.1) - multi_json (1.12.2) + multi_json (1.13.1) multi_xml (0.6.0) - mysql2 (0.4.9) + mysql2 (0.4.10) nested_form (0.3.2) net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (4.2.0) - nio4r (2.1.0) - nokogiri (1.8.1) + nio4r (2.2.0) + nokogiri (1.8.2) mini_portile2 (~> 2.3.0) pdf-core (0.7.0) - pg (0.21.0) + pg (1.0.0) prawn (2.2.2) pdf-core (~> 0.7.0) ttfunk (~> 1.5) prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) - puma (3.10.0) - rack (2.0.3) + puma (3.11.2) + rack (2.0.4) rack-cors (1.0.2) rack-protection (2.0.0) rack - rack-test (0.7.0) + rack-test (0.8.2) rack (>= 1.0, < 3) rails (5.1.4) actioncable (= 5.1.4) @@ -192,12 +192,12 @@ GEM method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.2.1) + rake (12.3.0) rb-fsevent (0.10.2) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) redis (3.3.5) - rspec-core (3.7.0) + rspec-core (3.7.1) rspec-support (~> 3.7.0) rspec-expectations (3.7.0) diff-lcs (>= 1.2.0, < 2.0) @@ -205,7 +205,7 @@ GEM rspec-mocks (3.7.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.7.0) - rspec-rails (3.7.1) + rspec-rails (3.7.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -213,14 +213,14 @@ GEM rspec-expectations (~> 3.7.0) rspec-mocks (~> 3.7.0) rspec-support (~> 3.7.0) - rspec-support (3.7.0) + rspec-support (3.7.1) ruby-ole (1.2.12.1) - sass (3.5.3) + sass (3.5.5) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.6) + sass-rails (5.0.7) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) @@ -238,7 +238,7 @@ GEM simple_form (3.5.0) actionpack (> 4, < 5.2) activemodel (> 4, < 5.2) - spreadsheet (1.1.4) + spreadsheet (1.1.5) ruby-ole (>= 1.0) spring (2.0.2) activesupport (>= 4.2) @@ -263,12 +263,12 @@ GEM to_xls-rails (1.3.1) spreadsheet (>= 0.8.5) ttfunk (1.5.1) - turbolinks (5.0.1) - turbolinks-source (~> 5) - turbolinks-source (5.0.3) + turbolinks (5.1.0) + turbolinks-source (~> 5.1) + turbolinks-source (5.1.0) tzinfo (1.2.4) thread_safe (~> 0.1) - uglifier (3.2.0) + uglifier (4.1.5) execjs (>= 0.3.0, < 3) web-console (3.5.1) actionview (>= 5.0) @@ -277,8 +277,8 @@ GEM railties (>= 5.0) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - whenever (0.9.7) + websocket-extensions (0.1.3) + whenever (0.10.0) chronic (>= 0.6.3) PLATFORMS diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 30d8a090..0e67c57e 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -134,7 +134,7 @@ select.form-control { } .credit-color{ - background-color:#FF5722; + background-color:#FFA500; } .other-payment-color{ diff --git a/app/assets/stylesheets/reset.css b/app/assets/stylesheets/reset.css index ea0aaa4f..78f23e15 100644 --- a/app/assets/stylesheets/reset.css +++ b/app/assets/stylesheets/reset.css @@ -68,6 +68,15 @@ background-color: #ccc; } +/*Shop Info color in navbar*/ +.shopinfo { + color: #212529; +} + +.link-buttoon { + text-decoration: none; +} + @media (min-width: 768px){ .dropdown-menu { padding: .3rem 0; diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e66d7700..3a35a15b 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base # lookup domain for db from provision before_action :lookup_domain, :set_locale - helper_method :current_company,:current_login_employee,:current_user + helper_method :current_company,:current_login_employee,:current_user,:shop_detail # alias_method :current_user, :current_login_employee,:current_user #this is base api base controller to need to inherit. #all token authentication must be done here @@ -101,6 +101,10 @@ class ApplicationController < ActionController::Base end + def shop_detail + @shop = Shop.first + end + def current_login_employee if (!session[:session_token].nil?) @employee = Employee.find_by_token_session(session[:session_token]) diff --git a/app/controllers/crm/bookings_controller.rb b/app/controllers/crm/bookings_controller.rb index efaa5419..30a9eb92 100755 --- a/app/controllers/crm/bookings_controller.rb +++ b/app/controllers/crm/bookings_controller.rb @@ -14,5 +14,10 @@ class Crm::BookingsController < BaseCrmController end end - + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/crm/customers_controller.rb b/app/controllers/crm/customers_controller.rb index f917538e..12944632 100755 --- a/app/controllers/crm/customers_controller.rb +++ b/app/controllers/crm/customers_controller.rb @@ -398,4 +398,10 @@ end params.require(:customer).permit(:id, :name, :company, :contact_no, :email, :date_of_birth,:salutation,:gender,:nrc_no,:address,:card_no, :paypar_account_no, :customer_type) end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/crm/dining_queues_controller.rb b/app/controllers/crm/dining_queues_controller.rb index 8184c660..4b1eddcc 100755 --- a/app/controllers/crm/dining_queues_controller.rb +++ b/app/controllers/crm/dining_queues_controller.rb @@ -142,4 +142,10 @@ class Crm::DiningQueuesController < BaseCrmController def dining_queue_params params.require(:dining_queue).permit(:customer_id, :name, :contact_no, :queue_no,:status,:seater,:remark) end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/crm/home_controller.rb b/app/controllers/crm/home_controller.rb index 13b4ede3..b5acf59a 100755 --- a/app/controllers/crm/home_controller.rb +++ b/app/controllers/crm/home_controller.rb @@ -55,6 +55,11 @@ class Crm::HomeController < BaseCrmController # end # end - + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/oqs/backhome_controller.rb b/app/controllers/oqs/backhome_controller.rb index 4ac5f0a2..990fa459 100755 --- a/app/controllers/oqs/backhome_controller.rb +++ b/app/controllers/oqs/backhome_controller.rb @@ -30,6 +30,12 @@ class Oqs::HomeController < BaseOqsController @queue_stations_items end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end + # Get Order items def get_order_items items = [] @@ -123,4 +129,9 @@ class Oqs::HomeController < BaseOqsController # completed_order = AssignedOrderItem.group(:order_id).where('delivery_status=true'); end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/oqs/edit_controller.rb b/app/controllers/oqs/edit_controller.rb index 01372dd3..b924702e 100755 --- a/app/controllers/oqs/edit_controller.rb +++ b/app/controllers/oqs/edit_controller.rb @@ -48,4 +48,10 @@ class Oqs::EditController < BaseOqsController order_queue_printer.print_order_item(print_settings, oqs, order_item.order_id, order_items_id, print_status=" (Updated)" ) end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/oqs/home_controller.rb b/app/controllers/oqs/home_controller.rb index 3ee71e8d..5ecd6920 100755 --- a/app/controllers/oqs/home_controller.rb +++ b/app/controllers/oqs/home_controller.rb @@ -209,4 +209,10 @@ class Oqs::HomeController < BaseOqsController end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end + end diff --git a/app/controllers/oqs/print_controller.rb b/app/controllers/oqs/print_controller.rb index aaa6b262..c78dbc10 100755 --- a/app/controllers/oqs/print_controller.rb +++ b/app/controllers/oqs/print_controller.rb @@ -101,4 +101,10 @@ class Oqs::PrintController < ApplicationController end end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end \ No newline at end of file diff --git a/app/controllers/origami/addorders_controller.rb b/app/controllers/origami/addorders_controller.rb index af404d8b..400cffa5 100755 --- a/app/controllers/origami/addorders_controller.rb +++ b/app/controllers/origami/addorders_controller.rb @@ -179,4 +179,9 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController # @dining = DiningFacility.find(params[:id]) # end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/bank_integration_controller.rb b/app/controllers/origami/bank_integration_controller.rb index a5e5d59f..6dde10da 100644 --- a/app/controllers/origami/bank_integration_controller.rb +++ b/app/controllers/origami/bank_integration_controller.rb @@ -95,4 +95,10 @@ class Origami::BankIntegrationController < ApplicationController #BaseOrigamiCon end render json: response end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/card_payments_controller.rb b/app/controllers/origami/card_payments_controller.rb index e0c56971..cd08c16a 100755 --- a/app/controllers/origami/card_payments_controller.rb +++ b/app/controllers/origami/card_payments_controller.rb @@ -24,4 +24,9 @@ class Origami::CardPaymentsController < BaseOrigamiController def create end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/cash_ins_controller.rb b/app/controllers/origami/cash_ins_controller.rb index 36860b85..4d7c2b64 100755 --- a/app/controllers/origami/cash_ins_controller.rb +++ b/app/controllers/origami/cash_ins_controller.rb @@ -14,4 +14,10 @@ class Origami::CashInsController < BaseOrigamiController shift.cash_in = shift.cash_in + amount.to_i shift.save end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/cash_mgmt_controller.rb b/app/controllers/origami/cash_mgmt_controller.rb index aaf55c1f..1f48370e 100755 --- a/app/controllers/origami/cash_mgmt_controller.rb +++ b/app/controllers/origami/cash_mgmt_controller.rb @@ -7,4 +7,10 @@ class Origami::CashMgmtController < ApplicationController def create end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/cash_outs_controller.rb b/app/controllers/origami/cash_outs_controller.rb index 048e78b4..cc22516c 100755 --- a/app/controllers/origami/cash_outs_controller.rb +++ b/app/controllers/origami/cash_outs_controller.rb @@ -12,4 +12,10 @@ class Origami::CashOutsController < BaseOrigamiController shift.cash_out = shift.cash_out + amount.to_i shift.save end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/check_in_process_controller.rb b/app/controllers/origami/check_in_process_controller.rb index 2c5b0b38..48d55c9a 100644 --- a/app/controllers/origami/check_in_process_controller.rb +++ b/app/controllers/origami/check_in_process_controller.rb @@ -35,4 +35,10 @@ class Origami::CheckInProcessController < BaseOrigamiController format.json { render json: respond } end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/credit_payments_controller.rb b/app/controllers/origami/credit_payments_controller.rb index 404b1506..cddf4feb 100755 --- a/app/controllers/origami/credit_payments_controller.rb +++ b/app/controllers/origami/credit_payments_controller.rb @@ -46,4 +46,10 @@ class Origami::CreditPaymentsController < BaseOrigamiController end end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end + end diff --git a/app/controllers/origami/customers_controller.rb b/app/controllers/origami/customers_controller.rb index d84dac92..be1cc4dd 100755 --- a/app/controllers/origami/customers_controller.rb +++ b/app/controllers/origami/customers_controller.rb @@ -130,5 +130,9 @@ class Origami::CustomersController < BaseOrigamiController end end - + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/discounts_controller.rb b/app/controllers/origami/discounts_controller.rb index 1166a705..4c7555b8 100755 --- a/app/controllers/origami/discounts_controller.rb +++ b/app/controllers/origami/discounts_controller.rb @@ -289,5 +289,9 @@ class Origami::DiscountsController < BaseOrigamiController # redirect_to origami_path(sale_id) # end - + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/home_controller.rb b/app/controllers/origami/home_controller.rb index c00b39bf..cc8aaaef 100755 --- a/app/controllers/origami/home_controller.rb +++ b/app/controllers/origami/home_controller.rb @@ -96,4 +96,9 @@ def set_dining @dining = DiningFacility.find(params[:dining_id]) end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/home_controller_bk.rb b/app/controllers/origami/home_controller_bk.rb index 4839f15c..3e414665 100755 --- a/app/controllers/origami/home_controller_bk.rb +++ b/app/controllers/origami/home_controller_bk.rb @@ -81,4 +81,9 @@ class Origami::HomeController < ApplicationController end end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/in_duties_controller.rb b/app/controllers/origami/in_duties_controller.rb index 5607939a..945f3bd9 100755 --- a/app/controllers/origami/in_duties_controller.rb +++ b/app/controllers/origami/in_duties_controller.rb @@ -168,4 +168,10 @@ class Origami::InDutiesController < BaseOrigamiController def in_duty_params params.require(:in_duty).permit(:id, :dinning_id, :commissioner_ids, :in_time, :out_time) end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/jcb_controller.rb b/app/controllers/origami/jcb_controller.rb index b8c7e7e0..e0e8e233 100755 --- a/app/controllers/origami/jcb_controller.rb +++ b/app/controllers/origami/jcb_controller.rb @@ -58,4 +58,9 @@ class Origami::JcbController < BaseOrigamiController end end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/master_controller.rb b/app/controllers/origami/master_controller.rb index b3813577..3d08bcfa 100755 --- a/app/controllers/origami/master_controller.rb +++ b/app/controllers/origami/master_controller.rb @@ -57,4 +57,9 @@ class Origami::MasterController < BaseOrigamiController end end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/moveroom_controller.rb b/app/controllers/origami/moveroom_controller.rb index 47a9fec9..5b53f68c 100755 --- a/app/controllers/origami/moveroom_controller.rb +++ b/app/controllers/origami/moveroom_controller.rb @@ -36,4 +36,10 @@ class Origami::MoveroomController < BaseOrigamiController end end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end + end diff --git a/app/controllers/origami/movetable_controller.rb b/app/controllers/origami/movetable_controller.rb index 52780381..8da417ac 100755 --- a/app/controllers/origami/movetable_controller.rb +++ b/app/controllers/origami/movetable_controller.rb @@ -70,4 +70,10 @@ class Origami::MovetableController < BaseOrigamiController @get_type = Booking.update_dining_facility(booking_array,change_to,change_from) end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/mpu_controller.rb b/app/controllers/origami/mpu_controller.rb index 7b7ef5a0..7709734d 100755 --- a/app/controllers/origami/mpu_controller.rb +++ b/app/controllers/origami/mpu_controller.rb @@ -57,4 +57,9 @@ class Origami::MpuController < BaseOrigamiController end end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/orders_controller.rb b/app/controllers/origami/orders_controller.rb index 85047ef0..c2670184 100755 --- a/app/controllers/origami/orders_controller.rb +++ b/app/controllers/origami/orders_controller.rb @@ -13,4 +13,10 @@ class Origami::OrdersController < BaseOrigamiController end end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/other_charges_controller.rb b/app/controllers/origami/other_charges_controller.rb index 51a1f7db..6cb9fbf9 100755 --- a/app/controllers/origami/other_charges_controller.rb +++ b/app/controllers/origami/other_charges_controller.rb @@ -57,4 +57,10 @@ class Origami::OtherChargesController < BaseOrigamiController dining = {:table_id => table_id, :table_type => table.type } render :json => dining.to_json end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end \ No newline at end of file diff --git a/app/controllers/origami/others_payments_controller.rb b/app/controllers/origami/others_payments_controller.rb index 16c7edae..6b034ed3 100755 --- a/app/controllers/origami/others_payments_controller.rb +++ b/app/controllers/origami/others_payments_controller.rb @@ -36,4 +36,9 @@ class Origami::OthersPaymentsController < BaseOrigamiController def create end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 6fa61bc7..e65d9550 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -366,4 +366,10 @@ class Origami::PaymentsController < BaseOrigamiController end end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end \ No newline at end of file diff --git a/app/controllers/origami/paypar_payments_controller.rb b/app/controllers/origami/paypar_payments_controller.rb index 5a15aa8c..9b23a12f 100755 --- a/app/controllers/origami/paypar_payments_controller.rb +++ b/app/controllers/origami/paypar_payments_controller.rb @@ -27,4 +27,10 @@ class Origami::PayparPaymentsController < BaseOrigamiController end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/product_commissions_controller.rb b/app/controllers/origami/product_commissions_controller.rb index 74dd8095..2ab9a618 100755 --- a/app/controllers/origami/product_commissions_controller.rb +++ b/app/controllers/origami/product_commissions_controller.rb @@ -136,4 +136,10 @@ class Origami::ProductCommissionsController < BaseOrigamiController def product_commission_params params.fetch(:product_commission, {}) end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/redeem_payments_controller.rb b/app/controllers/origami/redeem_payments_controller.rb index 2fdedf32..56fcb738 100755 --- a/app/controllers/origami/redeem_payments_controller.rb +++ b/app/controllers/origami/redeem_payments_controller.rb @@ -67,4 +67,10 @@ class Origami::RedeemPaymentsController < BaseOrigamiController end @out = false, 0 end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/request_bills_controller.rb b/app/controllers/origami/request_bills_controller.rb index e0f1d06c..c076a820 100755 --- a/app/controllers/origami/request_bills_controller.rb +++ b/app/controllers/origami/request_bills_controller.rb @@ -55,4 +55,10 @@ class Origami::RequestBillsController < ApplicationController # printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts,member_info,shop_details) end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/room_invoices_controller.rb b/app/controllers/origami/room_invoices_controller.rb index 8d805771..9c3b16a6 100755 --- a/app/controllers/origami/room_invoices_controller.rb +++ b/app/controllers/origami/room_invoices_controller.rb @@ -37,4 +37,9 @@ class Origami::RoomInvoicesController < BaseOrigamiController @customer = @sale.customer end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/rooms_controller.rb b/app/controllers/origami/rooms_controller.rb index bd375d63..13769860 100755 --- a/app/controllers/origami/rooms_controller.rb +++ b/app/controllers/origami/rooms_controller.rb @@ -92,5 +92,9 @@ class Origami::RoomsController < BaseOrigamiController # end end - + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/sale_edit_controller.rb b/app/controllers/origami/sale_edit_controller.rb index c00c35f0..a4b50689 100755 --- a/app/controllers/origami/sale_edit_controller.rb +++ b/app/controllers/origami/sale_edit_controller.rb @@ -160,4 +160,10 @@ class Origami::SaleEditController < BaseOrigamiController ProductCommission.remove_product_commission(item) end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/sales_controller.rb b/app/controllers/origami/sales_controller.rb index bdf481c2..e57d2ca0 100755 --- a/app/controllers/origami/sales_controller.rb +++ b/app/controllers/origami/sales_controller.rb @@ -51,5 +51,9 @@ class Origami::SalesController < BaseOrigamiController end end - + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/shifts_controller.rb b/app/controllers/origami/shifts_controller.rb index cb2cc830..435a98d1 100755 --- a/app/controllers/origami/shifts_controller.rb +++ b/app/controllers/origami/shifts_controller.rb @@ -108,4 +108,9 @@ class Origami::ShiftsController < BaseOrigamiController end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/surveys_controller.rb b/app/controllers/origami/surveys_controller.rb index b1baa0a8..90ff4c08 100644 --- a/app/controllers/origami/surveys_controller.rb +++ b/app/controllers/origami/surveys_controller.rb @@ -37,4 +37,10 @@ class Origami::SurveysController < BaseOrigamiController def survey_params params.require(:survey).permit(:child, :adult,:male,:female,:local,:foreigner, :dining_name,:receipt_no,:shift_id,:created_by,:total_customer,:total_amount) end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/table_invoices_controller.rb b/app/controllers/origami/table_invoices_controller.rb index 655083df..a9d5d340 100755 --- a/app/controllers/origami/table_invoices_controller.rb +++ b/app/controllers/origami/table_invoices_controller.rb @@ -61,4 +61,9 @@ class Origami::TableInvoicesController < BaseOrigamiController @customer = @sale.customer end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/unionpay_controller.rb b/app/controllers/origami/unionpay_controller.rb index fc15b7f5..813f4eb5 100644 --- a/app/controllers/origami/unionpay_controller.rb +++ b/app/controllers/origami/unionpay_controller.rb @@ -58,4 +58,10 @@ class Origami::UnionpayController < BaseOrigamiController @status, @sale = sale_payment.process_payment(saleObj, @user, cash, "unionpay") end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/visa_controller.rb b/app/controllers/origami/visa_controller.rb index b872aec3..8bdd8a90 100755 --- a/app/controllers/origami/visa_controller.rb +++ b/app/controllers/origami/visa_controller.rb @@ -57,4 +57,9 @@ class Origami::VisaController < BaseOrigamiController end end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/origami/void_controller.rb b/app/controllers/origami/void_controller.rb index 52b2068c..f9ad89a4 100755 --- a/app/controllers/origami/void_controller.rb +++ b/app/controllers/origami/void_controller.rb @@ -112,4 +112,10 @@ class Origami::VoidController < BaseOrigamiController end end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end \ No newline at end of file diff --git a/app/controllers/origami/voucher_controller.rb b/app/controllers/origami/voucher_controller.rb index c4b3c840..750189df 100755 --- a/app/controllers/origami/voucher_controller.rb +++ b/app/controllers/origami/voucher_controller.rb @@ -78,4 +78,9 @@ class Origami::VoucherController < BaseOrigamiController end end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/reports/bksaleitem_controller.rb b/app/controllers/reports/bksaleitem_controller.rb index 0f91681d..118269bb 100755 --- a/app/controllers/reports/bksaleitem_controller.rb +++ b/app/controllers/reports/bksaleitem_controller.rb @@ -16,4 +16,10 @@ class Reports::SaleitemController < BaseReportController end + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end + end diff --git a/app/controllers/reports/commission_controller.rb b/app/controllers/reports/commission_controller.rb index e97a1a77..9e13bd75 100755 --- a/app/controllers/reports/commission_controller.rb +++ b/app/controllers/reports/commission_controller.rb @@ -49,5 +49,11 @@ class Reports::CommissionController < BaseReportController format.json { render json: out } end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/reports/credit_payment_controller.rb b/app/controllers/reports/credit_payment_controller.rb index 3b716cc2..abf7a6af 100755 --- a/app/controllers/reports/credit_payment_controller.rb +++ b/app/controllers/reports/credit_payment_controller.rb @@ -59,4 +59,10 @@ authorize_resource :class => false format.json { render json: out } end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end \ No newline at end of file diff --git a/app/controllers/reports/dailysale_controller.rb b/app/controllers/reports/dailysale_controller.rb index e2102d87..d43355fa 100755 --- a/app/controllers/reports/dailysale_controller.rb +++ b/app/controllers/reports/dailysale_controller.rb @@ -19,4 +19,10 @@ class Reports::DailysaleController < BaseReportController def show end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/reports/payment_method_controller.rb b/app/controllers/reports/payment_method_controller.rb index 01a904ae..0262594f 100644 --- a/app/controllers/reports/payment_method_controller.rb +++ b/app/controllers/reports/payment_method_controller.rb @@ -61,4 +61,10 @@ class Reports::PaymentMethodController < BaseReportController format.json { render json: out } end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end \ No newline at end of file diff --git a/app/controllers/reports/receipt_no_controller.rb b/app/controllers/reports/receipt_no_controller.rb index faa12eae..ead85d72 100755 --- a/app/controllers/reports/receipt_no_controller.rb +++ b/app/controllers/reports/receipt_no_controller.rb @@ -61,4 +61,10 @@ authorize_resource :class => false format.json { render json: out } end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end \ No newline at end of file diff --git a/app/controllers/reports/saleitem_controller.rb b/app/controllers/reports/saleitem_controller.rb index a9d23797..58421342 100755 --- a/app/controllers/reports/saleitem_controller.rb +++ b/app/controllers/reports/saleitem_controller.rb @@ -76,5 +76,10 @@ class Reports::SaleitemController < BaseReportController format.json { render json: out } end end - + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/reports/shiftsale_controller.rb b/app/controllers/reports/shiftsale_controller.rb index f9373374..cf722495 100755 --- a/app/controllers/reports/shiftsale_controller.rb +++ b/app/controllers/reports/shiftsale_controller.rb @@ -47,5 +47,11 @@ class Reports::ShiftsaleController < BaseReportController format.json { render json: out } end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/reports/stock_check_controller.rb b/app/controllers/reports/stock_check_controller.rb index a9188f5d..9a033956 100755 --- a/app/controllers/reports/stock_check_controller.rb +++ b/app/controllers/reports/stock_check_controller.rb @@ -46,5 +46,11 @@ class Reports::StockCheckController < BaseReportController format.json { render json: out } end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end diff --git a/app/controllers/reports/void_sale_controller.rb b/app/controllers/reports/void_sale_controller.rb index 6169dadc..50a7c57d 100755 --- a/app/controllers/reports/void_sale_controller.rb +++ b/app/controllers/reports/void_sale_controller.rb @@ -58,4 +58,10 @@ authorize_resource :class => false format.json { render json: out } end end + + #Shop Name in Navbor + helper_method :shop_detail + def shop_detail + @shop = Shop.first + end end \ No newline at end of file diff --git a/app/models/ability.rb b/app/models/ability.rb index a72a47d2..1d310367 100755 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -102,7 +102,9 @@ class Ability can :menage, Booking can :manage, OrderQueueStation can :read, Sale - can :update, Sale + can :update, Sale + + can :manage, Customer can :get_customer, Customer can :add_customer, Customer can :update_sale_by_customer, Customer @@ -126,12 +128,11 @@ class Ability can :move_dining, :moveroom - can :manage, DiningQueue - can :manage, Commission can :manage, Commissioner can :manage, Promotion can :manage, Product + elsif user.role == "account" diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 67746ba6..babc6e06 100755 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -25,6 +25,13 @@ + +
+