Skip to content

Commit

Permalink
Rename Feature Flag for Topic XII (#11847)
Browse files Browse the repository at this point in the history
  • Loading branch information
karla-vm authored Aug 30, 2024
1 parent e49f67b commit ecf4672
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions services/app-api/handlers/reports/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -85,7 +85,7 @@ export const createReport = handler(async (event, _context) => {
reportType,
isProgramPCCM,
julyMcparRelease,
topicXIIUpdate
updateTopicXii
));
} catch (e) {
throw e;
Expand Down
4 changes: 2 additions & 2 deletions services/app-api/utils/formTemplates/formTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export async function getOrCreateFormTemplate(
reportType: ReportType,
isProgramPCCM: boolean,
julyMcparRelease: boolean,
topicXIIUpdate: boolean
updateTopicXii: boolean
) {
let currentFormTemplate = formTemplateForReportType(reportType);

Expand All @@ -93,7 +93,7 @@ export async function getOrCreateFormTemplate(
currentFormTemplate = generatePCCMTemplate(currentFormTemplate);
}

if (topicXIIUpdate) {
if (updateTopicXii) {
currentFormTemplate = makeTopicXIIModifications(currentFormTemplate);
}

Expand Down
2 changes: 1 addition & 1 deletion services/app-api/utils/types/reportContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface ReportMetadataShape extends ReportKeys {
programIsPCCM?: Choice[];
julyMcparRelease?: boolean;
previousRevisions: string[];
topicXIIUpdate?: boolean;
updateTopicXii?: boolean;
}

export interface ReportShape extends ReportMetadataShape {
Expand Down
2 changes: 1 addition & 1 deletion services/app-api/utils/types/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export interface MCPARReportMetadata extends ReportMetadata {
combinedData: boolean;
programIsPCCM: Choice[];
julyMcparRelease?: boolean;
topicXIIUpdate?: boolean;
updateTopicXii?: boolean;
}

// HELPER FUNCTIONS
Expand Down
4 changes: 2 additions & 2 deletions services/ui-src/src/components/modals/AddEditReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -109,7 +109,7 @@ export const AddEditReportModal = ({
locked: false,
submissionCount: 0,
previousRevisions: [],
topicXIIUpdate,
updateTopicXii,
},
fieldData: {
reportingPeriodStartDate: convertDateUtcToEt(reportingPeriodStartDate),
Expand Down
2 changes: 1 addition & 1 deletion services/ui-src/src/types/reportContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface ReportMetadataShape extends ReportKeys {
programIsPCCM?: Choice[];
julyMcparRelease?: boolean;
previousRevisions: string[];
topicXIIUpdate?: boolean;
updateTopicXii?: boolean;
}

export interface ReportShape extends ReportMetadataShape {
Expand Down
2 changes: 1 addition & 1 deletion services/ui-src/src/types/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export interface MCPARReportMetadata extends ReportMetadata {
combinedData: boolean;
programIsPCCM: Choice[];
julyMcparRelease?: boolean;
topicXIIUpdate?: boolean;
updateTopicXii?: boolean;
}

// HELPER FUNCTIONS
Expand Down

0 comments on commit ecf4672

Please sign in to comment.