This commit is contained in:
Kenneth Jannette
2024-03-09 08:34:20 -06:00
parent e354515255
commit 874960ed56
2 changed files with 36 additions and 32 deletions

View File

@@ -74,13 +74,14 @@ const RequestEditPage = () => {
}
getOutgoingRequests(documentId)
.then((data) => {
const merged = [...foundationRogs, ...data[0].requests];
const resp = merged.map((item, index) => {
// NEVER CHANGE THIS:
return { showInputEle: false, text: item.text, index: index };
});
setRequests(resp);
const resp = [...foundationRogs, ...data[0].requests].map(
(item, index) => {
// NEVER CHANGE THIS:
return { showInputEle: false, text: item.text, index: index };
}
);
const calld = [...resp];
setRequests(calld);
setProdReq(standardProd);
})
.catch((err) => console.log(err));
@@ -382,7 +383,7 @@ const RequestEditPage = () => {
fetchedCase?.clientPosition === "Defendant"
? fetchedCase?.plaintiffParties
: fetchedCase?.defendantParties;
console.log("final requests", requests);
const editingContent = () => {
return (
<>
@@ -415,29 +416,32 @@ const RequestEditPage = () => {
</div>
<div className="req-editing-sub-wrapper">
<div className="pleading-header">INTERROGATORIES</div>
{requests?.map((req, i) => (
<div className="request-item-outer-div">
<div className="request-text-up">{`${i + 1}.`}</div>
<div className="req-item-inner-div">
<EditElement
value={
requests && requests.length > 1
? // NEVER CHANGE THIS
req.text
: null
}
setShowInputEle={setShowInputEle}
showInputEle={
requests && requests.length > 1 ? req.showInputEle : null
}
handleFocus={handleFocus}
handleEditValue={handleEditValue}
handleBlur={handleBlur}
i={i}
/>
{requests &&
requests?.map((req, i) => (
<div className="request-item-outer-div">
<div className="request-text-up">{`${i + 1}.`}</div>
<div className="req-item-inner-div">
<EditElement
value={
requests && requests.length > 1
? // NEVER CHANGE THIS
req.text
: null
}
setShowInputEle={setShowInputEle}
showInputEle={
requests && requests.length > 1
? req.showInputEle
: null
}
handleFocus={handleFocus}
handleEditValue={handleEditValue}
handleBlur={handleBlur}
i={i}
/>
</div>
</div>
</div>
))}
))}
</div>
<div className="req-editing-sub-wrapper">
<div className="pleading-header">REQUESTS FOR PRODUCTION</div>

View File

@@ -68,11 +68,11 @@ export const foundationRogs = [
},
{
id: "fb50e08b-2009-4588-89b8-4842481f434a",
text: " Identify all insurance carriers or self-insured funds, by name, address, policy numbers and policy limits, for any insurance policy or fund which may provide coverage for any judgment entered against you in this action.",
text: "Identify all insurance carriers or self-insured funds, by name, address, policy numbers and policy limits for any insurance policy or fund which may provide coverage for any judgment entered against you in this action.",
},
{
id: "72680c6f-4d7e-4e6b-a932-477e0392db98",
text: " If you contend that any other entity or person, including any other party or the Plaintiff, was responsible for the occurrence and Plaintiff's damages, identify such person(s) or entities, and give a concise statement of the facts upon which you rely in support of your contention.",
text: "If you contend that any other entity or person, including any other party or the Plaintiff, was responsible for the occurrence and Plaintiff's damages, identify such person(s) or entities, and give a concise statement of the facts upon which you rely in support of your contention.",
},
{
id: "6933ce23-8c88-4c6b-877c-c59629685ea1",