more
This commit is contained in:
@@ -117,6 +117,7 @@ const CaseDetailsPage = () => {
|
||||
if (docType === "interrogatories-out") {
|
||||
setTimeout(handleNavEdit, 40000, docId, caseId);
|
||||
} else {
|
||||
// try to kick off parsing here
|
||||
setTimeout(handleNavigate, 40000, docId, caseId);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -63,8 +63,9 @@ const RequestEditPage = () => {
|
||||
? process.env.REACT_APP_API_DEV
|
||||
: process.env.REACT_APP_API_PROD;
|
||||
console.log("documentId", documentId);
|
||||
|
||||
useEffect(() => {
|
||||
if (!appUserId || !docId) {
|
||||
if (!appUserId || !documentId) {
|
||||
setDocument(null);
|
||||
return;
|
||||
}
|
||||
@@ -74,7 +75,7 @@ const RequestEditPage = () => {
|
||||
} catch (err) {
|
||||
console.log("Error:", err);
|
||||
}
|
||||
}, [appUserId, docId, caseId]);
|
||||
}, [appUserId, documentId, caseId]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!documentId || !documentType) {
|
||||
@@ -92,6 +93,7 @@ const RequestEditPage = () => {
|
||||
})
|
||||
.catch((err) => console.log(err));
|
||||
}, [documentId]);
|
||||
|
||||
async function getCase(parentCaseId) {
|
||||
try {
|
||||
const docRef = doc(db, "cases", `${parentCaseId}`);
|
||||
@@ -108,8 +110,10 @@ const RequestEditPage = () => {
|
||||
}
|
||||
}
|
||||
|
||||
async function getOutgoingRequests(docId) {
|
||||
async function getOutgoingRequests(documentId) {
|
||||
console.log("get out going requests called times:");
|
||||
const docType = String(documentType);
|
||||
const docId = String(documentId);
|
||||
const response = await fetch(
|
||||
`${apiUrl}/v1/get-outgoing-requests/${docId}/${docType}`,
|
||||
{
|
||||
|
||||
@@ -127,12 +127,15 @@ const UploadModal = (props) => {
|
||||
if (!clientPosition) {
|
||||
return;
|
||||
}
|
||||
const now = new Date();
|
||||
try {
|
||||
if (radioValue.toLowerCase() === "complaint") {
|
||||
if (clientPosition === "Plaintiff") {
|
||||
console.log(
|
||||
"111111111--------------------------sending POST to:",
|
||||
`${apiUrl}/v1/gen-disc-request-pl`
|
||||
`${apiUrl}/v1/gen-disc-request-pl`,
|
||||
"----------------------------------------at time:",
|
||||
`${now}`
|
||||
);
|
||||
const response = await fetch(`${apiUrl}/v1/gen-disc-request-pl`, {
|
||||
method: "POST",
|
||||
@@ -143,7 +146,9 @@ const UploadModal = (props) => {
|
||||
} else if (clientPosition === "Defendant") {
|
||||
console.log(
|
||||
"222222222------------------------------sending POST to:",
|
||||
`${apiUrl}/v1/gen-disc-request-df`
|
||||
`${apiUrl}/v1/gen-disc-request-df`,
|
||||
"----------------------------------------at time:",
|
||||
`${now}`
|
||||
);
|
||||
const response = await fetch(`${apiUrl}/v1/gen-disc-request-df`, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user