more
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user