more
This commit is contained in:
@@ -24,6 +24,15 @@ const DocEditPage = (props) => {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { documentId, caseId, docType, clientPosition, responseGenerations } =
|
const { documentId, caseId, docType, clientPosition, responseGenerations } =
|
||||||
useParams();
|
useParams();
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"documentId, caseId, docType, clientPosition, responseGenerations",
|
||||||
|
documentId,
|
||||||
|
caseId,
|
||||||
|
docType,
|
||||||
|
clientPosition,
|
||||||
|
responseGenerations
|
||||||
|
);
|
||||||
const [document, setDocument] = useState(null);
|
const [document, setDocument] = useState(null);
|
||||||
const [_docType, setDocType] = useState(docType);
|
const [_docType, setDocType] = useState(docType);
|
||||||
const [fetchedCase, setFetchedCase] = useState(null);
|
const [fetchedCase, setFetchedCase] = useState(null);
|
||||||
@@ -250,10 +259,10 @@ const DocEditPage = (props) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log("docType in second useEffect", docType);
|
console.log("docType in second useEffect", docType);
|
||||||
if (!docType || docType == "combined-numbered") {
|
if (!docType) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (responsesCreated > 1) {
|
if (responseGenerations > 1) {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
getCompletions(documentId, docType)
|
getCompletions(documentId, docType)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
@@ -268,7 +277,7 @@ const DocEditPage = (props) => {
|
|||||||
})
|
})
|
||||||
.catch((err) => console.log(err));
|
.catch((err) => console.log(err));
|
||||||
}
|
}
|
||||||
}, [documentId, docType, docType]);
|
}, [documentId, docType, responseGenerations]);
|
||||||
|
|
||||||
async function getParsedRogs(docId, docType) {
|
async function getParsedRogs(docId, docType) {
|
||||||
if (!docId || !docType) {
|
if (!docId || !docType) {
|
||||||
@@ -522,7 +531,8 @@ const DocEditPage = (props) => {
|
|||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
navigate(`/documents`);
|
navigate(`/documents`);
|
||||||
};
|
};
|
||||||
|
console.log("responses", responses);
|
||||||
|
console.log("parsedRogs", parsedRogs);
|
||||||
const editingContent = () => {
|
const editingContent = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user