From 8a6babd0fbd6c2bc9b7091320c9653efb40540b3 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Wed, 31 Jan 2024 10:56:58 -0600 Subject: [PATCH 1/7] more --- src/styles/modals.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/styles/modals.scss b/src/styles/modals.scss index abebf9d..1d09285 100644 --- a/src/styles/modals.scss +++ b/src/styles/modals.scss @@ -31,13 +31,14 @@ .create-modal-header { padding-left: 15px; - margin-bottom: 29px; + margin-bottom: 14px; font-weight: 500; letter-spacing: 0.009rem; line-height: 1.2rem; } .modal-caption-row { + height: 190px; background-color: rgba(230, 230, 230, 0.3254901961); padding: 15px; margin-bottom: 12px; @@ -54,7 +55,7 @@ font-weight: 500; letter-spacing: 0.009rem; line-height: 1.2rem; - margin: 20px 0px; + margin: 10px 0px; } .caption-one-container { From bcd3f210e37f00a27289b7594492c557c20b87b2 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Wed, 31 Jan 2024 11:09:54 -0600 Subject: [PATCH 2/7] more --- src/Constants/Fields/CreateCaseFields.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Constants/Fields/CreateCaseFields.js b/src/Constants/Fields/CreateCaseFields.js index 01e7b0d..0007664 100644 --- a/src/Constants/Fields/CreateCaseFields.js +++ b/src/Constants/Fields/CreateCaseFields.js @@ -11,10 +11,11 @@ export const createCaseFields = { caseType: { required: true, maxLength: 45 }, trialDate: { required: true, maxLength: 45, type: "date" }, filedDate: { required: true, maxLength: 45, type: "date" }, - contactFirstName: { required: true, maxLength: 45 }, - contactLastName: { required: true, maxLength: 45 }, + contactName: { required: true, maxLength: 45 }, contactEmail: { required: true, maxLength: 45, type: "email" }, leadAttorneys: { required: true, maxLength: 45 }, lawFirm: { required: false, maxLength: 45 }, clientPosition: { required: true, default: "Plaintiff" }, }; + +export const createCaseAdditionalFields = {}; From 5c111785db0ed8751f357941a4bf654b752b1c02 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Wed, 31 Jan 2024 11:13:00 -0600 Subject: [PATCH 3/7] more --- src/Components/Modals/CreateModal.js | 44 +++++++--------------------- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/src/Components/Modals/CreateModal.js b/src/Components/Modals/CreateModal.js index d5e341f..2a9fe76 100644 --- a/src/Components/Modals/CreateModal.js +++ b/src/Components/Modals/CreateModal.js @@ -365,51 +365,29 @@ const CreateModal = ({ setShowModal, caseData }) => { {isEditing ? ( -
Contast first name
+
Contact name
) : ( <> )} handleChangeInput(e, "contactFirstName")} + onChange={(e) => handleChangeInput(e, "contactName")} label={ - data.contactFirstName.value.length === 0 + data.contactName.value.length === 0 ? isEditing - ? caseData.contactFirstName - : "Contact First Name" + ? caseData.contactName + : "Contact Name" : "" } /> - - {isEditing ? ( -
Contact last name
- ) : ( - <> - )} - handleChangeInput(e, "contactLastName")} - label={ - data.contactLastName.value.length === 0 - ? isEditing - ? caseData.contactLastName - : "Contact Last Name" - : "" - } - /> - +
From 61c2407e51624882bb69292d005e8d9a630e20a3 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Wed, 31 Jan 2024 11:19:03 -0600 Subject: [PATCH 4/7] more --- src/Components/Modals/CreateModal.js | 250 ++++++++++------------- src/Constants/Fields/CreateCaseFields.js | 15 +- 2 files changed, 119 insertions(+), 146 deletions(-) diff --git a/src/Components/Modals/CreateModal.js b/src/Components/Modals/CreateModal.js index 2a9fe76..a39ebd9 100644 --- a/src/Components/Modals/CreateModal.js +++ b/src/Components/Modals/CreateModal.js @@ -337,7 +337,6 @@ const CreateModal = ({ setShowModal, caseData }) => { } /> - {isEditing ? (
Plaintiff(s)
@@ -362,144 +361,6 @@ const CreateModal = ({ setShowModal, caseData }) => { />
- - - {isEditing ? ( -
Contact name
- ) : ( - <> - )} - handleChangeInput(e, "contactName")} - label={ - data.contactName.value.length === 0 - ? isEditing - ? caseData.contactName - : "Contact Name" - : "" - } - /> - - - -
- - - {isEditing ? ( -
Case type
- ) : ( - <> - )} - handleChangeInput(e, "caseType")} - label={ - data.caseType.value.length === 0 - ? isEditing - ? caseData.caseType - : "Case Type" - : "" - } - /> - - - - {isEditing ? ( -
Contact email
- ) : ( - <> - )} - handleChangeInput(e, "contactEmail")} - label={ - data.contactEmail.value.length === 0 - ? isEditing - ? caseData.contactEmail - : "Contact Email" - : "" - } - /> - -
- - -
- handleChangeInput(e, "clientPosition")} - /> -
- - - {isEditing ? ( -
Billing code
- ) : ( - <> - )} - handleChangeInput(e, "billingCode")} - label={ - data.billingCode.value.length === 0 - ? isEditing - ? caseData.billingCode - : "Billing Code" - : "" - } - /> - -
- - - {isEditing ? ( -
Lead attorney
- ) : ( - <> - )} - handleChangeInput(e, "leadAttorneys")} - label={ - data.leadAttorneys.value.length === 0 - ? isEditing - ? caseData.leadAttorneys - : "Lead Attornery(s)" - : "" - } - /> - - -
); @@ -531,3 +392,114 @@ const CreateModal = ({ setShowModal, caseData }) => { }; export default CreateModal; + +/* + + {isEditing ? ( +
Contact name
+ ) : ( + <> + )} + handleChangeInput(e, "contactName")} + label={ + data.contactName.value.length === 0 + ? isEditing + ? caseData.contactName + : "Contact Name" + : "" + } + /> + + + + {isEditing ? ( +
Case type
+ ) : ( + <> + )} + handleChangeInput(e, "caseType")} + label={ + data.caseType.value.length === 0 + ? isEditing + ? caseData.caseType + : "Case Type" + : "" + } + /> + + + + +
+ handleChangeInput(e, "clientPosition")} + /> +
+ + + + {isEditing ? ( +
Billing code
+ ) : ( + <> + )} + handleChangeInput(e, "billingCode")} + label={ + data.billingCode.value.length === 0 + ? isEditing + ? caseData.billingCode + : "Billing Code" + : "" + } + /> + + + + {isEditing ? ( +
Lead attorney
+ ) : ( + <> + )} + handleChangeInput(e, "leadAttorneys")} + label={ + data.leadAttorneys.value.length === 0 + ? isEditing + ? caseData.leadAttorneys + : "Lead Attornery(s)" + : "" + } + /> + + */ diff --git a/src/Constants/Fields/CreateCaseFields.js b/src/Constants/Fields/CreateCaseFields.js index 0007664..6ed1c15 100644 --- a/src/Constants/Fields/CreateCaseFields.js +++ b/src/Constants/Fields/CreateCaseFields.js @@ -6,16 +6,17 @@ export const createCaseFields = { plaintiffParties: { required: true, maxLength: 45 }, defendantParties: { required: true, maxLength: 45 }, jurisdiction: { required: true, maxLength: 45 }, - billingCode: { required: true, maxLength: 45 }, venue: { required: true, maxLength: 45 }, - caseType: { required: true, maxLength: 45 }, trialDate: { required: true, maxLength: 45, type: "date" }, filedDate: { required: true, maxLength: 45, type: "date" }, - contactName: { required: true, maxLength: 45 }, - contactEmail: { required: true, maxLength: 45, type: "email" }, - leadAttorneys: { required: true, maxLength: 45 }, lawFirm: { required: false, maxLength: 45 }, - clientPosition: { required: true, default: "Plaintiff" }, }; -export const createCaseAdditionalFields = {}; +export const createCaseAdditionalFields = { + contactEmail: { required: true, maxLength: 45, type: "email" }, + contactName: { required: true, maxLength: 45 }, + clientPosition: { required: true, default: "Plaintiff" }, + caseType: { required: true, maxLength: 45 }, + billingCode: { required: true, maxLength: 45 }, + leadAttorneys: { required: true, maxLength: 45 }, +}; From d01edd9a3b4f4675bd802f37dd01816e2c6de749 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Wed, 31 Jan 2024 11:22:11 -0600 Subject: [PATCH 5/7] more --- src/Components/Modals/CreateModal.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Components/Modals/CreateModal.js b/src/Components/Modals/CreateModal.js index a39ebd9..cf7dc08 100644 --- a/src/Components/Modals/CreateModal.js +++ b/src/Components/Modals/CreateModal.js @@ -91,10 +91,6 @@ const CreateModal = ({ setShowModal, caseData }) => { } }; - const handleCreateCaseNavigation = (caseId) => { - // console.log("caseId in handleCreateCaseNavigation", caseId); - }; - const handleCreateCase = (e) => { e.preventDefault(); const dataValues = validateData(); From 3ad395537ceefb72ccec954038531373f06d81c2 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Wed, 31 Jan 2024 11:30:06 -0600 Subject: [PATCH 6/7] more --- src/styles/modals.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/modals.scss b/src/styles/modals.scss index 1d09285..cbcc0ef 100644 --- a/src/styles/modals.scss +++ b/src/styles/modals.scss @@ -41,7 +41,7 @@ height: 190px; background-color: rgba(230, 230, 230, 0.3254901961); padding: 15px; - margin-bottom: 12px; + margin-bottom: 24px; margin-left: 2px; margin-right: 2px; border-radius: 10px; From b463a6bd7feef590d63288b165b49f17cba60011 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Wed, 31 Jan 2024 11:40:58 -0600 Subject: [PATCH 7/7] more --- src/Components/Modals/CreateModal.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Components/Modals/CreateModal.js b/src/Components/Modals/CreateModal.js index cf7dc08..dbc5881 100644 --- a/src/Components/Modals/CreateModal.js +++ b/src/Components/Modals/CreateModal.js @@ -12,6 +12,8 @@ import { AppContext } from "../../Hooks/useContext/appContext.js"; import { db } from "../../firebase"; import { objectMap } from "../../Utils/Object"; import { createCaseFields as fields } from "../../Constants/Fields/CreateCaseFields.js"; +import { createCaseAdditionalFields as additionalFields } from "../../Constants/Fields/CreateCaseFields.js"; + import "../../styles/modals.scss"; import { getFormDataDefaults,