Merge pull request #156 from kjannette/what

more
This commit is contained in:
S Jannette
2024-03-12 20:26:14 -05:00
committed by GitHub
2 changed files with 29 additions and 13 deletions

View File

@@ -278,10 +278,18 @@ export const DocCard = (props) => {
const createdAtTime = createdAt?.seconds const createdAtTime = createdAt?.seconds
? createdAt?.seconds ? createdAt?.seconds
: new Date().getTime(); : new Date().getTime();
const now = new Date().getTime(); const now = new Date().getTime();
const uploadedAt = new Date(createdAtTime * 1000); const uploadedAt = new Date(createdAtTime * 1000);
const isReportable = Math.round((now - uploadedAt) / 60 / 1000) > 15; 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 disabled = docType ? false : true;
const tooltipText = 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."; "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 = const documentTitle =
docType === "interrogatories-out" docType === "interrogatories-out"
? "Outbound requests" ? "Outbound request"
: "Discovery responses"; : "Discovery response";
const isOutbound = docType === "interrogatories-out"; const isOutbound = docType === "interrogatories-out";
const buttonText = const buttonText =
@@ -315,14 +323,16 @@ export const DocCard = (props) => {
<></> <></>
)} )}
</div> </div>
{dateServed ? (
<div className="doc-col3">Served: {dateServed}</div>
) : (
<></>
)}
<div className="doc-col4"> <div className="doc-col4">
<div className="jurisdiction-box">{parentCaseName}</div> <div className="jurisdiction-box">{parentCaseName}</div>
</div> </div>
{createdAt ? (
<div className="doc-col2 responsive-none">
Created: {convertDate(createdAt)}
</div>
) : (
<></>
)}
{disabled && isReportable ? ( {disabled && isReportable ? (
<div className="doc-col5"> <div className="doc-col5">
<Button <Button

View File

@@ -173,7 +173,7 @@
width: 200px; width: 200px;
height: 100%; height: 100%;
padding-top: 1px; padding-top: 1px;
margin-right: 20px; margin-right: 15px;
} }
.doc-col3 { .doc-col3 {
@@ -182,17 +182,17 @@
min-width: 190px; min-width: 190px;
height: 100%; height: 100%;
padding-top: 1px; padding-top: 1px;
margin-right: 20px; margin-right: 15px;
} }
.doc-col4 { .doc-col4 {
display: flex; display: flex;
flex: 1; flex: 1;
align-items: center; align-items: center;
min-width: 280px; min-width: 220px;
height: 100%; height: 100%;
padding-top: 1px; padding-top: 1px;
margin-right: 20px; margin-right: 15px;
} }
.doc-col5 { .doc-col5 {
@@ -202,7 +202,7 @@
width: 120px; width: 120px;
height: 100%; height: 100%;
padding-right: 10px; padding-right: 10px;
margin-right: 20px; margin-right: 15px;
} }
.doc-col6 { .doc-col6 {
@@ -320,3 +320,9 @@
.gen-button { .gen-button {
width: 158px !important; width: 158px !important;
} }
@media only screen and (max-width: 1080px) {
.responsive-none {
display: none;
}
}