more
This commit is contained in:
@@ -46,14 +46,13 @@ const DocEditPage = () => {
|
|||||||
const [index, setIndex] = useState(0);
|
const [index, setIndex] = useState(0);
|
||||||
const [isBusy, setIsBusy] = useState(false);
|
const [isBusy, setIsBusy] = useState(false);
|
||||||
// For document generation:
|
// For document generation:
|
||||||
|
const state = group?.state[0] ? group.state[0].code : "ny";
|
||||||
const state = group.state[0] ? group.state[0].code : "ny";
|
|
||||||
const lawFirm = group ? group?.firm : null;
|
const lawFirm = group ? group?.firm : null;
|
||||||
const streetAdd = group ? group?.streetAddress : null;
|
const streetAdd = group ? group?.streetAddress : null;
|
||||||
const city = group ? group.city : null;
|
const city = group ? group?.city : null;
|
||||||
const usState = group.state[0] ? group.state[0].code : "ny";
|
const usState = group?.state[0] ? group?.state[0].code : "ny";
|
||||||
const zipCode = group ? group.zipCode : null;
|
const zipCode = group ? group?.zipCode : null;
|
||||||
const telephone = group ? group.telephone : null;
|
const telephone = group ? group?.telephone : null;
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const RequestEditPage = () => {
|
|||||||
const [fetchedCase, setFetchedCase] = useState();
|
const [fetchedCase, setFetchedCase] = useState();
|
||||||
const [showInputEle, setShowInputEle] = useState(true);
|
const [showInputEle, setShowInputEle] = useState(true);
|
||||||
const [document, setDocument] = useState(null);
|
const [document, setDocument] = useState(null);
|
||||||
const appUserId = group ? group.appUserId : null;
|
const appUserId = group ? group?.appUserId : null;
|
||||||
const [docId, setDocId] = useState(documentId);
|
const [docId, setDocId] = useState(documentId);
|
||||||
const [saveDocumentId, setSaveDocumentId] = useState("");
|
const [saveDocumentId, setSaveDocumentId] = useState("");
|
||||||
const [showSaveModal, setShowSaveModal] = useState(false);
|
const [showSaveModal, setShowSaveModal] = useState(false);
|
||||||
@@ -46,13 +46,13 @@ const RequestEditPage = () => {
|
|||||||
const [showErrorModal, setShowErrorModal] = useState(false);
|
const [showErrorModal, setShowErrorModal] = useState(false);
|
||||||
const [isBusy, setIsBusy] = useState(false);
|
const [isBusy, setIsBusy] = useState(false);
|
||||||
// Case Vars
|
// Case Vars
|
||||||
const state = group.state[0] ? group.state[0].code : "ny";
|
const state = group?.state[0] ? group.state[0].code : "ny";
|
||||||
const lawFirm = group ? group?.firm : null;
|
const lawFirm = group ? group?.firm : null;
|
||||||
const streetAdd = group ? group?.streetAddress : null;
|
const streetAdd = group ? group?.streetAddress : null;
|
||||||
const city = group ? group.city : null;
|
const city = group ? group?.city : null;
|
||||||
const usState = group.state[0] ? group.state[0].code : "ny";
|
const usState = group?.state[0] ? group?.state[0].code : "ny";
|
||||||
const zipCode = group ? group.zipCode : null;
|
const zipCode = group ? group?.zipCode : null;
|
||||||
const telephone = group ? group.telephone : null;
|
const telephone = group ? group?.telephone : null;
|
||||||
|
|
||||||
const apiUrl =
|
const apiUrl =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
@@ -190,14 +190,14 @@ const RequestEditPage = () => {
|
|||||||
? fetchedCase?.leadAttorneys
|
? fetchedCase?.leadAttorneys
|
||||||
: null;
|
: null;
|
||||||
const reqType = documentType;
|
const reqType = documentType;
|
||||||
const captionOne = fetchedCase.caption;
|
const captionOne = fetchedCase?.caption;
|
||||||
const captionTwo = fetchedCase.captionTwo;
|
const captionTwo = fetchedCase?.captionTwo;
|
||||||
const caseNum = fetchedCase.caseNumber;
|
const caseNum = fetchedCase?.caseNumber;
|
||||||
const plaintiffs = fetchedCase.plaintiffParties;
|
const plaintiffs = fetchedCase?.plaintiffParties;
|
||||||
const defendants = fetchedCase.defendantParties;
|
const defendants = fetchedCase?.defendantParties;
|
||||||
const venued = fetchedCase.venue;
|
const venued = fetchedCase?.venue;
|
||||||
const juris = fetchedCase.jurisdiction;
|
const juris = fetchedCase?.jurisdiction;
|
||||||
const judge = fetchedCase.judge;
|
const judge = fetchedCase?.judge;
|
||||||
const clientPosition = fetchedCase?.clientPosition
|
const clientPosition = fetchedCase?.clientPosition
|
||||||
? fetchedCase?.clientPosition
|
? fetchedCase?.clientPosition
|
||||||
: null;
|
: null;
|
||||||
@@ -308,10 +308,10 @@ const RequestEditPage = () => {
|
|||||||
|
|
||||||
const displayCopy =
|
const displayCopy =
|
||||||
state === "ny"
|
state === "ny"
|
||||||
? docEditCopy.NewYork
|
? docEditCopy?.NewYork
|
||||||
: state === "nj"
|
: state === "nj"
|
||||||
? docEditCopy.NewJersey
|
? docEditCopy?.NewJersey
|
||||||
: docEditCopy.NewYork;
|
: docEditCopy?.NewYork;
|
||||||
|
|
||||||
const servingParty =
|
const servingParty =
|
||||||
fetchedCase?.clientPosition === "Defendant"
|
fetchedCase?.clientPosition === "Defendant"
|
||||||
|
|||||||
@@ -59,15 +59,15 @@ export const docEditCopy = {
|
|||||||
|
|
||||||
export const outgoingComesNow = (state, fetchedCase) => {
|
export const outgoingComesNow = (state, fetchedCase) => {
|
||||||
let copyString;
|
let copyString;
|
||||||
const position = fetchedCase.clientPosition;
|
const position = fetchedCase?.clientPosition;
|
||||||
const parties =
|
const parties =
|
||||||
fetchedCase.clientPosition === "Plaintiff"
|
fetchedCase?.clientPosition === "Plaintiff"
|
||||||
? fetchedCase.plaintiffParties
|
? fetchedCase?.plaintiffParties
|
||||||
: fetchedCase.defendantParties;
|
: fetchedCase?.defendantParties;
|
||||||
const adversary =
|
const adversary =
|
||||||
fetchedCase.clientPosition === "Plaintiff"
|
fetchedCase?.clientPosition === "Plaintiff"
|
||||||
? fetchedCase.defendantParties
|
? fetchedCase?.defendantParties
|
||||||
: fetchedCase.plaintiffParties;
|
: fetchedCase?.plaintiffParties;
|
||||||
|
|
||||||
if (state === "ny") {
|
if (state === "ny") {
|
||||||
copyString = `COMES NOW, ${position}, ${parties}, through counsel, and hereby propounds these Interrogatories and Requests for Production on ${adversary}, to be answered under oath, in writing, in accordance with NY CPLR 3120 - 3130.`;
|
copyString = `COMES NOW, ${position}, ${parties}, through counsel, and hereby propounds these Interrogatories and Requests for Production on ${adversary}, to be answered under oath, in writing, in accordance with NY CPLR 3120 - 3130.`;
|
||||||
|
|||||||
Reference in New Issue
Block a user