isort and remove sorting from ui

This commit is contained in:
Beverly Nguyen
2025-06-25 14:01:23 -07:00
parent 5007523d79
commit 2868a86f55
3 changed files with 8 additions and 11 deletions

View File

@@ -98,15 +98,13 @@ def create_job_dict_entry(job):
return {
"job_id": job_id,
"can_download": can_download,
"download_link": url_for(
".view_job_csv",
service_id=current_service.id,
job_id=job_id
) if can_download else None,
"download_link": (
url_for(".view_job_csv", service_id=current_service.id, job_id=job_id)
if can_download
else None
),
"view_job_link": url_for(
".view_job",
service_id=current_service.id,
job_id=job_id
".view_job", service_id=current_service.id, job_id=job_id
),
"activity_time": activity_time,
"created_by": job.get("created_by"),

View File

@@ -43,10 +43,9 @@ def service_dashboard(service_id):
service_data_retention_days = 7
active_jobs = [job for job in job_response if job["job_status"] != "cancelled"]
sorted_jobs = sorted(active_jobs, key=lambda job: job["created_at"], reverse=True)
job_lists = [
{**job_dict, "finished_processing": job_is_finished(job_dict)}
for job_dict in sorted_jobs
for job_dict in active_jobs
]
total_messages = service_api_client.get_service_message_ratio(service_id)

View File

@@ -70,7 +70,7 @@
<span>Template</span>
</th>
<th data-sortable scope="col" role="columnheader" class="table-field-heading">
<span>Time sent</span>
<span>Started</span>
</th>
<th data-sortable scope="col" role="columnheader" class="table-field-heading">
<span>Sender</span>