From b7b0c8e6c44bb18b99ca4da0580fc3ce81b127ed Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Fri, 10 Jan 2025 15:03:53 +0000 Subject: [PATCH] add block for assigning documents to a case, use company timezone, update anchor tag class --- .../internal/admin/cases/add-case.html.twig | 17 + .../internal/admin/cases/edit-case.html.twig | 4 +- .../internal/admin/cases/list-cases.html.twig | 10 +- .../list-referral-sources.html.twig | 4 +- .../addresses/list-case-addresses.html.twig | 6 +- .../internal/cases/itinerary/report.html.twig | 2 +- .../cases/members/list-members.html.twig | 5 +- templates/internal/cases/my-cases.html.twig | 8 +- .../cases/notes/add-standard-note.html.twig | 2 +- .../cases/notes/add-visit-note.html.twig | 2 +- .../internal/cases/notes/edit-note.html.twig | 292 ++++++++++++++++++ .../internal/cases/notes/list-notes.html.twig | 83 +++-- .../cases/referrals/edit-referral.html.twig | 2 +- .../cases/referrals/list-referrals.html.twig | 2 +- templates/internal/cases/view-case.html.twig | 4 +- .../community_resource/list.html.twig | 6 +- .../internal/community_resource/map.html.twig | 2 +- .../internal/staff/notes/list-notes.html.twig | 16 +- .../internal/staff/notes/view-note.html.twig | 6 +- 19 files changed, 400 insertions(+), 73 deletions(-) diff --git a/templates/internal/admin/cases/add-case.html.twig b/templates/internal/admin/cases/add-case.html.twig index 4f11226..8bcfad5 100644 --- a/templates/internal/admin/cases/add-case.html.twig +++ b/templates/internal/admin/cases/add-case.html.twig @@ -81,6 +81,15 @@ {% endfor %} + +
+ {% for d in docs %} + + + + + {% endfor %} +
@@ -151,3 +160,11 @@ {% endblock %} + +{% block page_css %} + +{% endblock %} \ No newline at end of file diff --git a/templates/internal/admin/cases/edit-case.html.twig b/templates/internal/admin/cases/edit-case.html.twig index a25cfd5..3102d19 100644 --- a/templates/internal/admin/cases/edit-case.html.twig +++ b/templates/internal/admin/cases/edit-case.html.twig @@ -31,12 +31,12 @@
- +
- +
diff --git a/templates/internal/admin/cases/list-cases.html.twig b/templates/internal/admin/cases/list-cases.html.twig index 46e0962..65eab61 100644 --- a/templates/internal/admin/cases/list-cases.html.twig +++ b/templates/internal/admin/cases/list-cases.html.twig @@ -86,20 +86,20 @@ {% if is_granted('ROLE_CASE_MANAGER') or is_granted('ROLE_ADMIN') %} - + edit - + badge {% endif %} - + create_new_folder - + group_add - + clinical_notes diff --git a/templates/internal/admin/referral_source/list-referral-sources.html.twig b/templates/internal/admin/referral_source/list-referral-sources.html.twig index 381c1a5..4461298 100644 --- a/templates/internal/admin/referral_source/list-referral-sources.html.twig +++ b/templates/internal/admin/referral_source/list-referral-sources.html.twig @@ -58,7 +58,9 @@ {{ src.phone }} - Edit + + edit + {% endfor %} diff --git a/templates/internal/cases/addresses/list-case-addresses.html.twig b/templates/internal/cases/addresses/list-case-addresses.html.twig index 6ff35f5..43b8bf5 100644 --- a/templates/internal/cases/addresses/list-case-addresses.html.twig +++ b/templates/internal/cases/addresses/list-case-addresses.html.twig @@ -49,9 +49,7 @@
-
- {{ l.name }} -
+
{{ l.name }}
@@ -62,7 +60,7 @@ {{ l.lat }}/{{ l.lon }} - + edit diff --git a/templates/internal/cases/itinerary/report.html.twig b/templates/internal/cases/itinerary/report.html.twig index fc60d9a..2123745 100644 --- a/templates/internal/cases/itinerary/report.html.twig +++ b/templates/internal/cases/itinerary/report.html.twig @@ -55,7 +55,7 @@ {% for i in itineraries %} - {{ i.date|date('F j, Y') }} + {{ i.date|date('F j, Y', company_timezone) }} {{ i.memberCase.caseName }} {{ i.originLocation.name }} {{ i.destLocation.name }} diff --git a/templates/internal/cases/members/list-members.html.twig b/templates/internal/cases/members/list-members.html.twig index 56b16f9..0062ab8 100644 --- a/templates/internal/cases/members/list-members.html.twig +++ b/templates/internal/cases/members/list-members.html.twig @@ -73,9 +73,12 @@ {% endif %} - + edit + + content_copy + {% endfor %} diff --git a/templates/internal/cases/my-cases.html.twig b/templates/internal/cases/my-cases.html.twig index a7db9cc..5955ca7 100644 --- a/templates/internal/cases/my-cases.html.twig +++ b/templates/internal/cases/my-cases.html.twig @@ -60,16 +60,16 @@

{{ c.referrals|length }}

- + visibility - + create_new_folder - + group_add - + clinical_notes diff --git a/templates/internal/cases/notes/add-standard-note.html.twig b/templates/internal/cases/notes/add-standard-note.html.twig index a9269ac..047f32f 100644 --- a/templates/internal/cases/notes/add-standard-note.html.twig +++ b/templates/internal/cases/notes/add-standard-note.html.twig @@ -32,7 +32,7 @@ Expiration Date: - {{ referral.endDate|date('M j, Y') }} + {{ referral.endDate|date('M j, Y', company_timezone) }}
diff --git a/templates/internal/cases/notes/add-visit-note.html.twig b/templates/internal/cases/notes/add-visit-note.html.twig index 0af0753..d2ae89a 100644 --- a/templates/internal/cases/notes/add-visit-note.html.twig +++ b/templates/internal/cases/notes/add-visit-note.html.twig @@ -32,7 +32,7 @@ Expiration Date: - {{ referral.endDate|date('M j, Y') }} + {{ referral.endDate|date('M j, Y', company_timezone) }}
diff --git a/templates/internal/cases/notes/edit-note.html.twig b/templates/internal/cases/notes/edit-note.html.twig index e69de29..9c3e5bc 100644 --- a/templates/internal/cases/notes/edit-note.html.twig +++ b/templates/internal/cases/notes/edit-note.html.twig @@ -0,0 +1,292 @@ +{% extends 'base.html.twig' %} + +{% block body %} + {{ block('nav', 'internal/libs/nav.html.twig') }} + +
+ {{ block('topnav', 'internal/libs/top-nav.html.twig') }} + + {% if noteType == 'visit' %} +
+
+
+

Edit Referral Note

+

{{ referral.memberCase.caseName }}

+
+
+ {{ form_start(form) }} + {{ form_errors(form) }} +
+
+ {% set endDateWarning = '' %} + {% if date("+28 days") >= referral.endDate %} + {% set endDateWarning = 'bg-gradient-warning' %} + {% elseif date("+14 days") >= referral.endDate %} + {% set endDateWarning = 'bg-gradient-danger text-white' %} + {% endif %} + + Hours: + {{ referral.hours }} + / + Remaining: + {{ referral.getHoursRemaining() }} + + + Expiration Date: + {{ referral.endDate|date('M j, Y', company_timezone) }} + +
+
+
+
+ + +
+
+ +    + + +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ {{ form_row(form.members, { + 'label': 'Members Present', + 'label_attr': {'class': ''}, + 'attr': {'class': 'form-control'} + + }) }} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ +
+
+
+ {{ form_end(form) }} +
+
+
+ {% elseif noteType == 'standard' %} +
+
+
+

Add Referral Note

+

{{ referral.memberCase.caseName }}

+
+
+ {{ form_start(form) }} + {{ form_errors(form) }} +
+
+ {% set endDateWarning = '' %} + {% if date("+28 days") >= referral.endDate %} + {% set endDateWarning = 'bg-gradient-warning' %} + {% elseif date("+14 days") >= referral.endDate %} + {% set endDateWarning = 'bg-gradient-danger text-white' %} + {% endif %} + + Hours: + {{ referral.hours }} + / + Remaining: + {{ referral.getHoursRemaining() }} + + + Expiration Date: + {{ referral.endDate|date('M j, Y', company_timezone) }} + +
+
+
+
+ + +
+
+ +    + + +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+
+
+ {{ form_row(form.members, { + 'label': 'Members Present', + 'label_attr': {'class': ''}, + 'attr': {'class': 'form-control'} + }) }} +
+
+ + +
+
+
+
+
+ +
+
+
+ {{ form_end(form) }} +
+
+
+ {% endif %} +
+{% endblock %} diff --git a/templates/internal/cases/notes/list-notes.html.twig b/templates/internal/cases/notes/list-notes.html.twig index d2dfd6e..b85f8fc 100644 --- a/templates/internal/cases/notes/list-notes.html.twig +++ b/templates/internal/cases/notes/list-notes.html.twig @@ -16,21 +16,6 @@
Referral Note List
-   
@@ -38,15 +23,33 @@
Filter:   -    - +    +    +    +
- @@ -54,22 +57,22 @@ - {% for note in notes %} - {% set members = note.getMembers() %} - - - - - - - - - {% endfor %} + {% if caseNotes %} + {% for n in caseNotes %} + + + + + + + + {% endfor %} + {% endif %}
DOSService Location Method Members Present
- {{ note.date|date('M j, Y') }}
- {{ note.startTime|date('g:i a') }}-{{ note.endTime|date('g:i a') }} -
{{ note.referral.serviceCode.value }}{{ note.location.value }}{{ note.method.name|replace({'_': ' '})|lower|capitalize }} - {{ dump(members) }} -
{{ n.date|date("F j, Y", company_timezone) }}
+ {{ n.startTime|date("g:i a", company_timezone) }}-{{ n.endTime|date("g:i a", company_timezone) }} ({{ n.calcTimeUsed() }})
{{ n.location.value }}{{ n.method.name|lower|replace({"_": " "})|capitalize }} + + edit + +
@@ -80,3 +83,15 @@
{% endblock %} + +{% block page_js %} + +{% endblock %} diff --git a/templates/internal/cases/referrals/edit-referral.html.twig b/templates/internal/cases/referrals/edit-referral.html.twig index e0b81e2..ada0f20 100644 --- a/templates/internal/cases/referrals/edit-referral.html.twig +++ b/templates/internal/cases/referrals/edit-referral.html.twig @@ -41,7 +41,7 @@
- +
diff --git a/templates/internal/cases/referrals/list-referrals.html.twig b/templates/internal/cases/referrals/list-referrals.html.twig index 82fb80f..0820f26 100644 --- a/templates/internal/cases/referrals/list-referrals.html.twig +++ b/templates/internal/cases/referrals/list-referrals.html.twig @@ -113,7 +113,7 @@

{{ r.dischargeReason.value }}

-

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

+

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

diff --git a/templates/internal/cases/view-case.html.twig b/templates/internal/cases/view-case.html.twig index 5431823..5a48bb5 100644 --- a/templates/internal/cases/view-case.html.twig +++ b/templates/internal/cases/view-case.html.twig @@ -28,12 +28,12 @@
- +
- +
diff --git a/templates/internal/community_resource/list.html.twig b/templates/internal/community_resource/list.html.twig index 19b27d2..75263ed 100644 --- a/templates/internal/community_resource/list.html.twig +++ b/templates/internal/community_resource/list.html.twig @@ -4,7 +4,7 @@ {% endblock %} {% block body %} - {% set today = date("now", "America/Indiana/Indianapolis") %} + {% set today = date("now", company_timezone) %} {{ block('nav', 'internal/libs/nav.html.twig') }}
@@ -61,10 +61,10 @@ {{ r.getHours() }} {{ r.lat|number_format(6) }}/{{ r.lon|number_format(6) }} - + edit - + import_contacts diff --git a/templates/internal/community_resource/map.html.twig b/templates/internal/community_resource/map.html.twig index a93f253..774f79e 100644 --- a/templates/internal/community_resource/map.html.twig +++ b/templates/internal/community_resource/map.html.twig @@ -4,7 +4,7 @@ {% endblock %} {% block body %} - {% set today = date("now", "America/Indiana/Indianapolis") %} + {% set today = date("now", company_timezone) %} {{ block('nav', 'internal/libs/nav.html.twig') }}
diff --git a/templates/internal/staff/notes/list-notes.html.twig b/templates/internal/staff/notes/list-notes.html.twig index c79e0cd..8d349ce 100644 --- a/templates/internal/staff/notes/list-notes.html.twig +++ b/templates/internal/staff/notes/list-notes.html.twig @@ -39,41 +39,41 @@
-
{{ n.date|date('F j, Y') }}
+
{{ n.date|date('F j, Y', company_timezone) }}
{% if n.supervisorSignDateTime %} - {{ n.supervisorSignDateTime|date('F j, Y h:i a') }} + {{ n.supervisorSignDateTime|date('F j, Y h:i a', company_timezone) }} {% endif %} {% if n.workerSignDatetime %} - {{ n.workerSignDatetime|date('F j, Y h:i a') }} + {{ n.workerSignDatetime|date('F j, Y h:i a', company_timezone) }} {% endif %} {% if isWorker and not n.workerSignDatetime %} - + edit - + draw {% endif %} {% if isWorker and n.workerSignDatetime %} - + visibility {% endif %} {% if not isWorker and not n.supervisorSignDateTime %} - + draw {% endif %} {% if not isWorker and n.supervisorSignDateTime %} - + visibility {% endif %} diff --git a/templates/internal/staff/notes/view-note.html.twig b/templates/internal/staff/notes/view-note.html.twig index 8294621..4f79c09 100644 --- a/templates/internal/staff/notes/view-note.html.twig +++ b/templates/internal/staff/notes/view-note.html.twig @@ -19,17 +19,17 @@
Supervisor: - {{ note.supervisorSignDateTime|date("F j, Y h:i a") }}
+ {{ note.supervisorSignDateTime|date("F j, Y h:i a", company_timezone) }}
Case Worker: {% if note.workerSignDatetime %} - {{ note.workerSignDatetime|date("F j, Y h:i a") }}{% else %}Unsigned + {{ note.workerSignDatetime|date("F j, Y h:i a", company_timezone) }}{% else %}Unsigned {% endif %}
- +