hr_lite 0.69.1 → 0.71.0
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 +4 -4
- data/CHANGELOG.md +26 -0
- data/app/assets/stylesheets/hr_lite/hr_lite.css +9 -4
- data/app/controllers/hr_lite/admin/audit_logs_controller.rb +4 -1
- data/app/controllers/hr_lite/admin/expense_categories_controller.rb +3 -0
- data/app/controllers/hr_lite/admin/expenses_controller.rb +2 -0
- data/app/controllers/hr_lite/admin/office_locations_controller.rb +3 -0
- data/app/controllers/hr_lite/admin/resignations_controller.rb +3 -0
- data/app/controllers/hr_lite/admin/settings_controller.rb +3 -0
- data/app/views/hr_lite/admin/comp_off_requests/index.html.erb +1 -1
- data/app/views/hr_lite/admin/employees/_form.html.erb +1 -1
- data/app/views/hr_lite/admin/expense_categories/index.html.erb +1 -1
- data/app/views/hr_lite/admin/leave_requests/index.html.erb +1 -1
- data/app/views/hr_lite/admin/leave_types/index.html.erb +1 -1
- data/app/views/hr_lite/admin/loans/index.html.erb +1 -1
- data/app/views/hr_lite/admin/office_locations/index.html.erb +1 -1
- data/app/views/hr_lite/admin/payroll_runs/index.html.erb +1 -1
- data/app/views/hr_lite/admin/payroll_runs/show.html.erb +1 -1
- data/app/views/hr_lite/admin/statutory_rate_cards/index.html.erb +1 -1
- data/app/views/hr_lite/admin/tax_declarations/index.html.erb +1 -1
- data/app/views/hr_lite/admin/tax_declarations/overview.html.erb +1 -1
- data/app/views/hr_lite/team/show.html.erb +1 -1
- data/db/migrate/20261116090000_backfill_hr_lite_enforced_permission_keys.rb +20 -0
- data/lib/hr_lite/configuration.rb +2 -1
- data/lib/hr_lite/notifications.rb +1 -1
- data/lib/hr_lite/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12ce663b358b8accecc12485aebc7543006d7e933dbf7fbf5ca3b2a01c1814cf
|
|
4
|
+
data.tar.gz: b4633c9b5c5531a367470a83e5e586caf24f1d5e7dfeaa52fa4d377228e1c4ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c4de23caaac94f39cb138e38eddda9ecd6fea9fbf5f18e9bcacaa9382c7a340bc5b35e92ec2812afc62919d25c42e3eb12fafc2eaf3e65eac925efb4f3548798
|
|
7
|
+
data.tar.gz: 7cc7549ca269cd6a5c74db8b67ded123fd96824c884199bfc58d13122d05db5cef28e46b3e9cd2d75a207f839d5519963ab79f633037ee9dbe0120536f2784a2
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.71.0] - 2026-11-20
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `config.email_opt_out`: a host callable `->(event, user)` that skips the per-user email of an event for a user who does not want it. Bells and leadership emails are unchanged. No migrations.
|
|
15
|
+
|
|
16
|
+
## [0.70.1] - 2026-11-16
|
|
17
|
+
|
|
18
|
+
Layout fixes from an audit of every screen at 360px and 1440px. No migrations.
|
|
19
|
+
|
|
20
|
+
- **The More sheet names every tab.** The line under each place was cut with "…" on a phone. It now wraps.
|
|
21
|
+
- **A tick box's whole row takes the tap.** Where the label sits beside the box, a tap just off the 18px box did nothing. The label's tap area now covers the row.
|
|
22
|
+
- **Number columns have their heading over the numbers** on twelve tables (payroll runs, loans, leave types, tax overview and others). The heading was left-aligned over right-aligned figures.
|
|
23
|
+
- **The "‹" and "›" pager arrows are 44px wide** on work time and a person's summary. They were 38 to 41px, depending on the font.
|
|
24
|
+
- **Buttons on one line share a height**: Edit beside an open "More actions" on an employee, and Edit beside Share on a draft appraisal.
|
|
25
|
+
- **The weekday boxes of a shorter-day rule line up.** The first sat 4px above the rest.
|
|
26
|
+
- The new-employee picker's blank option reads "— new person, below —", which fits a phone.
|
|
27
|
+
|
|
28
|
+
## [0.70.0] - 2026-11-16
|
|
29
|
+
|
|
30
|
+
Five permissions on the Roles screen are now checked. One data migration.
|
|
31
|
+
|
|
32
|
+
- **Each screen asks for its own permission.** The audit trail needs "Read the audit trail" (`audit.view`); pay and appraisal rows in it need `audit.view_money`; HR settings, office locations and expense categories need `settings.manage`; accepting a resignation needs `resignation.manage`; putting an approved claim on payroll needs `expense.reimburse`. Before, these boxes did nothing: the screens opened on `profile.manage`, `payroll.manage` or `expense.approve`.
|
|
33
|
+
- **Nobody loses access on upgrade.** The migration gives every role the new permission wherever it holds the one that opened the screen before. Untick a box on the Roles screen to take a screen away from a role.
|
|
34
|
+
- A role that held `audit.view` without `profile.manage` (seeded Finance) can now open the audit trail by its address; the menu link still shows for leadership only.
|
|
35
|
+
|
|
10
36
|
## [0.69.1] - 2026-11-10
|
|
11
37
|
|
|
12
38
|
HR (and admins) can record leave on any working day. No migrations.
|
|
@@ -121,7 +121,7 @@ html:has(.hrl-body) { scroll-padding-top: 4rem; scroll-padding-bottom: calc(4.4r
|
|
|
121
121
|
/* Place icons: stroke-only, decoration beside a label that always shows. */
|
|
122
122
|
.hrl-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
|
123
123
|
.hrl-nav__text { display: flex; flex-direction: column; min-width: 0; }
|
|
124
|
-
.hrl-nav__hint { font-size: var(--hrl-t-small); font-weight: 400; color: var(--hrl-muted);
|
|
124
|
+
.hrl-nav__hint { font-size: var(--hrl-t-small); font-weight: 400; color: var(--hrl-muted); }
|
|
125
125
|
.hrl-nav__link--active .hrl-nav__hint { color: inherit; }
|
|
126
126
|
/* Tab row: the current place's tabs on one line; it scrolls sideways, never the page. */
|
|
127
127
|
.hrl-tabrow { display: flex; gap: var(--hrl-gap-target); overflow-x: auto; margin: 0 0 var(--hrl-s-4); padding-bottom: var(--hrl-s-2); border-bottom: 1px solid var(--hrl-line); }
|
|
@@ -228,6 +228,7 @@ html:has(.hrl-body) { scroll-padding-top: 4rem; scroll-padding-bottom: calc(4.4r
|
|
|
228
228
|
.hrl-page__actions { width: 100%; display: flex; flex-wrap: wrap; gap: .5rem; }
|
|
229
229
|
.hrl-page__actions .hrl-btn { flex: 1 1 auto; }
|
|
230
230
|
.hrl-page__actions .hrl-btn[aria-label] { flex: 0 0 auto; } /* icon-only pager arrows keep their width */
|
|
231
|
+
.hrl-page__actions:has(> details[open]) { align-items: flex-start; } /* an open menu does not stretch the button beside it */
|
|
231
232
|
@media (min-width: 481px) {
|
|
232
233
|
.hrl-page__actions { width: auto; margin-left: auto; }
|
|
233
234
|
.hrl-page__actions .hrl-btn { flex: 0 1 auto; }
|
|
@@ -292,6 +293,7 @@ details > form > button[type=submit], details > form > .hrl-btn { margin-top: .2
|
|
|
292
293
|
.hrl-btn--block { width: 100%; }
|
|
293
294
|
.hrl-btn--big { min-height: 58px; font-size: var(--hrl-t-lead); }
|
|
294
295
|
.hrl-btn[disabled] { opacity: .55; cursor: default; }
|
|
296
|
+
.hrl-btn[aria-label] { min-width: var(--hrl-target); } /* an arrow-only button is a full target */
|
|
295
297
|
summary.hrl-btn { list-style: none; }
|
|
296
298
|
summary.hrl-btn::-webkit-details-marker { display: none; } /* Safari before 18.4 draws it whatever the display */
|
|
297
299
|
/* A line with an "i": tap anywhere on it for why; the reason drops below. */
|
|
@@ -361,16 +363,18 @@ fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
|
|
|
361
363
|
}
|
|
362
364
|
.hrl-field textarea { min-height: 90px; resize: vertical; }
|
|
363
365
|
.hrl-filter { appearance: none; margin-bottom: var(--hrl-gap-target); } /* select_filter.js search box above its select */
|
|
364
|
-
.hrl-field--check { display: flex; align-items: center; gap: .55rem; min-height: var(--hrl-target); }
|
|
366
|
+
.hrl-field--check { display: flex; align-items: center; gap: .55rem; min-height: var(--hrl-target); position: relative; }
|
|
365
367
|
.hrl-field--check + .hrl-field--check { margin-top: var(--hrl-gap-target); }
|
|
368
|
+
.hrl-row > .hrl-field--check { margin-top: 0; } /* side by side: the row's gap spaces them */
|
|
366
369
|
/* A choice row inside a .hrl-field keeps its row layout (.hrl-field label would make it a block). */
|
|
367
370
|
.hrl-field label.hrl-field--check { display: flex; font-size: inherit; font-weight: 400; margin-bottom: 0; }
|
|
368
371
|
.hrl-field--check input {
|
|
369
|
-
width: 1.15rem; height: 1.15rem; min-height: 0; flex: 0 0 auto;
|
|
372
|
+
width: 1.15rem; height: 1.15rem; min-height: 0; flex: 0 0 auto; position: relative; z-index: 1; /* above the label's ::before */
|
|
370
373
|
accent-color: var(--hrl-accent);
|
|
371
374
|
}
|
|
372
|
-
/* The 44px label is the tap target for the small box. */
|
|
375
|
+
/* The 44px label is the tap target for the small box; its ::before carries that over the box and the gap. */
|
|
373
376
|
.hrl-field--check label { margin-bottom: 0; font-weight: 600; flex: 1; min-height: var(--hrl-target); display: flex; align-items: center; }
|
|
377
|
+
.hrl-field--check label::before { content: ""; position: absolute; inset: 0; }
|
|
374
378
|
.hrl-field--check label .hrl-hint { display: block; margin-top: 0; font-weight: 400; }
|
|
375
379
|
/* Rails wraps an invalid label/field in this div; contents keeps the stack, the re-pointed token reddens the border. */
|
|
376
380
|
.field_with_errors { display: contents; --hrl-field: var(--hrl-bad); }
|
|
@@ -397,6 +401,7 @@ fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
|
|
|
397
401
|
.hrl-feed { list-style: none; margin: 0; padding: 0; }
|
|
398
402
|
.hrl-feed__item { display: flex; gap: .7rem; padding: .8rem 0; border-bottom: 1px solid var(--hrl-line); }
|
|
399
403
|
.hrl-feed__item:last-child { border-bottom: 0; }
|
|
404
|
+
.hrl-feed__item > .button_to { display: flex; } /* its button stretches like a link button beside it */
|
|
400
405
|
.hrl-avatar {
|
|
401
406
|
flex: 0 0 auto; width: 38px; height: 38px; border-radius: var(--hrl-radius-pill);
|
|
402
407
|
background: var(--hrl-info-bg); color: var(--hrl-accent);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
module HrLite
|
|
2
2
|
module Admin
|
|
3
3
|
class AuditLogsController < LeadershipController
|
|
4
|
+
skip_before_action :require_governing_access!
|
|
5
|
+
before_action -> { hr_require_permission!("audit.view", scope: :all) }
|
|
6
|
+
|
|
4
7
|
def index
|
|
5
8
|
# Appraisal and promotion rows carry review text in plain columns:
|
|
6
9
|
# ordinary leadership governs people and policy, not pay.
|
|
7
|
-
scope =
|
|
10
|
+
scope = hr_can?("audit.view_money", scope: :all) ? AuditLog.recent : AuditLog.recent.outside_money_tier
|
|
8
11
|
scope = scope.where.not("action LIKE ?", "%.viewed") unless params[:views] # page views drown the changes
|
|
9
12
|
@audit_logs = paginate(scope.includes(:actor))
|
|
10
13
|
end
|
|
@@ -3,6 +3,9 @@ module HrLite
|
|
|
3
3
|
# No destroy: claims hold the category by foreign key. Retire one by
|
|
4
4
|
# unticking Active, which takes it off the claim form.
|
|
5
5
|
class ExpenseCategoriesController < LeadershipController
|
|
6
|
+
skip_before_action :require_governing_access!
|
|
7
|
+
before_action -> { hr_require_permission!("settings.manage", scope: :all) }
|
|
8
|
+
|
|
6
9
|
def index
|
|
7
10
|
@expense_categories = ExpenseCategory.alphabetical
|
|
8
11
|
end
|
|
@@ -31,6 +31,8 @@ module HrLite
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def reimburse
|
|
34
|
+
return hr_access_denied unless hr_can?("expense.reimburse", scope: :all)
|
|
35
|
+
|
|
34
36
|
expense = decidable.find(params[:id])
|
|
35
37
|
month = parse_month_param(params[:period_month])
|
|
36
38
|
expense.reimburse!(actor: hr_current_user, period_month: month)
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
module HrLite
|
|
2
2
|
module Admin
|
|
3
3
|
class OfficeLocationsController < LeadershipController
|
|
4
|
+
skip_before_action :require_governing_access!
|
|
5
|
+
before_action -> { hr_require_permission!("settings.manage", scope: :all) }
|
|
6
|
+
|
|
4
7
|
def index
|
|
5
8
|
@office_locations = OfficeLocation.order(:name)
|
|
6
9
|
end
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
module HrLite
|
|
2
2
|
module Admin
|
|
3
3
|
class ResignationsController < LeadershipController
|
|
4
|
+
skip_before_action :require_governing_access!
|
|
5
|
+
before_action -> { hr_require_permission!("resignation.manage", scope: :all) }
|
|
6
|
+
|
|
4
7
|
def accept
|
|
5
8
|
resignation = Resignation.find(params[:id])
|
|
6
9
|
resignation.accept!(
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<% if @requests.any? %>
|
|
15
15
|
<div class="hrl-table-wrap">
|
|
16
16
|
<table class="hrl-table hrl-table--stack">
|
|
17
|
-
<thead><tr><th>Employee</th><th>Day worked</th><th>Credit</th><th></th></tr></thead>
|
|
17
|
+
<thead><tr><th>Employee</th><th>Day worked</th><th class="hrl-num">Credit</th><th></th></tr></thead>
|
|
18
18
|
<tbody>
|
|
19
19
|
<% @requests.each do |request| %>
|
|
20
20
|
<tr>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div class="hrl-field">
|
|
7
7
|
<%= f.label :user_id, "Existing staff member" %>
|
|
8
8
|
<%= f.select :user_id, HrLite.employees.map { |u| [ HrLite.display_name(u), u.id ] },
|
|
9
|
-
{ include_blank: "—
|
|
9
|
+
{ include_blank: "— new person, below —" },
|
|
10
10
|
data: { hrl_filter: "Filter existing staff" } %>
|
|
11
11
|
</div>
|
|
12
12
|
<fieldset class="hrl-card">
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<% if @expense_categories.any? %>
|
|
11
11
|
<div class="hrl-table-wrap">
|
|
12
12
|
<table class="hrl-table hrl-table--stack">
|
|
13
|
-
<thead><tr><th>Name</th><th>Monthly cap</th><th>Receipt</th><th>Active</th><th></th></tr></thead>
|
|
13
|
+
<thead><tr><th>Name</th><th class="hrl-num">Monthly cap</th><th>Receipt</th><th>Active</th><th></th></tr></thead>
|
|
14
14
|
<tbody>
|
|
15
15
|
<% @expense_categories.each do |category| %>
|
|
16
16
|
<tr>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<% if @requests.any? %>
|
|
17
17
|
<div class="hrl-table-wrap">
|
|
18
18
|
<table class="hrl-table hrl-table--stack">
|
|
19
|
-
<thead><tr><th>Employee</th><th>Type</th><th>Dates</th><th>Days</th><th></th></tr></thead>
|
|
19
|
+
<thead><tr><th>Employee</th><th>Type</th><th>Dates</th><th class="hrl-num">Days</th><th></th></tr></thead>
|
|
20
20
|
<tbody>
|
|
21
21
|
<% @requests.each do |request| %>
|
|
22
22
|
<tr>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<section class="hrl-card">
|
|
10
10
|
<div class="hrl-table-wrap">
|
|
11
11
|
<table class="hrl-table hrl-table--stack">
|
|
12
|
-
<thead><tr><th>Type</th><th>Quota</th><th>Accrual</th><th>Carry cap</th><th>Paid</th><th></th></tr></thead>
|
|
12
|
+
<thead><tr><th>Type</th><th class="hrl-num">Quota</th><th>Accrual</th><th class="hrl-num">Carry cap</th><th>Paid</th><th></th></tr></thead>
|
|
13
13
|
<tbody>
|
|
14
14
|
<% @leave_types.each do |type| %>
|
|
15
15
|
<tr>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<% else %>
|
|
23
23
|
<div class="hrl-table-wrap">
|
|
24
24
|
<table class="hrl-table hrl-table--stack">
|
|
25
|
-
<thead><tr><th>Person</th><th>Principal</th><th>Instalment</th><th>Outstanding</th><th></th></tr></thead>
|
|
25
|
+
<thead><tr><th>Person</th><th class="hrl-num">Principal</th><th class="hrl-num">Instalment</th><th class="hrl-num">Outstanding</th><th></th></tr></thead>
|
|
26
26
|
<tbody>
|
|
27
27
|
<% @loans.each do |loan| %>
|
|
28
28
|
<tr>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<% if @office_locations.any? %>
|
|
11
11
|
<div class="hrl-table-wrap">
|
|
12
12
|
<table class="hrl-table hrl-table--stack">
|
|
13
|
-
<thead><tr><th>Name</th><th>Coordinates</th><th>Radius</th><th>Active</th><th></th></tr></thead>
|
|
13
|
+
<thead><tr><th>Name</th><th>Coordinates</th><th class="hrl-num">Radius</th><th>Active</th><th></th></tr></thead>
|
|
14
14
|
<tbody>
|
|
15
15
|
<% @office_locations.each do |office| %>
|
|
16
16
|
<tr>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<% if @runs.any? %>
|
|
11
11
|
<div class="hrl-table-wrap">
|
|
12
12
|
<table class="hrl-table hrl-table--stack">
|
|
13
|
-
<thead><tr><th>Period</th><th>Status</th><th>Slips</th><th>Net payout</th><th></th></tr></thead>
|
|
13
|
+
<thead><tr><th>Period</th><th>Status</th><th class="hrl-num">Slips</th><th class="hrl-num">Net payout</th><th></th></tr></thead>
|
|
14
14
|
<tbody>
|
|
15
15
|
<% @runs.each do |run| %>
|
|
16
16
|
<tr>
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<% if @slips.any? %>
|
|
70
70
|
<div class="hrl-table-wrap">
|
|
71
71
|
<table class="hrl-table hrl-table--stack">
|
|
72
|
-
<thead><tr><th>Employee</th><th>Paid days</th><th><abbr title="Loss of pay: unpaid days">LOP</abbr></th><th>Gross</th><th>Deductions</th><th>Net</th><th></th></tr></thead>
|
|
72
|
+
<thead><tr><th>Employee</th><th class="hrl-num">Paid days</th><th class="hrl-num"><abbr title="Loss of pay: unpaid days">LOP</abbr></th><th class="hrl-num">Gross</th><th class="hrl-num">Deductions</th><th class="hrl-num">Net</th><th></th></tr></thead>
|
|
73
73
|
<tbody>
|
|
74
74
|
<% @slips.each do |slip| %>
|
|
75
75
|
<tr>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</p>
|
|
15
15
|
<div class="hrl-table-wrap">
|
|
16
16
|
<table class="hrl-table hrl-table--stack">
|
|
17
|
-
<thead><tr><th>Year</th><th>PF ceiling</th><th>ESI ceiling</th><th>Verified</th><th></th></tr></thead>
|
|
17
|
+
<thead><tr><th>Year</th><th class="hrl-num">PF ceiling</th><th class="hrl-num">ESI ceiling</th><th>Verified</th><th></th></tr></thead>
|
|
18
18
|
<tbody>
|
|
19
19
|
<% live = HrLite::StatutoryRateCardRecord.effective_for(Date.current.beginning_of_month) %>
|
|
20
20
|
<% @cards.each do |card| %>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<% else %>
|
|
18
18
|
<div class="hrl-table-wrap">
|
|
19
19
|
<table class="hrl-table hrl-table--stack">
|
|
20
|
-
<thead><tr><th>Person</th><th>Year</th><th>Regime</th><th>Claimed</th><th></th></tr></thead>
|
|
20
|
+
<thead><tr><th>Person</th><th>Year</th><th>Regime</th><th class="hrl-num">Claimed</th><th></th></tr></thead>
|
|
21
21
|
<tbody>
|
|
22
22
|
<% @declarations.each do |declaration| %>
|
|
23
23
|
<tr>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<section class="hrl-card">
|
|
9
9
|
<div class="hrl-table-wrap">
|
|
10
10
|
<table class="hrl-table hrl-table--stack">
|
|
11
|
-
<thead><tr><th>Person</th><th>Regime</th><th>Tax for the year</th><th>Deducted so far</th><th>TDS a month</th><th>Declaration</th></tr></thead>
|
|
11
|
+
<thead><tr><th>Person</th><th>Regime</th><th class="hrl-num">Tax for the year</th><th class="hrl-num">Deducted so far</th><th class="hrl-num">TDS a month</th><th>Declaration</th></tr></thead>
|
|
12
12
|
<tbody>
|
|
13
13
|
<% @profiles.each do |profile| %>
|
|
14
14
|
<% declaration = @declarations[profile.user_id] %>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<% if rows.any? %>
|
|
39
39
|
<div class="hrl-table-wrap">
|
|
40
40
|
<table class="hrl-table hrl-table--stack">
|
|
41
|
-
<thead><tr><th>Name</th><% if @statuses %><th>Now</th><% end %><th>Status</th><th>Hours <%= @date == Date.current ? "today" : "that day" %></th><th>Hours this month</th></tr></thead>
|
|
41
|
+
<thead><tr><th>Name</th><% if @statuses %><th>Now</th><% end %><th>Status</th><th class="hrl-num">Hours <%= @date == Date.current ? "today" : "that day" %></th><th class="hrl-num">Hours this month</th></tr></thead>
|
|
42
42
|
<tbody>
|
|
43
43
|
<% rows.each do |row| %>
|
|
44
44
|
<tr>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class BackfillHrLiteEnforcedPermissionKeys < ActiveRecord::Migration[8.1]
|
|
2
|
+
# 0.70.0 starts checking five keys that the screens never asked for. Every
|
|
3
|
+
# role keeps the access it has today: it gets the new key wherever it holds
|
|
4
|
+
# the key that opened the screen before.
|
|
5
|
+
NEW_KEYS = {
|
|
6
|
+
"profile.manage" => %w[audit.view settings.manage resignation.manage],
|
|
7
|
+
"payroll.manage" => %w[audit.view_money],
|
|
8
|
+
"expense.approve" => %w[expense.reimburse]
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
def up
|
|
12
|
+
NEW_KEYS.each do |held, keys|
|
|
13
|
+
HrLite::RoleGrant.where(permission_key: held, scope: "all").pluck(:role_id).each do |role_id|
|
|
14
|
+
keys.each { |key| HrLite::RoleGrant.find_or_initialize_by(role_id: role_id, permission_key: key).update!(scope: "all") }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def down; end
|
|
20
|
+
end
|
|
@@ -8,7 +8,7 @@ module HrLite
|
|
|
8
8
|
:employees_scope, :mentionable_users, :notify, :render_pdf, :company,
|
|
9
9
|
:time_zone, :currency_symbol, :on_designation_change,
|
|
10
10
|
:leadership_emails, :extra_stylesheets, :superadmin_emails,
|
|
11
|
-
:mailer_from, :public_url_base, :notification_matrix, :back_link,
|
|
11
|
+
:mailer_from, :public_url_base, :notification_matrix, :email_opt_out, :back_link,
|
|
12
12
|
:onboard_user, :offboard_user, :invite_url_for,
|
|
13
13
|
# ->(user) { { url:, unread: } } — shows a notifications link in
|
|
14
14
|
# the HR shell; nil (default) shows nothing.
|
|
@@ -124,6 +124,7 @@ module HrLite
|
|
|
124
124
|
@mailer_from = "hr@example.com"
|
|
125
125
|
@public_url_base = nil # e.g. "https://hr.example.com" — enables email links + HrLite.public_url
|
|
126
126
|
@notification_matrix = nil # resolved lazily to Notifications::DEFAULT_MATRIX
|
|
127
|
+
@email_opt_out = nil # ->(event, user) { true } = this user does not want this event by email
|
|
127
128
|
@back_link = nil # optional {label:, url:} for the shell nav
|
|
128
129
|
@native_app = ->(request) { request.user_agent.to_s.match?(/Hotwire Native|Turbo Native/) }
|
|
129
130
|
@leave_year_start_month = 1 # 1 = calendar year; 7 = July–June leave year
|
|
@@ -138,7 +138,7 @@ module HrLite
|
|
|
138
138
|
# One query for everyone's Busy/Meeting end, not one per recipient.
|
|
139
139
|
held_until = HrLite.config.office_geofence ? WorkStatus.do_not_disturb_for(users.map(&:id)) : {}
|
|
140
140
|
users.each do |user|
|
|
141
|
-
next if user.email.blank?
|
|
141
|
+
next if user.email.blank? || HrLite.config.email_opt_out&.call(event.to_s, user)
|
|
142
142
|
|
|
143
143
|
begin
|
|
144
144
|
mail = EventMailer.event(to: user.email, subject: title, heading: title,
|
data/lib/hr_lite/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.71.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kshitiz sinha
|
|
@@ -548,6 +548,7 @@ files:
|
|
|
548
548
|
- db/migrate/20261022090000_create_hr_lite_hiring_replies.rb
|
|
549
549
|
- db/migrate/20261022090100_add_allow_sunday_to_hr_lite_hiring_campaigns.rb
|
|
550
550
|
- db/migrate/20261022120000_add_purpose_to_hr_lite_hiring_templates.rb
|
|
551
|
+
- db/migrate/20261116090000_backfill_hr_lite_enforced_permission_keys.rb
|
|
551
552
|
- lib/generators/hr_lite/install/install_generator.rb
|
|
552
553
|
- lib/generators/hr_lite/install/templates/AFTER_INSTALL
|
|
553
554
|
- lib/generators/hr_lite/install/templates/initializer.rb
|