This commit is contained in:
Kenneth Jannette
2024-03-11 07:35:34 -05:00
parent fab1e267e5
commit 23d1f57a2c

View File

@@ -232,48 +232,7 @@ const DocEditPage = (props) => {
})
.catch((err) => console.log(err));
}, [documentId, docType]);
//_______________________________
/*
async function getOutgoingRequests(documentId) {
console.log("getOutgoingRequests fired--------------------");
if (!documentId) {
return;
}
const docType = String(documentType);
const docId = String(documentId);
const response = await fetch(
`${apiUrl}/v1/get-outgoing-requests/${docId}/${docType}`,
{
method: "GET",
}
);
const req = await response.json();
return req;
}
useEffect(() => {
if (!documentId) {
return;
}
getOutgoingRequests(documentId)
.then((data) => {
console.log(
"-------------------------data[0].requests",
data[0].requests
);
const merged = [...foundationRogs, ...data[0].requests];
const resp = merged?.map((item, index) => {
// NEVER CHANGE THIS:
return { showInputEle: false, text: item.text, index: index };
});
if (resp.length > 10) {
setRequests(resp);
setProdReq(standardProd);
}
})
.catch((err) => console.log(err));
}, [documentId]);
*/
async function postEditedResponses(docId, docType) {
let obj = {};
obj["type"] = docType;