format process instance status strings w/ burnettk
This commit is contained in:
parent
2297477044
commit
882ab451f5
|
@ -30,6 +30,7 @@ import {
|
||||||
DATE_FORMAT_FOR_DISPLAY,
|
DATE_FORMAT_FOR_DISPLAY,
|
||||||
} from '../config';
|
} from '../config';
|
||||||
import {
|
import {
|
||||||
|
capitalizeFirstLetter,
|
||||||
convertDateAndTimeStringsToSeconds,
|
convertDateAndTimeStringsToSeconds,
|
||||||
convertDateObjectToFormattedHoursMinutes,
|
convertDateObjectToFormattedHoursMinutes,
|
||||||
convertSecondsToFormattedDateString,
|
convertSecondsToFormattedDateString,
|
||||||
|
@ -721,6 +722,9 @@ export default function ProcessInstanceListTable({
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const formatProcessInstanceStatus = (_row: any, value: any) => {
|
||||||
|
return capitalizeFirstLetter((value || '').replaceAll('_', ' '));
|
||||||
|
};
|
||||||
const processStatusSearch = () => {
|
const processStatusSearch = () => {
|
||||||
return (
|
return (
|
||||||
<MultiSelect
|
<MultiSelect
|
||||||
|
@ -734,7 +738,7 @@ export default function ProcessInstanceListTable({
|
||||||
setRequiresRefilter(true);
|
setRequiresRefilter(true);
|
||||||
}}
|
}}
|
||||||
itemToString={(item: any) => {
|
itemToString={(item: any) => {
|
||||||
return item || '';
|
return formatProcessInstanceStatus(null, item);
|
||||||
}}
|
}}
|
||||||
selectionFeedback="top-after-reopen"
|
selectionFeedback="top-after-reopen"
|
||||||
selectedItems={processStatusSelection}
|
selectedItems={processStatusSelection}
|
||||||
|
@ -1358,6 +1362,7 @@ export default function ProcessInstanceListTable({
|
||||||
id: formatProcessInstanceId,
|
id: formatProcessInstanceId,
|
||||||
process_model_identifier: formatProcessModelIdentifier,
|
process_model_identifier: formatProcessModelIdentifier,
|
||||||
process_model_display_name: formatProcessModelDisplayName,
|
process_model_display_name: formatProcessModelDisplayName,
|
||||||
|
status: formatProcessInstanceStatus,
|
||||||
start_in_seconds: formatSecondsForDisplay,
|
start_in_seconds: formatSecondsForDisplay,
|
||||||
end_in_seconds: formatSecondsForDisplay,
|
end_in_seconds: formatSecondsForDisplay,
|
||||||
updated_at_in_seconds: formatSecondsForDisplay,
|
updated_at_in_seconds: formatSecondsForDisplay,
|
||||||
|
|
Loading…
Reference in New Issue