Sha256: fcaf5430075dbd7ea000ce328fefd901eeedbd6a5f5aef943c1cc56196e39b71

Contents?: true

Size: 668 Bytes

Versions: 20

Compression:

Stored size: 668 Bytes

Contents

# Global visits not scoped to a patient
module Renalware
  module Clinics
    class VisitsController < BaseController
      include Renalware::Concerns::Pageable
      PER_PAGE = 100

      def index
        visits_query = VisitQuery.new(query_params)
        visits = visits_query.call.page(page).per(PER_PAGE)
        authorize visits

        render locals: {
          visits: visits,
          query: visits_query.search,
          clinics: Clinic.ordered,
          users: User.ordered
        }
      end

      private

      def query_params
        params
          .fetch(:q, {})
          .merge(page: page, per_page: per_page)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc13 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc11 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc10 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc9 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc8 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc7 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc6 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc5 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc4 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc3 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.rc1 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta12 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta11 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta10 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta9 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta8 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta7 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta6 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta5 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.0.pre.beta4 app/controllers/renalware/clinics/visits_controller.rb