more
This commit is contained in:
@@ -13,6 +13,7 @@ import { objectMap } from "../../Utils/Object";
|
|||||||
import { createCaseFields as fields } from "../../Constants/Fields/CreateCaseFields.js";
|
import { createCaseFields as fields } from "../../Constants/Fields/CreateCaseFields.js";
|
||||||
import {
|
import {
|
||||||
floridaCourts,
|
floridaCourts,
|
||||||
|
michiganCourts,
|
||||||
newYorkCounties,
|
newYorkCounties,
|
||||||
} from "../../Constants/Fields/CreateCaseFields.js";
|
} from "../../Constants/Fields/CreateCaseFields.js";
|
||||||
import "../../styles/modals.scss";
|
import "../../styles/modals.scss";
|
||||||
@@ -41,9 +42,9 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
|||||||
getFormDataDefaults(fields, isEditing ? caseData : undefined)
|
getFormDataDefaults(fields, isEditing ? caseData : undefined)
|
||||||
);
|
);
|
||||||
console.log("state in create modal", state);
|
console.log("state in create modal", state);
|
||||||
|
const courtsList = state === "mi" ? michiganCourts : floridaCourts;
|
||||||
function selectVenueValues(data) {
|
function selectVenueValues(data) {
|
||||||
const result = floridaCourts.filter((court) => {
|
const result = courtsList.filter((court) => {
|
||||||
let val;
|
let val;
|
||||||
const target = data?.jurisdiction?.value?.split(" ")[0];
|
const target = data?.jurisdiction?.value?.split(" ")[0];
|
||||||
if (court?.circuit === target) {
|
if (court?.circuit === target) {
|
||||||
@@ -222,10 +223,10 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
|||||||
name={"jurisdiction"}
|
name={"jurisdiction"}
|
||||||
state={state}
|
state={state}
|
||||||
value={data.jurisdiction.value}
|
value={data.jurisdiction.value}
|
||||||
values={floridaCourts}
|
values={courtsList}
|
||||||
error={data.jurisdiction.error}
|
error={data.jurisdiction.error}
|
||||||
message={data.jurisdiction.message}
|
message={data.jurisdiction.message}
|
||||||
type={state === "fl" ? "select" : "text"}
|
type={state === "fl" || state === "mi" ? "select" : "text"}
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
onChange={(e) => handleChangeInput(e, "jurisdiction")}
|
onChange={(e) => handleChangeInput(e, "jurisdiction")}
|
||||||
label={
|
label={
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export const floridaCourts = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const michiganCourts = [
|
export const michiganCourts = [
|
||||||
{
|
{
|
||||||
circuit: "1st",
|
circuit: "1st",
|
||||||
counties: ["Hillsdale"],
|
counties: ["Hillsdale"],
|
||||||
|
|||||||
Reference in New Issue
Block a user