This commit is contained in:
Kenneth Jannette
2024-03-09 12:33:05 -06:00
parent 71213600ff
commit 6a23c84e9f
5 changed files with 13 additions and 10 deletions

View File

@@ -69,23 +69,24 @@ const RequestEditPage = () => {
}, [appUserId, documentId, caseId]);
useEffect(() => {
if (!documentId || !documentType) {
if (!documentId) {
return;
}
getOutgoingRequests(documentId)
.then((data) => {
console.log(
"-------------------------data[0].requests",
data[0].requests
);
const merged = [...foundationRogs, ...data[0].requests];
console.log("merged", merged);
const resp = merged?.map((item, index) => {
// NEVER CHANGE THIS:
return { showInputEle: false, text: item.text, index: index };
});
if (!resp.length > 10) {
return;
if (resp.length > 10) {
setRequests(resp);
setProdReq(standardProd);
}
console.log("resp", resp);
setRequests(resp);
setProdReq(standardProd);
})
.catch((err) => console.log(err));
}, [documentId]);
@@ -107,6 +108,7 @@ const RequestEditPage = () => {
}
async function getOutgoingRequests(documentId) {
console.log("getOutgoingRequests fired--------------------");
if (!documentId) {
return;
}