update crm api

This commit is contained in:
Aung Myo
2017-06-12 16:33:18 +06:30
parent 622aa4f121
commit 6d34f92506
4 changed files with 14 additions and 9 deletions

View File

@@ -18,15 +18,20 @@ class Origami::CustomersController < BaseOrigamiController
filter = params[:filter]
if filter.nil?
@crm_customers = Customer.order("name").page(params[:page])
@crm_customers = Customer.order("name").page params[:page]
else
@crm_customers = Customer.where("name LIKE ?", "%#{filter}%").order("name").page(params[:page])
@crm_customers = Customer.where("name LIKE ?", "%#{filter}%").order("name").page params[:page]
end
# @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(2)
@crm_customer = Customer.new
# @membership = Customer.get_member_group
# if @membership["status"] == true
# @member_group = @membership["data"]
# end
puts "Errrrrrrrrrrrrrrrrr"
puts @crm_customer.new_record?
respond_to do |format|
# format.html { render :template => "crm/customers/index" }
format.html { render action: "index"}