cmtracker/templates/internal/staff/staff-dashboard.html.twig

85 lines
3.2 KiB
Twig
Raw Normal View History

{% 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') }}
2024-12-21 20:15:15 -05:00
<div class='container-fluid py-2'>
<div class='row'>
<div class='ms-3'>
<h3 class='mb-0 h4 font-weight-bolder'>Staff Dashboard</h3>
<p class='mb-4'></p>
</div>
{% for s in staff %}
<div class='col-xl-3 col-sm-6 mb-xl-0 mb-4'>
<div class='card'>
<div class='card-header p-2 ps-3'>
<div class='d-flex justify-content-between'>
<div>
<h4 class='mb-0'>{{ s.name }}</h4>
<p class='text-sm mb-0 text-capitalize'>
2025-01-10 10:09:44 -05:00
<a href='mailto:{{ s.email }}'>{{ s.email }}</a><br />
{% if s.workPhone %}<a href='tel:{{ s.workPhone }}'>{{ s.getFormattedPhone() }}</a>{% endif %}
2024-12-21 20:15:15 -05:00
</p>
</div>
<div class="icon icon-md icon-shape bg-gradient-dark shadow-dark shadow text-center border-radius-lg">
<i class="material-symbols-rounded opacity-10">weekend</i>
</div>
</div>
</div>
<hr class='dark horizontal my-0'>
<div class='card-footer p-2 ps-3'>
<p class='mb-0 text-sm'>
2025-01-10 10:09:44 -05:00
<span class='font-weight-bolder'>
<button class='btn btn-primary bg-gradient-dark' onclick='window.location.href="{{ path('app_staff_cases', {staffId: s.id}) }}"'>Staff Cases</button>
<button class='btn btn-primary bg-gradient-dark' id='send-message' data-user-id='{{ s.id }}'>Send Message</button>
2024-12-21 20:15:15 -05:00
</span>
</p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
2025-01-10 10:09:44 -05:00
<div class='modal fade' id='message-modal' tabindex='-1' role='dialog' aria-labelledby='message-modal-title'>
<div class='modal-dialog modal-dialog-centered' role='document'>
<div class='modal-content'>
<div class="modal-header">
<h6 class="modal-title font-weight-normal" id="message-modal-label">Message Staff</h6>
<button type="button" class="btn-close text-dark" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class='modal-body'>
<form>
<input type='hidden' id='my-case' value=''/>
<div class='input-group input-group-outline my-3'>
<textarea name='message' id='message' style='width:100%;height:100px;'></textarea>
</div>
</form>
</div>
<div class='modal-footer'>
<button type='button' id='close-modal' class='btn bg-gradient-secondary' data-bs-dismiss='modal'>Close</button>
<button type='button' id='send-message' class='btn bg-gradient-primary'>Send Message</button>
</div>
</div>
</div>
</div>
</main>
{% endblock %}
2025-01-10 10:09:44 -05:00
{% block page_js %}
<script type='module'>
import $ from "{{ asset('vendor/jquery/jquery.index.js') }}";
import {openMessage, sendMessage} from '{{ asset("js/app/message.js") }}';
window.$ = $;
$(function () {
document.getElementById('open-message').addEventListener('click', openMessage);
document.getElementById('send-message').addEventListener('click', sendMessage);
});
</script>
{% endblock %}