Add NoteController and associated templates, entities, repository.
This commit is contained in:
107
templates/internal/cases/notes/add-standard-note.html.twig
Normal file
107
templates/internal/cases/notes/add-standard-note.html.twig
Normal file
@ -0,0 +1,107 @@
|
||||
{% 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') }}
|
||||
|
||||
<section>
|
||||
<div class="card card-plain">
|
||||
<div class="card-header">
|
||||
<h4 class="font-weight-bolder">Add Referral Note</h4>
|
||||
<p class="mb-0">{{ referral.memberCase.caseName }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_start(form) }}
|
||||
{{ form_errors(form) }}
|
||||
<div class='container'>
|
||||
<div class='row'>
|
||||
{% set endDateWarning = '' %}
|
||||
{% if date("+28 days") >= referral.endDate %}
|
||||
{% set endDateWarning = 'bg-gradient-warning' %}
|
||||
{% elseif date("+14 days") >= referral.endDate %}
|
||||
{% set endDateWarning = 'bg-gradient-danger text-white' %}
|
||||
{% endif %}
|
||||
<span class='col{% if referral.hours < 40 %} bg-gradient-danger text-white{% endif %}'>
|
||||
Hours:
|
||||
{{ referral.hours }}
|
||||
/
|
||||
Remaining:
|
||||
{{ referral.getHoursRemaining() }}
|
||||
</span>
|
||||
<span class='col {{ endDateWarning }}'>
|
||||
Expiration Date:
|
||||
{{ referral.endDate|date('M j, Y') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class='row' style='margin-top:10px;'>
|
||||
<div class='col'>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_date'></label>
|
||||
<input type='date' name='{{ field_name(form.date) }}' id='note_form_date' class='form-control' title='Visit Date'/>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_startTime'></label>
|
||||
<input type='time' name='{{ field_name(form.startTime) }}' id='note_form_startTime' onchange='calcTime()' class='form-control' title='Start Time'/>
|
||||
<label for='note_form_endTime'></label>
|
||||
<input type='time' name='{{ field_name(form.endTime) }}' id='note_form_endTime' onchange='calcTime()' class='form-control' title='End Time'/>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<input type='text' id='case-mins' style='width:49%;margin-right:5px;' disabled='disabled' title='Case Minutes'/>
|
||||
<input type='text' id='case-hours' style='width:49%;margin-left:5px;' disabled='disabled' title='Case Hours'/>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
||||
<option value=''>-- Status --</option>
|
||||
|
||||
{% for s in enum('App\\Enums\\NoteStatus').cases() %}
|
||||
<option value='{{ s.value }}'>{{ s.value|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
||||
<option value=''>-- Location --</option>
|
||||
|
||||
{% for l in enum('App\\Enums\\NoteLocation').cases() %}
|
||||
<option value='{{ l.value }}' {% if l == default_location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
||||
<option value=''>-- Method --</option>
|
||||
|
||||
{% for m in enum('App\\Enums\\NoteMethod').cases() %}
|
||||
<option value='{{ m.value }}' {% if m == default_method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col'>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
{{ form_row(form.members, {
|
||||
'label': 'Members Present',
|
||||
'label_attr': {'class': ''},
|
||||
'attr': {'class': 'form-control'}
|
||||
}) }}
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='case_note_note' class='form-label'>Notes</label>
|
||||
<textarea name='{{ field_name(form.note) }}' id='case_note_note' class='form-control' style='width:100%;height:300px;'></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Save Note</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{% endblock %}
|
191
templates/internal/cases/notes/add-visit-note.html.twig
Normal file
191
templates/internal/cases/notes/add-visit-note.html.twig
Normal file
@ -0,0 +1,191 @@
|
||||
{% 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') }}
|
||||
|
||||
<section>
|
||||
<div class="card card-plain">
|
||||
<div class="card-header">
|
||||
<h4 class="font-weight-bolder">Add Referral Note</h4>
|
||||
<p class="mb-0">{{ referral.memberCase.caseName }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_start(form) }}
|
||||
{{ form_errors(form) }}
|
||||
<div class='container'>
|
||||
<div class='row'>
|
||||
{% set endDateWarning = '' %}
|
||||
{% if date("+28 days") >= referral.endDate %}
|
||||
{% set endDateWarning = 'bg-gradient-warning' %}
|
||||
{% elseif date("+14 days") >= referral.endDate %}
|
||||
{% set endDateWarning = 'bg-gradient-danger text-white' %}
|
||||
{% endif %}
|
||||
<span class='col{% if referral.hours < 40 %} bg-gradient-danger text-white{% endif %}'>
|
||||
Hours:
|
||||
{{ referral.hours }}
|
||||
/
|
||||
Remaining:
|
||||
{{ referral.getHoursRemaining() }}
|
||||
</span>
|
||||
<span class='col {{ endDateWarning }}'>
|
||||
Expiration Date:
|
||||
{{ referral.endDate|date('M j, Y') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class='row' style='margin-top:10px;'>
|
||||
<div class='col'>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_date'></label>
|
||||
<input type='date' name='{{ field_name(form.date) }}' id='note_form_date' class='form-control' title='Visit Date'/>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_startTime'></label>
|
||||
<input type='time' name='{{ field_name(form.startTime) }}' id='note_form_startTime' onchange='calcTime()' class='form-control' title='Start Time'/>
|
||||
<label for='note_form_endTime'></label>
|
||||
<input type='time' name='{{ field_name(form.endTime) }}' id='note_form_endTime' onchange='calcTime()' class='form-control' title='End Time'/>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<input type='text' id='case-mins' style='width:49%;margin-right:5px;' disabled='disabled' title='Case Minutes'/>
|
||||
<input type='text' id='case-hours' style='width:49%;margin-left:5px;' disabled='disabled' title='Case Hours'/>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
||||
<option value=''>-- Status --</option>
|
||||
|
||||
{% for s in enum('App\\Enums\\NoteStatus').cases() %}
|
||||
<option value='{{ s.value }}'>{{ s.value|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
||||
<option value=''>-- Location --</option>
|
||||
|
||||
{% for l in enum('App\\Enums\\NoteLocation').cases() %}
|
||||
<option value='{{ l.value }}' {% if l == default_location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
||||
<option value=''>-- Method --</option>
|
||||
|
||||
{% for m in enum('App\\Enums\\NoteMethod').cases() %}
|
||||
<option value='{{ m.value }}' {% if m == default_method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_parentalRole'>Parental Role</label>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.parentalRole) }}' id='note_form_parentalRole' class='form-control'>
|
||||
<option value=''>-- Select --</option>
|
||||
|
||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_childDevelopment'>Child Development</label>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.childDevelopment) }}' id='note_form_childDevelopment' class='form-control'>
|
||||
<option value=''>-- Select --</option>
|
||||
|
||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_appropriateResponse'>Appropriate Response</label>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.appropriateResponse) }}' id='note_form_appropriateResponse' class='form-control'>
|
||||
<option value=''>-- Select --</option>
|
||||
|
||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_childAheadOfSelf'>Child Ahead Of Self</label>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.childAheadOfSelf) }}' id='note_form_childAheadOfSelf' class='form-control'>
|
||||
<option value=''>-- Select --</option>
|
||||
|
||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_showsEmpathy'>Shows Empathy</label>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.showsEmpathy) }}' id='note_form_showsEmpathy' class='form-control'>
|
||||
<option value=''>-- Select --</option>
|
||||
|
||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_childFocused'>Child Focused</label>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.childFocused) }}' id='note_form_childFocused' class='form-control'>
|
||||
<option value=''>-- Select --</option>
|
||||
|
||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col'>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
{{ form_row(form.members, {
|
||||
'label': 'Members Present',
|
||||
'label_attr': {'class': ''},
|
||||
'attr': {'class': 'form-control'}
|
||||
}) }}
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_narrative'>Observed Narrative</label>
|
||||
<textarea name='{{ field_name(form.narrative) }}' id='note_form_narrative' class='form-control' style='width:100%;height:200px;'></textarea>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_strengths'>Observed Strengths</label>
|
||||
<textarea name='{{ field_name(form.strengths) }}' id='note_form_strengths' class='form-control' style='width:100%;height:200px;'></textarea>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_issues'>Observed Issues</label>
|
||||
<textarea name='{{ field_name(form.issues) }}' id='note_form_issues' class='form-control' style='width:100%;height:100px;'></textarea>
|
||||
</div>
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='note_form_recommendation'>Recommendation</label>
|
||||
<textarea name='{{ field_name(form.recommendation) }}' id='note_form_recommendation' class='form-control' style='width:100%;height:100px;'></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Save Note</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{% endblock %}
|
0
templates/internal/cases/notes/edit-note.html.twig
Normal file
0
templates/internal/cases/notes/edit-note.html.twig
Normal file
82
templates/internal/cases/notes/list-notes.html.twig
Normal file
82
templates/internal/cases/notes/list-notes.html.twig
Normal file
@ -0,0 +1,82 @@
|
||||
{% 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>
|
||||
<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:
|
||||
<input type='date' id='startDate' onchange='filterNotes()' title='Start Date'/>
|
||||
<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 %}
|
Reference in New Issue
Block a user