Update user templates

This commit is contained in:
Ryan Prather 2024-12-05 01:07:17 -05:00
parent e25eff2d49
commit db01c1296c
3 changed files with 49 additions and 19 deletions

View File

@ -40,13 +40,26 @@
<input type="password" name="{{ field_name(form.password) }}" id='user_form_password' placeholder="" class="form-control" required="required"/>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='user_form_job' class='form-label'>Job</label>
<select name='{{ field_name(form.job) }}' id='user_form_job' class='form-control'>
<option value=''></option>
{% for jt in enum('App\\Enums\\JobType').cases() %}
<option value='{{ jt.value }}'>{{ jt.name }}</option>
{% endfor %}
</select>
<div class='row justify-content-center flex-column'>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.caseWorker) }}' id='user_form_job_CASE_WORKER' value='CASE_WORKER'/>
<label for='user_form_job_CASE_WORKER'>Case Worker</label><br/>
</div>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.therapist) }}' id='user_form_job_THERAPIST' value='THERAPIST'/>
<label for='user_form_job_THERAPIST'>Therapist</label><br/>
</div>
</div>
<div class='row justify-content-center flex-column'>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.caseManager) }}' id='user_form_job_CASE_MANAGER' value='CASE_MANAGER'/>
<label for='user_form_job_CASE_MANAGER'>Case Manager</label>
</div>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.su) }}' id='user_form_job_ADMIN' value='THERAPIST'/>
<label for='user_form_job_ADMIN'>Admin</label><br/>
</div>
</div>
</div>
<div class='input-group input-group-outline mb-3'>
<label for='user_form_level' class='form-label'>Level</label>

View File

@ -30,15 +30,27 @@
<label for="user_form_email" class="form-label">Email</label>
<input type="email" name="{{ field_name(form.email) }}" value='{{ field_value(form.email) }}' class="form-control" required="required"/>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='user_form_job' class='form-label'>Job</label>
<select name='{{ field_name(form.job) }}' id='user_form_job' class='form-control'>
<option value=''></option>
{% for j in enum('App\\Enums\\JobType').cases() %}
{% set selected = (j.value == data.job.value) %}
<option value='{{ j.value }}' {% if selected %} selected="true" {% endif %}>{{ j.name }}</option>
{% endfor %}
</select>
<div class='input-group input-group-outline mb-3'>
<div class='row justify-content-center flex-column'>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.caseWorker) }}' id='user_form_job_CASE_WORKER' value='CASE_WORKER' {% if is_granted('ROLE_CASE_WORKER') %} checked="checked" {% endif %}/>
<label for='user_form_job_CASE_WORKER'>Case Worker</label><br/>
</div>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.therapist) }}' id='user_form_job_THERAPIST' value='THERAPIST' {% if is_granted('ROLE_THERAPIST') %} checked="checked" {% endif %}/>
<label for='user_form_job_THERAPIST'>Therapist</label><br/>
</div>
</div>
<div class='row justify-content-center flex-column'>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.caseManager) }}' id='user_form_job_CASE_MANAGER' value='CASE_MANAGER' {% if is_granted('ROLE_CASE_MANAGER') %} checked="checked" {% endif %}/>
<label for='user_form_job_CASE_MANAGER'>Case Manager</label>
</div>
<div class='col'>
<input type='checkbox' name='{{ field_name(form.su) }}' id='user_form_job_ADMIN' value='ADMIN' {% if is_granted('ROLE_ADMIN') %} checked="checked" {% endif %}/>
<label for='user_form_job_ADMIN'>Admin</label><br/>
</div>
</div>
</div>
<div class='input-group input-group-outline mb-3 is-filled'>
<label for='user_form_level' class='form-label'>Level</label>

View File

@ -11,9 +11,14 @@
<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="bg-gradient-dark shadow-dark border-radius-lg pt-4 pb-3">
<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">User List</h6>
</div>
<div>
<button type="button" class="btn btn-block btn-light mb-3" onclick="window.open('/index.php/add-user', '_self')">Add User</button>
</div>
</div>
</div>
<div class="card-body px-0 pb-2">
<div class="table-responsive p-0">
@ -44,7 +49,7 @@
</div>
</td>
<td>
<p class='text-xs font-weight-bold mb-0'>{{ user.job.value|lower|capitalize }}</p>
<p class='text-xs font-weight-bold mb-0'>{{ user.getJobs()|join(', ') }}</p>
</td>
<td class='align-middle text-center text-xs'>
{{ user.userCases|length }}