From c9cf8d7e0a4f029b12903d42701ec25b54fea02f Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Mon, 10 Feb 2025 16:18:53 -0500 Subject: [PATCH] up: various twig templates * various twig updates --- templates/internal/dashboard.html.twig | 97 +++++++++++++------ templates/internal/libs/top-nav.html.twig | 39 ++++---- .../internal/staff/cases/my-cases.html.twig | 16 ++- .../staff/cases/staff-cases.html.twig | 17 ++++ .../internal/staff/staff-dashboard.html.twig | 9 +- templates/libs/nav.html.twig | 7 -- .../register-step-company.html.twig | 4 + 7 files changed, 131 insertions(+), 58 deletions(-) diff --git a/templates/internal/dashboard.html.twig b/templates/internal/dashboard.html.twig index c4cee44..94335bc 100644 --- a/templates/internal/dashboard.html.twig +++ b/templates/internal/dashboard.html.twig @@ -10,22 +10,23 @@ {{ block('topnav', 'internal/libs/top-nav.html.twig') }}
-
-
+
+

Dashboard

-
+
-

Miles Travelled

+

Total Miles

- {{ milesTravelled30Days }} - mi / - {{ milesTravelledYTD }} - mi + {{ milesTravelled30Days }} / {{ milesTravelledYTD }} +

+

Case Miles

+

+ {{ caseMileage30Days }} / {{ caseMileageYTD }}

@@ -43,16 +44,16 @@
-
+

Time Travelled

- {{ totalTimeTravelled30Days|date("%a %H:%I'%S''") }} + {{ timeTravelled30Days|date("%a %H:%I'%S''") }} / - {{ totalTimeTravelledYTD|date("%a %H:%I'%S''") }} + {{ timeTravelledYTD|date("%a %H:%I'%S''") }}

@@ -68,14 +69,14 @@
-
+
-

Case Mileage

+

Billable Hours This Month

- {{ caseMileage30Days }} / {{ caseMileageYTD }} + {{ (totalBillableHours30Days / 60) | number_format(2) }}

@@ -86,18 +87,24 @@
-
+
-

Miles Travelled

-

+

Billable Hours YTD

+

+ {{ (totalBillableHoursYTD / 60) | number_format(2) }} +

weekend @@ -107,10 +114,11 @@
@@ -118,21 +126,20 @@
-
+
-
Website Views
-

Last Campaign Performance

+
Billable Hours
+

Rolling 6 Months

- +

- schedule +

- campaign sent 2 days ago

@@ -142,3 +149,37 @@
{% endblock %} + +{% block page_js %} + + + +{% endblock %} \ No newline at end of file diff --git a/templates/internal/libs/top-nav.html.twig b/templates/internal/libs/top-nav.html.twig index 64c4f40..c611ff5 100644 --- a/templates/internal/libs/top-nav.html.twig +++ b/templates/internal/libs/top-nav.html.twig @@ -29,13 +29,12 @@
- {% if is_granted('ROLE_ADMIN') %} - - {% endif %} + + diff --git a/templates/internal/staff/cases/my-cases.html.twig b/templates/internal/staff/cases/my-cases.html.twig index 9b8b158..cb7c4b8 100644 --- a/templates/internal/staff/cases/my-cases.html.twig +++ b/templates/internal/staff/cases/my-cases.html.twig @@ -18,7 +18,18 @@

{% for c in cases %} -
+ {% set latestNote = c.getStaffNotes()[0] %} + {% set status = '#ff0000' %} + {% set symbol = 'cancel' %} + {% if latestNote.getWorkerSignDatetime() %} + {% set status = '#00ff00' %} + {% set symbol = 'check_circle' %} + {% elseif latestNote.getSupervisorSignDateTime() %} + {% set status = '#ffff00' %} + {% set symbol = 'warning' %} + {% endif %} + +
@@ -38,6 +49,9 @@

Staff Notes + + {{ symbol }} +

diff --git a/templates/internal/staff/cases/staff-cases.html.twig b/templates/internal/staff/cases/staff-cases.html.twig index f378d58..626f8f0 100644 --- a/templates/internal/staff/cases/staff-cases.html.twig +++ b/templates/internal/staff/cases/staff-cases.html.twig @@ -12,6 +12,16 @@

{% for c in cases %} + {% set latestNote = c.getStaffNotes()[0] %} + {% set status = '#ff0000' %} + {% set symbol = 'cancel' %} + {% if latestNote.getWorkerSignDatetime() %} + {% set status = '#00ff00' %} + {% set symbol = 'check_circle' %} + {% elseif latestNote.getSupervisorSignDateTime() %} + {% set status = '#ffff00' %} + {% set symbol = 'warning' %} + {% endif %}
@@ -29,9 +39,16 @@

diff --git a/templates/internal/staff/staff-dashboard.html.twig b/templates/internal/staff/staff-dashboard.html.twig index b7d7f5e..9591f59 100644 --- a/templates/internal/staff/staff-dashboard.html.twig +++ b/templates/internal/staff/staff-dashboard.html.twig @@ -12,19 +12,20 @@

{% for s in staff %} -
+

{{ s.name }}

- {{ s.email }}
- {% if s.workPhone %}{{ s.getFormattedPhone() }}{% endif %} + {% if s.workPhone %}{{ s.getFormattedPhone() }}{% endif %}

- weekend + + weekend +
diff --git a/templates/libs/nav.html.twig b/templates/libs/nav.html.twig index fb185db..acf1b59 100644 --- a/templates/libs/nav.html.twig +++ b/templates/libs/nav.html.twig @@ -5,13 +5,6 @@ CM Tracker -