diff --git a/services/app-web/src/common-code/featureFlags/flags.ts b/services/app-web/src/common-code/featureFlags/flags.ts index b25c088eda..c1cf4c2269 100644 --- a/services/app-web/src/common-code/featureFlags/flags.ts +++ b/services/app-web/src/common-code/featureFlags/flags.ts @@ -41,6 +41,13 @@ const featureFlags = { flag: 'cms-questions', defaultValue: false, }, + /** + * Enables CMS to add, view, edit and delete MC-CRS record numbers + */ + MCCRS_RECORD_NUMBER: { + flag: 'mccrs-record-number', + defaultValue: false, + }, /** * Enables packages with shared rates dropdown on rate details page. This was an early version of rates across subs functionality. */ diff --git a/services/app-web/src/pages/App/AppRoutes.tsx b/services/app-web/src/pages/App/AppRoutes.tsx index d40c96433e..11d96f5ed0 100644 --- a/services/app-web/src/pages/App/AppRoutes.tsx +++ b/services/app-web/src/pages/App/AppRoutes.tsx @@ -159,6 +159,12 @@ const CMSUserRoutes = ({ featureFlags.RATE_REVIEWS_DASHBOARD.flag, featureFlags.RATE_REVIEWS_DASHBOARD.defaultValue ) + + const showMCCRSRecordNumber = ldClient?.variation( + featureFlags.MCCRS_RECORD_NUMBER.flag, + featureFlags.MCCRS_RECORD_NUMBER.defaultValue + ) + return ( @@ -206,10 +212,12 @@ const CMSUserRoutes = ({ path={RoutesRecord.SUBMISSIONS_SUMMARY} element={} /> - } - /> + {showMCCRSRecordNumber && ( + } + /> + )} { beforeEach(() => { - ldUseClientSpy({ 'cms-questions': false }) + ldUseClientSpy({ 'mccrs-record-number': true }) }) afterEach(() => { jest.resetAllMocks() diff --git a/services/app-web/src/pages/SubmissionSummary/SubmissionSummary.test.tsx b/services/app-web/src/pages/SubmissionSummary/SubmissionSummary.test.tsx index ffc0d84e57..b4aea29d6a 100644 --- a/services/app-web/src/pages/SubmissionSummary/SubmissionSummary.test.tsx +++ b/services/app-web/src/pages/SubmissionSummary/SubmissionSummary.test.tsx @@ -27,6 +27,7 @@ import { testS3Client } from '../../testHelpers/s3Helpers' describe('SubmissionSummary', () => { beforeEach(() => { ldUseClientSpy({ 'cms-questions': false }) + ldUseClientSpy({ 'mccrs-record-number': true }) }) afterEach(() => { jest.resetAllMocks() diff --git a/services/app-web/src/pages/SubmissionSummary/SubmissionSummary.tsx b/services/app-web/src/pages/SubmissionSummary/SubmissionSummary.tsx index 1074925c84..e89c331079 100644 --- a/services/app-web/src/pages/SubmissionSummary/SubmissionSummary.tsx +++ b/services/app-web/src/pages/SubmissionSummary/SubmissionSummary.tsx @@ -68,6 +68,11 @@ export const SubmissionSummary = (): React.ReactElement => { featureFlags.CMS_QUESTIONS.defaultValue ) + const showMCCRSRecordNumber = ldClient?.variation( + featureFlags.MCCRS_RECORD_NUMBER.flag, + featureFlags.MCCRS_RECORD_NUMBER.defaultValue + ) + const { pkg, currentRevision, packageData, user, documentDates } = useOutletContext() @@ -162,7 +167,7 @@ export const SubmissionSummary = (): React.ReactElement => { {pkg.mccrsID && (