diff --git a/migrations/sql/V2024.11.22.10.31__change_project_summary_dates_to_date.sql b/migrations/sql/V2024.11.22.10.31__change_project_summary_dates_to_date.sql new file mode 100644 index 0000000000..666e06c13e --- /dev/null +++ b/migrations/sql/V2024.11.22.10.31__change_project_summary_dates_to_date.sql @@ -0,0 +1,15 @@ +ALTER TABLE project_summary + ALTER COLUMN expected_draft_irt_submission_date TYPE date + USING expected_draft_irt_submission_date::date; + +ALTER TABLE project_summary + ALTER COLUMN expected_permit_application_date TYPE date + USING expected_permit_application_date::date; + +ALTER TABLE project_summary + ALTER COLUMN expected_permit_receipt_date TYPE date + USING expected_permit_receipt_date::date; + +ALTER TABLE project_summary + ALTER COLUMN expected_project_start_date TYPE date + USING expected_project_start_date::date; \ No newline at end of file diff --git a/services/common/src/components/help/HelpGuide.tsx b/services/common/src/components/help/HelpGuide.tsx index 26235b21af..78f3df1c8d 100644 --- a/services/common/src/components/help/HelpGuide.tsx +++ b/services/common/src/components/help/HelpGuide.tsx @@ -27,6 +27,8 @@ import DOMPurify from "dompurify"; import { useFeatureFlag } from "@mds/common/providers/featureFlags/useFeatureFlag"; import { Feature } from "@mds/common/utils"; import Loading from "../common/Loading"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faQuestionCircle } from "@fortawesome/pro-regular-svg-icons"; interface HelpGuideProps { helpKey: string; @@ -138,8 +140,14 @@ export const HelpGuideContent: FC = ({ helpKey }) => { return ( <> - { const url = GLOBAL_ROUTES?.EDIT_PROJECT_SUMMARY.dynamicRoute( project.project_summary.project_guid, project.project_summary.project_summary_guid, - "purpose-and-authorization", - false + "basic-information", + true ); history.push(url); }; diff --git a/services/common/src/components/projectSummary/ProjectContacts.tsx b/services/common/src/components/projectSummary/ProjectContacts.tsx index d4bea94d88..62f6f301bc 100644 --- a/services/common/src/components/projectSummary/ProjectContacts.tsx +++ b/services/common/src/components/projectSummary/ProjectContacts.tsx @@ -15,10 +15,9 @@ import { } from "@mds/common/redux/utils/Validate"; import { normalizePhone } from "@mds/common/redux/utils/helpers"; import LinkButton from "@mds/common/components/common/LinkButton"; -import { FORM, isFieldDisabled } from "@mds/common/constants"; +import { FORM, isFieldDisabled, CONTACTS_COUNTRY_OPTIONS } from "@mds/common/constants"; import RenderField from "@mds/common/components/forms/RenderField"; import RenderSelect from "@mds/common/components/forms/RenderSelect"; -import { CONTACTS_COUNTRY_OPTIONS } from "@mds/common/constants"; import { getDropdownProvinceOptions } from "@mds/common/redux/selectors/staticContentSelectors"; import { getSystemFlag } from "@mds/common/redux/selectors/authenticationSelectors"; @@ -46,9 +45,9 @@ const RenderContacts = ({ fields, isDisabled }) => { const { address_type_code, sub_division_code } = address ?? {}; const isInternational = address_type_code === "INT"; const isPrimary = contact.is_primary; + return ( - // eslint-disable-next-line react/no-array-index-key -
+
{index === 0 ? ( <> Primary project contact @@ -58,35 +57,33 @@ const RenderContacts = ({ fields, isDisabled }) => { ) : ( - <> - - - - - Additional project contact #{index} - - - - fields.remove(index)} - okText="Remove" - cancelText="Cancel" + + + + + Additional project contact #{index} + + + + fields.remove(index)} + okText="Remove" + cancelText="Cancel" + > + - - - - - + Delete + + + + + )} @@ -208,7 +205,7 @@ const RenderContacts = ({ fields, isDisabled }) => { { label="When do you anticipate submitting a draft Information Requirements Table?" placeholder="Please select date" component={RenderDate} - validate={[dateNotAfterOther(expected_permit_application_date)]} + validate={[dateInFuture, dateNotAfterOther(expected_permit_application_date)]} disabled={isFieldDisabled(systemFlag, formValues?.status_code)} /> { label="When do you anticipate submitting a permit application?" placeholder="Please select date" component={RenderDate} - validate={[dateNotBeforeOther(expected_draft_irt_submission_date)]} + validate={[dateInFuture, dateNotBeforeOther(expected_draft_irt_submission_date)]} disabled={isFieldDisabled(systemFlag, formValues?.status_code)} /> { label="When do you hope to receive your permit/amendment(s)?" placeholder="Please select date" component={RenderDate} - validate={[dateNotBeforeOther(expected_permit_application_date)]} + validate={[dateInFuture, dateNotBeforeOther(expected_permit_application_date)]} disabled={isFieldDisabled(systemFlag, formValues?.status_code)} /> { label="When do you anticipate starting work on this project?" placeholder="Please select date" component={RenderDate} - validate={[dateNotBeforeOther(expected_permit_receipt_date)]} + validate={[dateInFuture, dateNotBeforeOther(expected_permit_receipt_date)]} disabled={isFieldDisabled(systemFlag, formValues?.status_code)} /> diff --git a/services/common/src/components/projectSummary/ProjectLinks.tsx b/services/common/src/components/projectSummary/ProjectLinks.tsx index c08537eeef..b3cf017dab 100644 --- a/services/common/src/components/projectSummary/ProjectLinks.tsx +++ b/services/common/src/components/projectSummary/ProjectLinks.tsx @@ -77,7 +77,9 @@ const ProjectLinkInput = ({ unrelatedProjects = [], mineGuid, projectGuid }) => onChange={(...args) => handleChange(args)} />