cmtracker/templates/internal/staff/cases/staff-cases.html.twig
2025-02-10 16:18:53 -05:00

62 lines
2.1 KiB
Twig

{% extends 'base.html.twig' %}
{% block body %}
{{ block('nav', 'internal/libs/nav.html.twig') }}
<main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
{{ block('topnav', 'internal/libs/top-nav.html.twig') }}
<div class='container-fluid py-2'>
<div class='row'>
<div class='ms-3'>
<h3 class='mb-0 h4 font-weight-bolder'>Staff Cases</h3>
<p class='mb-4'></p>
</div>
{% for c in cases %}
{% set latestNote = c.getStaffNotes()[0] %}
{% set status = '#ff0000' %}
{% set symbol = 'cancel' %}
{% if latestNote.getWorkerSignDatetime() %}
{% set status = '#00ff00' %}
{% set symbol = 'check_circle' %}
{% elseif latestNote.getSupervisorSignDateTime() %}
{% set status = '#ffff00' %}
{% set symbol = 'warning' %}
{% endif %}
<div class='col-xl-3 col-sm-6 mb-xl-0 mb-4'>
<div class='card'>
<div class='card-header p-2 ps-3'>
<div class='d-flex justify-content-between'>
<div>
<h4 class='mb-0'>{{ c.caseName }}</h4>
<p class='text-sm mb-0 text-capitalize'>
<a href='tel:'></a>
</p>
</div>
<div class="icon icon-md icon-shape bg-gradient-dark shadow-dark shadow text-center border-radius-lg">
<i class="material-symbols-rounded opacity-10">weekend</i>
</div>
</div>
</div>
<hr class='dark horizontal my-0'>
<div class='card-footer p-2 ps-3'>
<p class='mb-0 text-sm'>
<span class='text-info' style='color:{{ status }} !important;'>
</span>
</p>
<p class='mb-0 text-sm'>
<span class='text-info font-weight-bolder'>
<a href='{{ path('app_staff_list_notes', {staffId: staffId, caseId: c.id}) }}'>Staff Notes</a>
<span class='material-symbols-rounded opacity-7' style='color:{{ status }}' title='Last Note: {{ latestNote.date|date('M j, Y') }}'>
{{ symbol }}
</span>
</span>
</p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</main>
{% endblock %}