more
This commit is contained in:
@@ -77,17 +77,14 @@ const UploadModal = (props) => {
|
||||
});
|
||||
}
|
||||
|
||||
async function updateRespGenerationCount(docId) {
|
||||
if (!docId) {
|
||||
return;
|
||||
}
|
||||
await updateDoc(doc(db, "documents", docId), {
|
||||
responseGenerations: increment(1),
|
||||
});
|
||||
}
|
||||
|
||||
async function saveToDb(uuidName) {
|
||||
const createdAt = new Date();
|
||||
let respGenVal;
|
||||
if (radioValue === "complaint") {
|
||||
respGenVal = 1;
|
||||
} else {
|
||||
respGenVal = 0;
|
||||
}
|
||||
const data = {
|
||||
ownerId: appUserId,
|
||||
createdAt: createdAt,
|
||||
@@ -99,14 +96,13 @@ const UploadModal = (props) => {
|
||||
parentCaseName: `${caption} v. ${captionTwo}`,
|
||||
parentCaseNumber: caseNumber,
|
||||
parentCaseJurisdiction: jurisdiction,
|
||||
responseGenerations: 0,
|
||||
responseGenerations: respGenVal,
|
||||
};
|
||||
|
||||
if (radioValue === "complaint") {
|
||||
docType = "interrogatories-out";
|
||||
data["docType"] = docType;
|
||||
updateUserAccountDocsGenerated(fbUserId);
|
||||
updateRespGenerationCount(uuidName);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user