From 4fc6971efd642b36585f3ff4267756c86cf84fb2 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Thu, 7 Mar 2024 15:47:25 -0600 Subject: [PATCH] more --- src/Components/Document/DocEditPage.js | 2 ++ src/pageElements/Cards.js | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Components/Document/DocEditPage.js b/src/Components/Document/DocEditPage.js index 07b6e24..da4e9ac 100644 --- a/src/Components/Document/DocEditPage.js +++ b/src/Components/Document/DocEditPage.js @@ -462,6 +462,8 @@ const DocEditPage = () => { if (!docId) { return; } + + console.log("updaeeResponseGenerationCount past if block"); await updateDoc(doc(db, "documents", docId), { responseGenerations: increment(1), }); diff --git a/src/pageElements/Cards.js b/src/pageElements/Cards.js index d7e7ed6..60c94c2 100644 --- a/src/pageElements/Cards.js +++ b/src/pageElements/Cards.js @@ -282,6 +282,7 @@ export const DocCard = (props) => { const uploadedAt = new Date(createdAtTime * 1000); const isReportable = Math.round((now - uploadedAt) / 60 / 1000) > 15; console.log("responseGenerations", responseGenerations); + console.log("docType", docType); const disabled = docType ? false : true; const tooltipText = "Parsing is taking a bit longer than usual. This usually resolves within 15 minutes. If it does not, click “report” and support will address the issue within 24 hours."; @@ -297,9 +298,9 @@ export const DocCard = (props) => { const isOutbound = docType === "interrogatories-out"; const buttonText = - docType === "interrogatories-out" + docType === "interrogatories" && responseGenerations > 0 ? "Edit Request" - : responseGenerations > 1 + : docType === "interrogatories-out" ? "Edit Response" : "Generate Response"; return (