Sha256: 35cd93f4dd93275a95d34da53b019a270c36c81c6c6f4184324407ba93026772

Contents?: true

Size: 584 Bytes

Versions: 20

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module System
    class UsersAwaitingApprovalComponent < ApplicationComponent
      attr_reader :current_user

      def initialize(current_user:)
        @current_user = current_user
      end

      def users_needing_approval_count
        @users_needing_approval_count ||= User.unapproved.count
      end

      def users_needing_approval_title
        [
          users_needing_approval_count,
          "user".pluralize(users_needing_approval_count),
          "awaiting approval"
        ].join(" ")
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
renalware-core-2.0.159 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.158 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.157 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.156 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.155 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.153 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.152 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.151 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.149 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.148 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.147 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.146 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.145 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.144 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.143 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.142 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.141 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.140 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.139 app/components/renalware/system/users_awaiting_approval_component.rb
renalware-core-2.0.138 app/components/renalware/system/users_awaiting_approval_component.rb