hr_lite 0.23.0 → 0.23.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: 8e83919f345e7b70bbe33b17937f9b44c70b04d1d58919d3d24607ac3931ba86
4
- data.tar.gz: '0973e68fde9009f3b6e0e47de86a06149a97ed0158bc5c289740b5469192c82e'
3
+ metadata.gz: 8f73917345c95226e4a223cbe4e3e13b4819e4ca6ea3831cbc4c129eff64bbe1
4
+ data.tar.gz: '03581e4aa969660467a7b7ecfd04938677398dbf57fe49b43beaee3b82c635e9'
5
5
  SHA512:
6
- metadata.gz: 62e9b4d98c7f8f3743129b731d960c0879f9c71aa808536e5fde70c16f6f20eb6c0c26960cfa5c2cfd29396dfdfcbd22dab3a6329f482e39e35795df5cea9727
7
- data.tar.gz: 07dcf6f864bc9675f5710b887ac7879f2996f22c926d64e3672d8b7d97f191d50bdedc4c7a190784c81525b87baf5acb21e9aff04fd8b208637d15a497d58231
6
+ metadata.gz: ce7315e67fa6cafd5beb9cba391e05545281e3d4af17bf1ef27576cbccef1195e0b6788f80cc9c702de68bbed0e1e9a1d754bb175f1557d8023932c22073cb66
7
+ data.tar.gz: 73934a9be7d733498691e8f35cf6705501992a28163040133165e599287793e0810ca194f6b0e744ab23f6dee9c4742f3a957e1a30efb4672dc3a9451e5828e8
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.23.1] - 2026-10-10
11
+
12
+ No migrations.
13
+
14
+ ### Added
15
+ - An employee's admin month (Team attendance → name) lists "Where they punched": each day's check-in and check-out time and place, a Map link that opens the exact spot in Google Maps, and how far apart the two were (warning badge over 500 m).
16
+
10
17
  ## [0.23.0] - 2026-10-10
11
18
 
12
19
  Two migrations: `hr_lite_performance_plans` and `hr_lite_awards`. No new permission keys.
@@ -52,6 +52,8 @@ module HrLite
52
52
  @counts[:absent] -= 1 if @month.all_month.cover?(Date.current) && @day_status.for(Date.current).kind == :absent
53
53
  @edit_date = params[:date].present? ? parse_date_param(params[:date]) : nil
54
54
  @edit_record = @edit_date && AttendanceRecord.find_or_initialize_by(user_id: @employee.id, date: @edit_date)
55
+ @punches = AttendanceRecord.for_month(@month).where(user_id: @employee.id).where.not(check_in_at: nil).order(:date)
56
+ @offices = OfficeLocation.active.to_a
55
57
  end
56
58
 
57
59
  # Regularization: fix punches with a mandatory note, fully audited.
@@ -24,6 +24,31 @@
24
24
  <p class="hrl-small hrl-muted hrl-mt">Tap a date to fix its punches.</p>
25
25
  </section>
26
26
 
27
+ <% if @punches.any? %>
28
+ <section class="hrl-card">
29
+ <h2 class="hrl-card__title">Where they punched</h2>
30
+ <% @punches.each do |record| %>
31
+ <div class="hrl-feed__item hrl-small">
32
+ <div class="hrl-feed__body">
33
+ <strong><%= record.date.strftime("%a %-d %b") %></strong>
34
+ <% [ [ "In", record.check_in_at, record.check_in_lat, record.check_in_lng ],
35
+ [ "Out", record.check_out_at, record.check_out_lat, record.check_out_lng ] ].each do |label, at, lat, lng| %>
36
+ <% next unless at %>
37
+ <div><%= label %> <%= at.strftime("%H:%M") %> · <%= HrLite::OfficeLocation.place(lat, lng, @offices) || "No GPS" %>
38
+ <% if lat && lng %>
39
+ · <a class="hrl-card__link" href="https://www.google.com/maps?q=<%= lat %>,<%= lng %>" target="_blank" rel="noopener noreferrer">Map<span class="hrl-sr-only"> of <%= label.downcase %> <%= record.date.strftime("%-d %b") %></span></a>
40
+ <% end %>
41
+ </div>
42
+ <% end %>
43
+ <% if (gap = record.punch_gap_m) %>
44
+ <div class="<%= gap > HrLite::AttendanceRecord::PUNCH_GAP_ALERT_M ? "hrl-badge hrl-badge--warn" : "hrl-muted" %>"><%= (gap / 1000.0).round(1) %> km apart</div>
45
+ <% end %>
46
+ </div>
47
+ </div>
48
+ <% end %>
49
+ </section>
50
+ <% end %>
51
+
27
52
  <% if @edit_date %>
28
53
  <section class="hrl-card" id="regularize">
29
54
  <h2 class="hrl-card__title">Fix <%= @edit_date.strftime("%A, %d %B") %></h2>
@@ -1,3 +1,3 @@
1
1
  module HrLite
2
- VERSION = "0.23.0"
2
+ VERSION = "0.23.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.23.0
4
+ version: 0.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kshitiz sinha