From 09794e93020d4ea548ca08f32c6d378b586d2df1 Mon Sep 17 00:00:00 2001 From: jasquat <2487833+jasquat@users.noreply.github.com> Date: Wed, 2 Aug 2023 04:36:19 -0400 Subject: [PATCH] =?UTF-8?q?column=20names=20for=20tables=20in=20frontend?= =?UTF-8?q?=20should=20only=20have=20the=20first=20letter=E2=80=A6=20(#425?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * column names for tables in frontend should only have the first letter of the first word capitalized * forgot a couple field names w/ burnettk --------- Co-authored-by: jasquat --- .../process_instance_report_service.py | 20 +++++++++---------- .../integration/test_process_api.py | 12 +++++------ .../src/routes/ProcessInstanceShow.tsx | 6 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py index e753099ee..b108b3139 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py @@ -55,8 +55,8 @@ class ProcessInstanceReportService: "accessor": "process_model_display_name", "filterable": False, }, - {"Header": "Start Time", "accessor": "start_in_seconds", "filterable": False}, - {"Header": "End Time", "accessor": "end_in_seconds", "filterable": False}, + {"Header": "Start time", "accessor": "start_in_seconds", "filterable": False}, + {"Header": "End time", "accessor": "end_in_seconds", "filterable": False}, {"Header": "Status", "accessor": "status", "filterable": False}, ], "filter_by": [ @@ -89,9 +89,9 @@ class ProcessInstanceReportService: "filterable": False, }, {"Header": "Task", "accessor": "task_title", "filterable": False}, - {"Header": "Waiting For", "accessor": "waiting_for", "filterable": False}, + {"Header": "Waiting for", "accessor": "waiting_for", "filterable": False}, {"Header": "Started", "accessor": "start_in_seconds", "filterable": False}, - {"Header": "Last Updated", "accessor": "task_updated_at_in_seconds", "filterable": False}, + {"Header": "Last updated", "accessor": "task_updated_at_in_seconds", "filterable": False}, {"Header": "Status", "accessor": "status", "filterable": False}, ], "filter_by": [ @@ -114,9 +114,9 @@ class ProcessInstanceReportService: "filterable": False, }, {"Header": "Task", "accessor": "task_title", "filterable": False}, - {"Header": "Started By", "accessor": "process_initiator_username", "filterable": False}, + {"Header": "Started by", "accessor": "process_initiator_username", "filterable": False}, {"Header": "Started", "accessor": "start_in_seconds", "filterable": False}, - {"Header": "Last Updated", "accessor": "task_updated_at_in_seconds", "filterable": False}, + {"Header": "Last updated", "accessor": "task_updated_at_in_seconds", "filterable": False}, ], "filter_by": [ {"field_name": "instances_with_tasks_waiting_for_me", "field_value": True, "operator": "equals"}, @@ -138,9 +138,9 @@ class ProcessInstanceReportService: "filterable": False, }, {"Header": "Task", "accessor": "task_title", "filterable": False}, - {"Header": "Started By", "accessor": "process_initiator_username", "filterable": False}, + {"Header": "Started by", "accessor": "process_initiator_username", "filterable": False}, {"Header": "Started", "accessor": "start_in_seconds", "filterable": False}, - {"Header": "Last Updated", "accessor": "task_updated_at_in_seconds", "filterable": False}, + {"Header": "Last updated", "accessor": "task_updated_at_in_seconds", "filterable": False}, ], "filter_by": [ {"field_name": "process_status", "field_value": active_status_values, "operator": "equals"}, @@ -326,7 +326,7 @@ class ProcessInstanceReportService: {"Header": "Start", "accessor": "start_in_seconds", "filterable": False}, {"Header": "End", "accessor": "end_in_seconds", "filterable": False}, { - "Header": "Started By", + "Header": "Started by", "accessor": "process_initiator_username", "filterable": False, }, @@ -339,7 +339,7 @@ class ProcessInstanceReportService: """Columns that are used with certain system reports.""" return_value: list[ReportMetadataColumn] = [ {"Header": "Task", "accessor": "task_title", "filterable": False}, - {"Header": "Waiting For", "accessor": "waiting_for", "filterable": False}, + {"Header": "Waiting for", "accessor": "waiting_for", "filterable": False}, ] return return_value diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py index 6327764ed..517de7ae0 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py @@ -2772,8 +2772,8 @@ class TestProcessApi(BaseTest): "columns": [ {"Header": "ID", "accessor": "id", "filterable": False}, {"Header": "Status", "accessor": "status", "filterable": False}, - {"Header": "Key One", "accessor": "key1", "filterable": False}, - {"Header": "Key Two", "accessor": "key2", "filterable": False}, + {"Header": "Key one", "accessor": "key1", "filterable": False}, + {"Header": "Key two", "accessor": "key2", "filterable": False}, ], "order_by": ["status"], "filter_by": [], @@ -2819,7 +2819,7 @@ class TestProcessApi(BaseTest): "columns": [ {"Header": "ID", "accessor": "id", "filterable": False}, {"Header": "Status", "accessor": "status", "filterable": False}, - {"Header": "Process Initiator", "accessor": "username", "filterable": False}, + {"Header": "Process initiator", "accessor": "username", "filterable": False}, ], "order_by": ["status"], "filter_by": [ @@ -2835,7 +2835,7 @@ class TestProcessApi(BaseTest): "columns": [ {"Header": "ID", "accessor": "id", "filterable": False}, {"Header": "Status", "accessor": "status", "filterable": False}, - {"Header": "Process Initiator", "accessor": "username", "filterable": False}, + {"Header": "Process initiator", "accessor": "username", "filterable": False}, ], "order_by": ["status"], "filter_by": [ @@ -2931,13 +2931,13 @@ class TestProcessApi(BaseTest): {"Header": "Start", "accessor": "start_in_seconds", "filterable": False}, {"Header": "End", "accessor": "end_in_seconds", "filterable": False}, { - "Header": "Started By", + "Header": "Started by", "accessor": "process_initiator_username", "filterable": False, }, {"Header": "Status", "accessor": "status", "filterable": False}, {"Header": "Task", "accessor": "task_title", "filterable": False}, - {"Header": "Waiting For", "accessor": "waiting_for", "filterable": False}, + {"Header": "Waiting for", "accessor": "waiting_for", "filterable": False}, {"Header": "awesome_var", "accessor": "awesome_var", "filterable": True}, {"Header": "invoice_number", "accessor": "invoice_number", "filterable": True}, {"Header": "key1", "accessor": "key1", "filterable": True}, diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx index e6b16c8b2..04b2b246f 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx @@ -322,7 +322,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { if (!processInstance) { return null; } - let lastUpdatedTimeLabel = 'Updated At'; + let lastUpdatedTimeLabel = 'Updated at'; let lastUpdatedTime = processInstance.task_updated_at_in_seconds; if (processInstance.end_in_seconds) { lastUpdatedTimeLabel = 'Completed'; @@ -367,12 +367,12 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
-
Started By:
+
Started by:
{processInstance.process_initiator_username}
{processInstance.process_model_with_diagram_identifier ? (
-
Current Diagram:
+
Current diagram: