From c76783b79fa568f6563b937120542e79b18a45d1 Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Tue, 17 Dec 2024 12:07:13 -0500 Subject: [PATCH] Don't display add button if not a case manager or admin Display highlighting for referrals close to expiration Highlight hours if < 40 --- .../cases/referrals/list-referrals.html.twig | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/templates/internal/cases/referrals/list-referrals.html.twig b/templates/internal/cases/referrals/list-referrals.html.twig index 268264d..82fb80f 100644 --- a/templates/internal/cases/referrals/list-referrals.html.twig +++ b/templates/internal/cases/referrals/list-referrals.html.twig @@ -15,9 +15,11 @@
Referral List
+ {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_CASE_MANAGER') %}
+ {% endif %}
@@ -37,6 +39,12 @@ {% for r in openReferrals %} + {% set dateEndWarning = '' %} + {% if date('+14 days') >= r.endDate %} + {% set dateEndWarning = 'bg-gradient-danger text-white' %} + {% elseif date('+28 days') >= r.endDate %} + {% set dateEndWarning = 'bg-gradient-faded-warning' %} + {% endif %}
{{ r.referralId }}
@@ -44,13 +52,13 @@

{{ r.serviceCode.value }}

- -

{{ r.hours }}

+ +

{{ r.hours }} / {{ r.getHoursRemaining() }}

- -

{{ r.endDate|date("F j, Y") }}

+ +

{{ r.endDate|date("M j, Y") }}

- + edit