From 874960ed562699c7c49f41fb4006cc02514bb9a9 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Sat, 9 Mar 2024 08:34:20 -0600 Subject: [PATCH] more --- src/Components/Document/ReqEditPage.js | 64 ++++++++++++++------------ src/Constants/Copy/reqEditCopy.js | 4 +- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/Components/Document/ReqEditPage.js b/src/Components/Document/ReqEditPage.js index 2b03e0e..d981bbb 100644 --- a/src/Components/Document/ReqEditPage.js +++ b/src/Components/Document/ReqEditPage.js @@ -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 = () => {
INTERROGATORIES
- {requests?.map((req, i) => ( -
-
{`${i + 1}.`}
-
- 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) => ( +
+
{`${i + 1}.`}
+
+ 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 FOR PRODUCTION
diff --git a/src/Constants/Copy/reqEditCopy.js b/src/Constants/Copy/reqEditCopy.js index 7fd440a..87feb1d 100644 --- a/src/Constants/Copy/reqEditCopy.js +++ b/src/Constants/Copy/reqEditCopy.js @@ -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",