@@ -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");
|
||||||
|
|||||||
@@ -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.`;
|
||||||
|
|||||||
Reference in New Issue
Block a user