diff --git a/src/Components/Case/CaseDetailsPage.js b/src/Components/Case/CaseDetailsPage.js index b5bd953..bb5a613 100644 --- a/src/Components/Case/CaseDetailsPage.js +++ b/src/Components/Case/CaseDetailsPage.js @@ -43,10 +43,12 @@ const CaseDetailsPage = () => { navigate(`/documents/${docId}/${docType}/${caseId}`); }; - const handleNavEdit = (documentId, reqType, caseId) => { - const documentType = reqType; + const handleNavEdit = (documentId, caseId) => { + if (!documentId || !caseId) { + return; + } - navigate(`/reqedit/${documentId}/${documentType}/${caseId}`); + navigate(`/reqedit/${documentId}/interrogatories-out/${caseId}`); }; const handleBack = () => { diff --git a/src/Components/Document/ReqEditPage.js b/src/Components/Document/ReqEditPage.js index f2637e1..67c0d77 100644 --- a/src/Components/Document/ReqEditPage.js +++ b/src/Components/Document/ReqEditPage.js @@ -8,7 +8,11 @@ import LoadingSpinner from "../../pageElements/LoadingSpinner"; import { docEditCopy } from "../../Constants/Copy/docEditCopy.js"; import ConfirmModal from "../Modals/ConfirmModal"; import Button from "../../pageElements/Button"; -import { rogInstructions } from "../../Constants/Copy/reqEditCopy.js"; +import { + rogInstructions, + rogDefinitions, + foundationRogs, +} from "../../Constants/Copy/reqEditCopy.js"; import { db } from "../../firebase"; import { collection, @@ -78,11 +82,6 @@ const RequestEditPage = () => { } }, [appUserId, docId, caseId]); - /* - * GET parsed requests. - * GET completions if already generated - */ - useEffect(() => { if (!documentId || !documentType) { return; @@ -94,7 +93,8 @@ const RequestEditPage = () => { // NEVER CHANGE THIS: return { showInputEle: false, text: item.text, index: index }; }); - setRequests(resp); + const merged = [...foundationRogs, ...resp]; + setRequests(merged); }) .catch((err) => console.log(err)); }, [documentId]); @@ -313,7 +313,7 @@ const RequestEditPage = () => { } return
{`${numText}${i + 1} `}
; }; - + console.log("fetchedCase", fetchedCase); const respondent = fetchedCase?.clientPosition == "Defendant" ? fetchedCase?.defendantParties @@ -357,6 +357,15 @@ const RequestEditPage = () => { ))} +
+
DEFINITIONS
+ {rogDefinitions?.map((req, i) => ( +
+
{`${i + 1}.`}
+
{req?.text}
+
+ ))} +
INTERROGATORIES
{requests?.map((req, i) => ( diff --git a/src/Constants/Copy/reqEditCopy.js b/src/Constants/Copy/reqEditCopy.js index fc05648..fa0d205 100644 --- a/src/Constants/Copy/reqEditCopy.js +++ b/src/Constants/Copy/reqEditCopy.js @@ -34,10 +34,10 @@ export const rogInstructions = [ }, ]; -export const rogDefinitiions = [ +export const rogDefinitions = [ { id: "545bff8d-66de-47fd-9f01-26c945ba8db3", - text: "'You' refers to the party to whom the requests are addressed and any addiitonal parties or entities as described above.", + text: "'You' refers to the party to whom the requests are addressed and any addiitonal parties or entities as described in the foregoing instructions and these definitions.", }, { id: "f218a1f6-4d21-4b53-b1c2-69e2d60b95bb",