Save first status
This commit is contained in:
parent
c3257e2d44
commit
5a99e9cc9e
|
@ -15,6 +15,7 @@ type OwnProps = {
|
||||||
columnArray: { Header: string; accessor: string };
|
columnArray: { Header: string; accessor: string };
|
||||||
orderBy: string;
|
orderBy: string;
|
||||||
processModelSelection: ProcessModel | null;
|
processModelSelection: ProcessModel | null;
|
||||||
|
processStatusSelection: string[];
|
||||||
buttonText?: string;
|
buttonText?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,6 +24,7 @@ export default function ProcessInstanceListSaveAsReport({
|
||||||
columnArray,
|
columnArray,
|
||||||
orderBy,
|
orderBy,
|
||||||
processModelSelection,
|
processModelSelection,
|
||||||
|
processStatusSelection,
|
||||||
buttonText = 'Save as Perspective',
|
buttonText = 'Save as Perspective',
|
||||||
}: OwnProps) {
|
}: OwnProps) {
|
||||||
const [identifier, setIdentifier] = useState('');
|
const [identifier, setIdentifier] = useState('');
|
||||||
|
@ -45,6 +47,13 @@ export default function ProcessInstanceListSaveAsReport({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (processStatusSelection.length > 0) {
|
||||||
|
filterByArray.push({
|
||||||
|
field_name: 'process_status',
|
||||||
|
field_value: processStatusSelection[0], // TODO: support more than one status
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
HttpService.makeCallToBackend({
|
HttpService.makeCallToBackend({
|
||||||
path: `/process-instances/reports`,
|
path: `/process-instances/reports`,
|
||||||
successCallback: onSuccess,
|
successCallback: onSuccess,
|
||||||
|
|
|
@ -778,6 +778,7 @@ export default function ProcessInstanceListTable({
|
||||||
columnArray={reportColumns()}
|
columnArray={reportColumns()}
|
||||||
orderBy=""
|
orderBy=""
|
||||||
processModelSelection={processModelSelection}
|
processModelSelection={processModelSelection}
|
||||||
|
processStatusSelection={processStatusSelection}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue