This commit is contained in:
Kenneth Jannette
2024-03-07 14:48:50 -06:00
parent 06e07333e5
commit 5bb00b833e
2 changed files with 21 additions and 10 deletions

View File

@@ -198,6 +198,7 @@ const DocEditPage = () => {
if (docSnap.exists()) { if (docSnap.exists()) {
const _case = docSnap.data(); const _case = docSnap.data();
_case.id = docSnap._key.path.segments[1]; _case.id = docSnap._key.path.segments[1];
console.log("_case", _case);
setFetchedCase(_case); setFetchedCase(_case);
} else { } else {
console.log("DB item does not exist"); console.log("DB item does not exist");

View File

@@ -6,7 +6,7 @@ export const docEditCopy = {
servingParty, servingParty,
fetchedCase fetchedCase
) { ) {
const position = fetchedCase.clientPosition; const position = fetchedCase ? fetchedCase.clientPosition : <></>;
const docCopy = const docCopy =
documentType && documentType === "interrogatories" documentType && documentType === "interrogatories"
? "Interrogatories" ? "Interrogatories"
@@ -59,15 +59,25 @@ export const docEditCopy = {
export const outgoingComesNow = (state, fetchedCase) => { export const outgoingComesNow = (state, fetchedCase) => {
let copyString; let copyString;
const position = fetchedCase?.clientPosition; const position = fetchedCase ? fetchedCase?.clientPosition : <></>;
const parties = const parties = fetchedCase ? (
fetchedCase?.clientPosition === "Plaintiff" fetchedCase?.clientPosition === "Plaintiff" ? (
? fetchedCase?.plaintiffParties fetchedCase?.plaintiffParties
: fetchedCase?.defendantParties; ) : (
const adversary = fetchedCase?.defendantParties
fetchedCase?.clientPosition === "Plaintiff" )
? fetchedCase?.defendantParties ) : (
: fetchedCase?.plaintiffParties; <></>
);
const adversary = fetchedCase ? (
fetchedCase?.clientPosition === "Plaintiff" ? (
fetchedCase?.defendantParties
) : (
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.`;