Merge branch 'main' into feature/process-nav-improvements

This commit is contained in:
Elizabeth Esswein 2023-01-05 10:46:52 -05:00
commit 2071317e91
3 changed files with 19 additions and 8 deletions

View File

@ -1050,8 +1050,8 @@ export default function ProcessInstanceListTable({
}
return null;
}}
placeholder="Process Initiator"
titleText="PROC"
placeholder="Starting typing username"
titleText="Process Initiator"
selectedItem={processInitiatorSelection}
/>
</Column>

View File

@ -39,6 +39,7 @@ export interface ProcessInstanceTask {
updated_at_in_seconds: number;
current_user_is_potential_owner: number;
potential_owner_usernames: string;
calling_subprocess_task_id: string;
}
export interface ProcessReference {

View File

@ -200,11 +200,18 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
const taskIds = { completed: [], readyOrWaiting: [] };
if (tasks) {
tasks.forEach(function getUserTasksElement(task: ProcessInstanceTask) {
if (task.state === 'COMPLETED') {
(taskIds.completed as any).push(task);
}
if (task.state === 'READY' || task.state === 'WAITING') {
(taskIds.readyOrWaiting as any).push(task);
const callingSubprocessId = searchParams.get('call_activity_task_id');
if (
!callingSubprocessId ||
callingSubprocessId === task.calling_subprocess_task_id
) {
console.log('callingSubprocessId', callingSubprocessId);
if (task.state === 'COMPLETED') {
(taskIds.completed as any).push(task);
}
if (task.state === 'READY' || task.state === 'WAITING') {
(taskIds.readyOrWaiting as any).push(task);
}
}
});
}
@ -474,7 +481,10 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
});
} else if (tasks) {
const matchingTask: any = tasks.find((task: any) => {
const callingSubprocessId = searchParams.get('call_activity_task_id');
return (
(!callingSubprocessId ||
callingSubprocessId === task.calling_subprocess_task_id) &&
task.name === shapeElement.id &&
bpmnProcessIdentifiers.includes(task.process_identifier)
);
@ -667,7 +677,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
buttons.push(
<Link
data-qa="go-to-call-activity-result"
to={`${window.location.pathname}?process_identifier=${task.call_activity_process_identifier}`}
to={`${window.location.pathname}?process_identifier=${task.call_activity_process_identifier}&call_activity_task_id=${task.id}`}
target="_blank"
>
View Call Activity Diagram