Completed Referral functionality
This commit is contained in:
@ -40,6 +40,7 @@
|
||||
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">DCS Case ID</th>
|
||||
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Type/Source</th>
|
||||
<th class='text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7'>County</th>
|
||||
<th class='text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7'>Referral Count</th>
|
||||
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Case Worker</th>
|
||||
<th class="text-secondary opacity-7"></th>
|
||||
</tr>
|
||||
@ -69,6 +70,9 @@
|
||||
<td>
|
||||
<p class='text-xs font-weight-bold mb-0'>{{ c.county.value }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class='text-center text-xs font-weight-bold mb-0'>{{ c.referrals|length }}</p>
|
||||
</td>
|
||||
<td class='align-middle text-center text-xs'>
|
||||
<p class='text-xs font-weight-bold mb-0'>
|
||||
{% if c.userCases|length > 0 %}
|
||||
@ -83,7 +87,7 @@
|
||||
<a href='/index.php/assign-case/{{ c.id }}' class='' title='Assign Case Worker' data-toggle='tooltip' data-original-title='Assign Worker'>
|
||||
<i class='material-symbols-rounded opacity-5'>badge</i>
|
||||
</a>
|
||||
<a href='/index.php/add-referral/{{ c.id }}' class='' title='List Referrals' data-toggle='tooltip' data-original-title='Add Referral'>
|
||||
<a href='/index.php/list-referrals/{{ c.id }}' class='' title='List Referrals' data-toggle='tooltip' data-original-title='Add Referral'>
|
||||
<i class='material-symbols-rounded opacity-5'>create_new_folder</i>
|
||||
</a>
|
||||
<a href='/index.php/list-members/{{ c.id }}' class='' title='List Members' data-toggle='tooltip' data-original-title='Add Member'>
|
||||
|
73
templates/internal/cases/referrals/add-referral.html.twig
Normal file
73
templates/internal/cases/referrals/add-referral.html.twig
Normal file
@ -0,0 +1,73 @@
|
||||
{% 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</h4>
|
||||
<p class="mb-0">{{ case.caseName }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container">
|
||||
{{ form_errors(form) }}
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='referral_form_referralId' class='form-label'>Referral ID</label>
|
||||
<input type='text' name='{{ field_name(form.referralId) }}' id='referral_form_referralId' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.serviceCode) }}' id='referral_form_serviceCode' class='form-control'>
|
||||
<option value=''>-- Select Service Code --</option>
|
||||
|
||||
{% for sc in enum('App\\Enums\\ReferralServiceType').cases() %}
|
||||
<option value='{{ sc.value }}'>{{ sc.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='referral_form_hours' class='form-label'>Hours</label>
|
||||
<input type='number' name='{{ field_name(form.hours) }}' id='referral_form_hours' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='referral_form_endDate' class='form-label'></label>
|
||||
<input type='date' name='{{ field_name(form.endDate) }}' id='referral_form_endDate' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.dischargeReason) }}' id='referral_form_dischargeReason' class='form-control'>
|
||||
<option value=''>-- Select Discharge Reason --</option>
|
||||
|
||||
{% for dr in enum('App\\Enums\\DischargeReason').cases() %}
|
||||
<option value='{{ dr.value }}'>{{ dr.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='referral_form_dischargeDate' class='form-label'></label>
|
||||
<input type='date' name='{{ field_name(form.dischargeDate) }}' id='referral_form_dischargeDate' class='form-control'/>
|
||||
</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 Referral</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{% endblock %}
|
73
templates/internal/cases/referrals/edit-referral.html.twig
Normal file
73
templates/internal/cases/referrals/edit-referral.html.twig
Normal file
@ -0,0 +1,73 @@
|
||||
{% 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</h4>
|
||||
<p class="mb-0">{{ case.caseName }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="container">
|
||||
{{ form_errors(form) }}
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='referral_form_referralId' class='form-label'>Referral ID</label>
|
||||
<input type='text' name='{{ field_name(form.referralId) }}' id='referral_form_referralId' value='{{ referral.referralId }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.serviceCode) }}' id='referral_form_serviceCode' class='form-control'>
|
||||
<option value=''>-- Select Service Code --</option>
|
||||
|
||||
{% for sc in enum('App\\Enums\\ReferralServiceType').cases() %}
|
||||
<option value='{{ sc.value }}' {% if referral.serviceCode.value == sc.value %} selected='selected' {% endif %}>{{ sc.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='referral_form_hours' class='form-label'>Hours</label>
|
||||
<input type='number' name='{{ field_name(form.hours) }}' id='referral_form_hours' value='{{ referral.hours }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3 is-filled'>
|
||||
<label for='referral_form_endDate' class='form-label'></label>
|
||||
<input type='date' name='{{ field_name(form.endDate) }}' id='referral_form_endDate' value='{{ referral.endDate|date("Y-m-d") }}' class='form-control'/>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<select name='{{ field_name(form.dischargeReason) }}' id='referral_form_dischargeReason' class='form-control'>
|
||||
<option value=''>-- Select Discharge Reason --</option>
|
||||
|
||||
{% for dr in enum('App\\Enums\\DischargeReason').cases() %}
|
||||
<option value='{{ dr.value }}'>{{ dr.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class='input-group input-group-outline mb-3'>
|
||||
<label for='referral_form_dischargeDate' class='form-label'></label>
|
||||
<input type='date' name='{{ field_name(form.dischargeDate) }}' id='referral_form_dischargeDate' class='form-control'/>
|
||||
</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 Referral</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{% endblock %}
|
123
templates/internal/cases/referrals/list-referrals.html.twig
Normal file
123
templates/internal/cases/referrals/list-referrals.html.twig
Normal file
@ -0,0 +1,123 @@
|
||||
{% 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 List</h6>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-block btn-light mb-3" onclick="window.open('/index.php/add-referral/{{ case.id }}', '_self')">Add Referral</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body px-0 pb-2">
|
||||
<div>
|
||||
Filter:
|
||||
</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">Referral ID</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">Hours Rem</th>
|
||||
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">End Date</th>
|
||||
<th class="text-secondary opacity-7"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in openReferrals %}
|
||||
<tr>
|
||||
<td>
|
||||
<h6 class='mb-0 text-small'>{{ r.referralId }}</h6>
|
||||
</td>
|
||||
<td>
|
||||
<p class='text-xs font-weight-bold mb-0'>{{ r.serviceCode.value }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class='text-xs font-weight-bold mb-0'>{{ r.hours }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class='text-xs font-weight-bold mb-0'>{{ r.endDate|date("F j, Y") }}</p>
|
||||
</td>
|
||||
<td class='align-right'>
|
||||
<a href='/index.php/case/{{ case.id }}/edit-referral/{{ r.id }}' class='' title='Edit Referral' data-toggle='tooltip'>
|
||||
<i class="material-symbols-rounded opacity-5">edit</i>
|
||||
</a>
|
||||
<a href='/index.php/list-notes/{{ r.id }}' class='' title='List Notes' data-toggle='tooltip'>
|
||||
<i class='material-symbols-rounded opacity-5'>edit_note</i>
|
||||
</a>
|
||||
<a href='#' class='' title='Close Referral' data-toggle='tooltip'>
|
||||
<i class='material-symbols-rounded opacity-5'>close</i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tbody>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<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">Closed Referrals</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body px-0 pb-2">
|
||||
<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">Referral ID</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">Discharge Reason</th>
|
||||
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Discharge Date</th>
|
||||
<th class="text-secondary opacity-7"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in closedReferrals %}
|
||||
<tr>
|
||||
<td>
|
||||
<h6 class='mb-0 text-small'>{{ r.referralId }}</h6>
|
||||
</td>
|
||||
<td>
|
||||
<p class='text-xs font-weight-bold mb-0'>{{ r.serviceCode.value }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class='text-xs font-weight-bold mb-0'>{{ r.dischargeReason.value }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class='text-xs font-weight-bold mb-0'>{{ r.dischargeDate|date("F j, Y") }}</p>
|
||||
</td>
|
||||
<td class='align-right'></td>
|
||||
</tr>
|
||||
</td>
|
||||
</tbody>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user