more
This commit is contained in:
@@ -5,7 +5,10 @@ import { Link, useNavigate } from "react-router-dom";
|
||||
import { AppContext } from "../../Hooks/useContext/appContext";
|
||||
import EditElement from "../../pageElements/EditElement";
|
||||
import LoadingSpinner from "../../pageElements/LoadingSpinner";
|
||||
import { docEditCopy } from "../../Constants/Copy/docEditCopy.js";
|
||||
import {
|
||||
docEditCopy,
|
||||
outgoingComesNow,
|
||||
} from "../../Constants/Copy/docEditCopy.js";
|
||||
import ConfirmModal from "../Modals/ConfirmModal";
|
||||
import Button from "../../pageElements/Button";
|
||||
import {
|
||||
@@ -40,9 +43,9 @@ const RequestEditPage = () => {
|
||||
const [showSaveModal, setShowSaveModal] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isReport, setIsReport] = useState(false);
|
||||
const [issueText, setIssueText] = useState("");
|
||||
const [showErrorModal, setShowErrorModal] = useState(false);
|
||||
const [isBusy, setIsBusy] = useState(false);
|
||||
// Case Vars
|
||||
const state = group.state[0] ? group.state[0].code : "ny";
|
||||
const lawFirm = group ? group?.firm : null;
|
||||
const streetAdd = group ? group?.streetAddress : null;
|
||||
@@ -88,7 +91,6 @@ const RequestEditPage = () => {
|
||||
}
|
||||
getOutgoingRequests(documentId)
|
||||
.then((data) => {
|
||||
console.log("data in useEffect", data);
|
||||
const resp = data[0].requests.map((item, index) => {
|
||||
// NEVER CHANGE THIS:
|
||||
return { showInputEle: false, text: item.text, index: index };
|
||||
@@ -116,7 +118,6 @@ const RequestEditPage = () => {
|
||||
}
|
||||
|
||||
async function getOutgoingRequests(docId) {
|
||||
console.log("getOutgoingRequests fired, docId", docId);
|
||||
const docType = String(documentType);
|
||||
const response = await fetch(
|
||||
`${apiUrl}/v1/get-outgoing-requests/${docId}/${docType}`,
|
||||
@@ -300,20 +301,6 @@ const RequestEditPage = () => {
|
||||
setIsReport(true);
|
||||
};
|
||||
|
||||
const numberingContent = (i) => {
|
||||
let numText;
|
||||
if (documentType === "interrogatories") {
|
||||
numText = "INTERROGATORY NO..";
|
||||
} else if (documentType === "admissions") {
|
||||
numText = "REQUEST FOR ADMISSION NO.";
|
||||
} else if (documentType === "production") {
|
||||
numText = "REQUEST FOR PRODUCTION NO.";
|
||||
} else {
|
||||
numText = "REQUEST NO.";
|
||||
}
|
||||
return <div className="numbering-container">{`${numText}${i + 1} `}</div>;
|
||||
};
|
||||
console.log("fetchedCase", fetchedCase);
|
||||
const respondent =
|
||||
fetchedCase?.clientPosition == "Defendant"
|
||||
? fetchedCase?.defendantParties
|
||||
@@ -330,8 +317,7 @@ const RequestEditPage = () => {
|
||||
fetchedCase?.clientPosition === "Defendant"
|
||||
? fetchedCase?.plaintiffParties
|
||||
: fetchedCase?.defendantParties;
|
||||
console.log("requests", requests);
|
||||
|
||||
console.log("state", state);
|
||||
const editingContent = () => {
|
||||
return (
|
||||
<>
|
||||
@@ -340,13 +326,7 @@ const RequestEditPage = () => {
|
||||
<div className="pleading-header">
|
||||
INTERROGATORIES AND REQUESTS FOR PRODUCTION
|
||||
</div>
|
||||
<div>
|
||||
{displayCopy.prelimaryStatement(
|
||||
documentType,
|
||||
respondent,
|
||||
servingParty
|
||||
)}
|
||||
</div>
|
||||
<div>{outgoingComesNow(state, fetchedCase)}</div>
|
||||
{/*displayCopy.prelimaryStatement*/}
|
||||
<div className="doc-editing-sub-wrapper row">
|
||||
<div className="pleading-header">INSTRUCTIONS</div>
|
||||
|
||||
Reference in New Issue
Block a user