From ecf4672614ff468acb89c6db6270bd69de82345f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karla=20Valc=C3=A1rcel=20Mart=C3=ADnez?= <99458559+karla-vm@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:41:59 -0400 Subject: [PATCH] Rename Feature Flag for Topic XII (#11847) --- services/app-api/handlers/reports/create.ts | 4 ++-- services/app-api/utils/formTemplates/formTemplates.ts | 4 ++-- services/app-api/utils/types/reportContext.ts | 2 +- services/app-api/utils/types/reports.ts | 2 +- services/ui-src/src/components/modals/AddEditReportModal.tsx | 4 ++-- services/ui-src/src/types/reportContext.ts | 2 +- services/ui-src/src/types/reports.ts | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/services/app-api/handlers/reports/create.ts b/services/app-api/handlers/reports/create.ts index 5cf36a490..af3f663c3 100644 --- a/services/app-api/handlers/reports/create.ts +++ b/services/app-api/handlers/reports/create.ts @@ -76,7 +76,7 @@ export const createReport = handler(async (event, _context) => { unvalidatedMetadata?.programIsPCCM?.[0]?.value === "Yes"; const julyMcparRelease = unvalidatedMetadata?.julyMcparRelease || false; - const topicXIIUpdate = unvalidatedMetadata?.topicXIIUpdate || false; + const updateTopicXii = unvalidatedMetadata?.updateTopicXii || false; // eslint-disable-next-line no-useless-catch try { @@ -85,7 +85,7 @@ export const createReport = handler(async (event, _context) => { reportType, isProgramPCCM, julyMcparRelease, - topicXIIUpdate + updateTopicXii )); } catch (e) { throw e; diff --git a/services/app-api/utils/formTemplates/formTemplates.ts b/services/app-api/utils/formTemplates/formTemplates.ts index 23b379633..c6c506aa6 100644 --- a/services/app-api/utils/formTemplates/formTemplates.ts +++ b/services/app-api/utils/formTemplates/formTemplates.ts @@ -79,7 +79,7 @@ export async function getOrCreateFormTemplate( reportType: ReportType, isProgramPCCM: boolean, julyMcparRelease: boolean, - topicXIIUpdate: boolean + updateTopicXii: boolean ) { let currentFormTemplate = formTemplateForReportType(reportType); @@ -93,7 +93,7 @@ export async function getOrCreateFormTemplate( currentFormTemplate = generatePCCMTemplate(currentFormTemplate); } - if (topicXIIUpdate) { + if (updateTopicXii) { currentFormTemplate = makeTopicXIIModifications(currentFormTemplate); } diff --git a/services/app-api/utils/types/reportContext.ts b/services/app-api/utils/types/reportContext.ts index 3304be27a..1dd33c41a 100644 --- a/services/app-api/utils/types/reportContext.ts +++ b/services/app-api/utils/types/reportContext.ts @@ -31,7 +31,7 @@ export interface ReportMetadataShape extends ReportKeys { programIsPCCM?: Choice[]; julyMcparRelease?: boolean; previousRevisions: string[]; - topicXIIUpdate?: boolean; + updateTopicXii?: boolean; } export interface ReportShape extends ReportMetadataShape { diff --git a/services/app-api/utils/types/reports.ts b/services/app-api/utils/types/reports.ts index ebac14ba4..15ceaa59e 100644 --- a/services/app-api/utils/types/reports.ts +++ b/services/app-api/utils/types/reports.ts @@ -182,7 +182,7 @@ export interface MCPARReportMetadata extends ReportMetadata { combinedData: boolean; programIsPCCM: Choice[]; julyMcparRelease?: boolean; - topicXIIUpdate?: boolean; + updateTopicXii?: boolean; } // HELPER FUNCTIONS diff --git a/services/ui-src/src/components/modals/AddEditReportModal.tsx b/services/ui-src/src/components/modals/AddEditReportModal.tsx index e479082bf..680c48b8e 100644 --- a/services/ui-src/src/components/modals/AddEditReportModal.tsx +++ b/services/ui-src/src/components/modals/AddEditReportModal.tsx @@ -42,7 +42,7 @@ export const AddEditReportModal = ({ // LaunchDarkly const yoyCopyFlag = useFlags()?.yoyCopy; const julyMcparRelease = useFlags()?.julyMcparRelease; - const topicXIIUpdate = useFlags()?.topicXIIUpdate; + const updateTopicXii = useFlags()?.updateTopicXii; // get correct form const modalFormJsonMap: any = { @@ -109,7 +109,7 @@ export const AddEditReportModal = ({ locked: false, submissionCount: 0, previousRevisions: [], - topicXIIUpdate, + updateTopicXii, }, fieldData: { reportingPeriodStartDate: convertDateUtcToEt(reportingPeriodStartDate), diff --git a/services/ui-src/src/types/reportContext.ts b/services/ui-src/src/types/reportContext.ts index da6d06f75..4223c8b7c 100644 --- a/services/ui-src/src/types/reportContext.ts +++ b/services/ui-src/src/types/reportContext.ts @@ -31,7 +31,7 @@ export interface ReportMetadataShape extends ReportKeys { programIsPCCM?: Choice[]; julyMcparRelease?: boolean; previousRevisions: string[]; - topicXIIUpdate?: boolean; + updateTopicXii?: boolean; } export interface ReportShape extends ReportMetadataShape { diff --git a/services/ui-src/src/types/reports.ts b/services/ui-src/src/types/reports.ts index 894adedc7..22d45bce2 100644 --- a/services/ui-src/src/types/reports.ts +++ b/services/ui-src/src/types/reports.ts @@ -183,7 +183,7 @@ export interface MCPARReportMetadata extends ReportMetadata { combinedData: boolean; programIsPCCM: Choice[]; julyMcparRelease?: boolean; - topicXIIUpdate?: boolean; + updateTopicXii?: boolean; } // HELPER FUNCTIONS