diff --git a/src/Components/Document/DocEditPage.js b/src/Components/Document/DocEditPage.js index 12680cb..a6e692e 100644 --- a/src/Components/Document/DocEditPage.js +++ b/src/Components/Document/DocEditPage.js @@ -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 ( + + ); default: return ( { + const { fetchedCase, displayCopy, onScrollClick } = props; + + return ( + <> +
+
+
+ STATE OF MICHIGAN + + IN THE CIRCUIT COURT FOR THE COUNTY OF{" "} + {fetchedCase?.venue.split(" ")[0].toUpperCase()} + +
+
+
+
+
+
Edit Document
+
+
+
+ {fetchedCase?.caption ? fetchedCase?.caption : <>}, +
+
+
+
+
Plaintiff(s),
+
+ Case No. {fetchedCase?.caseNumber} +
+
+
+
+
{displayCopy.versusText}
+
Hon. {fetchedCase?.judge}
+
+
+ {fetchedCase?.captionTwo ? fetchedCase?.captionTwo : <>}, +
+
+
+
Defendant(s)
+
+
+
__________________________________________________/
+
+
+
+
+ + Scroll + +
+
+
+ + ); +}; + +export default MichiganCaption; diff --git a/src/Components/Document/captionHeaders/newYorkCaption.js b/src/Components/Document/captionHeaders/newYorkCaption.js index c8ecae0..44ec8c9 100644 --- a/src/Components/Document/captionHeaders/newYorkCaption.js +++ b/src/Components/Document/captionHeaders/newYorkCaption.js @@ -1,4 +1,3 @@ -import { useState } from "react"; import Scrollbutton from "react-bootstrap/Button"; import { ArrowUp, ArrowDown } from "react-bootstrap-icons"; diff --git a/src/Components/Modals/CreateModal.js b/src/Components/Modals/CreateModal.js index 2daf665..330e09c 100644 --- a/src/Components/Modals/CreateModal.js +++ b/src/Components/Modals/CreateModal.js @@ -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} diff --git a/src/Components/Modals/PaymentModal.js b/src/Components/Modals/PaymentModal.js index 236208c..4d540e0 100644 --- a/src/Components/Modals/PaymentModal.js +++ b/src/Components/Modals/PaymentModal.js @@ -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 diff --git a/src/Components/Modals/UploadModal.js b/src/Components/Modals/UploadModal.js index c2791c5..8deb4d6 100644 --- a/src/Components/Modals/UploadModal.js +++ b/src/Components/Modals/UploadModal.js @@ -236,8 +236,8 @@ const UploadModal = (props) => {

- 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.

The document created will be associated with{" "} diff --git a/src/Components/SignupPage/SignupPage.js b/src/Components/SignupPage/SignupPage.js index b0db95e..4c79453 100644 --- a/src/Components/SignupPage/SignupPage.js +++ b/src/Components/SignupPage/SignupPage.js @@ -50,10 +50,10 @@ const SignupPage = () => { isUpgrade ? true : false ); - // const [showSelectPlan, setShowSelectPlan] = useState(true); + //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 = () => {

{isBusy ? : null} {!isUpgrade && !isBusy ? signupForm : <>} - {true && !isBusy ? ( + {showSelectPlan && !isBusy ? (
diff --git a/src/Constants/Copy/docEditCopy.js b/src/Constants/Copy/docEditCopy.js index 8861ccf..28d7d31 100644 --- a/src/Constants/Copy/docEditCopy.js +++ b/src/Constants/Copy/docEditCopy.js @@ -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 ( +
+

{copyString}

+
+ ); + }, + caseNumber: "Case No.", + versusText: "v.", + }, }; export const outgoingComesNow = (state, fetchedCase) => { diff --git a/src/Constants/Fields/CreateCaseFields.js b/src/Constants/Fields/CreateCaseFields.js index a7850ba..c559944 100644 --- a/src/Constants/Fields/CreateCaseFields.js +++ b/src/Constants/Fields/CreateCaseFields.js @@ -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" }, diff --git a/src/Constants/Fields/SignupFields.js b/src/Constants/Fields/SignupFields.js index b350006..0a94848 100644 --- a/src/Constants/Fields/SignupFields.js +++ b/src/Constants/Fields/SignupFields.js @@ -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" }, ]; diff --git a/src/pageElements/TextInput.js b/src/pageElements/TextInput.js index e165339..e70501e 100644 --- a/src/pageElements/TextInput.js +++ b/src/pageElements/TextInput.js @@ -16,7 +16,7 @@ const TextInput = (props) => { type, disabled, } = props; - const isFlorida = state === "fl"; + const isObject = state === "fl" || state === "mi"; return (
{ onChange={onChange} > @@ -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} )) ) : ( diff --git a/src/pageElements/Toggle.js b/src/pageElements/Toggle.js index c64a060..ddd3cd3 100644 --- a/src/pageElements/Toggle.js +++ b/src/pageElements/Toggle.js @@ -10,18 +10,18 @@ const Toggle = (props) => { name="options" value={value} onChange={handleToggle} - defaultValue={1} + defaultValue={2} > onClick(1)} + onClick={(e) => onClick(2)} id="tbg-radio-1" - value={1} + value={2} > onClick(2)} + onClick={(e) => onClick(1)} id="tbg-radio-2" - value={2} + value={1} > diff --git a/src/styles/docedit-page.scss b/src/styles/docedit-page.scss index cd3b4fb..2265071 100644 --- a/src/styles/docedit-page.scss +++ b/src/styles/docedit-page.scss @@ -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;