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.1.1 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.1.0 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.167 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.166 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.165 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.164 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.163 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.162 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.161 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.160 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.159 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.158 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.157 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.156 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.155 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.153 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.152 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.151 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.149 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.148 app/controllers/renalware/clinics/visits_controller.rb