From ae083f4b52e3806ed583da50aa657aff4d23bbd5 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Wed, 15 Jan 2025 17:08:21 -0800 Subject: [PATCH] update banner with different status states --- app/main/views/jobs.py | 1 + app/templates/partials/jobs/status.html | 43 +++++++++++++++++++------ 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py index dddf838a1c..9de227bc3f 100644 --- a/app/main/views/jobs.py +++ b/app/main/views/jobs.py @@ -407,6 +407,7 @@ def get_job_partials(job): session["arrived_from_preview_page"] = False arrived_from_preview_page_url = session.get("arrived_from_preview_page", False) + print('job', dir(job)) return { "counts": counts, diff --git a/app/templates/partials/jobs/status.html b/app/templates/partials/jobs/status.html index fb0a745f8d..fc94d174af 100644 --- a/app/templates/partials/jobs/status.html +++ b/app/templates/partials/jobs/status.html @@ -21,7 +21,7 @@

Delivery Status

- {% if job.still_processing or arrived_from_preview_page_url %} + {% if not job.finished_processing or arrived_from_preview_page_url %} {% if job.scheduled_for %}

@@ -33,16 +33,39 @@

Your text has been scheduled

{{display_message_status}} {% else %} -
-
-

Your text has been sent

-

- {{ job.template_name }} - {{ current_service.name }} was sent on {% if job.processing_started %} - {{ job.processing_started|format_datetime_table }} {% else %} - {{ job.created_at|format_datetime_table }} {% endif %} by {{ job.created_by.name }} -

+ {% if job.finished_processing or job.processing_started %} +
+
+

+ {% if job.finished_processing %} + Your text has been sent + {% else %} + Your text is sending + {% endif %} +

+

+ {{ job.template_name }} - {{ current_service.name }} + {% if job.finished_processing %} + was sent on {{job.processing_started|format_datetime_normal}} + {% else %} + has been sending since {{job.processing_started| format_datetime_normal}} + {% endif %} by {{ job.created_by.name }} +

+
-
+ {% else %} +
+
+

+ Your text is pending +

+

+ {{ job.template_name }} - {{ current_service.name }} + has been pending since {{job.created_at|format_datetime_normal}} by {{ job.created_by.name }} +

+
+
+ {% endif %} {{display_message_status}} {% endif %} {% endif %}