import React from "react"; import Button from "../pageElements/Button.js"; import { FileEarmarkText } from "react-bootstrap-icons"; import TextInput from "../pageElements/TextInput"; import Tooltip from "../pageElements/Tooltip"; import { InfoCircle } from "react-bootstrap-icons"; export const InfoCard = (props) => { const { data, onEdit, onCancel, onSave, onChangeInput, isEditing, isBusy } = props; const { caseNumber, caption, jurisdiction, judge, venue, caseType, trialDate, filedDate, contactFirstName, contactLastName, contactEmail, attorneys, parties, } = data; const editingContent = () => { return ( <>
Case caption:
onChangeInput(e, "caption")} />
Jurisdiction:
onChangeInput(e, "jurisdiction")} />
Judge:
onChangeInput(e, "judge")} />
Venue:
onChangeInput(e, "venue")} /> {caseType || isEditing ? ( <>
Case type:
onChangeInput(e, "caseType")} />
) : ( <> )}
Trial date:
onChangeInput(e, "trialDate")} />
Index number:
onChangeInput(e, "caseNumber")} />
Date filed:
onChangeInput(e, "filedDate")} />
Contact: onChangeInput(e, "contactFirstName")} /> onChangeInput(e, "contactLastName")} />
Contact email:
onChangeInput(e, "contactEmail")} />
Lead attorneys:
onChangeInput(e, "attorneys")} />
); }; const infoContent = () => { return ( <>
Case caption:

{caption}

Jurisdiction:

{jurisdiction}

Judge:

{judge}

Venue:

{venue}

{caseType ? (
Case type:

{caseType}

) : ( <> )}
Trial date:

{trialDate}

Index number:

{caseNumber}

Date filed:

{filedDate}

Contact:

{contactFirstName} {contactLastName}

Contact email:

{contactEmail}

Lead attorneys:

{attorneys}

); }; return (
{isEditing ? editingContent() : infoContent()}
{isEditing ? ( <>
); }; export const CaseCard = (props) => { const { caption, captionTwo, caseNumber, filedDate, jurisdiction, caseId, onClick, labelText, } = props; return (
{caption} v. {captionTwo}
{jurisdiction}

{`Filed: ${filedDate}`}

{caseNumber}
); }; export const DocCard = (props) => { const { title, parentCaseNumber, parentCaseName, parentCaseId, documentId, dateServed, docType, displayDeleteButton, handleNavigate, responseGenerations, confirmDelete, } = props; const tooltipText = "Parsing is taking longer than usual. Reasons may include high traffic, or a transitory system error. Usually this will resolve in 10 minutes. If not, click “report”, and it will be fixed in 24 hours."; const disabled = docType ? false : true; return (
{title} {disabled ? : <>}
{dateServed ? (
Served: {dateServed}
) : ( <> )}
{parentCaseName}
{parentCaseNumber}
{displayDeleteButton ? ( disabled ? (
); };