@@ -25,27 +25,7 @@ export const buildFilteredContentForCovid19Vaccine = async (apiContent: string):
2525 if ( campaigns . isActive ( VaccineType . COVID_19 ) ) {
2626 log . info ( "Campaign active" ) ;
2727 callout = undefined ;
28- const nbsBooking : ActionWithButton = {
29- type : ActionDisplayType . buttonWithCard ,
30- content : [ "## If this applies to you" , "### Book an appointment online at a pharmacy" ] . join ( "\n\n" ) as Content ,
31- button : { label : "Continue to booking" as Label , url : new URL ( "https://example.com" ) as ButtonUrl } ,
32- delineator : true ,
33- } ;
34- const walkIn : ActionWithButton = {
35- type : ActionDisplayType . actionLinkWithInfo ,
36- content : [
37- "## Get vaccinated without an appointment" ,
38- "You can find a walk-in COVID-19 vaccination site to get a vaccination without an appointment. You do not need to be registered with a GP." ,
39- ] . join ( "\n\n" ) as Content ,
40- button : {
41- label : "Find a walk-in COVID-19 vaccination site" as Label ,
42- url : new URL (
43- "https://www.nhs.uk/nhs-services/vaccination-and-booking-services/find-a-walk-in-covid-19-vaccination-site/" ,
44- ) as ButtonUrl ,
45- } ,
46- delineator : false ,
47- } ;
48- actions . push ( nbsBooking , walkIn ) ;
28+ actions . push ( ..._buildActions ( ) ) ;
4929 } else {
5030 log . info ( "No campaign active" ) ;
5131 callout = {
@@ -69,3 +49,27 @@ export const buildFilteredContentForCovid19Vaccine = async (apiContent: string):
6949
7050 return { ...standardFilteredContent , callout, recommendation, actions } ;
7151} ;
52+
53+ function _buildActions ( ) : Action [ ] {
54+ const nbsBooking : ActionWithButton = {
55+ type : ActionDisplayType . buttonWithInfo ,
56+ content : [ "## If this applies to you" , "### Book an appointment online at a pharmacy" ] . join ( "\n\n" ) as Content ,
57+ button : { label : "Continue to booking" as Label , url : new URL ( "https://example.com" ) as ButtonUrl } ,
58+ delineator : true ,
59+ } ;
60+ const walkIn : ActionWithButton = {
61+ type : ActionDisplayType . actionLinkWithInfo ,
62+ content : [
63+ "## Get vaccinated without an appointment" ,
64+ "You can find a walk-in COVID-19 vaccination site to get a vaccination without an appointment. You do not need to be registered with a GP." ,
65+ ] . join ( "\n\n" ) as Content ,
66+ button : {
67+ label : "Find a walk-in COVID-19 vaccination site" as Label ,
68+ url : new URL (
69+ "https://www.nhs.uk/nhs-services/vaccination-and-booking-services/find-a-walk-in-covid-19-vaccination-site/" ,
70+ ) as ButtonUrl ,
71+ } ,
72+ delineator : false ,
73+ } ;
74+ return [ nbsBooking , walkIn ] ;
75+ }
0 commit comments