edit a partial completed appeal
This commit is contained in:
@@ -3,6 +3,7 @@ import data from "../../data/collections.json";
|
||||
import {
|
||||
getBasicSearchDetails,
|
||||
getBasicSearchDetailsPaged,
|
||||
getBasicPartSavedDetails,
|
||||
} from "../../actions";
|
||||
|
||||
/*
|
||||
@@ -69,6 +70,37 @@ export const getSearchDetails = (searchResultsObj) => {
|
||||
return Promise.all(detailsArr);
|
||||
};
|
||||
|
||||
/*
|
||||
* Get the partially saved details of a case from the appeal type
|
||||
* @param object searchResultsObj
|
||||
*/
|
||||
export const getPartSavedDetails = (searchResultsObj) => {
|
||||
//console.log(searchResultsObj);
|
||||
|
||||
let detailsArr = [];
|
||||
searchResultsObj = searchResultsObj.value;
|
||||
const detailsObj = searchResultsObj.map((searchDetail, index) => {
|
||||
if (searchDetail.pinswg_appealcasetype == null) {
|
||||
console.log(searchDetail.title);
|
||||
} else {
|
||||
let formMeta = getFormCollectionByID(
|
||||
searchDetail.pinswg_appealcasetype
|
||||
);
|
||||
console.log(formMeta);
|
||||
detailsArr.push(
|
||||
getBasicPartSavedDetails(
|
||||
formMeta.LogicalCollectionName,
|
||||
searchDetail.title,
|
||||
formMeta.PrimaryIdAttribute,
|
||||
searchDetail.incidentid
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
//console.log(detailsArr);
|
||||
return Promise.all(detailsArr);
|
||||
};
|
||||
|
||||
/*
|
||||
* Get the details of a case from the appeal type
|
||||
* @param object searchResultsObj
|
||||
|
||||
Reference in New Issue
Block a user