|
|
|
@ -3511,14 +3511,17 @@ end
|
|
|
|
|
apply_action.update_attributes(status: (params[:type] == "1" ? 2 : 1), reason: reject_reason, reject_description: params[:reject_description], dealer_id: User.current.id, noticed: false)
|
|
|
|
|
|
|
|
|
|
User.where(:id => apply_action.user_id).first.update_attributes(:certification => (params[:type] == "1" ? 2 : 1))
|
|
|
|
|
user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{search}%'")
|
|
|
|
|
@authorizations = ApplyAction.where(:container_type => "TrialAuthorization", :status => 0, :user_id => user_id).includes(:user)
|
|
|
|
|
@autu_count = @authorizations.count
|
|
|
|
|
@limit = 15
|
|
|
|
|
@is_remote = true
|
|
|
|
|
@autu_pages = Paginator.new @autu_count, @limit, params['page'] || 1
|
|
|
|
|
@offset ||= @autu_pages.offset
|
|
|
|
|
@authorizations = paginateHelper @authorizations, @limit
|
|
|
|
|
|
|
|
|
|
if params[:reject_type] != "revocation"
|
|
|
|
|
user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{search}%'")
|
|
|
|
|
@authorizations = ApplyAction.where(:container_type => "TrialAuthorization", :status => 0, :user_id => user_id).includes(:user)
|
|
|
|
|
@autu_count = @authorizations.count
|
|
|
|
|
@limit = 15
|
|
|
|
|
@is_remote = true
|
|
|
|
|
@autu_pages = Paginator.new @autu_count, @limit, params['page'] || 1
|
|
|
|
|
@offset ||= @autu_pages.offset
|
|
|
|
|
@authorizations = paginateHelper @authorizations, @limit
|
|
|
|
|
end
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.js
|
|
|
|
|
end
|
|
|
|
|