From 55acb6a13ee5a98fd34a1ca1d497361260098274 Mon Sep 17 00:00:00 2001 From: tareq89 Date: Thu, 26 Dec 2024 14:47:14 +0600 Subject: [PATCH] certificate event type fixed --- src/api/certificates/handler.ts | 13 +++++++------ src/data-generator/declare.ts | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/api/certificates/handler.ts b/src/api/certificates/handler.ts index 8929c55c7..4a5f0b2e3 100644 --- a/src/api/certificates/handler.ts +++ b/src/api/certificates/handler.ts @@ -10,6 +10,7 @@ */ import { Request, ResponseToolkit } from '@hapi/hapi' +import { Event } from '../../form/types/types' type FontFamilyTypes = { normal: string @@ -43,7 +44,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) { const certificateConfigs: ICertificateConfigData[] = [ { id: 'birth-certificate', - event: 'birth', + event: Event.Birth, label: { id: 'certificates.birth.certificate', defaultMessage: 'Birth Certificate', @@ -67,7 +68,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) { }, { id: 'birth-certificate-certified-copy', - event: 'birth', + event: Event.Birth, label: { id: 'certificates.birth.certificate.copy', defaultMessage: 'Birth Certificate certified copy', @@ -92,7 +93,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) { }, { id: 'death-certificate', - event: 'death', + event: 'death' as Event.Death, label: { id: 'certificates.death.certificate', defaultMessage: 'Death Certificate', @@ -116,7 +117,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) { }, { id: 'death-certificate-certified-copy', - event: 'death', + event: 'death' as Event.Death, label: { id: 'certificates.death.certificate.copy', defaultMessage: 'Death Certificate certified copy', @@ -141,7 +142,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) { }, { id: 'marriage-certificate', - event: 'marriage', + event: 'marriage' as Event.Marriage, label: { id: 'certificates.marriage.certificate', defaultMessage: 'Marriage Certificate', @@ -165,7 +166,7 @@ export async function certificateHandler(request: Request, h: ResponseToolkit) { }, { id: 'marriage-certificate-certified-copy', - event: 'marriage', + event: 'marriage' as Event.Marriage, label: { id: 'certificates.marriage.certificate.copy', defaultMessage: 'Marriage Certificate certified copy', diff --git a/src/data-generator/declare.ts b/src/data-generator/declare.ts index 92670b8bf..3df131b86 100644 --- a/src/data-generator/declare.ts +++ b/src/data-generator/declare.ts @@ -208,7 +208,7 @@ export function createBirthDeclarationData( otherInformantType: '', contactPhoneNumber: '+2607' + faker.number.bigInt({ min: 10000000, max: 99999999 }), - email: faker.internet.email({ + contactEmail: faker.internet.email({ firstName: motherFirstName, lastName: familyName }),