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