This commit is contained in:
Kenneth Jannette
2024-02-17 14:37:32 -06:00
parent 609d1e99a0
commit 2c8a5405bb

View File

@@ -275,9 +275,16 @@ export const DocCard = (props) => {
confirmDelete,
createdAt,
} = props;
const createdAtTime = createdAt?.seconds
? createdAt?.seconds
: new Date().getTime();
const now = new Date().getTime();
const uploadedAt = createdAt ? createdAt.toDate() : new Date().getTime();
const uploadedAt = new Date(createdAtTime * 1000);
const isReportable = Math.round((now - uploadedAt) / 60 / 1000) > 15;
console.log(
"(now - uploadedAt) / 60 / 1000)",
(now - uploadedAt) / 60 / 1000
);
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.";