Skip to content

Commit 857d6a4

Browse files
VIA-618 SB Show warning callout in Flu in pregnancy page.
1 parent 648e588 commit 857d6a4

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

src/models/vaccine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ const VaccineInfo: Record<VaccineType, VaccineDetails> = {
298298
contentPath: "pregnancy/keeping-well/flu-jab" as UrlPathFragment,
299299
cacheFilename: "flu-jab.json" as Filename,
300300
nbsPath: "flu-vaccine-in-pregnancy" as UrlPathFragment,
301+
showWarningCallout: true,
301302
moreInformationHeadersFromContentApi: true,
302303
},
303304
};

src/services/content-api/parsers/custom/flu-in-pregnancy.test.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,14 @@ describe("getFilteredContentForFluInPregnancyVaccine", () => {
112112

113113
expect(pageCopy).toEqual(expect.objectContaining(expected));
114114
});
115+
116+
it("should return warning callout", () => {
117+
const expected = {
118+
callout: { heading: "Booking service closed", content: "Flu vaccine bookings will reopen in autumn 2026" },
119+
};
120+
121+
const pageCopy = getFilteredContentForFluInPregnancyVaccine(apiResponse);
122+
123+
expect(pageCopy).toEqual(expect.objectContaining(expected));
124+
});
115125
});

src/services/content-api/parsers/custom/flu-in-pregnancy.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { VaccineInfo, VaccineType } from "@src/models/vaccine";
2-
import { ContentApiVaccineResponse, VaccinePageContent, VaccinePageSection } from "@src/services/content-api/types";
2+
import {
3+
ContentApiVaccineResponse,
4+
HeadingWithContent,
5+
VaccinePageContent,
6+
VaccinePageSection,
7+
} from "@src/services/content-api/types";
38

49
export const getFilteredContentForFluInPregnancyVaccine = (apiContent: string): VaccinePageContent => {
510
const content: ContentApiVaccineResponse = JSON.parse(apiContent);
@@ -27,6 +32,10 @@ export const getFilteredContentForFluInPregnancyVaccine = (apiContent: string):
2732
subsections: [{ type: "simpleElement", headline: "", text: paragraphs[3], name: "markdown" }],
2833
};
2934
const webpageLink: URL = VaccineInfo[VaccineType.WHOOPING_COUGH].nhsWebpageLink;
35+
const callout: HeadingWithContent = {
36+
heading: "Booking service closed",
37+
content: "Flu vaccine bookings will reopen in autumn 2026",
38+
};
3039

3140
return {
3241
overview,
@@ -35,5 +44,6 @@ export const getFilteredContentForFluInPregnancyVaccine = (apiContent: string):
3544
howToGetVaccine,
3645
vaccineSideEffects: whenToGet,
3746
webpageLink,
47+
callout: callout,
3848
};
3949
};

0 commit comments

Comments
 (0)