do not show full group path in process model search and do not attempt to convert a date to ymd if it is already ymd w/ burnettk
This commit is contained in:
parent
1dfa64ca76
commit
89589bf723
|
@ -28,10 +28,14 @@ export default function ProcessModelSearch({
|
|||
return '';
|
||||
};
|
||||
|
||||
const getFullProcessModelLabel = (processModel: ProcessModel) => {
|
||||
return `${getParentGroupsDisplayName(processModel)} / ${
|
||||
processModel.display_name
|
||||
} (${processModel.id})`;
|
||||
const getProcessModelLabelForDisplay = (processModel: ProcessModel) => {
|
||||
return `${processModel.display_name} (${processModel.id})`;
|
||||
};
|
||||
|
||||
const getProcessModelLabelForSearch = (processModel: ProcessModel) => {
|
||||
return `${processModel.display_name} ${
|
||||
processModel.id
|
||||
} ${getParentGroupsDisplayName(processModel)}`;
|
||||
};
|
||||
|
||||
const shouldFilterProcessModel = (options: any) => {
|
||||
|
@ -42,7 +46,7 @@ export default function ProcessModelSearch({
|
|||
}
|
||||
const inputValueArray = inputValue.split(' ');
|
||||
const processModelLowerCase =
|
||||
getFullProcessModelLabel(processModel).toLowerCase();
|
||||
getProcessModelLabelForSearch(processModel).toLowerCase();
|
||||
|
||||
return inputValueArray.every((i: any) => {
|
||||
return processModelLowerCase.includes((i || '').toLowerCase());
|
||||
|
@ -56,7 +60,7 @@ export default function ProcessModelSearch({
|
|||
items={processModels}
|
||||
itemToString={(processModel: ProcessModel) => {
|
||||
if (processModel) {
|
||||
return getFullProcessModelLabel(processModel);
|
||||
return getProcessModelLabelForDisplay(processModel);
|
||||
}
|
||||
return null;
|
||||
}}
|
||||
|
|
|
@ -71,13 +71,15 @@ export const convertDateObjectToFormattedString = (dateObject: Date) => {
|
|||
};
|
||||
|
||||
export const dateStringToYMDFormat = (dateString: string) => {
|
||||
if (DATE_FORMAT.startsWith('dd')) {
|
||||
const d = dateString.split('-');
|
||||
return `${d[2]}-${d[1]}-${d[0]}`;
|
||||
}
|
||||
if (DATE_FORMAT.startsWith('MM')) {
|
||||
const d = dateString.split('-');
|
||||
return `${d[2]}-${d[0]}-${d[1]}`;
|
||||
if (dateString && dateString.match(/^\d{2}-\d{2}-\d{4}$/)) {
|
||||
if (DATE_FORMAT.startsWith('dd')) {
|
||||
const d = dateString.split('-');
|
||||
return `${d[2]}-${d[1]}-${d[0]}`;
|
||||
}
|
||||
if (DATE_FORMAT.startsWith('MM')) {
|
||||
const d = dateString.split('-');
|
||||
return `${d[2]}-${d[0]}-${d[1]}`;
|
||||
}
|
||||
}
|
||||
return dateString;
|
||||
};
|
||||
|
|
|
@ -690,7 +690,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
|||
setSelectingEvent(false);
|
||||
initializeTaskDataToDisplay(taskToDisplay);
|
||||
setEventPayload('{}');
|
||||
console.log('cancel updating task');
|
||||
removeError();
|
||||
};
|
||||
|
||||
|
@ -771,10 +770,8 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
|||
}
|
||||
|
||||
if (task.typename === 'CallActivity') {
|
||||
console.log('task', task);
|
||||
const taskDefinitionPropertiesJson: TaskDefinitionPropertiesJson =
|
||||
task.task_definition_properties_json;
|
||||
console.log('taskDefinitionPropertiesJson', taskDefinitionPropertiesJson);
|
||||
buttons.push(
|
||||
<Link
|
||||
data-qa="go-to-call-activity-result"
|
||||
|
|
Loading…
Reference in New Issue