This commit is contained in:
Kenneth Jannette
2024-03-07 16:44:39 -06:00
parent 82acfb6f17
commit eefdd589d3
3 changed files with 33 additions and 11 deletions

View File

@@ -98,6 +98,11 @@ const CaseDetailsPage = () => {
}
};
const handleConfirmDocType = (docType) => {
console.log("docType", docType);
setShowConfirmModal(true);
};
const handleCancelConfirm = () => {
setShowConfirmModal(false);
};
@@ -108,14 +113,7 @@ const CaseDetailsPage = () => {
navigate(`/signup/${isUpgrade}/${currentPlan}`);
};
async function updateUserAccountDocsGenerated() {
await updateDoc(doc(db, "users", fbUserId), {
docsGenerated: increment(1),
});
}
const handleSuccess = (docType, docId) => {
updateUserAccountDocsGenerated();
setShowUploadModal(false);
if (docType === "interrogatories-out") {
setTimeout(handleNavEdit, 40000, docId, caseId);
@@ -187,6 +185,8 @@ const CaseDetailsPage = () => {
setIsLoading={setIsLoading}
handleSuccess={handleSuccess}
caseData={subCase}
handleConfirmDocType={handleConfirmDocType}
fbUserId={fbUserId}
/>
) : null
) : null}