cmtracker/templates/internal/cases/notes/list-notes.html.twig

83 lines
3.2 KiB
Twig
Raw Normal View History

{% 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="col-12">
<div class="card my-4">
<div class="card-header p-0 position-relative mt-n4 mx-3 z-index-2">
<div class="d-flex justify-content-between bg-gradient-dark shadow-dark border-radius-lg pt-4 pb-3 ps-3 p-2">
<div>
<h6 class="text-white text-capitalize ps-3">Referral Note List</h6>
</div>
<div>
<select id='referralList' onchange='filterNotes()'>
<option value=''>-- Select Referral --</option>
{% for c in cases %}
<optgroup label='{{ c.memberCase.caseName }}'>
{% for r in c.memberCase.referrals %}
<option value='{{ r.id }}'>
{{ r.referralId }}
/
{{ r.serviceCode.value }}
</option>
{% endfor %}
</optgroup>
{% endfor %}
</select>&nbsp;&nbsp;
<button type="button" class="btn btn-block btn-light mb-3" onclick="window.open('/index.php/add-note/'+document.getElementById('referralList').value, '_self')">Add Note</button>
</div>
</div>
</div>
<div class="card-body px-0 pb-2">
<div>
Filter:&nbsp;&nbsp;
<input type='date' id='startDate' onchange='filterNotes()' title='Start Date'/>&nbsp;&nbsp;
<input type='date' id='endDate' onchange='filterNotes()' title='End Date'/>
</div>
<div class="table-responsive p-0">
<table class="table align-items-center mb-0">
<thead>
<tr>
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">DOS</th>
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7 ps-2">Service</th>
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Location</th>
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Method</th>
<th class='text-right text-uppercase text-secondary text-xxs font-weight-bolder opacity-7'>Members Present</th>
<th class="text-secondary opacity-7"></th>
</tr>
</thead>
<tbody id='note-list'>
{% for note in notes %}
{% set members = note.getMembers() %}
<tr>
<td>
{{ note.date|date('M j, Y') }}<br/>
{{ note.startTime|date('g:i a') }}-{{ note.endTime|date('g:i a') }}
</td>
<td>{{ note.referral.serviceCode.value }}</td>
<td class='text-center'>{{ note.location.value }}</td>
<td>{{ note.method.name|replace({'_': ' '})|lower|capitalize }}</td>
<td>
{{ dump(members) }}
</td>
<td></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
{% endblock %}