Initial commit (history cleared)
CI / test (3.4.1) (push) Has been cancelled

This commit is contained in:
2026-04-29 11:21:39 +01:00
commit 298610b5f6
277 changed files with 30877 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# frozen_string_literal: true
class PaidTimeOff < ApplicationRecord
belongs_to :user
has_many :schedule, foreign_key: :user_id, primary_key: :user_id, dependent: :destroy
def sick_days_remaining
self.sick_days_earned - self.sick_days_taken
end
def pto_days_remaining
self.pto_earned - self.pto_taken
end
def sick_days_taken_percentage
result = self.sick_days_taken.to_f / self.sick_days_earned.to_f * 100.0
end
end