hr_lite 0.64.1 → 0.65.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: 7771723b1709c1d61c4b26737d76980d3eb00d0896f68550380e8c8605e35f77
4
- data.tar.gz: 072a2fd9cc465306163c5bf3005eb8d9d69609f5122f05cd4c93839fc5b15b5f
3
+ metadata.gz: 2b0957999e3f167132b2c25455182bbe1aeb986ba6aaa9928d54721692a2c07a
4
+ data.tar.gz: 0b60cf956f6ce373fab9300cbfbf32a2c3734a3bec9a19ff55d85fff13c91e7f
5
5
  SHA512:
6
- metadata.gz: ac2806cb7d5c5d503b8f9136cc893166f3f1d6e7b46e6d49c25a1be7b0aba8c4b0c66eeaffd22229d96efbe89f14d5c3b510019da338697bda771460854b939b
7
- data.tar.gz: d39889da25d341b8eb2d5353ade577229971f2c6eee5d8028f722af6115ec0bb3b76404761b683dc6c25dd5c04d67407ddd79fe5d905e076492d2aa010a84d06
6
+ metadata.gz: 2ab5be9b791abad3013fddfeda2472bf333af6d156d0627a627071e25026cc9d30a9018927002be3d8bbffa84960bba0c05251e0fe31781d11ed44f4857148d7
7
+ data.tar.gz: 8b76610a5c37c3e5190aed833df733944b4e19716d4f7077e8a99f4f9042dcc4692871d94de58bd02829bce59fb2007da1ace55503912cb81521dbe7e27b9645
data/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.65.1] - 2026-11-03
11
+
12
+ - **Salary structures card has its own "Add salary structure" button.** It used to hide inside the employee's "More actions" menu, so the empty card ("payroll will skip this employee") gave no way to add one. More actions now holds only appraisal, designation change and PIP.
13
+
14
+ ## [0.65.0] - 2026-10-28
15
+
16
+ Expense claims have categories to pick from. No migrations.
17
+
18
+ - **`hr_lite:seed` adds 15 travel-company expense categories** (local conveyance, flights and trains, hotel stay, meals, client meetings, site inspections, visa fees, fuel and tolls, airport transfers, phone, courier, printing, trade fairs, tips, Other) when the table is empty. The "What kind of expense" picker was blank on installs nobody had configured. Every category needs a receipt except tips; "Other" uses the required "What it was for" note. An install that already has categories is left alone.
19
+
20
+ ## [0.64.2] - 2026-10-24
21
+
22
+ Leadership's leave-decision emails open the leave. No migrations.
23
+
24
+ - **"Leave approved/rejected" emails to leadership linked to the employee's own page** (`/leave_requests/:id`), which 404s for anyone else. Leadership's copy now names the employee and links to `/admin/leave_requests/:id`. The employee's email is unchanged.
25
+
10
26
  ## [0.64.1] - 2026-10-23
11
27
 
12
28
  Interview slots hand out 30-minute turns. No migrations.
@@ -310,7 +310,10 @@ module HrLite
310
310
  body: decision_note.presence,
311
311
  path: "/leave_requests/#{id}",
312
312
  bell_to: [ user ],
313
- email_to: [ user ]
313
+ email_to: [ user ],
314
+ # The employee's path 404s for anyone else; leadership opens the admin record.
315
+ leadership: { title: "#{title} — #{HrLite.display_name(user)}, #{leave_type.name} (#{date_range_label})",
316
+ path: "/admin/leave_requests/#{id}" }
314
317
  )
315
318
  end
316
319
 
@@ -8,18 +8,13 @@
8
8
  <% unless own %>
9
9
  <a class="hrl-btn" href="<%= hr_lite.edit_admin_employee_path(@profile) %>">Edit</a>
10
10
  <%# Their records are the tabs above; the HR actions fold into one More actions button. %>
11
- <% if hr_superadmin? || hr_can?("salary.manage", scope: :all) %>
11
+ <% if hr_superadmin? %>
12
12
  <details>
13
- <summary class="hrl-btn">More actions (appraisal, designation change, PIP, salary)</summary>
13
+ <summary class="hrl-btn">More actions (appraisal, designation change, PIP)</summary>
14
14
  <div class="hrl-row">
15
- <% if hr_superadmin? %>
16
- <a class="hrl-btn" href="<%= hr_lite.new_admin_employee_appraisal_path(@profile) %>">New appraisal</a>
17
- <a class="hrl-btn" href="<%= hr_lite.new_admin_employee_designation_change_path(@profile) %>">Designation change</a>
18
- <a class="hrl-btn" href="<%= hr_lite.new_admin_performance_plan_path(user_id: @profile.user_id) %>">Start PIP</a>
19
- <% end %>
20
- <% if hr_can?("salary.manage", scope: :all) %>
21
- <a class="hrl-btn hrl-btn--primary" href="<%= hr_lite.new_admin_employee_salary_structure_path(@profile) %>">New structure</a>
22
- <% end %>
15
+ <a class="hrl-btn" href="<%= hr_lite.new_admin_employee_appraisal_path(@profile) %>">New appraisal</a>
16
+ <a class="hrl-btn" href="<%= hr_lite.new_admin_employee_designation_change_path(@profile) %>">Designation change</a>
17
+ <a class="hrl-btn" href="<%= hr_lite.new_admin_performance_plan_path(user_id: @profile.user_id) %>">Start PIP</a>
23
18
  </div>
24
19
  </details>
25
20
  <% end %>
@@ -92,6 +87,9 @@
92
87
  <% else %>
93
88
  <p class="hrl-muted hrl-small">No structure yet — payroll will skip this employee.</p>
94
89
  <% end %>
90
+ <% if !own && hr_can?("salary.manage", scope: :all) %>
91
+ <a class="hrl-btn hrl-btn--primary hrl-mt" href="<%= hr_lite.new_admin_employee_salary_structure_path(@profile) %>">Add salary structure</a>
92
+ <% end %>
95
93
  </section>
96
94
  <% end %>
97
95
  </div>
data/lib/hr_lite/seeds.rb CHANGED
@@ -10,8 +10,28 @@ module HrLite
10
10
  { code: "CO", name: "Comp off", color: "#8b5cf6", paid: true, annual_quota: 0, accrual: "yearly_upfront", carry_forward_cap: 0, position: 5, comp_off: true }
11
11
  ].freeze
12
12
 
13
+ # A travel company's staff claims. "Other" takes anything else; the
14
+ # required "What it was for" field carries the note.
15
+ DEFAULT_EXPENSE_CATEGORIES = [
16
+ "Local conveyance (cab, auto, metro)", "Flights and trains", "Hotel stay",
17
+ "Meals on duty", "Client meeting and entertainment", "Site inspection and FAM trip",
18
+ "Visa, permit and passport fees", "Fuel, tolls and parking", "Airport transfers",
19
+ "Phone and internet", "Courier and documents", "Printing and stationery",
20
+ "Trade fair and events", "Tips and guide payments", "Other"
21
+ ].freeze
22
+
13
23
  def self.run!
14
- seed_leave_types! + seed_holidays!
24
+ seed_leave_types! + seed_holidays! + seed_expense_categories!
25
+ end
26
+
27
+ # Only into an empty table, so renamed or removed categories stay that way.
28
+ def self.seed_expense_categories!
29
+ return [] if ExpenseCategory.exists?
30
+
31
+ DEFAULT_EXPENSE_CATEGORIES.map do |name|
32
+ ExpenseCategory.create!(name: name, receipt_required: name != "Tips and guide payments")
33
+ "expense_category #{name}"
34
+ end
15
35
  end
16
36
 
17
37
  # Deliberately NOT auto-run from run!: an operator unticking every
@@ -1,3 +1,3 @@
1
1
  module HrLite
2
- VERSION = "0.64.1"
2
+ VERSION = "0.65.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.64.1
4
+ version: 0.65.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kshitiz sinha