Sha256: 305fc5050732eddf76ad1e9b67681c93f1facb5daae2c875dd450b70b0e10d51

Contents?: true

Size: 665 Bytes

Versions: 92

Compression:

Stored size: 665 Bytes

Contents

# frozen_string_literal: true

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

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

        render locals: {
          visits: CollectionPresenter.new(visits, ClinicVisitPresenter),
          query: visits_query.search,
          clinics: Clinic.ordered,
          users: User.ordered
        }
      end

      private

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

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
renalware-core-2.0.147 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.146 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.145 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.144 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.143 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.142 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.141 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.140 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.139 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.138 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.137 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.136 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.135 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.134 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.133 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.132 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.131 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.130 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.129 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.128 app/controllers/renalware/clinics/visits_controller.rb