@@ -35,8 +35,10 @@ const RequestEditPage = () => {
|
|||||||
const { group } = appState;
|
const { group } = appState;
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [requests, setRequests] = useState([1]);
|
const [requests, setRequests] = useState([1]);
|
||||||
|
const [prodReq, setProdReq] = useState();
|
||||||
const [fetchedCase, setFetchedCase] = useState();
|
const [fetchedCase, setFetchedCase] = useState();
|
||||||
const [showInputEle, setShowInputEle] = useState(true);
|
const [showInputEle, setShowInputEle] = useState(true);
|
||||||
|
const [showprodInputEle, setShowprodInputEle] = useState(true);
|
||||||
const [document, setDocument] = useState(null);
|
const [document, setDocument] = useState(null);
|
||||||
const appUserId = group ? group?.appUserId : null;
|
const appUserId = group ? group?.appUserId : null;
|
||||||
const [docId, setDocId] = useState(documentId);
|
const [docId, setDocId] = useState(documentId);
|
||||||
@@ -46,6 +48,7 @@ const RequestEditPage = () => {
|
|||||||
const [isReport, setIsReport] = useState(false);
|
const [isReport, setIsReport] = useState(false);
|
||||||
const [showErrorModal, setShowErrorModal] = useState(false);
|
const [showErrorModal, setShowErrorModal] = useState(false);
|
||||||
const [isBusy, setIsBusy] = useState(false);
|
const [isBusy, setIsBusy] = useState(false);
|
||||||
|
|
||||||
// Case Vars
|
// Case Vars
|
||||||
const state = group?.state[0] ? group.state[0].code : "ny";
|
const state = group?.state[0] ? group.state[0].code : "ny";
|
||||||
const lawFirm = group ? group?.firm : null;
|
const lawFirm = group ? group?.firm : null;
|
||||||
@@ -85,6 +88,7 @@ const RequestEditPage = () => {
|
|||||||
return { showInputEle: false, text: item.text, index: index };
|
return { showInputEle: false, text: item.text, index: index };
|
||||||
});
|
});
|
||||||
setRequests(resp);
|
setRequests(resp);
|
||||||
|
setProdReq(standardProd);
|
||||||
})
|
})
|
||||||
.catch((err) => console.log(err));
|
.catch((err) => console.log(err));
|
||||||
}, [documentId]);
|
}, [documentId]);
|
||||||
@@ -235,6 +239,19 @@ const RequestEditPage = () => {
|
|||||||
setRequests(newSelectedrequests);
|
setRequests(newSelectedrequests);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleProdBlur = (e, i) => {
|
||||||
|
const newSelectedrequests = requests?.map((r) => {
|
||||||
|
if (r.index === i) {
|
||||||
|
return {
|
||||||
|
...r,
|
||||||
|
showInputEle: !showInputEle,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
});
|
||||||
|
setRequests(newSelectedrequests);
|
||||||
|
};
|
||||||
|
|
||||||
const handleFocus = (arg, i) => {
|
const handleFocus = (arg, i) => {
|
||||||
const newSelectedrequests = requests?.map((r) => {
|
const newSelectedrequests = requests?.map((r) => {
|
||||||
if (r.index === i) {
|
if (r.index === i) {
|
||||||
@@ -248,11 +265,22 @@ const RequestEditPage = () => {
|
|||||||
setRequests(newSelectedrequests);
|
setRequests(newSelectedrequests);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleProdFocus = (arg, i) => {
|
||||||
|
const newSelectedrequests = requests?.map((r) => {
|
||||||
|
if (r.index === i) {
|
||||||
|
return {
|
||||||
|
...r,
|
||||||
|
showInputEle: !showInputEle,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
});
|
||||||
|
setRequests(newSelectedrequests);
|
||||||
|
};
|
||||||
|
|
||||||
const handleEditValue = (e, i) => {
|
const handleEditValue = (e, i) => {
|
||||||
console.log("e,i ", e, i);
|
|
||||||
const editingRes = requests?.map((r) => {
|
const editingRes = requests?.map((r) => {
|
||||||
if (r.index === i) {
|
if (r.index === i) {
|
||||||
console.log("r.inex", r.index);
|
|
||||||
return {
|
return {
|
||||||
...r,
|
...r,
|
||||||
text: e.target.value,
|
text: e.target.value,
|
||||||
@@ -263,6 +291,20 @@ const RequestEditPage = () => {
|
|||||||
setRequests(editingRes);
|
setRequests(editingRes);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleEditProdValue = (e, i) => {
|
||||||
|
console.log("e,i ", e, i);
|
||||||
|
const editingProd = standardProd?.map((r) => {
|
||||||
|
if (r.index === i) {
|
||||||
|
return {
|
||||||
|
...r,
|
||||||
|
text: e.target.value,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
});
|
||||||
|
setProdReq(editingProd);
|
||||||
|
};
|
||||||
|
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
navigate(`/documents`);
|
navigate(`/documents`);
|
||||||
};
|
};
|
||||||
@@ -365,24 +407,26 @@ const RequestEditPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="req-editing-sub-wrapper">
|
<div className="req-editing-sub-wrapper">
|
||||||
<div className="pleading-header">REQUESTS FOR PRODUCTION</div>
|
<div className="pleading-header">REQUESTS FOR PRODUCTION</div>
|
||||||
{standardProd?.map((req, i) => (
|
{prodReq?.map((preq, i) => (
|
||||||
<div className="request-item-outer-div">
|
<div className="request-item-outer-div">
|
||||||
<div className="request-text-up">{`${i + 1}.`}</div>
|
<div className="request-text-up">{`${i + 1}.`}</div>
|
||||||
<div className="req-item-inner-div">
|
<div className="req-item-inner-div">
|
||||||
<EditElement
|
<EditElement
|
||||||
value={
|
value={
|
||||||
requests && requests.length > 1
|
standardProd && standardProd.length > 1
|
||||||
? // NEVER CHANGE THIS
|
? // NEVER CHANGE THIS
|
||||||
req.text
|
preq.text
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
setShowInputEle={setShowInputEle}
|
setShowInputEle={setShowprodInputEle}
|
||||||
showInputEle={
|
showInputEle={
|
||||||
requests && requests.length > 1 ? req.showInputEle : null
|
standardProd && standardProd.length > 1
|
||||||
|
? preq.showInputEle
|
||||||
|
: null
|
||||||
}
|
}
|
||||||
handleFocus={handleFocus}
|
handleFocus={handleProdFocus}
|
||||||
handleEditValue={handleEditValue}
|
handleEditValue={handleEditProdValue}
|
||||||
handleBlur={handleBlur}
|
handleBlur={handleProdBlur}
|
||||||
i={i}
|
i={i}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -424,39 +468,3 @@ const RequestEditPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default RequestEditPage;
|
export default RequestEditPage;
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{displayCopy.prelimaryStatement(
|
|
||||||
documentType,
|
|
||||||
respondent,
|
|
||||||
servingParty
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
console.log("reqwuests in useEffect", requests);
|
|
||||||
|
|
||||||
{headerPicker(state, fetchedCase, onScrollClick)}
|
|
||||||
|
|
||||||
<EditElement
|
|
||||||
value={
|
|
||||||
requests && requests.length > 2
|
|
||||||
? // NEVER CHANGE THIS
|
|
||||||
requests[i].resp
|
|
||||||
: null
|
|
||||||
}
|
|
||||||
setShowInputEle={setShowInputEle}
|
|
||||||
showInputEle={
|
|
||||||
requests && requests.length > 2
|
|
||||||
? requests[i].showInputEle
|
|
||||||
: null
|
|
||||||
}
|
|
||||||
handleFocus={handleFocus}
|
|
||||||
handleEditValue={handleEditValue}
|
|
||||||
handleBlur={handleBlur}
|
|
||||||
i={i}
|
|
||||||
/>
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -104,53 +104,66 @@ export const standardProd = [
|
|||||||
{
|
{
|
||||||
id: "e0863692-c5da-4516-b85c-233a7f811a34",
|
id: "e0863692-c5da-4516-b85c-233a7f811a34",
|
||||||
text: "All documents identified, directly or indirectly, in your answers to Interrogatories.",
|
text: "All documents identified, directly or indirectly, in your answers to Interrogatories.",
|
||||||
|
index: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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, of course, those persons you expect to call as an expert witness at trial.",
|
||||||
|
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 upi intend to call at trial relied upon in formulating an opinion about the subject matter of this action.",
|
||||||
|
index: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "63ab0999-c877-4ebc-9094-6d343294411d",
|
id: "63ab0999-c877-4ebc-9094-6d343294411d",
|
||||||
text: "The most recent curriculum vitae of each expert whom you expect to call as an expert witness at trial.",
|
text: "The most recent curriculum vitae of each expert whom you expect to call as an expert witness at trial.",
|
||||||
|
index: 3,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "5b3ac105-c026-4f37-b335-2ab83adb6658",
|
id: "5b3ac105-c026-4f37-b335-2ab83adb6658",
|
||||||
text: "All notes, correspondence, bills, invoices, diagrams, photographs, or other documents prepared or reviewed by each person whom you expect to call as an expertwitness at trial.",
|
text: "All notes, correspondence, bills, invoices, diagrams, photographs, or other documents prepared or reviewed by each person whom you expect to call as an expertwitness at trial.",
|
||||||
|
index: 4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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 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.",
|
||||||
|
index: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "a07bbc03-2f14-4837-965b-67ee261f25e4",
|
id: "a07bbc03-2f14-4837-965b-67ee261f25e4",
|
||||||
text: "Any and all written, recorded, or signed statements of any party, including the plaintiff, defendant, witnesses, investigators, or agent, representative or employee of the parties concerning the subject matter of this action.",
|
text: "Any and all written, recorded, or signed statements of any party, including the plaintiff, defendant, witnesses, investigators, or agent, representative or employee of the parties concerning the subject matter of this action.",
|
||||||
|
index: 6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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, recordings in any medium, diagnostic images, diagrams, records, surveys or other graphic representations of information concerning the subject matter of this action.",
|
||||||
|
index: 7,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "cdcc44cf-13b2-4011-adb5-ed435156a0f8",
|
id: "cdcc44cf-13b2-4011-adb5-ed435156a0f8",
|
||||||
text: "Any documents which afforded, descirbed or pertained to liability insurance coverage for the occurrences which are the subject matter of the complaint.",
|
text: "Any documents which afforded, descirbed or pertained to liability insurance coverage for the occurrences which are the subject matter of the complaint.",
|
||||||
|
index: 8,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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 in any other parties’ answers to Interrogatories in your possession, if any.",
|
||||||
|
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 request in this case.",
|
||||||
|
index: 10,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "fe9ce1d8-265f-4ebc-9856-99715cbb23ee",
|
id: "fe9ce1d8-265f-4ebc-9856-99715cbb23ee",
|
||||||
text: "Any document prepared during the regular course of business as a result of the occurrence complained of in the complaint.",
|
text: "Any document prepared during the regular course of business as a result of the occurrence complained of in the complaint.",
|
||||||
|
index: 11,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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 defense of this case.",
|
||||||
|
index: 12,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user