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) getOutgoingRequests(documentId)
.then((data) => { .then((data) => {
const merged = [...foundationRogs, ...data[0].requests]; const resp = [...foundationRogs, ...data[0].requests].map(
const resp = merged.map((item, index) => { (item, index) => {
// NEVER CHANGE THIS: // NEVER CHANGE THIS:
return { showInputEle: false, text: item.text, index: index }; return { showInputEle: false, text: item.text, index: index };
}); }
);
setRequests(resp); const calld = [...resp];
setRequests(calld);
setProdReq(standardProd); setProdReq(standardProd);
}) })
.catch((err) => console.log(err)); .catch((err) => console.log(err));
@@ -382,7 +383,7 @@ const RequestEditPage = () => {
fetchedCase?.clientPosition === "Defendant" fetchedCase?.clientPosition === "Defendant"
? fetchedCase?.plaintiffParties ? fetchedCase?.plaintiffParties
: fetchedCase?.defendantParties; : fetchedCase?.defendantParties;
console.log("final requests", requests);
const editingContent = () => { const editingContent = () => {
return ( return (
<> <>
@@ -415,7 +416,8 @@ const RequestEditPage = () => {
</div> </div>
<div className="req-editing-sub-wrapper"> <div className="req-editing-sub-wrapper">
<div className="pleading-header">INTERROGATORIES</div> <div className="pleading-header">INTERROGATORIES</div>
{requests?.map((req, i) => ( {requests &&
requests?.map((req, 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">
@@ -428,7 +430,9 @@ const RequestEditPage = () => {
} }
setShowInputEle={setShowInputEle} setShowInputEle={setShowInputEle}
showInputEle={ showInputEle={
requests && requests.length > 1 ? req.showInputEle : null requests && requests.length > 1
? req.showInputEle
: null
} }
handleFocus={handleFocus} handleFocus={handleFocus}
handleEditValue={handleEditValue} handleEditValue={handleEditValue}

View File

@@ -68,7 +68,7 @@ export const foundationRogs = [
}, },
{ {
id: "fb50e08b-2009-4588-89b8-4842481f434a", 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", id: "72680c6f-4d7e-4e6b-a932-477e0392db98",