Skip to content

Commit

Permalink
disable ability to replace and archive for all documents IRT table
Browse files Browse the repository at this point in the history
  • Loading branch information
asinn134 committed Oct 29, 2024
1 parent b59f848 commit 3bb9593
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
18 changes: 15 additions & 3 deletions services/common/src/components/projects/ProjectDocumentsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ const ProjectDocumentsTab: FC<ProjectDocumentsTabProps> = ({ project }) => {
<Typography.Title level={3}>Project Description</Typography.Title>
<Alert
className={isCore ? "ant-alert-grey" : ""}
description="Refer back to Project Description Purpose and Authorization to see required document list."
description="Below are the required and supporting documents for each authorization submitted in the Project Description.
Refer to the Project Description Purpose and Authorization sections for the complete list of required documents."
showIcon
/>
</>
Expand Down Expand Up @@ -207,11 +208,22 @@ const ProjectDocumentsTab: FC<ProjectDocumentsTabProps> = ({ project }) => {
titleLevel={3}
onArchivedDocuments={refreshData}
documents={irtDocuments}
canReplace={canReplace}
canReplace={false}
canArchive={false}
infoText="Here is the IRT file you submitted under the Information Requirements Table.
To make changes to the submission, return to the IRT tab."
/>
),
},
{ href: "major-mine-application" },
{
href: "major-mine-application",
content: (
<>
<Typography.Title level={3}>Major Mine Application</Typography.Title>
<Typography.Paragraph>Below are the documents submitted as part of the Major Mine Application.</Typography.Paragraph>
</>
)
},
{
href: "mma-primary-document",
title: <div className="sub-tab-1">Primary Document</div>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface ProjectDocumentsTabSectionProps {
onArchivedDocuments: () => Promise<void>;
canArchive?: boolean;
canReplace?: boolean;
infoText?: string;
}
const ProjectDocumentsTabSection: FC<ProjectDocumentsTabSectionProps> = ({
documents,
Expand All @@ -22,13 +23,15 @@ const ProjectDocumentsTabSection: FC<ProjectDocumentsTabSectionProps> = ({
titleLevel = 4,
canArchive = true,
canReplace = true,
infoText = null,
}) => {
const sectionTitle = title ?? formatUrlToUpperCaseString(id);

return (
<Row id={id}>
<Col span={24}>
<Typography.Title level={titleLevel}>{sectionTitle}</Typography.Title>
{infoText && <Typography.Paragraph>{infoText}</Typography.Paragraph>}
</Col>
<Col span={24}>
<DocumentTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ exports[`ProjectDocumentsTab renders properly 1`] = `
<div
class="ant-alert-description"
>
Refer back to Project Description Purpose and Authorization to see required document list.
Below are the required and supporting documents for each authorization submitted in the Project Description.
Refer to the Project Description Purpose and Authorization sections for the complete list of required documents.
</div>
</div>
</div>
Expand Down Expand Up @@ -1837,6 +1838,12 @@ exports[`ProjectDocumentsTab renders properly 1`] = `
>
Information Requirements Table
</h3>
<div
class="ant-typography"
>
Here is the IRT file you submitted under the Information Requirements Table.
To make changes to the submission, return to the IRT tab.
</div>
</div>
<div
class="ant-col ant-col-24"
Expand Down Expand Up @@ -2217,14 +2224,19 @@ exports[`ProjectDocumentsTab renders properly 1`] = `
</div>
<div
class="ant-col ant-col-24"
id="major-mine-application"
style="padding: 8px 8px 8px 8px;"
>
<h3
class="ant-typography"
id="major-mine-application"
>
Major Mine Application
</h3>
<div
class="ant-typography"
>
Below are the documents submitted as part of the Major Mine Application.
</div>
</div>
<div
class="ant-col ant-col-24"
Expand Down

0 comments on commit 3bb9593

Please sign in to comment.