{% extends 'base.html' %} {% block content %}

Leave Policy Configuration

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}
Add New Leave Policy
For a single Apr-Mar annual credit line.

Credit Schedule
Define month-wise or period-wise leave credit lines.
Seq Label From Month To Month Credit Days Credit On Remarks Action
Total Credit from Lines: 0.0
Existing Leave Policies
{% for p in policies %} {% set lines = policy_credit_lines_as_json(p) %} {% else %} {% endfor %}
# Policy Leave Type Role Department Quota Credit Basis Pro-rata Credit Lines Max / Month Max Days RH Limit Join Cutoff Status Action
{{ loop.index }} {{ p.policy_name or '-' }} {{ p.leave_type.name if p.leave_type else '-' }} {{ p.role.name if p.role else 'All' }} {{ p.department.name if p.department else 'All' }} {{ p.annual_quota or '-' }} {{ (p.credit_basis or 'manual')|upper }} {% if p.pro_rata_credit %} Yes {% else %} No {% endif %} {% if lines %} {% else %} No lines {% endif %} {{ p.max_leaves_per_month or '-' }} {{ p.max_consecutive_days or '-' }} {{ p.rh_consecutive_limit or '-' }} {% if p.join_after_cutoff_month %} {{ p.join_after_cutoff_month }}{% if p.join_after_cutoff_day %}/{{ p.join_after_cutoff_day }}{% endif %} {% else %} - {% endif %} {% if p.is_active %} Active {% else %} Inactive {% endif %}
No policies defined.
{% for p in policies %} {% set lines = policy_credit_lines_as_json(p) %} {% endfor %}
{% endblock %}