Skip to content

Commit

Permalink
hydrate other text
Browse files Browse the repository at this point in the history
  • Loading branch information
karla-vm committed Nov 13, 2024
1 parent bc7acf6 commit 441fd08
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
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[];
previousRevisions: string[];
planTypeIncludedInProgram?: Choice[];
otherPlanType?: string;
"planTypeIncludedInProgram-otherText"?: string;
novMcparRelease?: boolean;
}

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 @@ -191,7 +191,7 @@ export interface NAAARReportMetadata extends ReportMetadata {
reportingPeriodEndDate: number;
dueDate: number;
planTypeIncludedInProgram: Choice[];
otherPlanType?: string;
"planTypeIncludedInProgram-otherText"?: string;
}

// HELPER FUNCTIONS
Expand Down
2 changes: 1 addition & 1 deletion services/app-api/utils/validation/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export const metadataValidationSchema = yup.object().shape({
completionStatus: yup.mixed(),
copyFieldDataSourceId: yup.string(),
planTypeIncludedInProgram: radio(),
otherPlanType: textOptional(),
"planTypeIncludedInProgram-otherText": textOptional(),
});
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 @@ -148,7 +148,6 @@ export const AddEditReportModal = ({
formData["reportingPeriodEndDate"]
);
const planTypeIncludedInProgram = formData["planTypeIncludedInProgram"];
const otherPlanType = formData["planTypeIncludedInProgram-otherText"];

return {
metadata: {
Expand All @@ -159,7 +158,8 @@ export const AddEditReportModal = ({
lastAlteredBy: full_name,
copyFieldDataSourceId: copyFieldDataSourceId?.value,
planTypeIncludedInProgram,
otherPlanType,
"planTypeIncludedInProgram-otherText":
formData["planTypeIncludedInProgram-otherText"],
locked: false,
submissionCount: 0,
previousRevisions: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ export const DashboardPage = ({ reportType }: Props) => {
copyFieldDataSourceId,
programIsPCCM: report?.programIsPCCM,
planTypeIncludedInProgram: report?.planTypeIncludedInProgram,
otherPlanType: report?.otherPlanType,
"planTypeIncludedInProgram-otherText":
report?.["planTypeIncludedInProgram-otherText"],
},
state: report.state,
id: report.id,
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[];
previousRevisions: string[];
planTypeIncludedInProgram?: Choice[];
otherPlanType?: string;
"planTypeIncludedInProgram-otherText"?: string;
novMcparRelease?: boolean;
}

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 @@ -192,7 +192,7 @@ export interface NAAARReportMetadata extends ReportMetadata {
reportingPeriodEndDate: number;
dueDate: number;
planTypeIncludedInProgram: Choice[];
otherPlanType?: string;
"planTypeIncludedInProgram-otherText"?: string;
}

// HELPER FUNCTIONS
Expand Down

0 comments on commit 441fd08

Please sign in to comment.