default to the for-me path on process instance show page links
This commit is contained in:
parent
5819b22cab
commit
769cc4126c
|
@ -115,6 +115,11 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let processInstanceShowPageBaseUrl = `/admin/process-instances/for-me/${params.process_model_id}/${params.process_instance_id}`;
|
||||||
|
if (variant === 'all') {
|
||||||
|
processInstanceShowPageBaseUrl = `/admin/process-instances/${params.process_model_id}/${params.process_instance_id}`;
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (permissionsLoaded) {
|
if (permissionsLoaded) {
|
||||||
const processTaskFailure = () => {
|
const processTaskFailure = () => {
|
||||||
|
@ -254,11 +259,12 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
if (queryParamArray.length > 0) {
|
if (queryParamArray.length > 0) {
|
||||||
queryParams = `?${queryParamArray.join('&')}`;
|
queryParams = `?${queryParamArray.join('&')}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
reloadDocument
|
reloadDocument
|
||||||
data-qa="process-instance-step-link"
|
data-qa="process-instance-step-link"
|
||||||
to={`/admin/process-instances/${params.process_model_id}/${params.process_instance_id}/${spiffStep}${queryParams}`}
|
to={`${processInstanceShowPageBaseUrl}/${spiffStep}${queryParams}`}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -282,7 +288,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const returnToLastSpiffStep = () => {
|
const returnToLastSpiffStep = () => {
|
||||||
window.location.href = `/admin/process-instances/${params.process_model_id}/${params.process_instance_id}`;
|
window.location.href = processInstanceShowPageBaseUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetProcessInstance = () => {
|
const resetProcessInstance = () => {
|
||||||
|
|
Loading…
Reference in New Issue