hr_lite 0.69.0 → 0.69.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9a2bc4764966f26e83853a97a693eed3266043e414f52c1c178f2f4859c065c
4
- data.tar.gz: cd97550dda828b9cc83670668768d8622f6b13d345df5309c6732e77386412b4
3
+ metadata.gz: b1baf60c535e3b5cdc3eac6c3cea7b16ef017d9a5bc544035c5baa84091aa665
4
+ data.tar.gz: 9061aa56cb55d265c5e998379103d346f3b170cf86b13b57d9bd0aef391b78d6
5
5
  SHA512:
6
- metadata.gz: 9d84016266084cf26e04553da027592ba4eb24c02c22178a51b9a49607694b1e68f534745b9da6e9d73b89988f7d0de90609bc3fed7b53fdd60fba3c94c1cb2f
7
- data.tar.gz: cdb3157feb52cb1e71bd519319835fa5360b5cd8dc90546efee400d6c4d16459e0fbe7c1658a10d9ec67b619557c6c4f03fca80aa86611d04a26f2663d4b9586
6
+ metadata.gz: 05cbcd508ef90ef56166997654d61fcd0bcdd093c5b6eed42d2d5343adaba94bf697a0e4b2520884516d0d6aeaee8ac2b6317a76b8a53b08921bf01ad06925da
7
+ data.tar.gz: f04403add05a6a730e96e18ca7b554049979fe52bb32d1ba7e49ca526bb34f09855b19336665d8806307708514c66ca538349aeb0bb75c3ab5948c0d86dfbcc9
data/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.69.1] - 2026-11-10
11
+
12
+ HR (and admins) can record leave on any working day. No migrations.
13
+
14
+ - **"Record leave" no longer refuses a checked-in day.** HR recording full-day leave for someone who checked in got "Attendance is marked in this period" and nothing was saved. It now saves and is approved as usual; the day shows and pays as leave, which already outranks a punch.
15
+ - **…nor caps it at penalty-held days.** Leave HR records is no longer limited to the balance left after penalty holds ("you can apply for at most N days"); anything past the balance is loss of pay, as before. Comp-off still needs its credit, because it has no loss of pay.
16
+ - Unchanged: an employee applying for themselves still meets both checks, and nobody can record leave on days that are all weekly offs or holidays, or over leave already recorded.
17
+
10
18
  ## [0.69.0] - 2026-11-09
11
19
 
12
20
  HR and leadership make or remove a holiday from the company calendar. No migrations.
@@ -392,10 +392,11 @@ module HrLite
392
392
  end
393
393
 
394
394
  # A full-day leave over a day that already has a check-in makes no
395
- # sense; a half-day alongside a punch is legitimate (worked half).
395
+ # sense; a half-day alongside a punch is legitimate (worked half), and
396
+ # HR may record leave over a checked-in day (leave outranks the punch).
396
397
  def no_punch_conflict
397
398
  return unless start_date && end_date
398
- return if half_day
399
+ return if half_day || recorded_by_hr?
399
400
 
400
401
  punched = AttendanceRecord.where(user_id: user_id, date: start_date..end_date)
401
402
  .where.not(check_in_at: nil)
@@ -418,7 +419,8 @@ module HrLite
418
419
  # balance with days held for penalties. Any other excess becomes loss of pay at approval.
419
420
  def sufficient_balance
420
421
  return unless start_date && end_date && leave_type
421
- return if leave_type.unlimited? || errors.any?
422
+ # HR records any day; past the balance it is loss of pay. Comp-off has no loss of pay.
423
+ return if leave_type.unlimited? || errors.any? || (recorded_by_hr? && !leave_type.comp_off)
422
424
 
423
425
  held = balance.penalty_days
424
426
  return unless leave_type.comp_off || held.positive?
@@ -1,3 +1,3 @@
1
1
  module HrLite
2
- VERSION = "0.69.0"
2
+ VERSION = "0.69.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hr_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.69.0
4
+ version: 0.69.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kshitiz sinha