From 882ab451f519ef40d004a286d101c6613e124944 Mon Sep 17 00:00:00 2001 From: jasquat Date: Mon, 24 Apr 2023 16:10:45 -0400 Subject: [PATCH] format process instance status strings w/ burnettk --- .../src/components/ProcessInstanceListTable.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx index 3247fec0d..9c457e2c8 100644 --- a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx @@ -30,6 +30,7 @@ import { DATE_FORMAT_FOR_DISPLAY, } from '../config'; import { + capitalizeFirstLetter, convertDateAndTimeStringsToSeconds, convertDateObjectToFormattedHoursMinutes, convertSecondsToFormattedDateString, @@ -721,6 +722,9 @@ export default function ProcessInstanceListTable({ ); }; + const formatProcessInstanceStatus = (_row: any, value: any) => { + return capitalizeFirstLetter((value || '').replaceAll('_', ' ')); + }; const processStatusSearch = () => { return ( { - return item || ''; + return formatProcessInstanceStatus(null, item); }} selectionFeedback="top-after-reopen" selectedItems={processStatusSelection} @@ -1358,6 +1362,7 @@ export default function ProcessInstanceListTable({ id: formatProcessInstanceId, process_model_identifier: formatProcessModelIdentifier, process_model_display_name: formatProcessModelDisplayName, + status: formatProcessInstanceStatus, start_in_seconds: formatSecondsForDisplay, end_in_seconds: formatSecondsForDisplay, updated_at_in_seconds: formatSecondsForDisplay,