Choose new report
This commit is contained in:
parent
49e4db6ae2
commit
589361b7fc
|
@ -41,6 +41,12 @@ export default function ProcessInstanceListSaveAsReport({
|
|||
return identifier?.length > 0;
|
||||
};
|
||||
|
||||
const responseHandler = (result: any) => {
|
||||
if (result.ok === true) {
|
||||
onSuccess(identifier);
|
||||
}
|
||||
};
|
||||
|
||||
const addProcessInstanceReport = (event: any) => {
|
||||
event.preventDefault();
|
||||
|
||||
|
@ -92,7 +98,7 @@ export default function ProcessInstanceListSaveAsReport({
|
|||
|
||||
HttpService.makeCallToBackend({
|
||||
path: `/process-instances/reports`,
|
||||
successCallback: onSuccess,
|
||||
successCallback: responseHandler,
|
||||
httpMethod: 'POST',
|
||||
postBody: {
|
||||
identifier,
|
||||
|
|
|
@ -367,6 +367,7 @@ export default function ProcessInstanceListTable({
|
|||
}
|
||||
};
|
||||
|
||||
// TODO: after factoring this out page hangs when invalid date ranges and applying the filter
|
||||
const calculateStartAndEndSeconds = () => {
|
||||
const startFromSeconds = convertDateAndTimeStringsToSeconds(
|
||||
startFromDate,
|
||||
|
@ -793,7 +794,11 @@ export default function ProcessInstanceListTable({
|
|||
|
||||
const saveAsReportComponent = () => {
|
||||
// TODO onSuccess reload/select the new report in the report search
|
||||
const callback = (_: any) => {};
|
||||
const callback = (identifier: string) => {
|
||||
processInstanceReportDidChange({
|
||||
selectedItem: { id: identifier, display_name: identifier },
|
||||
});
|
||||
};
|
||||
const {
|
||||
valid,
|
||||
startFromSeconds,
|
||||
|
|
Loading…
Reference in New Issue