Skip to content

Commit

Permalink
[MDS-6132] UI Updates around Project Description (#3244)
Browse files Browse the repository at this point in the history
* ui updates mostly around project description

* adjustment to test

* adding data to test mock

* update tests and mock

* update test, removing unnecessary feature flag

* styling adjustments to match figma mockup more
  • Loading branch information
asinn134 authored Sep 12, 2024
1 parent afe969b commit 901195a
Show file tree
Hide file tree
Showing 17 changed files with 290 additions and 241 deletions.
129 changes: 82 additions & 47 deletions services/common/src/components/project/ProjectDescriptionTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
ENVIRONMENTAL_MANAGMENT_ACT,
AMS_STATUS_CODES_SUCCESS,
AMS_STATUS_CODE_ERROR,
WASTE_DISCHARGE_AUTHORIZATION_PROCESS,
} from "@mds/common/constants/strings";
import {
AMS_ENVIRONMENTAL_MANAGEMENT_ACT_TYPES,
Expand All @@ -22,7 +23,7 @@ import { useSelector, useDispatch } from "react-redux";
import { getPermits } from "@mds/common/redux/selectors/permitSelectors";
import { renderTextColumn } from "@mds/common/components/common/CoreTableCommonColumns";
import { IAuthorizationSummary } from "@mds/common/interfaces";
import { useHistory } from "react-router-dom";
import { useHistory, Link } from "react-router-dom";

import {
getDropdownProjectSummaryPermitTypes,
Expand Down Expand Up @@ -378,7 +379,7 @@ const ProjectDescriptionTab = () => {
<Col span={24}>
<Row justify="space-between">
<Col>
<Typography.Title level={4}>Project Description Overview</Typography.Title>
<Typography.Title level={2}>Project Description Overview</Typography.Title>
</Col>
<Col>
<Button onClick={handleViewProjectDescriptionClicked} type="primary">
Expand Down Expand Up @@ -409,52 +410,86 @@ const ProjectDescriptionTab = () => {
/>
)}

<Typography.Title level={3}>Submission Progress</Typography.Title>
<Typography.Title level={4}>Major Mines Office</Typography.Title>
<Typography.Title level={5}>Mines Act</Typography.Title>
<CoreTable
rowKey="project_summary_authorization_guid"
dataSource={minesActData}
columns={nonAMSActColumns}
/>
<br />
<Typography.Title level={5}>Water Sustainability Act</Typography.Title>
<CoreTable
rowKey="project_summary_authorization_guid"
dataSource={waterSustainabilityActData}
columns={nonAMSActColumns}
/>
<br />
<Typography.Title level={5}>Forestry Act</Typography.Title>
<CoreTable
rowKey="project_summary_authorization_guid"
dataSource={forestryActData}
columns={nonAMSActColumns}
/>
<br />
<Typography.Title level={4}>Ministry of Environment</Typography.Title>
<Typography.Title level={5}>Environmental Management Act</Typography.Title>
{hasFailedAMSSubmission && (
<Alert
message="Submission Unsuccessful"
showIcon
type="error"
description={`Your environment authorization application was not submitted successfully. Please retry the submission or start a new application for the rejected authorization(s). You can link the submission to the new application on the Related Projects page. One or more of your environment authorization application has not been submitted successfully. Please retry the submission.`}
action={
shouldDisplayRetryButton ? (
<Button onClick={handleRetryAMSSubmissionClicked}>
Retry Failed Submission
</Button>
) : null
}
style={{ marginBottom: "12px" }}
/>
<Typography.Title level={3} className="font-colour">
Submission Progress
</Typography.Title>
{minesActData.length > 0 && (
<>
<Typography.Title level={5} className="primary-colour">
Major Mines Office
</Typography.Title>
<Typography.Text className="desktop-bold">Mines Act</Typography.Text>
<CoreTable
rowKey="project_summary_authorization_guid"
dataSource={minesActData}
columns={nonAMSActColumns}
/>
<br />
</>
)}
{waterSustainabilityActData.length > 0 && (
<>
<Typography.Text className="desktop-bold">Water Sustainability Act</Typography.Text>
<CoreTable
rowKey="project_summary_authorization_guid"
dataSource={waterSustainabilityActData}
columns={nonAMSActColumns}
/>
<br />
</>
)}
{forestryActData.length > 0 && (
<>
<Typography.Text className="desktop-bold">Forestry Act</Typography.Text>
<CoreTable
rowKey="project_summary_authorization_guid"
dataSource={forestryActData}
columns={nonAMSActColumns}
/>
<br />
</>
)}
{environmentalManagementActData.length > 0 && (
<>
<Typography.Title level={5} className="primary-colour">
Ministry of Environment
</Typography.Title>
<Typography.Text className="desktop-bold">
Environmental Management Act
</Typography.Text>
<Typography.Paragraph>
An Environmental Protection Officer will contact you once your application is
reviewed and accepted. In the meantime, to learn about the ministry’s structured
application process and timelines to get a waste discharge authorization, please
visit{" "}
<Link to={{ pathname: WASTE_DISCHARGE_AUTHORIZATION_PROCESS }} target="_blank">
The waste discharge authorization process
</Link>
.
</Typography.Paragraph>
{hasFailedAMSSubmission && (
<Alert
message="Submission Unsuccessful"
showIcon
type="error"
description={`Your environment authorization application was not submitted successfully. Please retry the submission or start a new application for the rejected authorization(s). You can link the submission to the new application on the Related Projects page. One or more of your environment authorization application has not been submitted successfully. Please retry the submission.`}
action={
shouldDisplayRetryButton ? (
<Button onClick={handleRetryAMSSubmissionClicked}>
Retry Failed Submission
</Button>
) : null
}
style={{ marginBottom: "12px" }}
/>
)}
<CoreTable
rowKey="project_summary_authorization_guid"
dataSource={environmentalManagementActData}
columns={amsActColumns}
/>
</>
)}
<CoreTable
rowKey="project_summary_authorization_guid"
dataSource={environmentalManagementActData}
columns={amsActColumns}
/>
</Col>
</Row>
) : (
Expand Down
Loading

0 comments on commit 901195a

Please sign in to comment.