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.48 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.47 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.46 app/controllers/renalware/clinics/visits_controller.rb
renalware-core-2.0.45 app/controllers/renalware/clinics/visits_controller.rb