Class: HrLite::LeaveType

Inherits:
ApplicationRecord show all
Includes:
Audited
Defined in:
app/models/hr_lite/leave_type.rb

Constant Summary collapse

ACCRUALS =
%w[yearly_upfront monthly].freeze

Constants included from Audited

Audited::REDACTED, Audited::SKIPPED_ATTRIBUTES

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.comp_off_typeObject

The type approved comp-off requests credit into (Settings marks it).



20
21
22
# File 'app/models/hr_lite/leave_type.rb', line 20

def self.comp_off_type
  active.find_by(comp_off: true)
end

Instance Method Details

#unlimited?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/models/hr_lite/leave_type.rb', line 24

def unlimited?
  annual_quota.nil?
end