hr_lite 0.53.0 → 0.55.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 +73 -0
- data/README.md +5 -2
- data/app/assets/javascripts/hr_lite/confirm.js +9 -5
- data/app/assets/javascripts/hr_lite/countdown.js +9 -2
- data/app/assets/javascripts/hr_lite/emoji_pick.js +4 -4
- data/app/assets/javascripts/hr_lite/search.js +1 -1
- data/app/assets/stylesheets/hr_lite/hr_lite.css +24 -14
- data/app/controllers/hr_lite/admin/attendances_controller.rb +12 -3
- data/app/controllers/hr_lite/admin/audit_logs_controller.rb +1 -0
- data/app/controllers/hr_lite/admin/comp_off_requests_controller.rb +1 -1
- data/app/controllers/hr_lite/admin/documents_controller.rb +1 -1
- data/app/controllers/hr_lite/admin/employees_controller.rb +11 -4
- data/app/controllers/hr_lite/admin/expenses_controller.rb +17 -1
- data/app/controllers/hr_lite/admin/hr_requests_controller.rb +4 -0
- data/app/controllers/hr_lite/admin/leave_requests_controller.rb +5 -2
- data/app/controllers/hr_lite/admin/payroll_runs_controller.rb +9 -5
- data/app/controllers/hr_lite/admin/regularization_requests_controller.rb +1 -1
- data/app/controllers/hr_lite/admin/reports_controller.rb +3 -2
- data/app/controllers/hr_lite/admin/salary_structures_controller.rb +2 -0
- data/app/controllers/hr_lite/admin/statutory_rate_cards_controller.rb +2 -1
- data/app/controllers/hr_lite/admin/tax_declarations_controller.rb +15 -4
- data/app/controllers/hr_lite/admin/work_locations_controller.rb +1 -1
- data/app/controllers/hr_lite/approvals_controller.rb +1 -0
- data/app/controllers/hr_lite/home_controller.rb +2 -11
- data/app/controllers/hr_lite/loans_controller.rb +1 -1
- data/app/controllers/hr_lite/regularization_requests_controller.rb +4 -4
- data/app/controllers/hr_lite/tax_declarations_controller.rb +9 -5
- data/app/helpers/hr_lite/application_helper.rb +34 -9
- data/app/jobs/hr_lite/attendance_close_job.rb +1 -1
- data/app/jobs/hr_lite/payroll_compute_job.rb +12 -0
- data/app/models/concerns/hr_lite/audited.rb +3 -1
- data/app/models/concerns/hr_lite/encrypted_money.rb +8 -5
- data/app/models/hr_lite/attendance_record.rb +21 -4
- data/app/models/hr_lite/comp_off_request.rb +2 -0
- data/app/models/hr_lite/document.rb +1 -1
- data/app/models/hr_lite/expense.rb +3 -0
- data/app/models/hr_lite/hr_request.rb +2 -0
- data/app/models/hr_lite/kudo.rb +2 -2
- data/app/models/hr_lite/leave_request.rb +25 -6
- data/app/models/hr_lite/payroll_line_item.rb +8 -0
- data/app/models/hr_lite/payroll_run.rb +15 -6
- data/app/models/hr_lite/regularization_request.rb +2 -2
- data/app/models/hr_lite/resignation.rb +5 -1
- data/app/models/hr_lite/role.rb +5 -0
- data/app/models/hr_lite/salary_slip.rb +2 -1
- data/app/models/hr_lite/statutory_rate_card_record.rb +6 -0
- data/app/models/hr_lite/tax_declaration.rb +5 -0
- data/app/services/hr_lite/attendance_puncher.rb +4 -0
- data/app/services/hr_lite/overview_query.rb +0 -12
- data/app/services/hr_lite/work_status.rb +5 -2
- data/app/views/hr_lite/admin/assets/index.html.erb +9 -2
- data/app/views/hr_lite/admin/attendances/index.html.erb +4 -4
- data/app/views/hr_lite/admin/attendances/show.html.erb +4 -2
- data/app/views/hr_lite/admin/attendances/summary.html.erb +5 -2
- data/app/views/hr_lite/admin/audit_logs/index.html.erb +6 -4
- data/app/views/hr_lite/admin/benefits/index.html.erb +10 -4
- data/app/views/hr_lite/admin/ca_reviews/index.html.erb +3 -3
- data/app/views/hr_lite/admin/checklists/index.html.erb +3 -3
- data/app/views/hr_lite/admin/comp_off_requests/index.html.erb +1 -2
- data/app/views/hr_lite/admin/comp_off_requests/show.html.erb +6 -6
- data/app/views/hr_lite/admin/designation_changes/new.html.erb +4 -3
- data/app/views/hr_lite/admin/documents/index.html.erb +9 -4
- data/app/views/hr_lite/admin/documents/show.html.erb +1 -0
- data/app/views/hr_lite/admin/employees/_form.html.erb +12 -5
- data/app/views/hr_lite/admin/employees/show.html.erb +40 -33
- data/app/views/hr_lite/admin/expense_categories/index.html.erb +1 -1
- data/app/views/hr_lite/admin/expenses/index.html.erb +7 -4
- data/app/views/hr_lite/admin/holidays/index.html.erb +7 -5
- data/app/views/hr_lite/admin/hr_requests/index.html.erb +3 -3
- data/app/views/hr_lite/admin/hr_requests/show.html.erb +5 -4
- data/app/views/hr_lite/admin/leave_balances/index.html.erb +6 -4
- data/app/views/hr_lite/admin/leave_requests/index.html.erb +1 -2
- data/app/views/hr_lite/admin/leave_requests/show.html.erb +6 -4
- data/app/views/hr_lite/admin/leave_types/edit.html.erb +4 -4
- data/app/views/hr_lite/admin/leave_types/index.html.erb +5 -5
- data/app/views/hr_lite/admin/loans/index.html.erb +1 -1
- data/app/views/hr_lite/admin/loans/new.html.erb +1 -1
- data/app/views/hr_lite/admin/loans/show.html.erb +8 -12
- data/app/views/hr_lite/admin/office_locations/edit.html.erb +4 -4
- data/app/views/hr_lite/admin/office_locations/index.html.erb +1 -1
- data/app/views/hr_lite/admin/overview/index.html.erb +10 -31
- data/app/views/hr_lite/admin/payroll_line_items/new.html.erb +2 -1
- data/app/views/hr_lite/admin/payroll_runs/index.html.erb +3 -3
- data/app/views/hr_lite/admin/payroll_runs/show.html.erb +15 -10
- data/app/views/hr_lite/admin/performance_plans/_form.html.erb +2 -1
- data/app/views/hr_lite/admin/policies/index.html.erb +2 -2
- data/app/views/hr_lite/admin/policies/new.html.erb +4 -3
- data/app/views/hr_lite/admin/regularization_requests/index.html.erb +3 -4
- data/app/views/hr_lite/admin/regularization_requests/show.html.erb +5 -6
- data/app/views/hr_lite/admin/reports/index.html.erb +3 -6
- data/app/views/hr_lite/admin/reports/show.html.erb +16 -2
- data/app/views/hr_lite/admin/roles/_form.html.erb +8 -6
- data/app/views/hr_lite/admin/roles/edit.html.erb +4 -2
- data/app/views/hr_lite/admin/roles/index.html.erb +1 -1
- data/app/views/hr_lite/admin/salary_slips/show.html.erb +3 -2
- data/app/views/hr_lite/admin/salary_structures/_form.html.erb +1 -0
- data/app/views/hr_lite/admin/settings/edit.html.erb +5 -1
- data/app/views/hr_lite/admin/statutory_rate_cards/_form.html.erb +14 -10
- data/app/views/hr_lite/admin/statutory_rate_cards/index.html.erb +3 -1
- data/app/views/hr_lite/admin/tax_declarations/index.html.erb +1 -1
- data/app/views/hr_lite/admin/tax_declarations/show.html.erb +8 -4
- data/app/views/hr_lite/admin/wfh_requests/index.html.erb +17 -16
- data/app/views/hr_lite/admin/wfh_requests/show.html.erb +3 -5
- data/app/views/hr_lite/admin/work_locations/index.html.erb +1 -1
- data/app/views/hr_lite/admin/work_modes/index.html.erb +1 -1
- data/app/views/hr_lite/approvals/index.html.erb +5 -4
- data/app/views/hr_lite/attendance/_custom_status.html.erb +7 -9
- data/app/views/hr_lite/attendance/_month_grid.html.erb +9 -9
- data/app/views/hr_lite/attendance/_penalties.html.erb +2 -2
- data/app/views/hr_lite/attendance/_punch_card.html.erb +10 -4
- data/app/views/hr_lite/attendance/_slot.html.erb +9 -6
- data/app/views/hr_lite/attendance/_trail.html.erb +1 -1
- data/app/views/hr_lite/attendance/_work_mode.html.erb +1 -1
- data/app/views/hr_lite/attendance/show.html.erb +7 -5
- data/app/views/hr_lite/calendar/show.html.erb +2 -2
- data/app/views/hr_lite/comp_off_requests/index.html.erb +1 -1
- data/app/views/hr_lite/comp_off_requests/new.html.erb +1 -1
- data/app/views/hr_lite/documents/_upload_form.html.erb +1 -1
- data/app/views/hr_lite/employee_profiles/show.html.erb +4 -2
- data/app/views/hr_lite/home/index.html.erb +6 -5
- data/app/views/hr_lite/id_cards/show.html.erb +5 -1
- data/app/views/hr_lite/leave_requests/_balance_chips.html.erb +3 -2
- data/app/views/hr_lite/leave_requests/new.html.erb +17 -8
- data/app/views/hr_lite/leave_requests/show.html.erb +2 -0
- data/app/views/hr_lite/loans/index.html.erb +1 -1
- data/app/views/hr_lite/org/show.html.erb +1 -1
- data/app/views/hr_lite/regularization_requests/index.html.erb +7 -7
- data/app/views/hr_lite/regularization_requests/new.html.erb +7 -5
- data/app/views/hr_lite/resignations/show.html.erb +2 -1
- data/app/views/hr_lite/salary_slips/_slip_detail.html.erb +7 -7
- data/app/views/hr_lite/salary_slips/pdf.html.erb +2 -1
- data/app/views/hr_lite/tax/_computation.html.erb +1 -1
- data/app/views/hr_lite/tax_declarations/show.html.erb +4 -4
- data/app/views/hr_lite/team/show.html.erb +8 -7
- data/app/views/hr_lite/timelines/show.html.erb +1 -0
- data/app/views/hr_lite/wfh_requests/index.html.erb +3 -3
- data/app/views/hr_lite/work_time/_bars.html.erb +5 -4
- data/app/views/hr_lite/work_time/_donut.html.erb +1 -1
- data/app/views/hr_lite/work_time/_report.html.erb +14 -8
- data/app/views/layouts/hr_lite/application.html.erb +1 -0
- data/app/views/layouts/hr_lite/mailer.html.erb +10 -2
- data/app/views/layouts/hr_lite/mailer.text.erb +4 -1
- data/config/routes.rb +1 -1
- data/lib/hr_lite/amount_in_words.rb +7 -5
- data/lib/hr_lite/notifications.rb +5 -2
- data/lib/hr_lite/statutory_seeds.rb +1 -1
- data/lib/hr_lite/version.rb +1 -1
- metadata +2 -1
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
<% content_for(:page_title) { @profile.employee_code } %>
|
|
2
2
|
<% content_for(:tabrow) { render "hr_lite/shared/person_tabs", user: @profile.user } %>
|
|
3
|
+
<% content_for(:back, "Employees") %>
|
|
4
|
+
<% own = @profile.user_id == hr_current_user.id # your own pay and record are for someone else to change %>
|
|
3
5
|
<div class="hrl-page__head">
|
|
4
6
|
<h1 class="hrl-page__title"><%= hr_display_name(@profile.user) %> <span class="hrl-muted">(<%= @profile.employee_code %>)</span></h1>
|
|
5
7
|
<div class="hrl-page__actions">
|
|
8
|
+
<% unless own %>
|
|
6
9
|
<a class="hrl-btn" href="<%= hr_lite.edit_admin_employee_path(@profile) %>">Edit</a>
|
|
7
|
-
<%# Their records are the tabs above; the HR actions fold into one
|
|
10
|
+
<%# Their records are the tabs above; the HR actions fold into one More actions button. %>
|
|
8
11
|
<% if hr_superadmin? || hr_can?("salary.manage", scope: :all) %>
|
|
9
12
|
<details>
|
|
10
|
-
<summary class="hrl-btn">
|
|
13
|
+
<summary class="hrl-btn">More actions (appraisal, designation change, PIP, salary)</summary>
|
|
11
14
|
<div class="hrl-row">
|
|
12
15
|
<% if hr_superadmin? %>
|
|
13
16
|
<a class="hrl-btn" href="<%= hr_lite.new_admin_employee_appraisal_path(@profile) %>">New appraisal</a>
|
|
14
|
-
<a class="hrl-btn" href="<%= hr_lite.new_admin_employee_designation_change_path(@profile) %>">
|
|
17
|
+
<a class="hrl-btn" href="<%= hr_lite.new_admin_employee_designation_change_path(@profile) %>">Designation change</a>
|
|
15
18
|
<a class="hrl-btn" href="<%= hr_lite.new_admin_performance_plan_path(user_id: @profile.user_id) %>">Start PIP</a>
|
|
16
19
|
<% end %>
|
|
17
20
|
<% if hr_can?("salary.manage", scope: :all) %>
|
|
@@ -20,6 +23,7 @@
|
|
|
20
23
|
</div>
|
|
21
24
|
</details>
|
|
22
25
|
<% end %>
|
|
26
|
+
<% end %>
|
|
23
27
|
</div>
|
|
24
28
|
</div>
|
|
25
29
|
|
|
@@ -30,7 +34,8 @@
|
|
|
30
34
|
<dt>Proposed last day</dt><dd><%= @pending_resignation.proposed_last_day.strftime("%d %B %Y") %></dd>
|
|
31
35
|
<% if @pending_resignation.reason.present? %><dt>Reason</dt><dd><%= @pending_resignation.reason %></dd><% end %>
|
|
32
36
|
</dl>
|
|
33
|
-
<%= form_with url: hr_lite.accept_admin_resignation_path(@pending_resignation), method: :post, local: true
|
|
37
|
+
<%= form_with url: hr_lite.accept_admin_resignation_path(@pending_resignation), method: :post, local: true,
|
|
38
|
+
data: { turbo_confirm: "Accept #{hr_display_name(@profile.user)}'s resignation? Payroll and attendance end on the last day you set." } do %>
|
|
34
39
|
<div class="hrl-field">
|
|
35
40
|
<label for="res_last_day">Confirm last working day</label>
|
|
36
41
|
<input type="date" id="res_last_day" name="last_day" class="hrl-input"
|
|
@@ -47,34 +52,6 @@
|
|
|
47
52
|
</section>
|
|
48
53
|
<% end %>
|
|
49
54
|
|
|
50
|
-
<%# Stays on the page after an exit date is stamped. Accepting a resignation
|
|
51
|
-
stamps one, and hiding this card at that moment removed the only control
|
|
52
|
-
that revokes sign-in — during the notice period, when it is needed. %>
|
|
53
|
-
<section class="hrl-card">
|
|
54
|
-
<h2 class="hrl-card__title"><%= @profile.date_of_exit ? "Revoke access" : "Offboard" %></h2>
|
|
55
|
-
<% if @profile.date_of_exit %>
|
|
56
|
-
<p class="hrl-small hrl-muted">Last day is <%= @profile.date_of_exit.strftime("%d %b %Y") %> —
|
|
57
|
-
attendance and payroll already clip to it. Run this on or after that day to revoke
|
|
58
|
-
sign-in. Records are never deleted.</p>
|
|
59
|
-
<% else %>
|
|
60
|
-
<p class="hrl-small hrl-muted">Stamps the last day (attendance and payroll clip to it) and revokes sign-in.
|
|
61
|
-
Records are never deleted.</p>
|
|
62
|
-
<% end %>
|
|
63
|
-
<%= form_with url: hr_lite.offboard_admin_employee_path(@profile), method: :post, local: true,
|
|
64
|
-
html: { data: { turbo_confirm: "Offboard #{hr_display_name(@profile.user)}?" } } do %>
|
|
65
|
-
<div class="hrl-field">
|
|
66
|
-
<label for="off_date">Last working day</label>
|
|
67
|
-
<input type="date" id="off_date" name="date_of_exit" class="hrl-input"
|
|
68
|
-
value="<%= @profile.date_of_exit || Date.current %>">
|
|
69
|
-
</div>
|
|
70
|
-
<div class="hrl-form-actions">
|
|
71
|
-
<button class="hrl-btn hrl-btn--danger" type="submit">
|
|
72
|
-
<%= @profile.date_of_exit ? "Revoke access now" : "Offboard employee" %>
|
|
73
|
-
</button>
|
|
74
|
-
</div>
|
|
75
|
-
<% end %>
|
|
76
|
-
</section>
|
|
77
|
-
|
|
78
55
|
<div class="hrl-grid hrl-grid--2">
|
|
79
56
|
<section class="hrl-card">
|
|
80
57
|
<h2 class="hrl-card__title">Profile</h2>
|
|
@@ -106,7 +83,7 @@
|
|
|
106
83
|
<td data-label="Effective"><%= structure.effective_from.strftime("%b %Y") %></td>
|
|
107
84
|
<td data-label="Basic" class="hrl-num"><%= hrl_money(structure.basic) %></td>
|
|
108
85
|
<td data-label="Gross" class="hrl-num"><%= hrl_money(structure.monthly_gross) %></td>
|
|
109
|
-
<td data-label=""
|
|
86
|
+
<td data-label=""><% unless own %><a class="hrl-btn" href="<%= hr_lite.edit_admin_employee_salary_structure_path(@profile, structure) %>">Edit</a><% end %></td>
|
|
110
87
|
</tr>
|
|
111
88
|
<% end %>
|
|
112
89
|
</tbody>
|
|
@@ -145,3 +122,33 @@
|
|
|
145
122
|
<% end %>
|
|
146
123
|
</section>
|
|
147
124
|
<% end %>
|
|
125
|
+
|
|
126
|
+
<%# Stays on the page after an exit date is stamped. Accepting a resignation
|
|
127
|
+
stamps one, and hiding this card at that moment removed the only control
|
|
128
|
+
that revokes sign-in — during the notice period, when it is needed. %>
|
|
129
|
+
<% unless own %>
|
|
130
|
+
<section class="hrl-card">
|
|
131
|
+
<h2 class="hrl-card__title"><%= @profile.date_of_exit ? "Revoke access" : "Offboard" %></h2>
|
|
132
|
+
<% if @profile.date_of_exit %>
|
|
133
|
+
<p class="hrl-small hrl-muted">Last day is <%= @profile.date_of_exit.strftime("%d %b %Y") %> —
|
|
134
|
+
attendance and payroll already clip to it. Run this on or after that day to revoke
|
|
135
|
+
sign-in. Records are never deleted.</p>
|
|
136
|
+
<% else %>
|
|
137
|
+
<p class="hrl-small hrl-muted">Stamps the last day (attendance and payroll clip to it) and revokes sign-in.
|
|
138
|
+
Records are never deleted.</p>
|
|
139
|
+
<% end %>
|
|
140
|
+
<%= form_with url: hr_lite.offboard_admin_employee_path(@profile), method: :post, local: true,
|
|
141
|
+
html: { data: { turbo_confirm: "Offboard #{hr_display_name(@profile.user)}?" } } do %>
|
|
142
|
+
<div class="hrl-field">
|
|
143
|
+
<label for="off_date">Last working day</label>
|
|
144
|
+
<input type="date" id="off_date" name="date_of_exit" class="hrl-input"
|
|
145
|
+
value="<%= @profile.date_of_exit || Date.current %>">
|
|
146
|
+
</div>
|
|
147
|
+
<div class="hrl-form-actions">
|
|
148
|
+
<button class="hrl-btn hrl-btn--danger" type="submit">
|
|
149
|
+
<%= @profile.date_of_exit ? "Revoke access now" : "Offboard employee" %>
|
|
150
|
+
</button>
|
|
151
|
+
</div>
|
|
152
|
+
<% end %>
|
|
153
|
+
</section>
|
|
154
|
+
<% end %>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<td data-label="Monthly cap" class="hrl-num"><%= category.uncapped? ? "No cap" : hrl_money(category.monthly_cap) %></td>
|
|
19
19
|
<td data-label="Receipt"><%= category.receipt_required ? "Required" : "Optional" %></td>
|
|
20
20
|
<td data-label="Active"><%= category.active ? "Yes" : "No" %></td>
|
|
21
|
-
<td data-label=""><a class="hrl-
|
|
21
|
+
<td data-label=""><a class="hrl-btn" href="<%= hr_lite.edit_admin_expense_category_path(category) %>">Edit</a></td>
|
|
22
22
|
</tr>
|
|
23
23
|
<% end %>
|
|
24
24
|
</tbody>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<section class="hrl-card">
|
|
5
5
|
<div class="hrl-row">
|
|
6
6
|
<% HrLite::Expense::STATUSES.each do |status| %>
|
|
7
|
-
<a class="hrl-btn <%= "
|
|
7
|
+
<a class="hrl-btn" <%= "aria-current=true" if status == @status %>
|
|
8
8
|
href="<%= hr_lite.admin_expenses_path(status: status) %>"><%= status.humanize %></a>
|
|
9
9
|
<% end %>
|
|
10
10
|
</div>
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
<div class="hrl-small hrl-muted">
|
|
27
27
|
<%= expense.description %> · <%= expense.spent_on.strftime("%d %b %Y") %>
|
|
28
28
|
</div>
|
|
29
|
+
<% if expense.receipt.attached? %><a class="hrl-card__link" href="<%= hr_lite.receipt_admin_expense_path(expense) %>">Open receipt</a><% end %>
|
|
29
30
|
</td>
|
|
30
31
|
<td data-label="Amount" class="hrl-num"><%= hrl_money(expense.amount) %></td>
|
|
31
32
|
<td data-label="">
|
|
@@ -33,13 +34,15 @@
|
|
|
33
34
|
<%= form_with url: hr_lite.approve_admin_expense_path(expense), method: :post do %>
|
|
34
35
|
<%= submit_tag "Approve", class: "hrl-btn hrl-btn--primary" %>
|
|
35
36
|
<% end %>
|
|
36
|
-
<%= form_with url: hr_lite.reject_admin_expense_path(expense), method: :post do %>
|
|
37
|
-
<%=
|
|
37
|
+
<%= form_with url: hr_lite.reject_admin_expense_path(expense), method: :post, class: "hrl-row hrl-mt" do %>
|
|
38
|
+
<%= label_tag "reject-expense-#{expense.id}", "Reason to reject", class: "hrl-sr-only" %>
|
|
39
|
+
<%= text_field_tag :decision_note, nil, id: "reject-expense-#{expense.id}", placeholder: "Reason to reject", required: true, class: "hrl-input" %>
|
|
38
40
|
<%= submit_tag "Reject", class: "hrl-btn" %>
|
|
39
41
|
<% end %>
|
|
40
42
|
<% elsif expense.approved? %>
|
|
41
43
|
<%= form_with url: hr_lite.reimburse_admin_expense_path(expense), method: :post do %>
|
|
42
|
-
<%=
|
|
44
|
+
<%= label_tag "reimburse-month-#{expense.id}", "Paid with the payroll of", class: "hrl-sr-only" %>
|
|
45
|
+
<%= month_field_tag :period_month, Date.current.strftime("%Y-%m"), id: "reimburse-month-#{expense.id}", required: true, class: "hrl-input" %>
|
|
43
46
|
<%= submit_tag "Mark reimbursed", class: "hrl-btn" %>
|
|
44
47
|
<% end %>
|
|
45
48
|
<% end %>
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
<div class="hrl-page__head">
|
|
3
3
|
<h1 class="hrl-page__title">Holidays <%= @year %></h1>
|
|
4
4
|
<div class="hrl-page__actions">
|
|
5
|
-
<a class="hrl-btn" href="
|
|
6
|
-
<a class="hrl-btn" href="<%= hr_lite.admin_holidays_path(year: @year
|
|
5
|
+
<a class="hrl-btn hrl-btn--primary" href="#add-holiday">Add a holiday</a>
|
|
6
|
+
<a class="hrl-btn" href="<%= hr_lite.admin_holidays_path(year: @year - 1) %>">‹ <%= @year - 1 %></a>
|
|
7
|
+
<a class="hrl-btn" href="<%= hr_lite.admin_holidays_path(year: @year + 1) %>"><%= @year + 1 %> ›</a>
|
|
7
8
|
</div>
|
|
8
9
|
</div>
|
|
9
10
|
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
</section>
|
|
36
37
|
|
|
37
38
|
<div class="hrl-grid hrl-grid--2">
|
|
38
|
-
<section class="hrl-card">
|
|
39
|
+
<section class="hrl-card" id="add-holiday">
|
|
39
40
|
<h2 class="hrl-card__title">Add one</h2>
|
|
40
41
|
<%= form_with model: @holiday, url: hr_lite.admin_holidays_path, local: true do |f| %>
|
|
41
42
|
<div class="hrl-field"><%= f.label :date %><%= f.date_field :date %></div>
|
|
@@ -58,10 +59,11 @@
|
|
|
58
59
|
<%= select_tag :office_location_id, options_for_select(@offices), include_blank: "All offices", id: "bulk-office", data: { hrl_filter: ("Type an office" if @offices.size > 5) } %></div>
|
|
59
60
|
<% end %>
|
|
60
61
|
<div class="hrl-field">
|
|
61
|
-
<
|
|
62
|
+
<label for="bulk-lines">One holiday a line: date, name</label>
|
|
63
|
+
<textarea name="lines" id="bulk-lines" class="hrl-input" rows="6" placeholder="2026-11-09, Diwali 2026-03-04, Holi"></textarea>
|
|
62
64
|
</div>
|
|
63
65
|
<div class="hrl-form-actions">
|
|
64
|
-
<button type="submit" class="hrl-btn
|
|
66
|
+
<button type="submit" class="hrl-btn">Add all</button>
|
|
65
67
|
</div>
|
|
66
68
|
<% end %>
|
|
67
69
|
</section>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<section class="hrl-card">
|
|
5
5
|
<div class="hrl-row">
|
|
6
6
|
<% HrLite::HrRequest::STATUSES.each do |status| %>
|
|
7
|
-
<a class="hrl-btn <%= "
|
|
7
|
+
<a class="hrl-btn" <%= "aria-current=true" if status == @status %>
|
|
8
8
|
href="<%= hr_lite.admin_hr_requests_path(status: status) %>"><%= status.humanize %></a>
|
|
9
9
|
<% end %>
|
|
10
10
|
</div>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<% @requests.each do |request| %>
|
|
22
22
|
<tr>
|
|
23
23
|
<td data-label="Request">
|
|
24
|
-
<a href="<%= hr_lite.admin_hr_request_path(request) %>"><%= request.subject %></a>
|
|
24
|
+
<a class="hrl-card__link" href="<%= hr_lite.admin_hr_request_path(request) %>"><%= request.subject %></a>
|
|
25
25
|
<div class="hrl-small hrl-muted"><%= request.category_label %></div>
|
|
26
26
|
</td>
|
|
27
27
|
<td data-label="Who"><%= hr_display_name(request.user) %></td>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<%= request.assigned_to ? hr_display_name(request.assigned_to) : "—" %>
|
|
30
30
|
</td>
|
|
31
31
|
<td data-label="">
|
|
32
|
-
<a class="hrl-
|
|
32
|
+
<a class="hrl-btn" href="<%= hr_lite.admin_hr_request_path(request) %>">Open</a>
|
|
33
33
|
</td>
|
|
34
34
|
</tr>
|
|
35
35
|
<% end %>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<section class="hrl-card">
|
|
5
5
|
<p class="hrl-small hrl-muted">
|
|
6
6
|
<%= @request.category_label %> · <%= hr_display_name(@request.user) %> ·
|
|
7
|
-
<%= @request.created_at.to_date.strftime("%d %b %Y") %>
|
|
7
|
+
<%= @request.created_at.to_date.strftime("%d %b %Y") %>
|
|
8
8
|
<%= hrl_request_status_badge(@request.status) %>
|
|
9
9
|
</p>
|
|
10
10
|
<% if @request.category == "id_card" %>
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
<h2 class="hrl-card__title">Answer</h2>
|
|
21
21
|
<%= form_with url: hr_lite.resolve_admin_hr_request_path(@request), method: :post do %>
|
|
22
22
|
<div class="hrl-field">
|
|
23
|
-
<%= label_tag :resolution, "
|
|
24
|
-
<%= text_area_tag :resolution, nil, rows: 4 %>
|
|
23
|
+
<%= label_tag :resolution, "Answer to #{hr_display_name(@request.user)}" %>
|
|
24
|
+
<%= text_area_tag :resolution, nil, rows: 4, required: true %>
|
|
25
25
|
</div>
|
|
26
26
|
<div class="hrl-form-actions">
|
|
27
27
|
<%= submit_tag "Send answer", class: "hrl-btn hrl-btn--primary" %>
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
<%= label_tag :assignee_id, "Or hand it to somebody" %>
|
|
34
34
|
<%= select_tag :assignee_id,
|
|
35
35
|
options_for_select(HrLite.users_holding("hr_request.manage")
|
|
36
|
-
.map { |u| [ hr_display_name(u), u.id ] })
|
|
36
|
+
.map { |u| [ hr_display_name(u), u.id ] }),
|
|
37
|
+
include_blank: "Choose…", required: true, data: { hrl_filter: "Type a name to filter" } %>
|
|
37
38
|
</div>
|
|
38
39
|
<div class="hrl-form-actions">
|
|
39
40
|
<%= submit_tag "Assign", class: "hrl-btn" %>
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
<tr>
|
|
15
15
|
<td data-label="Employee"><%= hr_display_name(employee) %><% if @no_joining_date.include?(employee.id) %><br><span class="hrl-badge hrl-badge--bad">No joining date — no leave accrues</span><% end %></td>
|
|
16
16
|
<% @types.each do |type| %>
|
|
17
|
-
<% balance = HrLite::LeaveBalance.for(employee, type, @year) %>
|
|
18
|
-
<td data-label="<%= type.code %>" class="hrl-num"><span><strong><%= hrl_days(
|
|
17
|
+
<% balance = HrLite::LeaveBalance.for(employee, type, @year); used = balance.used; entitled = balance.entitled # each once: both query %>
|
|
18
|
+
<td data-label="<%= type.code %>" class="hrl-num"><span><strong><%= hrl_days(entitled - used) %></strong> left<br><span class="hrl-small hrl-muted"><%= hrl_days(used) %>/<%= hrl_days(entitled) %> used</span><% if (held = balance.penalty_days).positive? %><br><span class="hrl-small"><%= hrl_days(held) %> held for penalties</span><% end %></span></td>
|
|
19
19
|
<% end %>
|
|
20
20
|
</tr>
|
|
21
21
|
<% end %>
|
|
@@ -28,10 +28,12 @@
|
|
|
28
28
|
<section class="hrl-card">
|
|
29
29
|
<h2 class="hrl-card__title">Adjust a balance</h2>
|
|
30
30
|
<p class="hrl-small hrl-muted">Positive credits (comp-off), negative debits. Fully audited.</p>
|
|
31
|
-
<%= form_with url: hr_lite.adjust_admin_leave_balances_path, method: :post, local: true
|
|
31
|
+
<%= form_with url: hr_lite.adjust_admin_leave_balances_path, method: :post, local: true,
|
|
32
|
+
data: { turbo_confirm: "Change this leave balance? It shows on the person's leave at once." } do %>
|
|
32
33
|
<div class="hrl-field">
|
|
33
34
|
<label for="adj_user">Employee</label>
|
|
34
|
-
<select name="user_id" id="adj_user" class="hrl-input">
|
|
35
|
+
<select name="user_id" id="adj_user" class="hrl-input" required data-hrl-filter="Type a name to filter">
|
|
36
|
+
<option value="">Choose…</option>
|
|
35
37
|
<% @employees.each do |employee| %>
|
|
36
38
|
<option value="<%= employee.id %>"><%= hr_display_name(employee) %></option>
|
|
37
39
|
<% end %>
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<div class="hrl-row hrl-row--mb">
|
|
10
10
|
<% HrLite::LeaveRequest::STATUSES.each do |status| %>
|
|
11
|
-
|
|
12
|
-
href="<%= hr_lite.admin_leave_requests_path(status: status) %>"><%= status.humanize %></a>
|
|
11
|
+
<%= link_to status.humanize, hr_lite.admin_leave_requests_path(status: status), class: "hrl-btn", aria: { current: ("true" if @status == status) } %>
|
|
13
12
|
<% end %>
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<% if @request.reason.present? %><dt>Reason</dt><dd><%= @request.reason %></dd><% end %>
|
|
16
16
|
<% unless @request.leave_type.unlimited? %>
|
|
17
17
|
<dt>Balance</dt>
|
|
18
|
-
<dd><%= hrl_days(@balance.available) %> of <%= hrl_days(@balance.entitled) %> available</dd>
|
|
18
|
+
<dd><%= hrl_days(@balance.available(as_of: @request.start_date)) %> of <%= hrl_days(@balance.entitled(as_of: @request.start_date)) %> available</dd>
|
|
19
19
|
<% if (@request.pending? || @request.approved?) && (short = @request.days_beyond_balance).positive? %>
|
|
20
20
|
<dt>Loss of pay</dt><dd><%= hrl_days(short) %> day(s) beyond the balance will be unpaid</dd>
|
|
21
21
|
<% end %>
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
<%# Approve and reject are two separate forms on purpose. Rails binds the
|
|
61
61
|
CSRF token to the form's OWN action, so one form retargeted with
|
|
62
62
|
`formaction:` can never pass verification on the second endpoint. %>
|
|
63
|
-
<%= form_with url: hr_lite.approve_admin_leave_request_path(@request), method: :post, local: true
|
|
63
|
+
<%= form_with url: hr_lite.approve_admin_leave_request_path(@request), method: :post, local: true,
|
|
64
|
+
html: { data: { turbo_confirm: "Approve #{hr_display_name(@request.user)}'s leave, #{@request.date_range_label}?" } } do %>
|
|
64
65
|
<div class="hrl-field">
|
|
65
66
|
<label for="approve_note">Note (optional)</label>
|
|
66
67
|
<textarea name="decision_note" id="approve_note" class="hrl-input"></textarea>
|
|
@@ -73,10 +74,11 @@
|
|
|
73
74
|
|
|
74
75
|
<section class="hrl-card">
|
|
75
76
|
<h2 class="hrl-card__title">Reject</h2>
|
|
76
|
-
<%= form_with url: hr_lite.reject_admin_leave_request_path(@request), method: :post, local: true
|
|
77
|
+
<%= form_with url: hr_lite.reject_admin_leave_request_path(@request), method: :post, local: true,
|
|
78
|
+
html: { data: { turbo_confirm: "Reject #{hr_display_name(@request.user)}'s leave, #{@request.date_range_label}?" } } do %>
|
|
77
79
|
<div class="hrl-field">
|
|
78
80
|
<label for="reject_note">Reason (required)</label>
|
|
79
|
-
<textarea name="decision_note" id="reject_note" class="hrl-input"></textarea>
|
|
81
|
+
<textarea name="decision_note" id="reject_note" class="hrl-input" required></textarea>
|
|
80
82
|
</div>
|
|
81
83
|
<div class="hrl-form-actions">
|
|
82
84
|
<button class="hrl-btn hrl-btn--danger" type="submit">Reject</button>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<% content_for(:page_title) { "Edit leave type" } %>
|
|
2
2
|
<div class="hrl-page__head">
|
|
3
3
|
<h1 class="hrl-page__title">Edit <%= @leave_type.name %></h1>
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
</div>
|
|
5
|
+
<%= render "form", leave_type: @leave_type, url: hr_lite.admin_leave_type_path(@leave_type), method: :patch %>
|
|
6
|
+
<div class="hrl-row hrl-mt">
|
|
7
|
+
<%= button_to "Delete", hr_lite.admin_leave_type_path(@leave_type), method: :delete,
|
|
6
8
|
class: "hrl-btn hrl-btn--danger",
|
|
7
9
|
form: { data: { turbo_confirm: "Delete this leave type?" } } %>
|
|
8
|
-
</div>
|
|
9
10
|
</div>
|
|
10
|
-
<%= render "form", leave_type: @leave_type, url: hr_lite.admin_leave_type_path(@leave_type), method: :patch %>
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
<% @leave_types.each do |type| %>
|
|
15
15
|
<tr>
|
|
16
16
|
<td data-label="Type">
|
|
17
|
-
<span class="hrl-badge" style="
|
|
17
|
+
<span class="hrl-badge hrl-badge--type" style="--hrl-type: <%= type.color %>"><%= type.code %></span>
|
|
18
18
|
<%= type.name %>
|
|
19
19
|
<% unless type.active %><span class="hrl-badge hrl-badge--muted">Inactive</span><% end %>
|
|
20
20
|
</td>
|
|
21
|
-
<td data-label="Quota" class="hrl-num"><%= type.unlimited? ? "Unlimited" : type.annual_quota
|
|
21
|
+
<td data-label="Quota" class="hrl-num"><%= type.unlimited? ? "Unlimited" : "#{hrl_days(type.annual_quota)} days" %></td>
|
|
22
22
|
<td data-label="Accrual"><%= type.accrual.humanize %></td>
|
|
23
|
-
<td data-label="Carry cap" class="hrl-num"><%= type.carry_forward_cap.
|
|
23
|
+
<td data-label="Carry cap" class="hrl-num"><%= type.carry_forward_cap ? "#{hrl_days(type.carry_forward_cap)} days" : "—" %></td>
|
|
24
24
|
<td data-label="Paid"><%= type.paid ? "Yes" : "No" %></td>
|
|
25
25
|
<td data-label="">
|
|
26
|
-
<a class="hrl-
|
|
26
|
+
<a class="hrl-btn" href="<%= hr_lite.edit_admin_leave_type_path(type) %>">Edit</a>
|
|
27
27
|
</td>
|
|
28
28
|
</tr>
|
|
29
29
|
<% end %>
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
<a class="hrl-btn" href="<%= hr_lite.admin_office_locations_path %>">Office locations</a>
|
|
37
37
|
<a class="hrl-btn" href="<%= hr_lite.admin_holidays_path %>">Holidays</a>
|
|
38
38
|
<a class="hrl-btn" href="<%= hr_lite.admin_expense_categories_path %>">Expense categories</a>
|
|
39
|
-
<a class="hrl-btn" href="<%= hr_lite.edit_admin_setting_path %>">
|
|
39
|
+
<a class="hrl-btn" href="<%= hr_lite.edit_admin_setting_path %>">HR settings</a>
|
|
40
40
|
</div>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<p>Outstanding across every active loan: <strong><%= hrl_money(@outstanding) %></strong></p>
|
|
11
11
|
<div class="hrl-row">
|
|
12
12
|
<% HrLite::Loan::STATUSES.each do |status| %>
|
|
13
|
-
<a class="hrl-btn <%= "
|
|
13
|
+
<a class="hrl-btn" <%= "aria-current=true" if @status == status %>
|
|
14
14
|
href="<%= hr_lite.admin_loans_path(status: status) %>"><%= status.humanize %></a>
|
|
15
15
|
<% end %>
|
|
16
16
|
</div>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<%= f.label :user_id, "Employee" %>
|
|
14
14
|
<%= f.select :user_id, options_for_select(HrLite.employees.map { |u| [ hr_display_name(u), u.id ] },
|
|
15
15
|
@loan.user_id),
|
|
16
|
-
{}, data: { hrl_filter: "Type a name to filter" } %>
|
|
16
|
+
{ include_blank: "Choose…" }, required: true, data: { hrl_filter: "Type a name to filter" } %>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="hrl-field">
|
|
19
19
|
<%= f.label :principal, "Amount lent (₹)" %>
|
|
@@ -4,18 +4,14 @@
|
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
6
|
<section class="hrl-card">
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<% if @loan.reason.present? %><tr><td data-label="Reason"><%= @loan.reason %></td></tr><% end %>
|
|
16
|
-
</tbody>
|
|
17
|
-
</table>
|
|
18
|
-
</div>
|
|
7
|
+
<dl class="hrl-deflist">
|
|
8
|
+
<dt>Status</dt><dd><%= @loan.status.humanize %></dd>
|
|
9
|
+
<dt>Monthly instalment</dt><dd><%= hrl_money(@loan.monthly_instalment) %></dd>
|
|
10
|
+
<dt>Starts</dt><dd><%= @loan.starts_on.strftime("%b %Y") %></dd>
|
|
11
|
+
<dt>Repaid</dt><dd><%= hrl_money(@loan.repaid) %></dd>
|
|
12
|
+
<dt>Outstanding</dt><dd><strong><%= hrl_money(@loan.outstanding) %></strong></dd>
|
|
13
|
+
<% if @loan.reason.present? %><dt>Reason</dt><dd><%= @loan.reason %></dd><% end %>
|
|
14
|
+
</dl>
|
|
19
15
|
|
|
20
16
|
<% if @loan.active? %>
|
|
21
17
|
<div class="hrl-row">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<% content_for(:page_title) { "Edit office" } %>
|
|
2
2
|
<div class="hrl-page__head">
|
|
3
3
|
<h1 class="hrl-page__title">Edit <%= @office_location.name %></h1>
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
</div>
|
|
5
|
+
<%= render "form", office_location: @office_location, url: hr_lite.admin_office_location_path(@office_location), method: :patch %>
|
|
6
|
+
<div class="hrl-row hrl-mt">
|
|
7
|
+
<%= button_to "Delete", hr_lite.admin_office_location_path(@office_location), method: :delete,
|
|
6
8
|
class: "hrl-btn hrl-btn--danger",
|
|
7
9
|
form: { data: { turbo_confirm: "Remove this office?" } } %>
|
|
8
|
-
</div>
|
|
9
10
|
</div>
|
|
10
|
-
<%= render "form", office_location: @office_location, url: hr_lite.admin_office_location_path(@office_location), method: :patch %>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<td data-label="Coordinates"><%= office.lat %>, <%= office.lng %></td>
|
|
19
19
|
<td data-label="Radius" class="hrl-num"><%= office.radius_m %> m</td>
|
|
20
20
|
<td data-label="Active"><%= office.active ? "Yes" : "No" %></td>
|
|
21
|
-
<td data-label=""><a class="hrl-
|
|
21
|
+
<td data-label=""><a class="hrl-btn" href="<%= hr_lite.edit_admin_office_location_path(office) %>">Edit</a></td>
|
|
22
22
|
</tr>
|
|
23
23
|
<% end %>
|
|
24
24
|
</tbody>
|
|
@@ -3,50 +3,29 @@
|
|
|
3
3
|
<h1 class="hrl-page__title">HR overview</h1>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
|
+
<%# The Inbox badge's count and rows, so the board never counts what the Inbox hides. %>
|
|
7
|
+
<% pending = hrl_inbox_count %>
|
|
6
8
|
<div class="hrl-kpis">
|
|
7
|
-
<div class="hrl-kpi"><div class="hrl-kpi__value"><%=
|
|
9
|
+
<div class="hrl-kpi"><div class="hrl-kpi__value"><%= pending %></div><div class="hrl-kpi__label">Pending approvals</div></div>
|
|
8
10
|
<div class="hrl-kpi"><div class="hrl-kpi__value"><%= @kpis[:on_leave] %></div><div class="hrl-kpi__label">On leave today</div></div>
|
|
9
11
|
<div class="hrl-kpi"><div class="hrl-kpi__value"><%= @kpis[:flagged] %></div><div class="hrl-kpi__label">Flagged punches</div></div>
|
|
10
12
|
<div class="hrl-kpi"><div class="hrl-kpi__value"><%= @kpis[:missing_checkout] %></div><div class="hrl-kpi__label">Missing checkouts</div></div>
|
|
11
13
|
</div>
|
|
12
14
|
|
|
13
|
-
<% if @
|
|
15
|
+
<% if pending.zero? && @kpis.except(:pending).values.all?(&:zero?) %>
|
|
14
16
|
<p class="hrl-card hrl-card--empty">All present and accounted for.</p>
|
|
15
17
|
<% else %>
|
|
16
|
-
<% if
|
|
18
|
+
<% if pending.positive? %>
|
|
17
19
|
<section class="hrl-card">
|
|
18
20
|
<h2 class="hrl-card__title">Pending approvals</h2>
|
|
19
|
-
<%
|
|
21
|
+
<% hrl_inbox_rows(HrLite::Admin::OverviewController::SECTION_CAP).each do |tab, request| %>
|
|
22
|
+
<% what, href = hrl_inbox_item(tab, request) %>
|
|
20
23
|
<div class="hrl-feed__item">
|
|
21
|
-
<div class="hrl-feed__body">
|
|
22
|
-
|
|
23
|
-
— <%= request.leave_type.name %>, <%= request.date_range_label %> (<%= hrl_days(request.days_count) %> d)
|
|
24
|
-
</div>
|
|
25
|
-
<a class="hrl-btn" href="<%= hr_lite.admin_leave_request_path(request) %>">Decide</a>
|
|
26
|
-
</div>
|
|
27
|
-
<% end %>
|
|
28
|
-
<%# Comp-off and regularization are approvals too. Listing leave alone
|
|
29
|
-
left both queues invisible on the board that exists to surface work. %>
|
|
30
|
-
<% @query.pending_comp_offs.limit(HrLite::Admin::OverviewController::SECTION_CAP).each do |request| %>
|
|
31
|
-
<div class="hrl-feed__item">
|
|
32
|
-
<div class="hrl-feed__body">
|
|
33
|
-
<strong><%= hr_display_name(request.user) %></strong>
|
|
34
|
-
— comp-off for <%= request.date_worked.strftime("%d %b") %>
|
|
35
|
-
(<%= hrl_days(request.credit_days) %> d)
|
|
36
|
-
</div>
|
|
37
|
-
<a class="hrl-btn" href="<%= hr_lite.admin_comp_off_request_path(request) %>">Decide</a>
|
|
38
|
-
</div>
|
|
39
|
-
<% end %>
|
|
40
|
-
<% @query.pending_regularizations.limit(HrLite::Admin::OverviewController::SECTION_CAP).each do |request| %>
|
|
41
|
-
<div class="hrl-feed__item">
|
|
42
|
-
<div class="hrl-feed__body">
|
|
43
|
-
<strong><%= hr_display_name(request.user) %></strong>
|
|
44
|
-
— attendance fix for <%= request.date.strftime("%d %b") %>
|
|
45
|
-
</div>
|
|
46
|
-
<a class="hrl-btn" href="<%= hr_lite.admin_regularization_request_path(request) %>">Decide</a>
|
|
24
|
+
<div class="hrl-feed__body"><strong><%= hr_display_name(request.user) %></strong> — <%= what %></div>
|
|
25
|
+
<a class="hrl-btn" href="<%= href %>">Decide</a>
|
|
47
26
|
</div>
|
|
48
27
|
<% end %>
|
|
49
|
-
<a class="hrl-card__link" href="<%= hr_lite.
|
|
28
|
+
<a class="hrl-card__link" href="<%= hr_lite.approvals_path %>">All requests</a>
|
|
50
29
|
</section>
|
|
51
30
|
<% end %>
|
|
52
31
|
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
<div class="hrl-field">
|
|
14
14
|
<%= f.label :user_id, "Employee" %>
|
|
15
15
|
<%= f.select :user_id, options_for_select(HrLite.employees.map { |u| [ hr_display_name(u), u.id ] },
|
|
16
|
-
@item.user_id)
|
|
16
|
+
@item.user_id),
|
|
17
|
+
{ include_blank: "Choose…" }, required: true, data: { hrl_filter: "Type a name to filter" } %>
|
|
17
18
|
</div>
|
|
18
19
|
<div class="hrl-field">
|
|
19
20
|
<%= f.label :component_id, "Item" %>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="hrl-page__head">
|
|
3
3
|
<h1 class="hrl-page__title">Payroll runs</h1>
|
|
4
4
|
<div class="hrl-page__actions">
|
|
5
|
-
|
|
5
|
+
<% if hr_can?("payroll.manage", scope: :all) %><a class="hrl-btn hrl-btn--primary" href="<%= hr_lite.new_admin_payroll_run_path %>">New run</a><% end %>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
@@ -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
|
|
13
|
+
<thead><tr><th>Period</th><th>Status</th><th>Slips</th><th>Net payout</th><th></th></tr></thead>
|
|
14
14
|
<tbody>
|
|
15
15
|
<% @runs.each do |run| %>
|
|
16
16
|
<tr>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<span class="hrl-badge <%= { "published" => "hrl-badge--ok", "finalized" => "hrl-badge--warn", "draft" => "hrl-badge--muted" }[run.status] %>"><%= run.status.humanize %></span>
|
|
20
20
|
</td>
|
|
21
21
|
<td data-label="Slips" class="hrl-num"><%= run.salary_slips.size %></td>
|
|
22
|
-
<td data-label="Net
|
|
22
|
+
<td data-label="Net payout" class="hrl-num"><%= hrl_money(run.total_net) %></td>
|
|
23
23
|
<td data-label=""><a class="hrl-btn" href="<%= hr_lite.admin_payroll_run_path(run) %>">Open</a></td>
|
|
24
24
|
</tr>
|
|
25
25
|
<% end %>
|