fix: twig note templates
* fix edit notes and and member present * refactor enum moving process
This commit is contained in:
parent
607ca79c4d
commit
b828333222
@ -55,7 +55,7 @@
|
|||||||
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
||||||
<option value=''>-- Status --</option>
|
<option value=''>-- Status --</option>
|
||||||
|
|
||||||
{% for s in enum('App\\Enums\\NoteStatus').cases() %}
|
{% for s in enum('App\\Enums\\Case\\NoteStatus').cases() %}
|
||||||
<option value='{{ s.value }}'>{{ s.value|capitalize }}</option>
|
<option value='{{ s.value }}'>{{ s.value|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -64,7 +64,7 @@
|
|||||||
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
||||||
<option value=''>-- Location --</option>
|
<option value=''>-- Location --</option>
|
||||||
|
|
||||||
{% for l in enum('App\\Enums\\NoteLocation').cases() %}
|
{% for l in enum('App\\Enums\\Case\\NoteLocation').cases() %}
|
||||||
<option value='{{ l.value }}' {% if l == default_location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
<option value='{{ l.value }}' {% if l == default_location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -73,7 +73,7 @@
|
|||||||
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
||||||
<option value=''>-- Method --</option>
|
<option value=''>-- Method --</option>
|
||||||
|
|
||||||
{% for m in enum('App\\Enums\\NoteMethod').cases() %}
|
{% for m in enum('App\\Enums\\Case\\NoteMethod').cases() %}
|
||||||
<option value='{{ m.value }}' {% if m == default_method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
<option value='{{ m.value }}' {% if m == default_method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -81,11 +81,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class='col'>
|
<div class='col'>
|
||||||
<div class='input-group input-group-outline mb-3'>
|
<div class='input-group input-group-outline mb-3'>
|
||||||
{{ form_row(form.members, {
|
{% for m in members %}
|
||||||
'label': 'Members Present',
|
<div class='row'>
|
||||||
'label_attr': {'class': ''},
|
<input type='checkbox' name='{{ field_name(form.members) }}[]' id='visit_note_form_member_{{ loop.index }}' value='{{ m.id }}' class='member-present'/>
|
||||||
'attr': {'class': 'form-control'}
|
<label for='visit_note_form_member_{{ loop.index }}'>{{ m.name }}</label>
|
||||||
}) }}
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class='input-group input-group-outline mb-3'>
|
<div class='input-group input-group-outline mb-3'>
|
||||||
<label for='case_note_note' class='form-label'>Notes</label>
|
<label for='case_note_note' class='form-label'>Notes</label>
|
||||||
@ -104,4 +105,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
{{ block('right_bar', 'internal/libs/right-bar.html.twig') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block page_js %}
|
||||||
|
<script type='module'>
|
||||||
|
import {default as moment} from "{{ asset('vendor/moment/moment.index.js') }}";
|
||||||
|
import {calcTime} from "{{ asset('js/app/notes.js') }}";
|
||||||
|
window.calcTime = calcTime;
|
||||||
|
window.moment = moment;
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block page_css %}
|
||||||
|
<style type='text/css'>
|
||||||
|
.row>* {
|
||||||
|
width: revert !important;
|
||||||
|
flex-shrink: revert !important;
|
||||||
|
}
|
||||||
|
.member-present {
|
||||||
|
margin-left: var(--bs-gutter-x);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
||||||
<option value=''>-- Status --</option>
|
<option value=''>-- Status --</option>
|
||||||
|
|
||||||
{% for s in enum('App\\Enums\\NoteStatus').cases() %}
|
{% for s in enum('App\\Enums\\Case\\NoteStatus').cases() %}
|
||||||
<option value='{{ s.value }}'>{{ s.value|capitalize }}</option>
|
<option value='{{ s.value }}'>{{ s.value|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -64,7 +64,7 @@
|
|||||||
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
||||||
<option value=''>-- Location --</option>
|
<option value=''>-- Location --</option>
|
||||||
|
|
||||||
{% for l in enum('App\\Enums\\NoteLocation').cases() %}
|
{% for l in enum('App\\Enums\\Case\\NoteLocation').cases() %}
|
||||||
<option value='{{ l.value }}' {% if l == default_location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
<option value='{{ l.value }}' {% if l == default_location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -73,7 +73,7 @@
|
|||||||
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
||||||
<option value=''>-- Method --</option>
|
<option value=''>-- Method --</option>
|
||||||
|
|
||||||
{% for m in enum('App\\Enums\\NoteMethod').cases() %}
|
{% for m in enum('App\\Enums\\Case\\NoteMethod').cases() %}
|
||||||
<option value='{{ m.value }}' {% if m == default_method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
<option value='{{ m.value }}' {% if m == default_method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -85,7 +85,7 @@
|
|||||||
<select name='{{ field_name(form.parentalRole) }}' id='note_form_parentalRole' class='form-control'>
|
<select name='{{ field_name(form.parentalRole) }}' id='note_form_parentalRole' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -97,7 +97,7 @@
|
|||||||
<select name='{{ field_name(form.childDevelopment) }}' id='note_form_childDevelopment' class='form-control'>
|
<select name='{{ field_name(form.childDevelopment) }}' id='note_form_childDevelopment' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -109,7 +109,7 @@
|
|||||||
<select name='{{ field_name(form.appropriateResponse) }}' id='note_form_appropriateResponse' class='form-control'>
|
<select name='{{ field_name(form.appropriateResponse) }}' id='note_form_appropriateResponse' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -121,7 +121,7 @@
|
|||||||
<select name='{{ field_name(form.childAheadOfSelf) }}' id='note_form_childAheadOfSelf' class='form-control'>
|
<select name='{{ field_name(form.childAheadOfSelf) }}' id='note_form_childAheadOfSelf' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<select name='{{ field_name(form.showsEmpathy) }}' id='note_form_showsEmpathy' class='form-control'>
|
<select name='{{ field_name(form.showsEmpathy) }}' id='note_form_showsEmpathy' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -145,7 +145,7 @@
|
|||||||
<select name='{{ field_name(form.childFocused) }}' id='note_form_childFocused' class='form-control'>
|
<select name='{{ field_name(form.childFocused) }}' id='note_form_childFocused' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}'>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -153,11 +153,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class='col'>
|
<div class='col'>
|
||||||
<div class='input-group input-group-outline mb-3'>
|
<div class='input-group input-group-outline mb-3'>
|
||||||
{{ form_row(form.members, {
|
{% for m in members %}
|
||||||
'label': 'Members Present',
|
<div class='row'>
|
||||||
'label_attr': {'class': ''},
|
<input type='checkbox' name='{{ field_name(form.members) }}[]' id='visit_note_form_member_{{ loop.index }}' value='{{ m.id }}' class='member-present'/>
|
||||||
'attr': {'class': 'form-control'}
|
<label for='visit_note_form_member_{{ loop.index }}'>{{ m.name }}</label>
|
||||||
}) }}
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class='input-group input-group-outline mb-3'>
|
<div class='input-group input-group-outline mb-3'>
|
||||||
<label for='note_form_narrative'>Observed Narrative</label>
|
<label for='note_form_narrative'>Observed Narrative</label>
|
||||||
@ -189,3 +190,24 @@
|
|||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block page_js %}
|
||||||
|
<script type='module'>
|
||||||
|
import {default as moment} from "{{ asset('vendor/moment/moment.index.js') }}";
|
||||||
|
import {calcTime} from "{{ asset('js/app/notes.js') }}";
|
||||||
|
window.calcTime = calcTime;
|
||||||
|
window.moment = moment;
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block page_css %}
|
||||||
|
<style type='text/css'>
|
||||||
|
.row>* {
|
||||||
|
width: revert !important;
|
||||||
|
flex-shrink: revert !important;
|
||||||
|
}
|
||||||
|
.member-present {
|
||||||
|
margin-left: var(--bs-gutter-x);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
@ -56,8 +56,8 @@
|
|||||||
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
||||||
<option value=''>-- Status --</option>
|
<option value=''>-- Status --</option>
|
||||||
|
|
||||||
{% for s in enum('App\\Enums\\NoteStatus').cases() %}
|
{% for s in enum('App\\Enums\\Case\\NoteStatus').cases() %}
|
||||||
<option value='{{ s.value }}' {% if s.value == note.status.value %} selected='selected' {% endif %}>{{ s.value|capitalize }}</option>
|
<option value='{{ s.value }}' {% if s == note.status %} selected='selected' {% endif %}>{{ s.value|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -65,8 +65,8 @@
|
|||||||
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
||||||
<option value=''>-- Location --</option>
|
<option value=''>-- Location --</option>
|
||||||
|
|
||||||
{% for l in enum('App\\Enums\\NoteLocation').cases() %}
|
{% for l in enum('App\\Enums\\Case\\NoteLocation').cases() %}
|
||||||
<option value='{{ l.value }}' {% if l.value == note.location.value %} selected='selected' {% endif %}>{{ l.value }}</option>
|
<option value='{{ l.value }}' {% if l == note.location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -74,8 +74,8 @@
|
|||||||
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
||||||
<option value=''>-- Method --</option>
|
<option value=''>-- Method --</option>
|
||||||
|
|
||||||
{% for m in enum('App\\Enums\\NoteMethod').cases() %}
|
{% for m in enum('App\\Enums\\Case\\NoteMethod').cases() %}
|
||||||
<option value='{{ m.value }}' {% if m.value == note.method.value %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
<option value='{{ m.value }}' {% if m == note.method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -86,8 +86,8 @@
|
|||||||
<select name='{{ field_name(form.parentalRole) }}' id='note_form_parentalRole' class='form-control'>
|
<select name='{{ field_name(form.parentalRole) }}' id='note_form_parentalRole' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}' {% if q.value == note.parentalRole.value %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}' {% if q == note.parentalRole %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -98,8 +98,8 @@
|
|||||||
<select name='{{ field_name(form.childDevelopment) }}' id='note_form_childDevelopment' class='form-control'>
|
<select name='{{ field_name(form.childDevelopment) }}' id='note_form_childDevelopment' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}' {% if q.value == note.childDevelopment.value %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}' {% if q == note.childDevelopment %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -110,8 +110,8 @@
|
|||||||
<select name='{{ field_name(form.appropriateResponse) }}' id='note_form_appropriateResponse' class='form-control'>
|
<select name='{{ field_name(form.appropriateResponse) }}' id='note_form_appropriateResponse' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}' {% if q.value == note.appropriateResponse.value %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}' {% if q == note.appropriateResponse %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -122,8 +122,8 @@
|
|||||||
<select name='{{ field_name(form.childAheadOfSelf) }}' id='note_form_childAheadOfSelf' class='form-control'>
|
<select name='{{ field_name(form.childAheadOfSelf) }}' id='note_form_childAheadOfSelf' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}' {% if q.value == note.childAheadOfSelf.value %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}' {% if q == note.childAheadOfSelf %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -134,8 +134,8 @@
|
|||||||
<select name='{{ field_name(form.showsEmpathy) }}' id='note_form_showsEmpathy' class='form-control'>
|
<select name='{{ field_name(form.showsEmpathy) }}' id='note_form_showsEmpathy' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}' {% if q.value == note.showsEmpathy.value %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}' {% if q == note.showsEmpathy %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -146,20 +146,29 @@
|
|||||||
<select name='{{ field_name(form.childFocused) }}' id='note_form_childFocused' class='form-control'>
|
<select name='{{ field_name(form.childFocused) }}' id='note_form_childFocused' class='form-control'>
|
||||||
<option value=''>-- Select --</option>
|
<option value=''>-- Select --</option>
|
||||||
|
|
||||||
{% for q in enum('App\\Enums\\VisitQualityLevel').cases() %}
|
{% for q in enum('App\\Enums\\Case\\VisitQualityLevel').cases() %}
|
||||||
<option value='{{ q.value }}' {% if q.value == note.childFocused.value %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
<option value='{{ q.value }}' {% if q == note.childFocused %} selected='selected' {% endif %}>{{ q.name|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='col'>
|
<div class='col'>
|
||||||
<div class='input-group input-group-outline mb-3'>
|
<div class='input-group input-group-outline mb-3'>
|
||||||
{{ form_row(form.members, {
|
<div>
|
||||||
|
<label>Member Present</label>
|
||||||
|
{% for m in members %}
|
||||||
|
<div class='row'>
|
||||||
|
<input type='checkbox' id='note_form_member_{{ loop.index }}' name='{{ field_name(form.members) }}[]' value='{{ m.id }}' class='member-present' {% if m.isChecked() %} checked='checked' {% endif %}/>
|
||||||
|
<label for='note_form_member_{{ loop.index }}'>{{ m.getName() }}</label>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{# form_row(form.members, {
|
||||||
'label': 'Members Present',
|
'label': 'Members Present',
|
||||||
'label_attr': {'class': ''},
|
'label_attr': {'class': ''},
|
||||||
'attr': {'class': 'form-control'}
|
'attr': {'class': 'form-control'},
|
||||||
|
'help': 'Select each member present during the time'
|
||||||
}) }}
|
}) #}
|
||||||
</div>
|
</div>
|
||||||
<div class='input-group input-group-outline mb-3'>
|
<div class='input-group input-group-outline mb-3'>
|
||||||
<label for='note_form_narrative'>Observed Narrative</label>
|
<label for='note_form_narrative'>Observed Narrative</label>
|
||||||
@ -208,11 +217,8 @@
|
|||||||
{% set endDateWarning = 'bg-gradient-danger text-white' %}
|
{% set endDateWarning = 'bg-gradient-danger text-white' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class='col{% if referral.hours < 40 %} bg-gradient-danger text-white{% endif %}'>
|
<span class='col{% if referral.hours < 40 %} bg-gradient-danger text-white{% endif %}'>
|
||||||
Hours:
|
Hours: {{ referral.hours }} /
|
||||||
{{ referral.hours }}
|
Remaining: {{ referral.getHoursRemaining() }}
|
||||||
/
|
|
||||||
Remaining:
|
|
||||||
{{ referral.getHoursRemaining() }}
|
|
||||||
</span>
|
</span>
|
||||||
<span class='col {{ endDateWarning }}'>
|
<span class='col {{ endDateWarning }}'>
|
||||||
Expiration Date:
|
Expiration Date:
|
||||||
@ -239,7 +245,7 @@
|
|||||||
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
<select name='{{ field_name(form.status) }}' id='note_form_status' class='form-control'>
|
||||||
<option value=''>-- Status --</option>
|
<option value=''>-- Status --</option>
|
||||||
|
|
||||||
{% for s in enum('App\\Enums\\NoteStatus').cases() %}
|
{% for s in enum('App\\Enums\\Case\\NoteStatus').cases() %}
|
||||||
<option value='{{ s.value }}'>{{ s.value|capitalize }}</option>
|
<option value='{{ s.value }}'>{{ s.value|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@ -248,8 +254,8 @@
|
|||||||
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
<select name='{{ field_name(form.location) }}' id='note_form_location' class='form-control'>
|
||||||
<option value=''>-- Location --</option>
|
<option value=''>-- Location --</option>
|
||||||
|
|
||||||
{% for l in enum('App\\Enums\\NoteLocation').cases() %}
|
{% for l in enum('App\\Enums\\Case\\NoteLocation').cases() %}
|
||||||
<option value='{{ l.value }}' {% if l == default_location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
<option value='{{ l.value }}' {% if l == note.location %} selected='selected' {% endif %}>{{ l.value }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -257,19 +263,30 @@
|
|||||||
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
<select name='{{ field_name(form.method) }}' id='note_form_method' class='form-control'>
|
||||||
<option value=''>-- Method --</option>
|
<option value=''>-- Method --</option>
|
||||||
|
|
||||||
{% for m in enum('App\\Enums\\NoteMethod').cases() %}
|
{% for m in enum('App\\Enums\\Case\\NoteMethod').cases() %}
|
||||||
<option value='{{ m.value }}' {% if m == default_method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
<option value='{{ m.value }}' {% if m == note.method %} selected='selected' {% endif %}>{{ m.name|replace({'_': ' '})|lower|capitalize }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='col'>
|
<div class='col'>
|
||||||
<div class='input-group input-group-outline mb-3'>
|
<div class='input-group input-group-outline mb-3'>
|
||||||
{{ form_row(form.members, {
|
<div>
|
||||||
|
<label>Member Present</label>
|
||||||
|
{% for idx,m in members %}
|
||||||
|
<div class='row'>
|
||||||
|
<input type='checkbox' id='note_form_member_{{ idx }}' name='{{ field_name(form.members) }}[]' value='{{ m.id }}' class='member-present' {% if m.isChecked() %} checked='checked' {% endif %}/>
|
||||||
|
<label for='note_form_member_{{ idx }}'>{{ m.name }}</label>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{# form_row(form.members, {
|
||||||
'label': 'Members Present',
|
'label': 'Members Present',
|
||||||
'label_attr': {'class': ''},
|
'label_attr': {'class': ''},
|
||||||
'attr': {'class': 'form-control'}
|
'attr': {'class': 'form-control'},
|
||||||
}) }}
|
'help': 'Select each member present during the time',
|
||||||
|
'value': member.id
|
||||||
|
}) #}
|
||||||
</div>
|
</div>
|
||||||
<div class='input-group input-group-outline mb-3'>
|
<div class='input-group input-group-outline mb-3'>
|
||||||
<label for='case_note_note' class='form-label'>Notes</label>
|
<label for='case_note_note' class='form-label'>Notes</label>
|
||||||
@ -283,10 +300,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ form_end(form) }}
|
{{ form_end(form, {render_rest: false}) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</main>
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block page_js %}
|
||||||
|
<script type='module'>
|
||||||
|
import {* as $} from "{{ asset('vendor/jquery/jquery.index.js') }}";
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block page_css %}
|
||||||
|
<style>
|
||||||
|
.row>* {
|
||||||
|
width: revert !important;
|
||||||
|
flex-shrink: revert !important;
|
||||||
|
}
|
||||||
|
.member-present {
|
||||||
|
margin-left: var(--bs-gutter-x);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
@ -52,19 +52,25 @@
|
|||||||
<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">DOS</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">Location</th>
|
||||||
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Method</th>
|
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Method</th>
|
||||||
|
<th class='text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7'>Members</th>
|
||||||
<th class="text-secondary opacity-7"></th>
|
<th class="text-secondary opacity-7"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id='note-list'>
|
<tbody id='note-list'>
|
||||||
{% if caseNotes %}
|
{% if caseNotes %}
|
||||||
{% for n in caseNotes %}
|
{% for n in caseNotes %}
|
||||||
|
{% set type = 'standard' %}
|
||||||
|
{% if n.referral.serviceCode.value == 'VS-THBB' %}
|
||||||
|
{% set type = 'visit' %}
|
||||||
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ n.date|date("F j, Y", company_timezone) }}<br/>
|
<td>{{ n.date|date("F j, Y", company_timezone) }}<br/>
|
||||||
{{ n.startTime|date("g:i a", company_timezone) }}-{{ n.endTime|date("g:i a", company_timezone) }} ({{ n.calcTimeUsed() }})</td>
|
{{ n.startTime|date("g:i a", company_timezone) }}-{{ n.endTime|date("g:i a", company_timezone) }} ({{ (n.calcTimeUsed() / 60)|number_format(2) }})</td>
|
||||||
<td class='text-center'>{{ n.location.value }}</td>
|
<td class='text-center'>{{ n.location.value }}</td>
|
||||||
<td class='text-center'>{{ n.method.name|lower|replace({"_": " "})|capitalize }}</td>
|
<td class='text-center'>{{ n.method.name|lower|replace({"_": " "})|capitalize }}</td>
|
||||||
|
<td class=''>{% for m in n.members %}{{ m.getName() }}, {% endfor %}</td>
|
||||||
<td style='text-align: right;'>
|
<td style='text-align: right;'>
|
||||||
<a href='/edit-note/{{ n.id }}' class='text-secondary' title='Edit Note'>
|
<a href='{{ path("app_edit_note", {noteType: type, noteId: n.id}) }}' class='text-secondary' title='Edit Note'>
|
||||||
<i class="material-symbols-rounded opacity-5">edit</i>
|
<i class="material-symbols-rounded opacity-5">edit</i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user