You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
class Admins::ShixunsController < Admins::BaseController
|
|
|
|
|
|
|
|
def index
|
|
|
|
params[:sort_by] = params[:sort_by].presence || 'created_on'
|
|
|
|
params[:sort_direction] = params[:sort_direction].presence || 'desc'
|
|
|
|
shixuns = Admins::ShixunQuery.call(params)
|
|
|
|
@editing_shixuns = shixuns.where(status:0).size
|
|
|
|
@pending_shixuns = shixuns.where(status:1).size
|
|
|
|
@processed_shixuns = shixuns.where(status:2).size
|
|
|
|
@closed_shixuns = shixuns.where(status:3).size
|
|
|
|
@shixuns_type_check = MirrorRepository.select(:id,:type_name).pluck(:type_name,:id)
|
|
|
|
@params_page = params[:page] || 1
|
|
|
|
@shixuns = paginate shixuns.preload(:user,:challenges)
|
|
|
|
end
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|