diff --git a/src/app/api/flag-wrapper.jsx b/src/app/api/flag-wrapper.jsx index 3e3f689ffc..a71388fe86 100755 --- a/src/app/api/flag-wrapper.jsx +++ b/src/app/api/flag-wrapper.jsx @@ -23,6 +23,7 @@ function FlagWrapper({ children }) { const cmsDisabledIsOn = isOn('cms-disabled'); const demographicChangeRequestIsOn = isOn('demographic-change-request'); + const hti5ErdIsOn = isOn('hti-5-erd'); const insightsConnectionIsOn = isOn('insights-connection'); const insightsDisplayIsOn = isOn('insights-display'); const rwtAiIntegrationIsOn = isOn('rwt-ai-integration'); @@ -34,6 +35,7 @@ function FlagWrapper({ children }) { isProduction, cmsDisabledIsOn, demographicChangeRequestIsOn, + hti5ErdIsOn, insightsConnectionIsOn, insightsDisplayIsOn, rwtAiIntegrationIsOn, diff --git a/src/app/components/listing/details/sed/sed.jsx b/src/app/components/listing/details/sed/sed.jsx index 5fa1abcf43..0c078d00b6 100755 --- a/src/app/components/listing/details/sed/sed.jsx +++ b/src/app/components/listing/details/sed/sed.jsx @@ -21,7 +21,7 @@ import ChplSedTaskView from './sed-task-view'; import { ChplLink } from 'components/util'; import { sortCriteria } from 'services/criteria.service'; import { getDisplayDateFormat } from 'services/date-util'; -import { UserContext } from 'shared/contexts'; +import { FlagContext, UserContext } from 'shared/contexts'; import { listing as listingType } from 'shared/prop-types/listing'; import { theme } from 'themes'; @@ -61,6 +61,7 @@ function ChplSed({ listing }) { sedReportFileLocation, sedTestingEndDay, } = listing; + const { hti5ErdIsOn } = useContext(FlagContext); const { user } = useContext(UserContext); const [hasSed, setHasSed] = useState(false); const classes = useStyles(); @@ -79,93 +80,133 @@ function ChplSed({ listing }) { return ( - - - - - - - Full Usability Report: - - - { sedReportFileLocation - && ( - - )} - {!sedReportFileLocation && 'No report on file'} - - - - - Description of Intended Users: - - - {sedIntendedUserDescription ?? 'N/A'} - - - - - Date SED Testing was Completed: - - - {getDisplayDateFormat(sedTestingEndDay)} - - - - - + { !hti5ErdIsOn + && ( + + + + + + + Full Usability Report: + + + { sedReportFileLocation + && ( + + )} + {!sedReportFileLocation && 'No report on file'} + + + + + Description of Intended Users: + + + {sedIntendedUserDescription ?? 'N/A'} + + + + + Date SED Testing was Completed: + + + {getDisplayDateFormat(sedTestingEndDay)} + + + + + + )} - - - - Certification Criteria - UCD Process - UCD Process Details - - - - { sed.ucdProcesses - .sort(sortUcdProcesses) - .map((ucd) => ( - - - - {ucd.criteria - .sort(sortCriteria) - .map((criterion) => ( - - {criterion.removed && 'Removed | '} - {criterion.number} - - ))} - - - - {ucd.name} - - - {ucd.details} - + { !hti5ErdIsOn + && ( +
+ + + Certification Criteria + UCD Process + UCD Process Details + + + + { sed.ucdProcesses + .sort(sortUcdProcesses) + .map((ucd) => ( + + + + {ucd.criteria + .sort(sortCriteria) + .map((criterion) => ( + + {criterion.removed && 'Removed | '} + {criterion.number} + + ))} + + + + {ucd.name} + + + {ucd.details} + + + ))} + +
+ )} + { hti5ErdIsOn + && ( + + + + Certification Criteria + UCD Process - ))} - -
+ + + { sed.ucdProcesses + .sort(sortUcdProcesses) + .map((ucd) => ( + + + + {ucd.criteria + .sort(sortCriteria) + .map((criterion) => ( + + {criterion.removed && 'Removed | '} + {criterion.number} + + ))} + + + + {ucd.value} + + + ))} + + + )}
- { (listing.edition === null || listing.edition.name === '2015') + { (listing.edition === null || listing.edition.name === '2015') && !hti5ErdIsOn && ( diff --git a/src/app/pages/listing/history/listings.service.js b/src/app/pages/listing/history/listings.service.js index 1e2f162051..91a7bb8dc0 100755 --- a/src/app/pages/listing/history/listings.service.js +++ b/src/app/pages/listing/history/listings.service.js @@ -259,8 +259,12 @@ const compare = (before, after, key, title = 'unknown') => { break; case 'ucdProcesses': options = { - sort: (p, c) => ((p.name ?? p.ucdProcessName) < (c.name ?? c.ucdProcessName) ? -1 : (p.name ?? p.ucdProcessName) > (c.name ?? c.ucdProcessName) ? 1 : 0), - write: (f) => `UCD Process "${f.name ?? f.ucdProcessName}"`, + sort: (p, c) => { + const pv = p.name ?? p.ucdProcessName ?? p.value; + const cv = c.name ?? c.ucdProcessName ?? c.value; + return pv < cv ? -1 : (pv > cv ? 1 : 0); + }, + write: (f) => `UCD Process "${f.name ?? f.ucdProcessName ?? f.value}"`, }; break; default: diff --git a/src/app/shared/contexts/flag-context.js b/src/app/shared/contexts/flag-context.js index 6800d73a7e..5b76b34ef7 100755 --- a/src/app/shared/contexts/flag-context.js +++ b/src/app/shared/contexts/flag-context.js @@ -3,6 +3,7 @@ import { createContext } from 'react'; const FlagContext = createContext({ cmsDisabledIsOn: false, demographicChangeRequestIsOn: false, + hti5ErdIsOn: false, insightsConnectionIsOn: false, insightsDisplayIsOn: false, rwtAiIntegrationIsOn: false,