process model show now only shows my instances
This commit is contained in:
parent
5fa6be6651
commit
8a4d8ceeeb
|
@ -70,7 +70,6 @@ const REFRESH_INTERVAL = 5;
|
||||||
const REFRESH_TIMEOUT = 600;
|
const REFRESH_TIMEOUT = 600;
|
||||||
|
|
||||||
type OwnProps = {
|
type OwnProps = {
|
||||||
apiPath?: string;
|
|
||||||
filtersEnabled?: boolean;
|
filtersEnabled?: boolean;
|
||||||
processModelFullIdentifier?: string;
|
processModelFullIdentifier?: string;
|
||||||
paginationQueryParamPrefix?: string;
|
paginationQueryParamPrefix?: string;
|
||||||
|
@ -89,7 +88,6 @@ interface dateParameters {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ProcessInstanceListTable({
|
export default function ProcessInstanceListTable({
|
||||||
apiPath = '/process-instances',
|
|
||||||
filtersEnabled = true,
|
filtersEnabled = true,
|
||||||
processModelFullIdentifier,
|
processModelFullIdentifier,
|
||||||
paginationQueryParamPrefix,
|
paginationQueryParamPrefix,
|
||||||
|
@ -102,6 +100,10 @@ export default function ProcessInstanceListTable({
|
||||||
autoReload = false,
|
autoReload = false,
|
||||||
variant = 'for-me',
|
variant = 'for-me',
|
||||||
}: OwnProps) {
|
}: OwnProps) {
|
||||||
|
let apiPath = '/process-instances/for-me';
|
||||||
|
if (variant === 'all') {
|
||||||
|
apiPath = '/process-instances';
|
||||||
|
}
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
@ -336,6 +338,7 @@ export default function ProcessInstanceListTable({
|
||||||
perPageOptions,
|
perPageOptions,
|
||||||
reportIdentifier,
|
reportIdentifier,
|
||||||
additionalParams,
|
additionalParams,
|
||||||
|
apiPath,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// This sets the filter data using the saved reports returned from the initial instance_list query.
|
// This sets the filter data using the saved reports returned from the initial instance_list query.
|
||||||
|
|
|
@ -57,10 +57,8 @@ export default function ProcessInstanceList({ variant }: OwnProps) {
|
||||||
return <h1>My Process Instances</h1>;
|
return <h1>My Process Instances</h1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
let apiPath = '/process-instances/for-me';
|
|
||||||
let selectedTabIndex = 0;
|
let selectedTabIndex = 0;
|
||||||
if (variant === 'all') {
|
if (variant === 'all') {
|
||||||
apiPath = '/process-instances';
|
|
||||||
selectedTabIndex = 1;
|
selectedTabIndex = 1;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
@ -90,7 +88,7 @@ export default function ProcessInstanceList({ variant }: OwnProps) {
|
||||||
<br />
|
<br />
|
||||||
{processInstanceBreadcrumbElement()}
|
{processInstanceBreadcrumbElement()}
|
||||||
{processInstanceTitleElement()}
|
{processInstanceTitleElement()}
|
||||||
<ProcessInstanceListTable apiPath={apiPath} variant={variant} />
|
<ProcessInstanceListTable variant={variant} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,6 +143,8 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
ability,
|
ability,
|
||||||
targetUris,
|
targetUris,
|
||||||
searchParams,
|
searchParams,
|
||||||
|
taskListPath,
|
||||||
|
variant,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const deleteProcessInstance = () => {
|
const deleteProcessInstance = () => {
|
||||||
|
|
|
@ -555,7 +555,7 @@ export default function ProcessModelShow() {
|
||||||
return (
|
return (
|
||||||
<Grid fullWidth condensed>
|
<Grid fullWidth condensed>
|
||||||
<Column sm={{ span: 3 }} md={{ span: 4 }} lg={{ span: 3 }}>
|
<Column sm={{ span: 3 }} md={{ span: 4 }} lg={{ span: 3 }}>
|
||||||
<h2>Process Instances</h2>
|
<h2>My Process Instances</h2>
|
||||||
</Column>
|
</Column>
|
||||||
<Column
|
<Column
|
||||||
sm={{ span: 1, offset: 3 }}
|
sm={{ span: 1, offset: 3 }}
|
||||||
|
@ -675,6 +675,7 @@ export default function ProcessModelShow() {
|
||||||
{processInstanceListTableButton()}
|
{processInstanceListTableButton()}
|
||||||
<ProcessInstanceListTable
|
<ProcessInstanceListTable
|
||||||
filtersEnabled={false}
|
filtersEnabled={false}
|
||||||
|
variant="for-me"
|
||||||
processModelFullIdentifier={processModel.id}
|
processModelFullIdentifier={processModel.id}
|
||||||
perPageOptions={[2, 5, 25]}
|
perPageOptions={[2, 5, 25]}
|
||||||
showReports={false}
|
showReports={false}
|
||||||
|
|
Loading…
Reference in New Issue