diff --git a/src/pageElements/Cards.js b/src/pageElements/Cards.js index 0f83ba0..68b7bd0 100644 --- a/src/pageElements/Cards.js +++ b/src/pageElements/Cards.js @@ -278,10 +278,18 @@ export const DocCard = (props) => { const createdAtTime = createdAt?.seconds ? createdAt?.seconds : new Date().getTime(); + const now = new Date().getTime(); const uploadedAt = new Date(createdAtTime * 1000); const isReportable = Math.round((now - uploadedAt) / 60 / 1000) > 15; + function convertDate(dateVar) { + const date = new Date(parseInt(dateVar?.seconds) * 1000); + const date2 = date.toLocaleString("en-US", { month: "long" }); + const temp = String(date).split(" "); + return `${date2} ${temp[2]}, ${temp[3]}`; + } + 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."; @@ -293,8 +301,8 @@ export const DocCard = (props) => { const documentTitle = docType === "interrogatories-out" - ? "Outbound requests" - : "Discovery responses"; + ? "Outbound request" + : "Discovery response"; const isOutbound = docType === "interrogatories-out"; const buttonText = @@ -315,14 +323,16 @@ export const DocCard = (props) => { <>> )} - {dateServed ? ( -