@@ -28,6 +28,7 @@ const CaseDetailsPage = () => {
|
|||||||
const [docsAllowed, setDocsAllowed] = useState(null);
|
const [docsAllowed, setDocsAllowed] = useState(null);
|
||||||
const [docsGenerated, setDocsGenerated] = useState(null);
|
const [docsGenerated, setDocsGenerated] = useState(null);
|
||||||
const [docTypeUploaded, setDocTypeUploaded] = useState();
|
const [docTypeUploaded, setDocTypeUploaded] = useState();
|
||||||
|
const [document, setDocument] = useState(null);
|
||||||
const { appState } = useContext(AppContext);
|
const { appState } = useContext(AppContext);
|
||||||
const { group } = appState;
|
const { group } = appState;
|
||||||
const appUserId = group ? group.appUserId : null;
|
const appUserId = group ? group.appUserId : null;
|
||||||
@@ -39,26 +40,52 @@ const CaseDetailsPage = () => {
|
|||||||
? process.env.REACT_APP_API_DEV
|
? process.env.REACT_APP_API_DEV
|
||||||
: process.env.REACT_APP_API_PROD;
|
: process.env.REACT_APP_API_PROD;
|
||||||
|
|
||||||
const handleNavigate = (docId, caseId) => {
|
// isComplaint = true - NEVER CHANGE THESE ARGS
|
||||||
//documentId, responseGenerations, caseId, documentType
|
async function generateOutgoingDiscReq(docId, clientPosition) {
|
||||||
console.log("handle navigate fired docId", docId);
|
try {
|
||||||
let docType = "interrogatories";
|
const response = await fetch(
|
||||||
navigate(`/documents/${docId}/${docType}/${caseId}`);
|
`${apiUrl}/v1/generate-outgoing-disc-req/${docId}/${clientPosition}`,
|
||||||
};
|
{
|
||||||
|
method: "POST",
|
||||||
const handleNavEdit = (documentId, caseId) => {
|
|
||||||
if (!documentId || !caseId) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
console.log(
|
|
||||||
"hit handleNavEdit----------------------------------------------------------"
|
|
||||||
);
|
);
|
||||||
navigate(`/reqedit/${documentId}/interrogatories-out/${caseId}`);
|
const res = response;
|
||||||
};
|
return res;
|
||||||
|
} catch (err) {
|
||||||
|
console.log("generate out error", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// isComplaint = false - NEVER CHANGE THESE ARGS
|
||||||
|
async function generateRespIncomingDiscReq(docId, clientPosition) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(
|
||||||
|
`${apiUrl}/v1/generate-disc-responses/${docId}/${clientPosition}`,
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const res = response;
|
||||||
|
return res;
|
||||||
|
} catch (err) {
|
||||||
|
console.log("gen resp err", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const handleBack = () => {
|
async function handleSuccess(docId, docType, radioValue) {
|
||||||
navigate("/cases");
|
setShowUploadModal(false);
|
||||||
};
|
const clientPosition = subCase.clientPosition;
|
||||||
|
console.log("handle success in details page ~~~~~~~~~> docType", docType);
|
||||||
|
|
||||||
|
if (docType === "complaint") {
|
||||||
|
const isComplaint = true;
|
||||||
|
generateOutgoingDiscReq(docId, isComplaint, clientPosition);
|
||||||
|
setTimeout(handleNavEdit, 60000, docId, caseId);
|
||||||
|
} else {
|
||||||
|
const isComplaint = false;
|
||||||
|
generateRespIncomingDiscReq(docId, isComplaint, clientPosition);
|
||||||
|
setTimeout(handleNavigate, 60000, docId, caseId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getCase() {
|
function getCase() {
|
||||||
const docRef = doc(db, "cases", caseId);
|
const docRef = doc(db, "cases", caseId);
|
||||||
@@ -81,6 +108,7 @@ const CaseDetailsPage = () => {
|
|||||||
const response = await getDoc(docRef).then(function (doc) {
|
const response = await getDoc(docRef).then(function (doc) {
|
||||||
if (doc.exists) {
|
if (doc.exists) {
|
||||||
const data = doc.data();
|
const data = doc.data();
|
||||||
|
console.log("data", data);
|
||||||
setDocsAllowed(data.docsAllowedPerMonth);
|
setDocsAllowed(data.docsAllowedPerMonth);
|
||||||
setDocsGenerated(data.docsGenerated);
|
setDocsGenerated(data.docsGenerated);
|
||||||
return data;
|
return data;
|
||||||
@@ -96,6 +124,7 @@ const CaseDetailsPage = () => {
|
|||||||
}, [fbUserId]);
|
}, [fbUserId]);
|
||||||
|
|
||||||
const handleUploadDoc = () => {
|
const handleUploadDoc = () => {
|
||||||
|
console.log("docAllowed, docsGenewrated", docsAllowed, docsGenerated);
|
||||||
if (docsAllowed - docsGenerated > 0) {
|
if (docsAllowed - docsGenerated > 0) {
|
||||||
setShowUploadModal(true);
|
setShowUploadModal(true);
|
||||||
} else {
|
} else {
|
||||||
@@ -103,6 +132,26 @@ const CaseDetailsPage = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleNavigate = (docId, caseId) => {
|
||||||
|
console.log("handle navigate fired docId", docId);
|
||||||
|
const responseGenerations = 1;
|
||||||
|
navigate(`/docedit/${docId}/${responseGenerations}/${caseId}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleNavEdit = (documentId, caseId) => {
|
||||||
|
if (!documentId || !caseId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log(
|
||||||
|
"hit handleNavEdit----------------------------------------------------------"
|
||||||
|
);
|
||||||
|
navigate(`/reqedit/${documentId}/interrogatories-out/${caseId}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleBack = () => {
|
||||||
|
navigate("/cases");
|
||||||
|
};
|
||||||
|
|
||||||
const handleConfirmDocType = (docType) => {
|
const handleConfirmDocType = (docType) => {
|
||||||
setShowConfirmModal(true);
|
setShowConfirmModal(true);
|
||||||
};
|
};
|
||||||
@@ -117,39 +166,6 @@ const CaseDetailsPage = () => {
|
|||||||
navigate(`/signup/${isUpgrade}/${currentPlan}`);
|
navigate(`/signup/${isUpgrade}/${currentPlan}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
async function generateOutgoingDiscoveryRequests(
|
|
||||||
docId,
|
|
||||||
radioValue,
|
|
||||||
clientPosition
|
|
||||||
) {
|
|
||||||
const response = await fetch(
|
|
||||||
`${apiUrl}/v1/make-outgoing-requests/${docId}/${radioValue}/${clientPosition}`,
|
|
||||||
{
|
|
||||||
method: "POST",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
const res = response;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleSuccess(docId, docType, radioValue) {
|
|
||||||
setShowUploadModal(false);
|
|
||||||
console.log(
|
|
||||||
" handle success in main pagedocId, docType, radioValue",
|
|
||||||
docId,
|
|
||||||
docType,
|
|
||||||
radioValue
|
|
||||||
);
|
|
||||||
if (docType === "complaint") {
|
|
||||||
const clientPosition = subCase.clientPosition;
|
|
||||||
generateOutgoingDiscoveryRequests(docId, radioValue, clientPosition);
|
|
||||||
setTimeout(handleNavEdit, 60000, docId, caseId);
|
|
||||||
} else {
|
|
||||||
// try to kick off parsing here
|
|
||||||
setTimeout(handleNavigate, 40000, docId, caseId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const ButtonContent = () => {
|
const ButtonContent = () => {
|
||||||
return (
|
return (
|
||||||
<div className="details-button-container">
|
<div className="details-button-container">
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ const UploadModal = (props) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (radioValue.toLowerCase() === "complaint") {
|
if (radioValue.toLowerCase() === "complaint") {
|
||||||
const response = await fetch(`${apiUrl}/v1/gen-disc-request-out`, {
|
const response = await fetch(`${apiUrl}/v1/parse-new-compdoc`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: file,
|
body: file,
|
||||||
});
|
});
|
||||||
@@ -189,6 +189,7 @@ const UploadModal = (props) => {
|
|||||||
const response = await processFile();
|
const response = await processFile();
|
||||||
saveToDb(response.uuidName);
|
saveToDb(response.uuidName);
|
||||||
const docId = response.uuidName;
|
const docId = response.uuidName;
|
||||||
|
console.log("radioValue in modal", radioValue);
|
||||||
setTimeout(handleSuccess, 10000, docId, radioValue);
|
setTimeout(handleSuccess, 10000, docId, radioValue);
|
||||||
return;
|
return;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ export const rogInstructions = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const rogDefinitions = [
|
export const rogDefinitions = [
|
||||||
|
{
|
||||||
|
text: '"And" and "or" have both conjunctive and disjunctive meanings as necessary to bring within the scope of each request all documents and information that might otherwise be construed to be outside its scope."',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "545bff8d-66de-47fd-9f01-26c945ba8db3",
|
id: "545bff8d-66de-47fd-9f01-26c945ba8db3",
|
||||||
text: "'You' refers to the party to whom the requests are addressed and any additional parties or entities as described in the foregoing instructions and these definitions.",
|
text: "'You' refers to the party to whom the requests are addressed and any additional parties or entities as described in the foregoing instructions and these definitions.",
|
||||||
@@ -45,7 +48,7 @@ export const rogDefinitions = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "dda1376c-3d42-471f-9cb8-4a1ecb9c10cc",
|
id: "dda1376c-3d42-471f-9cb8-4a1ecb9c10cc",
|
||||||
text: "“Document” means and includes all written and graphic matter of every kind and description, whether printed or produced by any process or by hand, whether final draft or reproduction, whether in the actual or constructive possession, custody or control of the respondent to a given interrogatory, including any and all written letters, correspondence, memoranda, notes, statements, transcripts, files, charters, articles of incorporation, securities, bonds, stocks, certificates of deposit, evidences of debt, contracts, agreements, licenses, memoranda or notes of telephone or personal conversations, work papers, tapes, charts, reports, books, ledgers, telegrams, sound recordings, books of account, customer account statements, financial statements, catalogs, checks, check stubs, and written statements of witnesses or other persons having knowledge pertaining to the pertinent facts requested or relating to the interrogatory or subpart thereof, whether or not these documents are claimed to be privileged against disclosure.",
|
text: "“Document” means and includes all written and graphic matter of every kind and description, whether printed or produced by any mechanical, digital or other process, or by hand, whether final draft or reproduction, whether in the actual or constructive possession, custody or control of the respondent to a given interrogatory. This includes any and all written letters, correspondence, memoranda, notes, statements, transcripts, files, charters, articles of incorporation, securities, bonds, stocks, certificates of deposit, evidences of debt, contracts, agreements, licenses, memoranda or notes of telephone or personal conversations, work papers, tapes, charts, reports, books, ledgers, telegrams, sound recordings, books of account, customer account statements, financial statements, catalogs, checks, check stubs, and written statements of witnesses or other persons having knowledge pertaining to the pertinent facts requested or relating to the interrogatory or subpart thereof, whether or not these documents are claimed to be privileged against disclosure.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "05970162-1b13-4f98-ac73-91da0c8f0bf4",
|
id: "05970162-1b13-4f98-ac73-91da0c8f0bf4",
|
||||||
@@ -108,12 +111,12 @@ export const standardProd = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "0d648f06-b6f9-4264-bcf2-c3111fe3f976",
|
id: "0d648f06-b6f9-4264-bcf2-c3111fe3f976",
|
||||||
text: "All written reports of all expert witnesses with whom you or your attorneys have consulted, including, of course, those persons you expect to call as an expert witness at trial.",
|
text: "All written reports of all expert witnesses with whom you or your attorneys have consulted, including but not limited to those you expect to and/or have identified as persons you will call as expert witnesses at any trial of this action.",
|
||||||
index: 1,
|
index: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "8c8573de-1a5c-4828-ba99-d51f610136a5",
|
id: "8c8573de-1a5c-4828-ba99-d51f610136a5",
|
||||||
text: "All documents upon which any expert witness upi intend to call at trial relied upon in formulating an opinion about the subject matter of this action.",
|
text: "All documents upon which any expert witness you intend to call at trial relied upon in formulating an opinion about the subject matter of this action.",
|
||||||
index: 2,
|
index: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -128,7 +131,7 @@ export const standardProd = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "eb382a63-1c0b-4a78-9bba-d67380bb6367",
|
id: "eb382a63-1c0b-4a78-9bba-d67380bb6367",
|
||||||
text: "All invoices generated by expert witnesses generated for performing all expert witness services to you, including but not limited to, fees for the medical examination, the records review, the pretrial preparation, any telephone conference, any trial testimony anticipated and any other fee paid for expert fees.",
|
text: "All invoices generated by expert witnesses for performing expert witness services to you, including but not limited to fees for medical examination, records review, pretrial preparation, any telephone conference, any trial testimony anticipated and any other fee paid to experts.",
|
||||||
index: 5,
|
index: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -138,7 +141,7 @@ export const standardProd = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "495b094d-36f2-4a83-971e-54b1b5312515",
|
id: "495b094d-36f2-4a83-971e-54b1b5312515",
|
||||||
text: "All documents, photographs, videotapes or audio tapes, recordings in any medium, diagnostic images, diagrams, records, surveys or other graphic representations of information concerning the subject matter of this action.",
|
text: "All documents, photographs, videotapes or audio tapes, digital recordings or recordings in any medium, diagnostic images, diagrams, records, surveys or other graphic representations of information concerning the subject matter/occurrences that form the basis of this action.",
|
||||||
index: 7,
|
index: 7,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -148,12 +151,12 @@ export const standardProd = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "7b85bf1d-ce31-4cb5-baac-b678f3afb418",
|
id: "7b85bf1d-ce31-4cb5-baac-b678f3afb418",
|
||||||
text: "Any documents identified in any other parties’ answers to Interrogatories in your possession, if any.",
|
text: "Any documents identified or described in any other parties' answers to Interrogatories that are in your possession, custody or control.",
|
||||||
index: 9,
|
index: 9,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "5b2033f9-2d14-49d4-848a-8c3630bb78d8",
|
id: "5b2033f9-2d14-49d4-848a-8c3630bb78d8",
|
||||||
text: "Any documents received pursuant to a subpoena request in this case.",
|
text: "Any documents received pursuant to a subpoena duces tecum or a request under the Freedom of Information Act in this case.",
|
||||||
index: 10,
|
index: 10,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -163,7 +166,7 @@ export const standardProd = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "0012041e-8618-4864-b084-9c354261731a",
|
id: "0012041e-8618-4864-b084-9c354261731a",
|
||||||
text: "Copies of any treaties, standards in the industry, legal authority, rule, case, statute, or code that will be relied upon in the defense of this case.",
|
text: "Copies of any treaties, standards in the industry, legal authority, rule, case, statute, or code that will be relied upon in the prosecution of this action.",
|
||||||
index: 12,
|
index: 12,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
|
|
||||||
.user-name-container {
|
.user-name-container {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-left: 7px;
|
margin-left: 7px !important;
|
||||||
color: var(--font-light);
|
color: var(--font-light);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user