{# djlint:off #}
$('#sidebar .sidebar-status-icon').remove();
$('#sidebar .sidebar-status-occupancy').remove();
{% for tool in tool_summary %}
{% if tool.area_requires_reservation %}
$('#tool-{{ tool.id }}').prepend(' ');
{% endif %}
{% if tool.in_use %}
$('#tool-{{ tool.id }}').append('');
{% endif %}
{% if tool.delayed_logoff_in_progress %}
$('#tool-{{ tool.id }}').append('');
{% endif %}
{% if tool.scheduled_outage %}
$('#tool-{{ tool.id }}').append('');
{% elif tool.scheduled_partial_outage %}
$('#tool-{{ tool.id }}').append('');
{% endif %}
{% if tool.required_resource_is_unavailable %}
$('#tool-{{ tool.id }}').append('');
{% elif tool.nonrequired_resource_is_unavailable %}
$('#tool-{{ tool.id }}').append('');
{% endif %}
{% if tool.operational == False %}
$('#tool-{{ tool.id }}').append('');
{% elif tool.problematic == True %}
$('#tool-{{ tool.id }}').append('');
{% endif %}
{% endfor %}
{% for area in area_summary %}
{% if area.scheduled_outage %}
$('#area-{{ area.id }}').append('');
{% endif %}
{% if area.required_resource_is_unavailable %}
$('#area-{{ area.id }}').append('');
{% endif %}
{% if area.maximum_capacity %}
$('#area-{{ area.id }}').append('');
{% if area.occupancy_count >= area.danger_capacity %}
$('#area-{{ area.id }}').append('');
{% elif area.occupancy_count >= area.warning_capacity %}
$('#area-{{ area.id }}').append('');
{% else %}
$('#area-{{ area.id }}').append('');
{% endif %}
{% if area.count_staff_in_occupancy and area.count_service_personnel_in_occupancy %}
$('#area-{{ area.id }}').append('');
{% elif not area.count_staff_in_occupancy and area.count_service_personnel_in_occupancy %}
$('#area-{{ area.id }}').append('');
{% elif not area.count_service_personnel_in_occupancy and area.count_staff_in_occupancy %}
$('#area-{{ area.id }}').append('');
{% else %}
$('#area-{{ area.id }}').append('');
{% endif %}
{% endif %}
{% endfor %}
$('span[data-toggle~="tooltip"]').tooltip({ container: 'body', 'html': true });