diff --git a/src/frontend/src/components/public/PIAFormTabs/accuracyRetention/accuracy-retention-interface.ts b/src/frontend/src/components/public/PIAFormTabs/accuracyRetention/accuracy-retention-interface.ts index 0ff9dcf50..625b7dacc 100644 --- a/src/frontend/src/components/public/PIAFormTabs/accuracyRetention/accuracy-retention-interface.ts +++ b/src/frontend/src/components/public/PIAFormTabs/accuracyRetention/accuracy-retention-interface.ts @@ -13,3 +13,7 @@ export interface IAccuracyCorrectionAndRetention { describeRetention: string; }; } + +export interface AccuracyCorrectionAndRetentionProps { + showComments?: boolean; +} diff --git a/src/frontend/src/components/public/PIAFormTabs/accuracyRetention/index.tsx b/src/frontend/src/components/public/PIAFormTabs/accuracyRetention/index.tsx index e66953511..d896591dd 100644 --- a/src/frontend/src/components/public/PIAFormTabs/accuracyRetention/index.tsx +++ b/src/frontend/src/components/public/PIAFormTabs/accuracyRetention/index.tsx @@ -1,7 +1,10 @@ import MDEditor from '@uiw/react-md-editor'; import { useContext, useEffect, useMemo, useState } from 'react'; import Messages from './helper/messages'; -import { IAccuracyCorrectionAndRetention } from './accuracy-retention-interface'; +import { + IAccuracyCorrectionAndRetention, + AccuracyCorrectionAndRetentionProps, +} from './accuracy-retention-interface'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'; import { deepEqual } from '../../../../utils/object-comparison.util'; @@ -15,12 +18,8 @@ import ViewComments from '../../../common/ViewComment'; import { PiaSections } from '../../../../types/enums/pia-sections.enum'; import Radio from '../../../common/Radio'; -interface AccuracyCorrectionAndRetentionProps { - hideViewComments: boolean; -} - export const AccuracyCorrectionAndRetention = ({ - hideViewComments, + showComments = true, }: AccuracyCorrectionAndRetentionProps) => { const { pia, @@ -279,7 +278,7 @@ export const AccuracyCorrectionAndRetention = ({

)} - {!hideViewComments && ( + {showComments && ( )} - {!hideViewComments && ( + {showComments && ( ) : null ) : null} - {!hideViewComments && ( + {showComments && ( { risk: string; response: string; } + +export interface PIAAdditionalRisksProps { + showComments?: boolean; +} diff --git a/src/frontend/src/components/public/PIAFormTabs/additionalRisks/index.tsx b/src/frontend/src/components/public/PIAFormTabs/additionalRisks/index.tsx index 0b00a2436..b02b7cd46 100644 --- a/src/frontend/src/components/public/PIAFormTabs/additionalRisks/index.tsx +++ b/src/frontend/src/components/public/PIAFormTabs/additionalRisks/index.tsx @@ -1,6 +1,6 @@ import { useContext, useEffect, useMemo, useState } from 'react'; import Messages from './messages'; -import { IAdditionalRisks } from './AdditionalRisks'; +import { IAdditionalRisks, PIAAdditionalRisksProps } from './AdditionalRisks'; import { deepEqual } from '../../../../utils/object-comparison.util'; import { setNestedReactState } from '../../../../utils/object-modification.util'; import { Table } from '../../../common/Table'; @@ -12,11 +12,9 @@ import { import ViewComments from '../../../common/ViewComment'; import { PiaSections } from '../../../../types/enums/pia-sections.enum'; -interface PIAAdditionalRisksProps { - hideViewComments: boolean; -} - -const PIAAdditionalRisks = ({ hideViewComments }: PIAAdditionalRisksProps) => { +const PIAAdditionalRisks = ({ + showComments = true, +}: PIAAdditionalRisksProps) => { const { pia, commentCount, @@ -84,7 +82,7 @@ const PIAAdditionalRisks = ({ hideViewComments }: PIAAdditionalRisksProps) => { format="row" readOnly={isReadOnly} /> - {!hideViewComments && ( + {showComments && ( { const { pia, @@ -372,7 +371,7 @@ const PIAAgreementsAndInformationBanks = ({ )} - {!hideViewComments && ( + {showComments && ( - {!hideViewComments && ( + {showComments && ( { const { pia, @@ -121,7 +119,7 @@ const PIACollectionUseAndDisclosure = ({ addRowBtnLabel="Add more steps" format="row" /> - {!hideViewComments && ( + {showComments && ( - {!hideViewComments && ( + {showComments && ( { const { pia, @@ -337,7 +336,7 @@ export const SecurityPersonalInformation = ({

)} - {!hideViewComments && ( + {showComments && ( )} - {!hideViewComments && ( + {showComments && ( )} - {!hideViewComments && ( + {showComments && ( { const { pia, @@ -396,7 +395,7 @@ const StoringPersonalInformation = ({ )} )} - {!hideViewComments && ( + {showComments && ( )} - {!hideViewComments && ( + {showComments && ( )} - {!hideViewComments && ( + {showComments && ( Not answered

)} - {!hideViewComments && ( + {showComments && ( Not answered

)} - {!hideViewComments && ( + {showComments && ( Not answered

)} - {!hideViewComments && ( + {showComments && ( - {!hideViewComments && ( + {showComments && ( { const [pia, setPia] = useState(); // Determine to hide ViewComments on PDF - const hideViewComments = true; + const showComments = false; useEffect(() => { const htmlTag = document.getElementsByTagName('HTML')[0]; @@ -102,32 +102,24 @@ export const PiaFormPrintPreview = () => { {pia?.hasAddedPiToDataElements !== false && ( <>
- +
- +
- +
- +
- +
diff --git a/src/frontend/src/routes/router.tsx b/src/frontend/src/routes/router.tsx index d5533b398..6359bb14e 100644 --- a/src/frontend/src/routes/router.tsx +++ b/src/frontend/src/routes/router.tsx @@ -38,7 +38,6 @@ export const ProtectedRoute = () => { const Router = () => { const isMPO = !!isMPORole(); - const hideViewComments = false; // const comingSoonBanner = ( //
@@ -92,125 +91,47 @@ const Router = () => { } /> - - } - /> - - } - /> + } /> + } /> - } + element={} > } /> - - } - /> - - } - /> + } /> + } /> } /> - - } - /> - - } - /> + } /> + } /> } /> - - } - /> - - } - /> + } /> + } /> } /> - } + element={} /> - } + element={} /> } /> - - } - /> - - } - /> + } /> + } /> } />