more
This commit is contained in:
@@ -187,7 +187,7 @@ const DocEditPage = (props) => {
|
|||||||
// NEVER CHANGE THIS:
|
// NEVER CHANGE THIS:
|
||||||
return { showInputEle: false, resp: item.text, index: index };
|
return { showInputEle: false, resp: item.text, index: index };
|
||||||
});
|
});
|
||||||
setResponses(resp);
|
setParsedRogs(resp);
|
||||||
})
|
})
|
||||||
.catch((err) => console.log(err));
|
.catch((err) => console.log(err));
|
||||||
}, [documentId]);
|
}, [documentId]);
|
||||||
@@ -218,7 +218,6 @@ const DocEditPage = (props) => {
|
|||||||
if (!docId || !docType) {
|
if (!docId || !docType) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("docId, docType", docId, docType);
|
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${apiUrl}/v1/get-completions/${docId}/${docType}`,
|
`${apiUrl}/v1/get-completions/${docId}/${docType}`,
|
||||||
{
|
{
|
||||||
@@ -242,6 +241,7 @@ const DocEditPage = (props) => {
|
|||||||
.catch((err) => console.log(err));
|
.catch((err) => console.log(err));
|
||||||
}, [documentId, docType]);
|
}, [documentId, docType]);
|
||||||
console.log("responses", responses);
|
console.log("responses", responses);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
async function getOutgoingRequests(documentId) {
|
async function getOutgoingRequests(documentId) {
|
||||||
console.log("getOutgoingRequests fired--------------------");
|
console.log("getOutgoingRequests fired--------------------");
|
||||||
@@ -397,27 +397,6 @@ const DocEditPage = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!documentId || !docType) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getParsedRequests(documentId, docType)
|
|
||||||
.then((data) => {
|
|
||||||
const resp = data[0].responses.map((item, index) => {
|
|
||||||
// NEVER CHANGE THIS:
|
|
||||||
return { showInputEle: false, resp: item.text, index: index };
|
|
||||||
});
|
|
||||||
return resp;
|
|
||||||
})
|
|
||||||
.then((resp) => {
|
|
||||||
console.log("knksdjfksdfn resp", resp);
|
|
||||||
setParsedRogs(resp);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log("Error getting parsed requestas:", err);
|
|
||||||
});
|
|
||||||
}, [documentId, docType]);
|
|
||||||
|
|
||||||
const handleConfirmReport = () => {
|
const handleConfirmReport = () => {
|
||||||
setShowSaveModal(true);
|
setShowSaveModal(true);
|
||||||
setIsReport(true);
|
setIsReport(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user