remove conflict data in ability.rb

This commit is contained in:
phyusin
2018-02-09 14:06:16 +06:30
65 changed files with 415 additions and 57 deletions

View File

@@ -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])

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -50,4 +50,10 @@ class Oqs::EditController < BaseOqsController
order_queue_printer.print_order_item(print_settings, oqs, order_item.order_id, order_items_id, print_status=" (Cancelled)", before_updated_qty )
end
end
#Shop Name in Navbor
helper_method :shop_detail
def shop_detail
@shop = Shop.first
end
end

View File

@@ -224,7 +224,12 @@ class Oqs::HomeController < BaseOqsController
.where("aoi.delivery_status = #{status} AND aoi.created_at >= '#{Time.now.beginning_of_day.utc}' ")
query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
.group("order_queue_stations.id")
end
#Shop Name in Navbor
helper_method :shop_detail
def shop_detail
@shop = Shop.first
end
end

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -128,4 +128,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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -39,4 +39,10 @@ class Origami::OrdersController < BaseOrigamiController
end
end
end
#Shop Name in Navbor
helper_method :shop_detail
def shop_detail
@shop = Shop.first
end
end

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -125,5 +125,9 @@ class Origami::RoomsController < BaseOrigamiController
end
end
#Shop Name in Navbor
helper_method :shop_detail
def shop_detail
@shop = Shop.first
end
end

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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