{% extends '_include/base.html.twig' %} {% set currency = display_currency() %} {% block title %}HR Management{% endblock %} {% block content %}

HR Management Dashboard

Pending Absences

{{ stats.pending_absences ?? 0 }}

Active Suspensions

{{ stats.active_suspensions ?? 0 }}

Ongoing Trainings

{{ stats.ongoing_trainings ?? 0 }}

Pending Advances

{{ stats.pending_advances ?? 0 }}



Recent Absence Requests

{% if recent_absences is defined and recent_absences|length > 0 %}
{% for absence in recent_absences %} {% endfor %}
Employee Type Duration Status Action
{{ absence.employee.firstName }} {{ absence.employee.lastName }} {{ absence.type }} {{ absence.startDate|date('m/d') }} - {{ absence.endDate|date('m/d') }} {% if absence.isApproved is null %} Pending {% elseif absence.isApproved %} Approved {% else %} Rejected {% endif %} {% if absence.isApproved is null %} {% endif %}
{% else %}

No recent absence requests

{% endif %}

Upcoming Trainings

{% if upcoming_trainings is defined and upcoming_trainings|length > 0 %}
{% for training in upcoming_trainings %} {% endfor %}
Program Start Date Participants Status Action
{{ training.title }} {{ training.startDate|date('Y-m-d') }} {{ training.enrollments|length }} {{ training.isActive ? 'Active' : 'Inactive' }}
{% else %}

No upcoming trainings

{% endif %}

Recent Advance Requests

{% if recent_advances is defined and recent_advances|length > 0 %}
{% for advance in recent_advances %} {% endfor %}
Employee Amount Date Status Action
{{ advance.employee.firstName }} {{ advance.employee.lastName }} {{ advance.amount|format_currency(currency) }} {{ advance.requestDate|date('Y-m-d') }} {% if advance.isApproved is null %} Pending {% elseif advance.isApproved %} Approved {% else %} Rejected {% endif %} {% if advance.isApproved is null %} {% endif %}
{% else %}

No recent advance requests

{% endif %}

Active Suspensions

{% if active_suspensions is defined and active_suspensions|length > 0 %}
{% for suspension in active_suspensions %} {% endfor %}
Employee Reason Period Type Action
{{ suspension.employee.firstName }} {{ suspension.employee.lastName }} {{ suspension.reason|slice(0, 30) }}{% if suspension.reason|length > 30 %}...{% endif %} {{ suspension.startDate|date('m/d') }} - {{ suspension.endDate|date('m/d') }} {{ suspension.isPaid ? 'Paid' : 'Unpaid' }}
{% else %}

No active suspensions

{% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}