@@ -2,6 +2,7 @@ import { useState, useContext, useEffect } from "react";
|
||||
import NewYorkCaption from "./captionHeaders/newYorkCaption.js";
|
||||
import NewJerseyCaption from "./captionHeaders/newJerseyCaption.js";
|
||||
import FloridaCaption from "./captionHeaders/floridaCaption.js";
|
||||
import MichiganCaption from "./captionHeaders/michiganCaption.js";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import EditElement from "../../pageElements/EditElement";
|
||||
@@ -11,14 +12,8 @@ import Button from "../../pageElements/Button";
|
||||
import ConfirmModal from "../Modals/ConfirmModal";
|
||||
import LoadingSpinner from "../../pageElements/LoadingSpinner";
|
||||
import { docEditCopy } from "../../Constants/Copy/docEditCopy.js";
|
||||
import { doc, getDoc, updateDoc, increment } from "firebase/firestore";
|
||||
import "../../styles/docedit-page.scss";
|
||||
import {
|
||||
doc,
|
||||
getDoc,
|
||||
updateDoc,
|
||||
onSnapshot,
|
||||
increment,
|
||||
} from "firebase/firestore";
|
||||
|
||||
const DocEditPage = (props) => {
|
||||
const navigate = useNavigate();
|
||||
@@ -64,9 +59,11 @@ const DocEditPage = (props) => {
|
||||
const displayCopy =
|
||||
state === "ny"
|
||||
? docEditCopy.NewYork
|
||||
: state === "mi"
|
||||
? docEditCopy.Michigan
|
||||
: state === "nj"
|
||||
? docEditCopy.NewJersey
|
||||
: docEditCopy.NewYork;
|
||||
: docEditCopy.NewJersey;
|
||||
|
||||
const headerPicker = () => {
|
||||
switch (state) {
|
||||
@@ -94,6 +91,14 @@ const DocEditPage = (props) => {
|
||||
onScrollClick={onScrollClick}
|
||||
/>
|
||||
);
|
||||
case "mi":
|
||||
return (
|
||||
<MichiganCaption
|
||||
displayCopy={displayCopy}
|
||||
fetchedCase={fetchedCase}
|
||||
onScrollClick={onScrollClick}
|
||||
/>
|
||||
);
|
||||
default:
|
||||
return (
|
||||
<NewYorkCaption
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useState } from "react";
|
||||
import Scrollbutton from "react-bootstrap/Button";
|
||||
import { ArrowUp, ArrowDown } from "react-bootstrap-icons";
|
||||
import "../../../styles/captions.scss";
|
||||
|
||||
64
src/Components/Document/captionHeaders/michiganCaption.js
Normal file
64
src/Components/Document/captionHeaders/michiganCaption.js
Normal file
@@ -0,0 +1,64 @@
|
||||
import Scrollbutton from "react-bootstrap/Button";
|
||||
import { ArrowUp, ArrowDown } from "react-bootstrap-icons";
|
||||
|
||||
const MichiganCaption = (props) => {
|
||||
const { fetchedCase, displayCopy, onScrollClick } = props;
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="docedit-super-row">
|
||||
<div className="docedit-uppercol1"></div>
|
||||
<div className="docedit-uppercol2 centered-text">
|
||||
<span>STATE OF MICHIGAN</span>
|
||||
<span>
|
||||
IN THE CIRCUIT COURT FOR THE COUNTY OF{" "}
|
||||
{fetchedCase?.venue.split(" ")[0].toUpperCase()}
|
||||
</span>
|
||||
</div>
|
||||
<div className="docedit-uppercol3"></div>
|
||||
</div>
|
||||
<div className="docedit-header-row">
|
||||
<div className="docedit-header-col1">
|
||||
<div className="docedit-header-text">Edit Document</div>
|
||||
</div>
|
||||
<div className="docedit-header-col2 plain-text">
|
||||
<div className="header-middle-row1">
|
||||
{fetchedCase?.caption ? fetchedCase?.caption : <></>},
|
||||
</div>
|
||||
<div className="header-middle-row2">
|
||||
<div className="content-spacer"></div>
|
||||
<div className="middle-row-inner">
|
||||
<div>Plaintiff(s),</div>
|
||||
<div className="casenum-box">
|
||||
Case No. {fetchedCase?.caseNumber}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="header-middle-row3">
|
||||
<div>{displayCopy.versusText}</div>
|
||||
<div>Hon. {fetchedCase?.judge}</div>
|
||||
</div>
|
||||
<div className="header-middle-row4">
|
||||
{fetchedCase?.captionTwo ? fetchedCase?.captionTwo : <></>},
|
||||
</div>
|
||||
<div className="header-middle-row5">
|
||||
<div className="content-spacer2"></div>
|
||||
<div>Defendant(s)</div>
|
||||
</div>
|
||||
<div className="pleading-divider-box">
|
||||
<div>__________________________________________________/</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="docedit-header-col3">
|
||||
<div className="scroll-button-box">
|
||||
<Scrollbutton onClick={onScrollClick} className="scroll-button">
|
||||
Scroll <ArrowUp /> <ArrowDown />
|
||||
</Scrollbutton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default MichiganCaption;
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useState } from "react";
|
||||
import Scrollbutton from "react-bootstrap/Button";
|
||||
import { ArrowUp, ArrowDown } from "react-bootstrap-icons";
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import { objectMap } from "../../Utils/Object";
|
||||
import { createCaseFields as fields } from "../../Constants/Fields/CreateCaseFields.js";
|
||||
import {
|
||||
floridaCourts,
|
||||
michiganCourts,
|
||||
newYorkCounties,
|
||||
} from "../../Constants/Fields/CreateCaseFields.js";
|
||||
import "../../styles/modals.scss";
|
||||
@@ -36,14 +37,14 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
||||
const [venueArray, setVenueArray] = useState();
|
||||
const [newCaseId, setNewCaseId] = useState();
|
||||
const state = group?.state[0].code ? group?.state[0].code : null;
|
||||
|
||||
const caseNumCopy = state === "ny" ? "Index Number" : "Case Number";
|
||||
const [data, setData] = useState(
|
||||
getFormDataDefaults(fields, isEditing ? caseData : undefined)
|
||||
);
|
||||
|
||||
const courtsList = state === "mi" ? michiganCourts : floridaCourts;
|
||||
function selectVenueValues(data) {
|
||||
const result = floridaCourts.filter((court) => {
|
||||
const result = courtsList.filter((court) => {
|
||||
let val;
|
||||
const target = data?.jurisdiction?.value?.split(" ")[0];
|
||||
if (court?.circuit === target) {
|
||||
@@ -57,7 +58,7 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
||||
const handleChangeInput = (e, name) => {
|
||||
let venArr;
|
||||
const newData = handleFormDataChange(e, name, data, fields);
|
||||
if (state === "fl") {
|
||||
if (state === "fl" || state === "mi") {
|
||||
venArr = selectVenueValues(newData);
|
||||
}
|
||||
|
||||
@@ -222,10 +223,10 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
||||
name={"jurisdiction"}
|
||||
state={state}
|
||||
value={data.jurisdiction.value}
|
||||
values={floridaCourts}
|
||||
values={courtsList}
|
||||
error={data.jurisdiction.error}
|
||||
message={data.jurisdiction.message}
|
||||
type={state === "fl" ? "select" : "text"}
|
||||
type={state === "fl" || state === "mi" ? "select" : "text"}
|
||||
disabled={isBusy}
|
||||
onChange={(e) => handleChangeInput(e, "jurisdiction")}
|
||||
label={
|
||||
@@ -266,7 +267,7 @@ const CreateModal = ({ setShowModal, caseData }) => {
|
||||
name={"venue"}
|
||||
value={data.venue.value}
|
||||
error={data.venue.error}
|
||||
type={state === "fl" ? "select" : "text"}
|
||||
type={state === "fl" || state === "mi" ? "select" : "text"}
|
||||
values={venueArray}
|
||||
message={data.venue.message}
|
||||
disabled={isBusy}
|
||||
|
||||
@@ -60,7 +60,7 @@ const PaymentModal = ({
|
||||
|
||||
const totalToday =
|
||||
planValue === "ofCounsel" ? 59 : amountToday + extraAccountsPrice;
|
||||
|
||||
console.log("selectedPlan in modal", selectedPlan);
|
||||
const isCounsel = planValue === "ofCounsel" ? true : false;
|
||||
const handleSignupClick = () => {
|
||||
//clear fields
|
||||
|
||||
@@ -236,8 +236,8 @@ const UploadModal = (props) => {
|
||||
<Modal.Body>
|
||||
<div className="modal-header-text-wrapper">
|
||||
<p className="upload-modal-header-text">
|
||||
Select a .pdf file for upload, then 1. enter title, and 2. choose
|
||||
document type (other fields optional).
|
||||
1, Enter document title, (i.e. Plaintiff's Interrogatories). 2.
|
||||
Click or drag and drop the .psf file.
|
||||
</p>
|
||||
<p className="upload-modal-header-text">
|
||||
The document created will be associated with{" "}
|
||||
|
||||
@@ -53,7 +53,7 @@ const SignupPage = () => {
|
||||
//const [showSelectPlan, setShowSelectPlan] = useState(true);
|
||||
|
||||
const [activeRadioOption, setActiveRadioOption] = useState("partner");
|
||||
const [selectedPlan, setSelectedPlan] = useState([signupRadioFields[1]]);
|
||||
const [selectedPlan, setSelectedPlan] = useState([signupRadioFields[2]]);
|
||||
const stripe = new Stripe(stripeApiKey);
|
||||
const apiUrl =
|
||||
process.env.NODE_ENV === "development"
|
||||
@@ -109,7 +109,7 @@ const SignupPage = () => {
|
||||
setSelectedPlan(tempPlan);
|
||||
setActiveRadioOption(tempPlan[0].value);
|
||||
};
|
||||
|
||||
console.log("selectedPlan in signup page", selectedPlan);
|
||||
const handleLeftArrowClick = () => {
|
||||
if (valX == 0) {
|
||||
return;
|
||||
@@ -292,8 +292,8 @@ const SignupPage = () => {
|
||||
|
||||
const handleCancelModal = () => {
|
||||
setShowPromoModal(!showPromoModal);
|
||||
setShowSelectPlan(true);
|
||||
setTimeout(scrollToLowerPanel, 93);
|
||||
setShowSelectPlan(!showSelectPlan);
|
||||
};
|
||||
|
||||
const handleOpenSelectPlan = (e) => {
|
||||
@@ -309,6 +309,7 @@ const SignupPage = () => {
|
||||
|
||||
saveLeadData(dataValues);
|
||||
setShowPromoModal(!showPromoModal);
|
||||
setShowSelectPlan(true);
|
||||
};
|
||||
|
||||
const handleToggle = (val) => setIsAnnual(val);
|
||||
@@ -635,7 +636,7 @@ const SignupPage = () => {
|
||||
<div className="signup-super-container">
|
||||
{isBusy ? <LoadingSpinner message={""} loaderType="MoonLoader" /> : null}
|
||||
{!isUpgrade && !isBusy ? signupForm : <></>}
|
||||
{true && !isBusy ? (
|
||||
{showSelectPlan && !isBusy ? (
|
||||
<div className="select-plan-container" id="select-plan-scid">
|
||||
<div className="select-plan-header">
|
||||
<div className="plan-header-right">
|
||||
|
||||
@@ -55,6 +55,31 @@ export const docEditCopy = {
|
||||
caseNumber: "Docket No.",
|
||||
versusText: "vs.",
|
||||
},
|
||||
Michigan: {
|
||||
prelimaryStatement: function (documentType, respondent, servingParty) {
|
||||
const docCopy =
|
||||
documentType && documentType === "interrogatories"
|
||||
? "Interrogatories"
|
||||
: documentType && documentType === "admissions"
|
||||
? "Request for Admissions"
|
||||
: documentType && documentType === "production"
|
||||
? "Request for Production"
|
||||
: documentType && documentType.includes("combined")
|
||||
? "Interrogatories and Request for Production"
|
||||
: null;
|
||||
|
||||
const copyString = `COMES NOW, Respondent(s), ${respondent}, through counsel, in response to the ${docCopy}
|
||||
served by ${servingParty}, and states as follows:`;
|
||||
|
||||
return (
|
||||
<div className="prelim-statement-container">
|
||||
<p>{copyString}</p>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
caseNumber: "Case No.",
|
||||
versusText: "v.",
|
||||
},
|
||||
};
|
||||
|
||||
export const outgoingComesNow = (state, fetchedCase) => {
|
||||
|
||||
@@ -119,6 +119,247 @@ export const floridaCourts = [
|
||||
},
|
||||
];
|
||||
|
||||
export const michiganCourts = [
|
||||
{
|
||||
circuit: "1st",
|
||||
counties: ["Hillsdale County"],
|
||||
},
|
||||
{
|
||||
circuit: "2nd",
|
||||
counties: ["Berrien County"],
|
||||
},
|
||||
{
|
||||
circuit: "3rd",
|
||||
counties: ["Wayne County"],
|
||||
},
|
||||
{
|
||||
circuit: "4th",
|
||||
counties: ["Jackson County"],
|
||||
},
|
||||
{
|
||||
circuit: "5th",
|
||||
counties: ["Barry County"],
|
||||
},
|
||||
{
|
||||
circuit: "6th",
|
||||
counties: ["Oakland County"],
|
||||
},
|
||||
{
|
||||
circuit: "7th",
|
||||
counties: ["Genesee County"],
|
||||
},
|
||||
{
|
||||
circuit: "8th",
|
||||
counties: ["Ionia County", "Montcalm County"],
|
||||
},
|
||||
{
|
||||
circuit: "9th",
|
||||
counties: ["Kalamazoo County"],
|
||||
},
|
||||
{
|
||||
circuit: "10th",
|
||||
counties: ["Saginaw County"],
|
||||
},
|
||||
{
|
||||
circuit: "11th",
|
||||
counties: [
|
||||
"Alger County",
|
||||
"Luce County",
|
||||
"Mackinac County",
|
||||
"Schoolcraft County",
|
||||
],
|
||||
},
|
||||
{
|
||||
circuit: "12th",
|
||||
counties: ["Baraga County", "Houghton County", "Keweenaw County"],
|
||||
},
|
||||
{
|
||||
circuit: "13th",
|
||||
counties: ["Antrim County", "Leelanau County", "Grand Traverse County"],
|
||||
},
|
||||
{
|
||||
circuit: "14th",
|
||||
counties: ["Muskegon County"],
|
||||
},
|
||||
{
|
||||
circuit: "15th",
|
||||
counties: ["Branch County"],
|
||||
},
|
||||
{
|
||||
circuit: "16th",
|
||||
counties: ["Macomb County"],
|
||||
},
|
||||
{
|
||||
circuit: "17th",
|
||||
counties: ["Kent County"],
|
||||
},
|
||||
{
|
||||
circuit: "18th",
|
||||
counties: ["Bay County"],
|
||||
},
|
||||
{
|
||||
circuit: "19th",
|
||||
counties: ["Benzie County", "Manistee County"],
|
||||
},
|
||||
{
|
||||
circuit: "20th",
|
||||
counties: ["Ottawa County"],
|
||||
},
|
||||
{
|
||||
circuit: "21st",
|
||||
counties: ["Isabella County"],
|
||||
},
|
||||
{
|
||||
circuit: "22nd",
|
||||
counties: ["Washtenaw County"],
|
||||
},
|
||||
{
|
||||
circuit: "23rd",
|
||||
counties: [
|
||||
"Alcona County",
|
||||
"Arenac County",
|
||||
"Iosco County",
|
||||
"Oscoda County",
|
||||
],
|
||||
},
|
||||
{
|
||||
circuit: "24th",
|
||||
counties: ["Sanilac County"],
|
||||
},
|
||||
{
|
||||
circuit: "25th",
|
||||
counties: ["Marquette County"],
|
||||
},
|
||||
{
|
||||
circuit: "26th",
|
||||
counties: ["Alpena County", "Montmorency County"],
|
||||
},
|
||||
{
|
||||
circuit: "27th",
|
||||
counties: ["Lake County", "Newaygo County"],
|
||||
},
|
||||
{
|
||||
circuit: "28th",
|
||||
counties: ["Missaukee County", "Wexford County"],
|
||||
},
|
||||
{
|
||||
circuit: "29th",
|
||||
counties: ["Clinton County", "Gratiot County"],
|
||||
},
|
||||
{
|
||||
circuit: "30th",
|
||||
counties: ["Ingham County"],
|
||||
},
|
||||
{
|
||||
circuit: "31st",
|
||||
counties: ["St. Clair County"],
|
||||
},
|
||||
{
|
||||
circuit: "32nd",
|
||||
counties: ["Gogebic County", "Ontonagon County"],
|
||||
},
|
||||
{
|
||||
circuit: "33rd",
|
||||
counties: ["Charlevoix County"],
|
||||
},
|
||||
{
|
||||
circuit: "34th",
|
||||
counties: ["Ogemaw County", "Roscommon County"],
|
||||
},
|
||||
{
|
||||
circuit: "35th",
|
||||
counties: ["Shiawasee County"],
|
||||
},
|
||||
{
|
||||
circuit: "36th",
|
||||
counties: ["Van Buren County"],
|
||||
},
|
||||
{
|
||||
circuit: "37th",
|
||||
counties: ["Calhoum County"],
|
||||
},
|
||||
{
|
||||
circuit: "38th",
|
||||
counties: ["Monroe County"],
|
||||
},
|
||||
{
|
||||
circuit: "39th",
|
||||
counties: ["Lenawee County"],
|
||||
},
|
||||
{
|
||||
circuit: "40th",
|
||||
counties: ["Lapeer County"],
|
||||
},
|
||||
{
|
||||
circuit: "41st",
|
||||
counties: ["Dickinson County", "Iron County", "Menominee County"],
|
||||
},
|
||||
{
|
||||
circuit: "42nd",
|
||||
counties: ["Midland County"],
|
||||
},
|
||||
{
|
||||
circuit: "43rd",
|
||||
counties: ["Cass County"],
|
||||
},
|
||||
{
|
||||
circuit: "44th",
|
||||
counties: ["Livingston County"],
|
||||
},
|
||||
{
|
||||
circuit: "45th",
|
||||
counties: ["St. Joseph County"],
|
||||
},
|
||||
{
|
||||
circuit: "45th",
|
||||
counties: ["St. Joseph County"],
|
||||
},
|
||||
{
|
||||
circuit: "46th",
|
||||
counties: ["Crawford County", "Kalkaska County", "Otsego County"],
|
||||
},
|
||||
{
|
||||
circuit: "47th",
|
||||
counties: ["Delta County"],
|
||||
},
|
||||
{
|
||||
circuit: "49th",
|
||||
counties: ["Mecosta County", "Osceoloa County"],
|
||||
},
|
||||
{
|
||||
circuit: "51st",
|
||||
counties: ["Mason County", "Oceana County"],
|
||||
},
|
||||
{
|
||||
circuit: "52nd",
|
||||
counties: ["Huron County"],
|
||||
},
|
||||
{
|
||||
circuit: "53rd",
|
||||
counties: ["Cheboygan County", "Presque Isle County"],
|
||||
},
|
||||
{
|
||||
circuit: "55th",
|
||||
counties: ["Tuscola County"],
|
||||
},
|
||||
{
|
||||
circuit: "55th",
|
||||
counties: ["Clare County", "Gladwin County"],
|
||||
},
|
||||
{
|
||||
circuit: "56th",
|
||||
counties: ["Eaton County"],
|
||||
},
|
||||
{
|
||||
circuit: "57th",
|
||||
counties: ["Emmet County"],
|
||||
},
|
||||
{
|
||||
circuit: "50th",
|
||||
counties: ["Chippewa County"],
|
||||
},
|
||||
];
|
||||
|
||||
export const newYorkCounties = [
|
||||
{ name: "Albany County" },
|
||||
{ name: "Allegany County" },
|
||||
|
||||
@@ -21,7 +21,7 @@ export const signupFields = {
|
||||
minLength: 3,
|
||||
maxLength: 45,
|
||||
type: "select",
|
||||
values: ["Florida", "New Jersey", "New York"],
|
||||
values: ["Florida", "Michigan", "New Jersey", "New York"],
|
||||
},
|
||||
zipCode: {
|
||||
required: true,
|
||||
@@ -57,6 +57,7 @@ export const signupFields = {
|
||||
|
||||
export const stateDataValues = [
|
||||
{ name: "Florida", value: "florida", code: "fl" },
|
||||
{ name: "Michigan", value: "michigan", code: "mi" },
|
||||
{ name: "New York", value: "newYork", code: "ny" },
|
||||
{ name: "New Jersey", value: "newJersey", code: "nj" },
|
||||
];
|
||||
|
||||
@@ -16,7 +16,7 @@ const TextInput = (props) => {
|
||||
type,
|
||||
disabled,
|
||||
} = props;
|
||||
const isFlorida = state === "fl";
|
||||
const isObject = state === "fl" || state === "mi";
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -43,7 +43,7 @@ const TextInput = (props) => {
|
||||
onChange={onChange}
|
||||
>
|
||||
<option
|
||||
id="ddlProducts"
|
||||
id="input-select-option"
|
||||
className={`select-option`}
|
||||
value=""
|
||||
></option>
|
||||
@@ -54,7 +54,7 @@ const TextInput = (props) => {
|
||||
className={`select-option`}
|
||||
key={`item${i}`}
|
||||
>
|
||||
{isFlorida ? `${item.circuit} Judicial Circuit` : item}
|
||||
{isObject ? `${item.circuit} Judicial Circuit` : item}
|
||||
</option>
|
||||
))
|
||||
) : (
|
||||
|
||||
@@ -10,18 +10,18 @@ const Toggle = (props) => {
|
||||
name="options"
|
||||
value={value}
|
||||
onChange={handleToggle}
|
||||
defaultValue={1}
|
||||
defaultValue={2}
|
||||
>
|
||||
<ToggleButton
|
||||
onClick={(e) => onClick(1)}
|
||||
onClick={(e) => onClick(2)}
|
||||
id="tbg-radio-1"
|
||||
value={1}
|
||||
value={2}
|
||||
></ToggleButton>
|
||||
|
||||
<ToggleButton
|
||||
onClick={(e) => onClick(2)}
|
||||
onClick={(e) => onClick(1)}
|
||||
id="tbg-radio-2"
|
||||
value={2}
|
||||
value={1}
|
||||
></ToggleButton>
|
||||
</ToggleButtonGroup>
|
||||
</>
|
||||
|
||||
@@ -248,6 +248,15 @@
|
||||
color: #373737;
|
||||
}
|
||||
|
||||
.centered-text {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.plain-text {
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
||||
.docedit-uppercol2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user