diff --git a/src/app/components/change-request/change-request.jsx b/src/app/components/change-request/change-request.jsx
index de8cbccdaf..adc0fb61db 100644
--- a/src/app/components/change-request/change-request.jsx
+++ b/src/app/components/change-request/change-request.jsx
@@ -141,24 +141,11 @@ const getChangeRequestViewDetails = (cr) => {
>
);
- case 'RWT Plans URL Change Request':
- return (
- <>
-
-
- >
- );
case 'RWT Results URL Change Request':
return (
<>
-
+
>
);
case 'Service Base URL List Change Request':
@@ -191,20 +178,10 @@ const getChangeRequestEditDetails = (cr, handleDispatch, isAccepting) => {
return (
);
- case 'RWT Plans URL Change Request':
- return (
-
- );
case 'RWT Results URL Change Request':
return (
);
case 'Service Base URL List Change Request':
diff --git a/src/app/components/change-request/types/listing-rwt-edit.jsx b/src/app/components/change-request/types/listing-rwt-edit.jsx
index 145eff3b17..c7c5b51a9e 100755
--- a/src/app/components/change-request/types/listing-rwt-edit.jsx
+++ b/src/app/components/change-request/types/listing-rwt-edit.jsx
@@ -4,7 +4,7 @@ import {
Typography,
makeStyles,
} from '@material-ui/core';
-import { bool, string } from 'prop-types';
+import { bool } from 'prop-types';
import { useFormik } from 'formik';
import * as yup from 'yup';
@@ -42,7 +42,7 @@ const validationSchema = yup.object({
}),
});
-function ChplChangeRequestListingRwtEdit({ isAccepting = false, title, value }) {
+function ChplChangeRequestListingRwtEdit({ isAccepting = false }) {
const { analytics } = useAnalyticsContext();
const { changeRequest, setChangeRequest } = useContext(ChangeRequestContext);
const { hasAnyRole } = useContext(UserContext);
@@ -54,14 +54,14 @@ function ChplChangeRequestListingRwtEdit({ isAccepting = false, title, value })
}, [hasAnyRole, isAccepting]);
const getCurrent = () => {
- if (changeRequest.details.listing[value]) {
+ if (changeRequest.details.listing.rwtResultsUrl) {
return (
);
@@ -152,6 +152,4 @@ export default ChplChangeRequestListingRwtEdit;
ChplChangeRequestListingRwtEdit.propTypes = {
isAccepting: bool,
- title: string.isRequired,
- value: string.isRequired,
};
diff --git a/src/app/components/change-request/types/listing-rwt-plans.jsx b/src/app/components/change-request/types/listing-rwt-plans.jsx
deleted file mode 100755
index a679a39357..0000000000
--- a/src/app/components/change-request/types/listing-rwt-plans.jsx
+++ /dev/null
@@ -1,396 +0,0 @@
-import React, { useContext, useEffect, useState } from 'react';
-import {
- Box,
- Button,
- Card,
- CardContent,
- CircularProgress,
- Container,
- Typography,
- makeStyles,
-} from '@material-ui/core';
-import CancelIcon from '@material-ui/icons/Cancel';
-import CheckCircleIcon from '@material-ui/icons/CheckCircle';
-import VerifiedUserIcon from '@material-ui/icons/VerifiedUser';
-import { useSnackbar } from 'notistack';
-import { useFormik } from 'formik';
-import * as yup from 'yup';
-
-import { usePostChangeRequest } from 'api/change-requests';
-import { usePostUrlChecker } from 'api/url-checker';
-import { ChplActionBar } from 'components/action-bar';
-import { ChplLink, ChplTextField } from 'components/util';
-import { ListingContext, UserContext } from 'shared/contexts';
-import { utilStyles, palette, theme } from 'themes';
-
-const useStyles = makeStyles({
- ...utilStyles,
- titlePadding: {
- paddingTop: '16px',
- paddingBottom: '16px',
- },
- titleBackground: {
- backgroundColor: palette.white,
- paddingBottom: '16px',
- marginTop: '-16px',
- padding: '16px 32px',
- boxShadow: 'rgb(149 157 165 / 10%) 0 4px 8px',
- },
- pageBackground: {
- backgroundColor: palette.lightGray,
- minHeight: 'calc(100vh - 64px)',
- },
- resultsCard: {
- width: '32.3%',
- overflowWrap: 'break-word',
- [theme.breakpoints.down('sm')]: {
- width: '100%',
- },
- },
- resultsCardHalf: {
- width: '49.2%',
- overflowWrap: 'break-word',
- [theme.breakpoints.down('sm')]: {
- width: '100%',
- },
- },
- statusText: {
- display: 'flex',
- alignItems: 'center',
- },
- resultsContainer: {
- display: 'flex',
- flexDirection: 'row',
- gap: '16px',
- paddingBottom: '16px',
- [theme.breakpoints.down('sm')]: {
- flexDirection: 'column',
- },
- },
- greenIcon: {
- color: 'green',
- marginLeft: '8px',
- marginTop: '4px',
- },
- redIcon: {
- color: 'red',
- marginLeft: '8px',
- marginTop: '4px',
- },
-});
-
-const validationSchema = yup.object({
- url: yup.string()
- .required('Field is required')
- .url('Improper format (http://www.example.com)'),
-});
-
-function ChplListingRwtPlans() {
- const { hasAnyRole } = useContext(UserContext);
- const { listing } = useContext(ListingContext);
- const { enqueueSnackbar } = useSnackbar();
- const { mutate: submitCR } = usePostChangeRequest();
- const {
- data, isLoading, isSuccess, mutate,
- } = usePostUrlChecker();
- const [currentUrl, setCurrentUrl] = useState(undefined);
- const [errorMessages, setErrorMessages] = useState([]);
- const [hasValidated, setHasValidated] = useState(false);
- const [isProcessing, setIsProcessing] = useState(false);
- const [urlCheckResponse, setUrlCheckResponse] = useState(undefined);
- const classes = useStyles();
- let formik;
-
- useEffect(() => {
- if (isLoading || !isSuccess) { return; }
- setUrlCheckResponse(data.data);
- }, [data, isLoading, isSuccess]);
-
- useEffect(() => {
- const url = listing.rwtPlansUrl;
- formik.setFieldValue('url', url ?? '');
- setCurrentUrl(url);
- }, [listing]);
-
- const handleDispatch = (action) => {
- switch (action) {
- case 'save':
- setIsProcessing(true);
- submitCR({
- developer: listing.developer,
- changeRequestType: {
- id: 5,
- name: 'RWT Plans URL Change Request',
- },
- details: {
- listing,
- url: formik.values.url,
- },
- }, {
- onSuccess: () => {
- setIsProcessing(false);
- enqueueSnackbar('URL change request has been submitted successfully.', {
- variant: 'success',
- });
- },
- onError: (error) => {
- setIsProcessing(false);
- if (error.response.data.error) {
- setErrorMessages([error.response.data.error]);
- } else if (error.response.data.errorMessages) {
- setErrorMessages(error.response.data.errorMessages);
- } else {
- setErrorMessages(['An error occurred. Please try again, or contact your ONC-ACB for assistance']);
- }
- },
- });
- break;
- // no default
- }
- };
-
- const isActionDisabled = () => !formik.isValid || !hasValidated;
-
- const validate = (urlToValidate) => {
- setUrlCheckResponse(undefined);
- mutate(urlToValidate, {
- onSuccess: () => {
- setHasValidated(true);
- },
- onError: () => {
- setHasValidated(true);
- enqueueSnackbar('There was an error attempting to check the URL.', {
- variant: 'error',
- });
- },
- });
- };
-
- formik = useFormik({
- initialValues: {
- url: '',
- },
- onSubmit: () => {
- const urlToValidate = {
- url: formik.values.url,
- };
- validate(urlToValidate);
- },
- validationSchema,
- });
-
- const displayStatusIcon = (passed) => {
- if (passed) {
- return (
-
- );
- }
- return (
-
- );
- };
-
- return (
- <>
-
-
-
- RWT Plans URL Update
-
-
- Current URL:
- {' '}
- { currentUrl ?? 'None' }
-
-
-
- }
- >
- Validate
-
-
-
-
-
- { isLoading
- && (
-
-
-
- )}
- { urlCheckResponse
- && (
- <>
- Results
-
-
-
-
- Status:
-
-
- { urlCheckResponse.passed ? 'Passed' : 'Failure' }
- { displayStatusIcon(urlCheckResponse.passed) }
-
- { urlCheckResponse.errorMessage
- && (
- <>
-
- Error Message:
-
-
- { urlCheckResponse.errorMessage }
-
- >
- )}
-
-
-
-
-
- URL:
-
-
- { urlCheckResponse.url }
-
-
-
-
- { (hasAnyRole(['chpl-admin', 'chpl-onc']) || !urlCheckResponse.passed)
- && (
- <>
- Assertions
-
-
-
- { urlCheckResponse.httpResponseAssertion?.actualValue ? (
- <>
-
- HTTP Status Code:
-
-
-
- { urlCheckResponse.httpResponseAssertion.actualValue }
-
- { displayStatusIcon(urlCheckResponse.httpResponseAssertion.passed) }
-
-
-
-
- >
- ) : (
- <>
-
- No HTTP Status Code Available:
-
-
-
- The HTTP response code could not be retrieved or is unavailable.
-
- { displayStatusIcon(urlCheckResponse.httpResponseAssertion.passed) }
-
- >
- )}
-
-
-
-
-
- Response Time (in milliseconds):
-
- { urlCheckResponse.responseTimeAssertion?.actualValue
- ? (
- <>
-
-
- { urlCheckResponse.responseTimeAssertion.actualValue }
-
- { displayStatusIcon(urlCheckResponse.responseTimeAssertion.passed) }
-
- >
- ) : (
- <>
-
-
- The response time is empty or unavailable.
-
- { displayStatusIcon(urlCheckResponse.responseTimeAssertion.passed) }
-
- >
- )}
-
-
-
-
- { urlCheckResponse.bodyNotEmptyAssertion?.actualValue ? (
- <>
-
- Body Content:
-
-
-
- { urlCheckResponse.bodyNotEmptyAssertion.actualValue
- ? urlCheckResponse.bodyNotEmptyAssertion.actualValue
- : 'Empty body content'}
-
- { displayStatusIcon(urlCheckResponse.bodyNotEmptyAssertion.passed) }
-
- >
- ) : (
- <>
-
- No Content Available:
-
-
-
- The body content is empty or unavailable.
-
- { displayStatusIcon(urlCheckResponse.bodyNotEmptyAssertion.passed) }
-
- >
- )}
-
-
-
- >
- )}
- >
- )}
-
-
- >
- );
-}
-
-export default ChplListingRwtPlans;
-
-ChplListingRwtPlans.propTypes = {
-};
diff --git a/src/app/components/change-request/types/listing-rwt-results.jsx b/src/app/components/change-request/types/listing-rwt-results.jsx
deleted file mode 100755
index d5c803c609..0000000000
--- a/src/app/components/change-request/types/listing-rwt-results.jsx
+++ /dev/null
@@ -1,396 +0,0 @@
-import React, { useContext, useEffect, useState } from 'react';
-import {
- Box,
- Button,
- Card,
- CardContent,
- CircularProgress,
- Container,
- Typography,
- makeStyles,
-} from '@material-ui/core';
-import CancelIcon from '@material-ui/icons/Cancel';
-import CheckCircleIcon from '@material-ui/icons/CheckCircle';
-import VerifiedUserIcon from '@material-ui/icons/VerifiedUser';
-import { useSnackbar } from 'notistack';
-import { useFormik } from 'formik';
-import * as yup from 'yup';
-
-import { usePostChangeRequest } from 'api/change-requests';
-import { usePostUrlChecker } from 'api/url-checker';
-import { ChplActionBar } from 'components/action-bar';
-import { ChplLink, ChplTextField } from 'components/util';
-import { ListingContext, UserContext } from 'shared/contexts';
-import { utilStyles, palette, theme } from 'themes';
-
-const useStyles = makeStyles({
- ...utilStyles,
- titlePadding: {
- paddingTop: '16px',
- paddingBottom: '16px',
- },
- titleBackground: {
- backgroundColor: palette.white,
- paddingBottom: '16px',
- marginTop: '-16px',
- padding: '16px 32px',
- boxShadow: 'rgb(149 157 165 / 10%) 0 4px 8px',
- },
- pageBackground: {
- backgroundColor: palette.lightGray,
- minHeight: 'calc(100vh - 64px)',
- },
- resultsCard: {
- width: '32.3%',
- overflowWrap: 'break-word',
- [theme.breakpoints.down('sm')]: {
- width: '100%',
- },
- },
- resultsCardHalf: {
- width: '49.2%',
- overflowWrap: 'break-word',
- [theme.breakpoints.down('sm')]: {
- width: '100%',
- },
- },
- statusText: {
- display: 'flex',
- alignItems: 'center',
- },
- resultsContainer: {
- display: 'flex',
- flexDirection: 'row',
- gap: '16px',
- paddingBottom: '16px',
- [theme.breakpoints.down('sm')]: {
- flexDirection: 'column',
- },
- },
- greenIcon: {
- color: 'green',
- marginLeft: '8px',
- marginTop: '4px',
- },
- redIcon: {
- color: 'red',
- marginLeft: '8px',
- marginTop: '4px',
- },
-});
-
-const validationSchema = yup.object({
- url: yup.string()
- .required('Field is required')
- .url('Improper format (http://www.example.com)'),
-});
-
-function ChplListingRwtResults() {
- const { hasAnyRole } = useContext(UserContext);
- const { listing } = useContext(ListingContext);
- const { enqueueSnackbar } = useSnackbar();
- const { mutate: submitCR } = usePostChangeRequest();
- const {
- data, isLoading, isSuccess, mutate,
- } = usePostUrlChecker();
- const [currentUrl, setCurrentUrl] = useState(undefined);
- const [errorMessages, setErrorMessages] = useState([]);
- const [hasValidated, setHasValidated] = useState(false);
- const [isProcessing, setIsProcessing] = useState(false);
- const [urlCheckResponse, setUrlCheckResponse] = useState(undefined);
- const classes = useStyles();
- let formik;
-
- useEffect(() => {
- if (isLoading || !isSuccess) { return; }
- setUrlCheckResponse(data.data);
- }, [data, isLoading, isSuccess]);
-
- useEffect(() => {
- const url = listing.rwtResultsUrl;
- formik.setFieldValue('url', url ?? '');
- setCurrentUrl(url);
- }, [listing]);
-
- const handleDispatch = (action) => {
- switch (action) {
- case 'save':
- setIsProcessing(true);
- submitCR({
- developer: listing.developer,
- changeRequestType: {
- id: 6,
- name: 'RWT Results URL Change Request',
- },
- details: {
- listing,
- url: formik.values.url,
- },
- }, {
- onSuccess: () => {
- setIsProcessing(false);
- enqueueSnackbar('URL change request has been submitted successfully.', {
- variant: 'success',
- });
- },
- onError: (error) => {
- setIsProcessing(false);
- if (error.response.data.error) {
- setErrorMessages([error.response.data.error]);
- } else if (error.response.data.errorMessages) {
- setErrorMessages(error.response.data.errorMessages);
- } else {
- setErrorMessages(['An error occurred. Please try again, or contact your ONC-ACB for assistance']);
- }
- },
- });
- break;
- // no default
- }
- };
-
- const isActionDisabled = () => !formik.isValid || !hasValidated;
-
- const validate = (urlToValidate) => {
- setUrlCheckResponse(undefined);
- mutate(urlToValidate, {
- onSuccess: () => {
- setHasValidated(true);
- },
- onError: () => {
- setHasValidated(true);
- enqueueSnackbar('There was an error attempting to check the URL.', {
- variant: 'error',
- });
- },
- });
- };
-
- formik = useFormik({
- initialValues: {
- url: '',
- },
- onSubmit: () => {
- const urlToValidate = {
- url: formik.values.url,
- };
- validate(urlToValidate);
- },
- validationSchema,
- });
-
- const displayStatusIcon = (passed) => {
- if (passed) {
- return (
-
- );
- }
- return (
-
- );
- };
-
- return (
- <>
-
-
-
- RWT Results URL Update
-
-
- Current URL:
- {' '}
- { currentUrl ?? 'None' }
-
-
-
- }
- >
- Validate
-
-
-
-
-
- { isLoading
- && (
-
-
-
- )}
- { urlCheckResponse
- && (
- <>
- Results
-
-
-
-
- Status:
-
-
- { urlCheckResponse.passed ? 'Passed' : 'Failure' }
- { displayStatusIcon(urlCheckResponse.passed) }
-
- { urlCheckResponse.errorMessage
- && (
- <>
-
- Error Message:
-
-
- { urlCheckResponse.errorMessage }
-
- >
- )}
-
-
-
-
-
- URL:
-
-
- { urlCheckResponse.url }
-
-
-
-
- { (hasAnyRole(['chpl-admin', 'chpl-onc']) || !urlCheckResponse.passed)
- && (
- <>
- Assertions
-
-
-
- { urlCheckResponse.httpResponseAssertion?.actualValue ? (
- <>
-
- HTTP Status Code:
-
-
-
- { urlCheckResponse.httpResponseAssertion.actualValue }
-
- { displayStatusIcon(urlCheckResponse.httpResponseAssertion.passed) }
-
-
-
-
- >
- ) : (
- <>
-
- No HTTP Status Code Available:
-
-
-
- The HTTP response code could not be retrieved or is unavailable.
-
- { displayStatusIcon(urlCheckResponse.httpResponseAssertion.passed) }
-
- >
- )}
-
-
-
-
-
- Response Time (in milliseconds):
-
- { urlCheckResponse.responseTimeAssertion?.actualValue
- ? (
- <>
-
-
- { urlCheckResponse.responseTimeAssertion.actualValue }
-
- { displayStatusIcon(urlCheckResponse.responseTimeAssertion.passed) }
-
- >
- ) : (
- <>
-
-
- The response time is empty or unavailable.
-
- { displayStatusIcon(urlCheckResponse.responseTimeAssertion.passed) }
-
- >
- )}
-
-
-
-
- { urlCheckResponse.bodyNotEmptyAssertion?.actualValue ? (
- <>
-
- Body Content:
-
-
-
- { urlCheckResponse.bodyNotEmptyAssertion.actualValue
- ? urlCheckResponse.bodyNotEmptyAssertion.actualValue
- : 'Empty body content'}
-
- { displayStatusIcon(urlCheckResponse.bodyNotEmptyAssertion.passed) }
-
- >
- ) : (
- <>
-
- No Content Available:
-
-
-
- The body content is empty or unavailable.
-
- { displayStatusIcon(urlCheckResponse.bodyNotEmptyAssertion.passed) }
-
- >
- )}
-
-
-
- >
- )}
- >
- )}
-
-
- >
- );
-}
-
-export default ChplListingRwtResults;
-
-ChplListingRwtResults.propTypes = {
-};
diff --git a/src/app/components/change-request/types/listing-rwt-view.jsx b/src/app/components/change-request/types/listing-rwt-view.jsx
index bc76c1ff39..933fafd752 100755
--- a/src/app/components/change-request/types/listing-rwt-view.jsx
+++ b/src/app/components/change-request/types/listing-rwt-view.jsx
@@ -3,7 +3,6 @@ import {
Typography,
makeStyles,
} from '@material-ui/core';
-import { string } from 'prop-types';
import { ChplLink } from 'components/util';
import { ChangeRequestContext, useAnalyticsContext } from 'shared/contexts';
@@ -21,20 +20,20 @@ const useStyles = makeStyles({
},
});
-function ChplChangeRequestListingRwtView({ title, value }) {
+function ChplChangeRequestListingRwtView() {
const { analytics } = useAnalyticsContext();
const { changeRequest } = useContext(ChangeRequestContext);
const classes = useStyles();
const getCurrent = () => {
- if (changeRequest.details.listing[value]) {
+ if (changeRequest.details.listing.rwtResultsUrl) {
return (
);
@@ -46,11 +45,7 @@ function ChplChangeRequestListingRwtView({ title, value }) {
- Current RWT
- {' '}
- { title }
- {' '}
- URL
+ Current RWT Results URL
{ getCurrent() }
@@ -58,18 +53,14 @@ function ChplChangeRequestListingRwtView({ title, value }) {
- Submitted RWT
- {' '}
- { title }
- {' '}
- URL
+ Submitted RWT Results URL
@@ -82,6 +73,4 @@ function ChplChangeRequestListingRwtView({ title, value }) {
export default ChplChangeRequestListingRwtView;
ChplChangeRequestListingRwtView.propTypes = {
- title: string.isRequired,
- value: string.isRequired,
};
diff --git a/src/app/components/download-listings/download-listings.jsx b/src/app/components/download-listings/download-listings.jsx
index edcb7a5164..cb226ed45d 100755
--- a/src/app/components/download-listings/download-listings.jsx
+++ b/src/app/components/download-listings/download-listings.jsx
@@ -19,7 +19,7 @@ import { ChplTooltip } from 'components/util';
import { eventTrack } from 'services/analytics.service';
import { sortCqms } from 'services/cqms.service';
import { sortCriteria } from 'services/criteria.service';
-import { UserContext, useAnalyticsContext } from 'shared/contexts';
+import { FlagContext, UserContext, useAnalyticsContext } from 'shared/contexts';
import { listing as listingPropType } from 'shared/prop-types';
import { palette, theme } from 'themes';
@@ -133,6 +133,7 @@ const parseSvapCsv = ({ svaps }, data) => {
function ChplDownloadListings({ listings: initialListings = [], toggled = [] }) {
const { analytics } = useAnalyticsContext();
+ const { hti5ErdIsOn } = useContext(FlagContext);
const { hasAnyRole } = useContext(UserContext);
const [anchor, setAnchor] = useState(null);
const [categories, setCategories] = useState(allCategories.map((h) => ({
@@ -199,7 +200,7 @@ function ChplDownloadListings({ listings: initialListings = [], toggled = [] })
const activeCategories = categories.filter((cat) => cat.selected).map((cat) => cat.key);
const csvExporter = new ExportToCsv({
...csvOptions,
- headers: allHeaders.filter((h) => activeCategories.includes(h.objectKey) || activeCategories.includes(h.group)),
+ headers: allHeaders.filter((h) => ((activeCategories.includes(h.objectKey) || activeCategories.includes(h.group)) && (!hti5ErdIsOn || h.objectKey !== 'rwtPlansUrl'))),
});
if (analytics) {
eventTrack({
diff --git a/src/app/components/filter/filters/subscription-subjects.jsx b/src/app/components/filter/filters/subscription-subjects.jsx
index dd0c8801f8..b2b2586a6c 100755
--- a/src/app/components/filter/filters/subscription-subjects.jsx
+++ b/src/app/components/filter/filters/subscription-subjects.jsx
@@ -8,7 +8,6 @@ const filter = {
{ value: 'Certification Status Changed' },
{ value: 'Certification Criterion Added' },
{ value: 'Certification Criterion Removed' },
- { value: 'RWT Plans URL Changed' },
{ value: 'RWT Results URL Changed' },
{ value: 'Service Base URL List Changed' },
],
diff --git a/src/app/components/listing/details/listing-information/listing-information.jsx b/src/app/components/listing/details/listing-information/listing-information.jsx
index bc23bc9178..37a9bf8da3 100755
--- a/src/app/components/listing/details/listing-information/listing-information.jsx
+++ b/src/app/components/listing/details/listing-information/listing-information.jsx
@@ -14,7 +14,7 @@ import {
import { ChplLink } from 'components/util';
import { getDisplayDateFormat } from 'services/date-util';
import { getStatusIcon } from 'services/listing.service';
-import { UserContext } from 'shared/contexts';
+import { FlagContext, UserContext } from 'shared/contexts';
import { listing as listingType } from 'shared/prop-types/listing';
import { theme } from 'themes';
@@ -40,6 +40,7 @@ const useStyles = makeStyles({
});
function ChplListingInformation({ listing: initialListing }) {
+ const { hti5ErdIsOn } = useContext(FlagContext);
const { hasAnyRole, user } = useContext(UserContext);
const [listing, setListing] = useState(undefined);
const classes = useStyles();
@@ -353,11 +354,11 @@ function ChplListingInformation({ listing: initialListing }) {
router={{ sref: 'organizations.developers.developer', options: { id: listing.developer.id } }}
/>
- { (listing.rwtPlansUrl || listing.rwtPlansCheckDate || listing.rwtResultsUrl || listing.rwtResultsCheckDate)
+ { ((!hti5ErdIsOn && (listing.rwtPlansUrl || listing.rwtPlansCheckDate)) || listing.rwtResultsUrl || listing.rwtResultsCheckDate)
&& (
Real World Testing:
- { listing.rwtPlansUrl
+ { listing.rwtPlansUrl && !hti5ErdIsOn
&& (
<>
Plans:
@@ -373,7 +374,7 @@ function ChplListingInformation({ listing: initialListing }) {
/>
>
)}
- { listing.rwtPlansCheckDate && canViewRwtDates()
+ { listing.rwtPlansCheckDate && canViewRwtDates() && !hti5ErdIsOn
&& (
<>
Last ONC-ACB RWT Plans Completeness Check:
diff --git a/src/app/components/listing/listing-edit.jsx b/src/app/components/listing/listing-edit.jsx
index 44a50ec9f1..9e0813c1b6 100755
--- a/src/app/components/listing/listing-edit.jsx
+++ b/src/app/components/listing/listing-edit.jsx
@@ -94,7 +94,7 @@ function ChplListingEdit({
warnings = [],
isProcessing = false,
}) {
- const { isProduction, rwtAiIntegrationIsOn } = useContext(FlagContext);
+ const { hti5ErdIsOn, isProduction, rwtAiIntegrationIsOn } = useContext(FlagContext);
const { listing } = useContext(ListingContext);
const { hasAnyRole } = useContext(UserContext);
const { enqueueSnackbar } = useSnackbar();
@@ -568,16 +568,19 @@ function ChplListingEdit({
-
+ { !hti5ErdIsOn
+ && (
+
+ )}
-
+ { !hti5ErdIsOn
+ && (
+
+ )}
- { plans.length > 0
+ { plans.length > 0 && !hti5ErdIsOn
&& (
<>
diff --git a/src/app/pages/search/real-world-testing/real-world-testing-view.jsx b/src/app/pages/search/real-world-testing/real-world-testing-view.jsx
index 4cd01b33c6..8eb44f7933 100755
--- a/src/app/pages/search/real-world-testing/real-world-testing-view.jsx
+++ b/src/app/pages/search/real-world-testing/real-world-testing-view.jsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useState } from 'react';
+import React, { useContext, useEffect, useState } from 'react';
import {
Box,
Typography,
@@ -27,7 +27,7 @@ import { eventTrack } from 'services/analytics.service';
import { getDisplayDateFormat } from 'services/date-util';
import { getStatusIcon } from 'services/listing.service';
import { useSessionStorage as useStorage } from 'services/storage.service';
-import { useAnalyticsContext } from 'shared/contexts';
+import { FlagContext, useAnalyticsContext } from 'shared/contexts';
const sortOptions = [
{ property: 'chpl_id', text: 'CHPL ID' },
@@ -38,6 +38,7 @@ const sortOptions = [
function ChplRealWorldTestingSearchView() {
const storageKey = 'storageKey-realWorldTestingView';
+ const { hti5ErdIsOn } = useContext(FlagContext);
const { analytics } = useAnalyticsContext();
const [listings, setListings] = useState([]);
const [orderBy, setOrderBy] = useStorage(`${storageKey}-orderBy`, 'developer');
@@ -84,6 +85,153 @@ function ChplRealWorldTestingSearchView() {
setSortDescending(orderDirection === 'desc');
};
+ const buildSearchResultCard = (item) => (hti5ErdIsOn ? (
+
+ ),
+ }, {
+ label: 'Product',
+ value: item.product.name,
+ }, {
+ label: 'Version',
+ value: item.version.name,
+ }], [{
+ label: 'CHPL ID',
+ value: (
+
+ ),
+ }, {
+ label: 'Certification Date',
+ value: getDisplayDateFormat(item.certificationDate),
+ }, {
+ label: 'Status',
+ value: getStatusIcon(item.certificationStatus),
+ iconButton: ,
+ }], [{
+ label: 'Real World Testing Results URL',
+ value: item.rwtResultsUrl
+ ? (
+
+ )
+ : 'N/A',
+ }]]}
+ actions={}
+ />
+ ) : (
+
+ ),
+ }, {
+ label: 'Product',
+ value: item.product.name,
+ }, {
+ label: 'Version',
+ value: item.version.name,
+ }], [{
+ label: 'CHPL ID',
+ value: (
+
+ ),
+ }, {
+ label: 'Certification Date',
+ value: getDisplayDateFormat(item.certificationDate),
+ }, {
+ label: 'Status',
+ value: getStatusIcon(item.certificationStatus),
+ iconButton: ,
+ }], [{
+ label: 'Real World Testing Plans URL',
+ value: item.rwtPlansUrl
+ ? (
+
+ )
+ : 'N/A',
+ }, {
+ label: 'Real World Testing Results URL',
+ value: item.rwtResultsUrl
+ ? (
+
+ )
+ : 'N/A',
+ }]]}
+ actions={}
+ />
+ ));
+
const pageStart = (pageNumber * pageSize) + 1;
const pageEnd = Math.min((pageNumber + 1) * pageSize, recordCount);
@@ -120,7 +268,10 @@ function ChplRealWorldTestingSearchView() {
inline
/>
{' '}
- must successfully test their real world use. If applicable, Real World Testing plans are required to be made publicly available on the CHPL annually by December 15th. Additionally, Real World Testing results are to be made publicly available on the CHPL by March 15th of the subsequent year.
+ must successfully test their real world use.
+ {' '}
+ {!hti5ErdIsOn && 'If applicable, Real World Testing plans are required to be made publicly available on the CHPL annually by December 15th. Additionally, '}
+ Real World Testing results are to be made publicly available on the CHPL by March 15th of the subsequent year.
@@ -181,102 +332,7 @@ function ChplRealWorldTestingSearchView() {
&& (
<>
- {listings.map((item) => (
-
- ),
- },
- {
- label: 'Product',
- value: item.product.name,
- },
- {
- label: 'Version',
- value: item.version.name,
- },
- ],
- [
- {
- label: 'CHPL ID',
- value: (
-
- ),
- },
- {
- label: 'Certification Date',
- value: getDisplayDateFormat(item.certificationDate),
- },
- {
- label: 'Status',
- value: getStatusIcon(item.certificationStatus),
- iconButton: ,
- },
- ],
- [
- {
- label: 'Real World Testing Plans URL',
- value: item.rwtPlansUrl
- ? (
-
- )
- : 'N/A',
- },
- {
- label: 'Real World Testing Results URL',
- value: item.rwtResultsUrl
- ? (
-
- )
- : 'N/A',
- },
- ],
- ]}
- actions={}
- />
- ))}
+ {listings.map((item) => buildSearchResultCard(item))}
{
+ const rwtOptions = hti5ErdIsOn ? {
+ ...defaultFilter,
+ key: 'rwtOptions',
+ display: 'Real World Testing',
+ operatorKey: 'rwtOperator',
+ values: [
+ { value: 'has_results_url', display: 'Has RWT Results URL', default: true },
+ { value: 'no_results_url', display: 'Does not have RWT Results URL' },
+ ],
+ } : {
+ ...defaultFilter,
+ key: 'rwtOptions',
+ display: 'Real World Testing',
+ operatorKey: 'rwtOperator',
+ values: [
+ { value: 'has_plans_url', display: 'Has RWT Plans URL', default: true },
+ { value: 'has_results_url', display: 'Has RWT Results URL', default: true },
+ { value: 'no_plans_url', display: 'Does not have RWT Plans URL' },
+ { value: 'no_results_url', display: 'Does not have RWT Results URL' },
+ ],
+ };
+ setFilters((prev) => [
+ ...prev.filter((f) => f.key !== 'rwtOptions'),
+ rwtOptions,
+ ]);
+ }, [hti5ErdIsOn]);
+
const data = {
analytics: {
...analytics,
diff --git a/src/app/pages/subscriptions/manage-subscriptions.jsx b/src/app/pages/subscriptions/manage-subscriptions.jsx
index 6fd5d106bd..d76764a42c 100755
--- a/src/app/pages/subscriptions/manage-subscriptions.jsx
+++ b/src/app/pages/subscriptions/manage-subscriptions.jsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React, { useContext, useEffect, useState } from 'react';
import ChplManageSubscriptionsView from './manage-subscriptions-view';
@@ -14,6 +14,7 @@ import {
subscriptionSubjects,
subscriptionTypes,
} from 'components/filter/filters';
+import { FlagContext } from 'shared/contexts';
const staticFilters = [{
...defaultFilter,
@@ -37,7 +38,29 @@ subscriptionTypes,
];
function ChplManageSubscriptionsPage() {
- const [filters] = useState(staticFilters);
+ const { hti5ErdIsOn } = useContext(FlagContext);
+ const [filters, setFilters] = useState(staticFilters);
+
+ useEffect(() => {
+ if (!hti5ErdIsOn) {
+ setFilters((prev) => [
+ ...prev.filter((f) => f.key !== 'subscriptionSubjects'),
+ {
+ ...defaultFilter,
+ key: 'subscriptionSubjects',
+ display: 'Subscription Subject',
+ values: [
+ { value: 'Certification Status Changed' },
+ { value: 'Certification Criterion Added' },
+ { value: 'Certification Criterion Removed' },
+ { value: 'RWT Plans URL Changed' },
+ { value: 'RWT Results URL Changed' },
+ { value: 'Service Base URL List Changed' },
+ ],
+ },
+ ]);
+ }
+ }, [hti5ErdIsOn]);
const analytics = {
category: 'Manage Subscriptions',