Save first status
This commit is contained in:
parent
c3257e2d44
commit
5a99e9cc9e
|
@ -15,6 +15,7 @@ type OwnProps = {
|
|||
columnArray: { Header: string; accessor: string };
|
||||
orderBy: string;
|
||||
processModelSelection: ProcessModel | null;
|
||||
processStatusSelection: string[];
|
||||
buttonText?: string;
|
||||
};
|
||||
|
||||
|
@ -23,6 +24,7 @@ export default function ProcessInstanceListSaveAsReport({
|
|||
columnArray,
|
||||
orderBy,
|
||||
processModelSelection,
|
||||
processStatusSelection,
|
||||
buttonText = 'Save as Perspective',
|
||||
}: OwnProps) {
|
||||
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({
|
||||
path: `/process-instances/reports`,
|
||||
successCallback: onSuccess,
|
||||
|
|
|
@ -778,6 +778,7 @@ export default function ProcessInstanceListTable({
|
|||
columnArray={reportColumns()}
|
||||
orderBy=""
|
||||
processModelSelection={processModelSelection}
|
||||
processStatusSelection={processStatusSelection}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue