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.104 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.103 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.102 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.101 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.100 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.99 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.98 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.97 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.96 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.95 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.94 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.93 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.92 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.91 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.90 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.89 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.88 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.87 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.86 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.85 app/controllers/renalware/clinics/visits_controller.rb