Sha256: 8a1adbc723da0c94f6ccf2f54dacf7f780d40eb8b3a9824e2cd32db1dedb635e

Contents?: true

Size: 618 Bytes

Versions: 24

Compression:

Stored size: 618 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: visits,
          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

24 entries across 24 versions & 1 rubygems

Version Path
renalware-core-2.0.72 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.71 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.70 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.69 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.68 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.67 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.64 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.63 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.62 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.61 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.60 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.58 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.57 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.56 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.55 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.54 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.53 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.52 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.51 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.50 app/controllers/renalware/clinics/visits_controller.rb