use hyphens instead of parenthesis for process model search

This commit is contained in:
jasquat 2023-05-03 09:08:25 -04:00
parent e71ff3f701
commit beba4cb91b
1 changed files with 7 additions and 2 deletions

View File

@ -33,9 +33,14 @@ export default function ProcessModelSearch({
const getProcessModelLabelForDisplay = (processModel: ProcessModel) => {
let processModelId = processModel.id;
if (truncateProcessModelDisplayName) {
processModelId = processModelId.split('/').slice(-2).join('/');
let processModelIdArray = processModelId.split('/');
if (processModelIdArray.length > 2) {
processModelIdArray = processModelIdArray.slice(-2);
processModelIdArray.unshift('...');
}
processModelId = processModelIdArray.join('/');
}
return `${processModel.display_name} (${processModelId})`;
return `${processModel.display_name} - ${processModelId}`;
};
const getProcessModelLabelForSearch = (processModel: ProcessModel) => {