diff --git a/src/Components/Document/DocumentListPage.js b/src/Components/Document/DocumentListPage.js index 3120e46..981183d 100644 --- a/src/Components/Document/DocumentListPage.js +++ b/src/Components/Document/DocumentListPage.js @@ -171,7 +171,7 @@ const DocumentListPage = ({ perPage }) => { if (!group) { return null; } - + console.log("allDocs", allDocs); const DesktopContent = () => { return ( <> @@ -204,6 +204,7 @@ const DocumentListPage = ({ perPage }) => { parentCaseNumber={doc.parentCaseNumber} parentCaseName={doc.parentCaseName} parentCaseId={doc.parentCaseId} + createdAt={doc.createdAt} docType={doc.docType} documentId={doc.documentId} dateServed={doc.dateServed} diff --git a/src/pageElements/Cards.js b/src/pageElements/Cards.js index 90377e8..965e9f7 100644 --- a/src/pageElements/Cards.js +++ b/src/pageElements/Cards.js @@ -4,7 +4,7 @@ import { FileEarmarkText } from "react-bootstrap-icons"; import TextInput from "../pageElements/TextInput"; import Tooltip from "../pageElements/Tooltip"; import { InfoCircle } from "react-bootstrap-icons"; - +import { toDate } from "firebase/firestore"; export const InfoCard = (props) => { const { data, onEdit, onCancel, onSave, onChangeInput, isEditing, isBusy } = props; @@ -273,15 +273,20 @@ export const DocCard = (props) => { handleNavigate, responseGenerations, confirmDelete, + createdAt, } = props; - + const now = new Date().getTime(); + const uploadedAt = createdAt.toDate(); + const isReportable = Math.round((now - uploadedAt) / 60 / 1000) > 15; + 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."; + const pendingText = + "Parsing in process, please be patient. This should resolve within 10 minutes."; const report = (documentId, docType) => { console.log("report documentId, docType", documentId, docType); }; - const tooltipText = - "Parsing is taking a bit longer than usual. This usually resolves within 10 - 15 minutes. If it does not, click “report” and support will address the issue within 24 hours."; - const disabled = docType ? false : true; return (