keep query params when navigating to process instance short link w/ burnettk

This commit is contained in:
jasquat 2024-06-04 15:47:11 -04:00
parent fe2a8da9e9
commit a988e7691a
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@ export default function useProcessInstanceNavigate() {
const handleProcessInstanceNavigation = (
result: any,
processInstanceId: number,
suffix: string | undefined
suffix: string | undefined,
) => {
const processInstanceResult: ProcessInstance = result.process_instance;
let path = '/process-instances';
@ -21,11 +21,13 @@ export default function useProcessInstanceNavigate() {
path += '/for-me';
}
path += `/${modifyProcessIdentifierForPathParam(
processInstanceResult.process_model_identifier
processInstanceResult.process_model_identifier,
)}/${processInstanceResult.id}`;
if (suffix !== undefined) {
path += suffix;
}
const queryParams = window.location.search;
path += queryParams;
navigate(path);
};