more
This commit is contained in:
@@ -36,7 +36,7 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
||||
const [venueArray, setVenueArray] = useState();
|
||||
const [newCaseId, setNewCaseId] = useState();
|
||||
const state = group?.state[0].code ? group?.state[0].code : null;
|
||||
console.log("state", state);
|
||||
|
||||
const caseNumCopy = state === "ny" ? "Index Number" : "Case Number";
|
||||
const [data, setData] = useState(
|
||||
getFormDataDefaults(fields, isEditing ? caseData : undefined)
|
||||
@@ -212,22 +212,27 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
||||
/>
|
||||
</Col>
|
||||
<Col className="mb-3">
|
||||
{isEditing ? <div className="edit-modal-label">Venue</div> : <></>}
|
||||
{isEditing ? (
|
||||
<div className="edit-modal-label">Jurisdiction</div>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
<TextInput
|
||||
key={"venue"}
|
||||
name={"venue"}
|
||||
value={data.venue.value}
|
||||
error={data.venue.error}
|
||||
key={"jurisdiction"}
|
||||
name={"jurisdiction"}
|
||||
state={state}
|
||||
value={data.jurisdiction.value}
|
||||
values={floridaCourts}
|
||||
error={data.jurisdiction.error}
|
||||
message={data.jurisdiction.message}
|
||||
type={state === "fl" ? "select" : "text"}
|
||||
values={venueArray}
|
||||
message={data.venue.message}
|
||||
disabled={isBusy}
|
||||
onChange={(e) => handleChangeInput(e, "venue")}
|
||||
onChange={(e) => handleChangeInput(e, "jurisdiction")}
|
||||
label={
|
||||
data.venue.value.length === 0
|
||||
data.jurisdiction.value.length === 0
|
||||
? isEditing
|
||||
? caseData.venue
|
||||
: "Venue"
|
||||
? caseData.jurisdiction
|
||||
: "Jurisdiction"
|
||||
: ""
|
||||
}
|
||||
/>
|
||||
@@ -255,27 +260,22 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
||||
</Col>
|
||||
|
||||
<Col className="mb-3">
|
||||
{isEditing ? (
|
||||
<div className="edit-modal-label">Jurisdiction</div>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
{isEditing ? <div className="edit-modal-label">Venue</div> : <></>}
|
||||
<TextInput
|
||||
key={"jurisdiction"}
|
||||
name={"jurisdiction"}
|
||||
state={state}
|
||||
value={data.jurisdiction.value}
|
||||
values={floridaCourts}
|
||||
error={data.jurisdiction.error}
|
||||
message={data.jurisdiction.message}
|
||||
key={"venue"}
|
||||
name={"venue"}
|
||||
value={data.venue.value}
|
||||
error={data.venue.error}
|
||||
type={state === "fl" ? "select" : "text"}
|
||||
values={venueArray}
|
||||
message={data.venue.message}
|
||||
disabled={isBusy}
|
||||
onChange={(e) => handleChangeInput(e, "jurisdiction")}
|
||||
onChange={(e) => handleChangeInput(e, "venue")}
|
||||
label={
|
||||
data.jurisdiction.value.length === 0
|
||||
data.venue.value.length === 0
|
||||
? isEditing
|
||||
? caseData.jurisdiction
|
||||
: "Jurisdiction"
|
||||
? caseData.venue
|
||||
: "Venue"
|
||||
: ""
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user