diff --git a/forms-flow-web/src/components/FOI/customComponents/ContactApplicant/util.tsx b/forms-flow-web/src/components/FOI/customComponents/ContactApplicant/util.tsx index 0ebf4aead..9f549a9cc 100644 --- a/forms-flow-web/src/components/FOI/customComponents/ContactApplicant/util.tsx +++ b/forms-flow-web/src/components/FOI/customComponents/ContactApplicant/util.tsx @@ -30,9 +30,13 @@ export const getExtensiondetails = (requestExtensions:any, type: string) => { } export const getExtensionType = (requestExtensions: any) => { - let oipcExtension = getExtensiondetails(requestExtensions, "OIPC"); - let pbExtension = getExtensiondetails(requestExtensions, "Public Body"); - return pbExtension[0] ? "PB" : oipcExtension[0] ? "OIPC" : "NA"; + if (!requestExtensions || requestExtensions.length === 0) { + return "NA"; + } + + // Get the type of the latest extension + let latestExtension = requestExtensions[0]; + return latestExtension["extensiontype"] === "Public Body" ? "PB" : "OIPC"; } export const getTemplateVariables = (requestDetails: any, requestExtensions:any, responsePackagePdfStitchStatus:any, cfrFeeData:any, templateInfo: any) => { diff --git a/request-management-api/request_api/email_templates/oipc_applicant_consent_time_extension.html b/request-management-api/request_api/email_templates/oipc_applicant_consent_time_extension.html index 0130b0f73..9edf9bc8e 100644 --- a/request-management-api/request_api/email_templates/oipc_applicant_consent_time_extension.html +++ b/request-management-api/request_api/email_templates/oipc_applicant_consent_time_extension.html @@ -88,16 +88,16 @@
Was a fee estimate sent? ☐Yes ☐No
+Was a fee estimate sent? {{feeEstimateStatus}}
Date fee estimate sent: Date
+Date fee estimate sent: {{feeEstimateDate}}
Date deposit or full fee paid:
+Date deposit or full fee paid: {{fullFeePaidDate}}
Date of fee waiver decision: Date
+Date of fee waiver decision: {{feeWaiverDecisionDate}}
diff --git a/request-management-api/request_api/email_templates/oipc_first_time_extension.html b/request-management-api/request_api/email_templates/oipc_first_time_extension.html index cfb42f329..640c467a5 100644 --- a/request-management-api/request_api/email_templates/oipc_first_time_extension.html +++ b/request-management-api/request_api/email_templates/oipc_first_time_extension.html @@ -109,16 +109,16 @@
Was a fee estimate sent? ☐Yes ☐No
+Was a fee estimate sent? {{feeEstimateStatus}}
Date fee estimate sent: Date
+Date fee estimate sent: {{feeEstimateDate}}
Date deposit or full fee paid:
+Date deposit or full fee paid: {{fullFeePaidDate}}
Date of fee waiver decision: Date
+Date of fee waiver decision: {{feeWaiverDecisionDate}}