Add case twig templates and update referral source

This commit is contained in:
Ryan Prather 2024-12-07 22:44:20 -05:00
parent 6df0aec578
commit 0a4a0e2e75
4 changed files with 369 additions and 3 deletions

View File

@ -0,0 +1,153 @@
{% 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">Case Info</h4>
<p class="mb-0"></p>
</div>
<div class="card-body">
<div class="container">
{{ form_errors(form) }}
{{ form_start(form) }}
<div class="row">
<div class='col'>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_caseNumber' class='form-label'>Case #</label>
<input type='text' name='{{ field_name(form.caseNumber) }}' id='case_form_caseNumber' class='form-control' required='required'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_dcsCaseId' class='form-label'>DCS Case ID</label>
<input type='text' name='{{ field_name(form.dcsCaseId) }}' id='case_form_dcsCaseId' class='form-control' required='required'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_admitDate' class='form-label'>Admit Date</label>
<input type='date' name='{{ field_name(form.admitDate) }}' id='case_form_admitDate' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_closeDate' class='form-label'>Close Date</label>
<input type='date' name='{{ field_name(form.closeDate) }}' id='case_form_closeDate' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_caseEmail' class='form-label'>Case Email</label>
<input type='text' name='{{ field_name(form.caseEmail) }}' id='case_form_caseEmail' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_referralType' class='form-label'>Referral Type</label>
<input type='text' name='{{ field_name(form.referralType) }}' id='case_form_referralType' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_level' class='form-label'>Level</label>
<select name='{{ field_name(form.level) }}' id='case_form_level' class='form-control'>
<option value=''></option>
{% for l in enum('App\\Enums\\CaseLevel').cases() %}
<option value='{{ l.value }}'>{{ l.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_referralSource' class='form-label'>Referral Source</label>
<select name='{{ field_name(form.referralSource) }}' id='case_form_referralSource' class='form-control'>
<option value=''></option>
{% for src in sources %}
<option value='{{ src.id }}'>{{ src.name}}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_referralSources2' class='form-label'>2nd Referral Source</label>
<select name='{{ field_name(form.referralSource2) }}' id='case_form_referralSources2' class='form-control'>
<option value=''></option>
{% for src in sources %}
<option value='{{ src.id }}'>{{ src.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class='col'>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_firstName' class='form-label'>First Name</label>
<input type='text' name='{{ field_name(form.firstName) }}' id='case_form_firstName' class='form-control' required='required'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_lastName' class='form-label'>Last Name</label>
<input type='text' name='{{ field_name(form.lastName) }}' id='case_form_lastName' class='form-control' required='required'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_address' class='form-label'>Address</label>
<input type='text' name='{{ field_name(form.address) }}' id='case_form_address' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_address2' class='form-label'>Address 2</label>
<input type='text' name='{{ field_name(form.address2) }}' id='case_form_address2' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_city' class='form-label'>City</label>
<input type='text' name='{{ field_name(form.city) }}' id='case_form_city' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_state' class='form-label'>State</label>
<input type='text' name='{{ field_name(form.state) }}' id='case_form_state' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_zip' class='form-label'>Zip</label>
<input type='text' name='{{ field_name(form.zip) }}' id='case_form_zip' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_county' class='form-label'>County</label>
<select name='{{ field_name(form.county) }}' id='case_form_county' class='form-control'>
<option value=''></option>
{% for c in enum('App\\Enums\\County').cases() %}
<option value='{{ c.value }}'>{{ c.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_insurance' class='form-label'>Insurance</label>
<input type='text' name='{{ field_name(form.insurance) }}' id='case_form_insurance' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_medicaid' class='form-label'>Medicaid</label>
<input type='text' name='{{ field_name(form.medicaid) }}' id='case_form_medicaid' class='form-control'/>
</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 Case</button>
</div>
</div>
{{ form_end(form) }}
</div>
</div>
</div>
</section>
</main>
{% endblock %}

View File

@ -0,0 +1,48 @@
{% 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='page-header min-vh-100'>
<div class='container'>
<div class="row">
<div class="col-6 d-lg-flex d-none h-100 my-auto pe-0 position-absolute top-0 start-0 text-center justify-content-center flex-column">
<div class="position-relative bg-gradient-primary h-100 m-3 px-7 border-radius-lg d-flex flex-column justify-content-center" style="background-image: url('/assets/img/illustrations/illustration-signup.jpg'); background-size: cover;"></div>
</div>
<div class='col-xl-4 col-lg-5 col-md-7 d-flex flex-column ms-auto me-auto ms-lg-auto me-lg-5'>
<div class="card card-plain">
<div class="card-header">
<h4 class="font-weight-bolder">Assign Case Worker</h4>
</div>
<div class="card-body">
{{ form_errors(form) }}
{{ form_start(form) }}
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='user_form_caseWorker' class='form-label'>Case Worker</label>
<select name='{{ field_name(form.user) }}' id='user_form_caseWorker' class='form-control'>
<option value=''></option>
{% for w in caseWorkers %}
{% set selected = (w.id == assignedWorkerId) %}
<option value='{{ w.id }}' {% if selected %} selected="true" {% endif %}>{{ w.name }}</option>
{% endfor %}
</select>
</div>
<div class="text-center">
<button type="submit" class="btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0">Assign Case Worker</button>
</div>
{{ form_end(form) }}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
{% endblock %}

View File

@ -0,0 +1,168 @@
{% 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">Case Info</h4>
<p class="mb-0"></p>
</div>
<div class="card-body">
<div class="container">
{{ form_errors(form) }}
{{ form_start(form) }}
<div class="row">
<div class='col'>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_caseNumber' class='form-label'>Case #</label>
<input type='text' name='{{ field_name(form.caseNumber) }}' id='case_form_caseNumber' value='{{ case.caseNumber }}' class='form-control' required='required'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_dcsCaseId' class='form-label'>DCS Case ID</label>
<input type='text' name='{{ field_name(form.dcsCaseId) }}' id='case_form_dcsCaseId' value='{{ case.dcsCaseId }}' class='form-control' required='required'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_admitDate' class='form-label'>Admit Date</label>
<input type='date' name='{{ field_name(form.admitDate) }}' id='case_form_admitDate' value='{{ case.admitDate|date('Y-m-d') }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3{% if case.closeDate %} is-filled{% endif %}'>
<label for='case_form_closeDate' class='form-label'>Close Date</label>
<input type='date' name='{{ field_name(form.closeDate) }}' id='case_form_closeDate' value='{% if case.closeDate %}{{ case.closeDate|date('Y-m-d') }}{% endif %}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='case_form_caseEmail' class='form-label'>Case Email</label>
<input type='text' name='{{ field_name(form.caseEmail) }}' id='case_form_caseEmail' value='{{ case.caseEmail }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_referralType' class='form-label'>Referral Type</label>
<input type='text' name='{{ field_name(form.referralType) }}' id='case_form_referralType' value='{{ case.referralType }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_level' class='form-label'>Level</label>
<select name='{{ field_name(form.level) }}' id='case_form_level' class='form-control'>
<option value=''></option>
{% for l in enum('App\\Enums\\CaseLevel').cases() %}
{% set selected="" %}
{% if case.level.value == l.value %}
{% set selected=" selected='selected" %}
{% endif %}
<option value='{{ l.value }}' {{ selected }}>{{ l.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_referralSource' class='form-label'>Referral Source</label>
<select name='{{ field_name(form.referralSource) }}' id='case_form_referralSource' class='form-control'>
<option value=''></option>
{% for src in sources %}
{% set selected="" %}
{% if case.referralSource.id == src.id %}
{% set selected=" selected='selected'" %}
{% endif %}
<option value='{{ src.id }}' {{ selected }}>{{ src.name}}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3 {% if case.referralSource2 %}is-filled{% endif %}'>
<label for='case_form_referralSources2' class='form-label'>2nd Referral Source</label>
<select name='{{ field_name(form.referralSource2) }}' id='case_form_referralSources2' class='form-control'>
<option value=''></option>
{% for src in sources %}
{% set selected="" %}
{% if case.referralSource2 and case.referralSource2.id == src.id %}
{% set selected=" selected='selected'" %}
{% endif %}
<option value='{{ src.id }}' {{ selected }}>{{ src.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class='col'>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_firstName' class='form-label'>First Name</label>
<input type='text' name='{{ field_name(form.firstName) }}' id='case_form_firstName' value='{{ case.firstName }}' class='form-control' required='required'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_lastName' class='form-label'>Last Name</label>
<input type='text' name='{{ field_name(form.lastName) }}' id='case_form_lastName' value='{{ case.lastName }}' class='form-control' required='required'/>
</div>
<div class='input-group input-group-outline mb-3{% if case.address %} is-filled{% endif %}'>
<label for='case_form_address' class='form-label'>Address</label>
<input type='text' name='{{ field_name(form.address) }}' id='case_form_address' value='{{ case.address }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3{% if case.address2 %} is-filled{% endif %}'>
<label for='case_form_address2' class='form-label'>Address 2</label>
<input type='text' name='{{ field_name(form.address2) }}' id='case_form_address2' value='{{ case.address2 }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3{% if case.city %} is-filled{% endif %}'>
<label for='case_form_city' class='form-label'>City</label>
<input type='text' name='{{ field_name(form.city) }}' id='case_form_city' value='{{ case.city }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3{% if case.state %} is-filled{% endif %}'>
<label for='case_form_state' class='form-label'>State</label>
<input type='text' name='{{ field_name(form.state) }}' id='case_form_state' value='{{ case.state }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3{% if case.zip %} is-filled{% endif %}'>
<label for='case_form_zip' class='form-label'>Zip</label>
<input type='text' name='{{ field_name(form.zip) }}' id='case_form_zip' value='{{ case.zip }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='case_form_county' class='form-label'>County</label>
<select name='{{ field_name(form.county) }}' id='case_form_county' class='form-control'>
<option value=''></option>
{% for c in enum('App\\Enums\\County').cases() %}
{% set selected="" %}
{% if case.county.value %}
{% set selected=" selected='selected'" %}
{% endif %}
<option value='{{ c.value }}' {{ selected }}>{{ c.name }}</option>
{% endfor %}
</select>
</div>
<div class='input-group input-group-outline mb-3{% if case.insurance %} is-filled{% endif %}'>
<label for='case_form_insurance' class='form-label'>Insurance</label>
<input type='text' name='{{ field_name(form.insurance) }}' id='case_form_insurance' value='{{ case.insurance }}' class='form-control'/>
</div>
<div class='input-group input-group-outline mb-3{% if case.medicaid %} is-filled{% endif %}'>
<label for='case_form_medicaid' class='form-label'>Medicaid</label>
<input type='text' name='{{ field_name(form.medicaid) }}' id='case_form_medicaid' value='{{ case.medicaid }}' class='form-control'/>
</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">Update Case</button>
</div>
</div>
{{ form_end(form) }}
</div>
</div>
</div>
</section>
</main>
{% endblock %}

View File

@ -40,9 +40,6 @@
<tr> <tr>
<td> <td>
<div class='d-flex px-2 py-1'> <div class='d-flex px-2 py-1'>
<div>
<img src='' class='avatar avatar-sm me-3 border-radius-large' alt='{{ src.name }}'>
</div>
<div class='d-flex flex-column justify-content-center'> <div class='d-flex flex-column justify-content-center'>
<h6 class='mb-0 text-small'>{{ src.name }}</h6> <h6 class='mb-0 text-small'>{{ src.name }}</h6>
<p class='text-xs text-secondary mb-0'> <p class='text-xs text-secondary mb-0'>