diff --git a/infrastructure/authorized_keys b/infrastructure/authorized_keys
new file mode 100644
index 000000000..5f3b43959
--- /dev/null
+++ b/infrastructure/authorized_keys
@@ -0,0 +1,7 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDECqHO65UpyrrO8uueD06RxGaVVq22f152Rf8qVQQAAIGAMu6gCs7ztlZ8a3yQgSEIjM/Jl1/RqIVs6CziTEef74nLFTZ5Ufz3CLRVgdebBeSBEmhTfTUV0HLkSyNzwKFpuzJxucGd72ulPvEp6eHvyJAPJz37YcU8cjaL1v05T6s2ee99li35GlDDtCzfjVV4ZPAg5JdfWuTj41RAVC0LQhk2/NB4qEu37UxGGjhRFSjBEsS5LxI9QfvgrsHpl/VOn+soH7ZkK7kS6qRgNP/uYsXRWXhHaamcl5OX68gJWTbrW6c7PCqlbCWGnsHJswCmqPIthwXXMfC7ULDNLSKG6mslAt5Dyc8/MCr3vTW7pDyr2d0FvvY86SMQUggxv3qF7TZewqfX1bhK0fMLarIxVMQ1RFo//wN9QGA+2we8rxd2Y1Kr1DBuJyuwXPfv+Exo8yNYQ+x/AYH5k6UVcSYuaB8eYmplG2KQCxt8RBFtoChrwOKNRWLqXdKyfpdp5XmnnWxPvR95gf3h3yLocVYkF0i0uvKKJ0vt8J0Ezfkdfow0B1kUg5bPXKJROX7PwbaCPdYcxyDaO6wwOigRnSmoFvkH1pLb4j1RQAXcX531CHgfN6Izi/h0mpMS4bnyIUcv2GQr+h4z4TxcCtj7qpH2y6yw7XG12jVh7TfeesXG2Q== euanmillar77@gmail.com
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGUprcQyUFYwRto0aRpgriR95C1pgNxrQ0lEWEe1D8he haidertameem@gmail.com
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDH6qZgtXhWf+xKwpWmHez6F44VRWrUJPF/aa+qdAc+EUNcUUNq8a/KflVthI15GW83VdHSgOCqrqnZTl/shfjOlq9FxsCDI9BY1Zt2+Dc/YMiY4519jM8QEUpZllJTAsBbaz3MSfqda67lEY8sQp9Jk5hw3vUOYxPBtHLSBehwnj4rNnobRrQ4YeOPnLry+cwf8tuQ1ftaxmsKeSKc8blToj2zJHe5t2a5CkOmCOCjAoToVVHWtUZwZ8E3Xrwdyod1q3vnNjofHPr8TFYpuJlAaIAtko4w8XaeQAbfz+iWGpOSYjbaMhG3gq05kfTm3XUEUsbwSeWhZ8d7F0XDESjHDELQYcikHgm6ywnUtpMht16rbjnZ+h8mDlE/Ftz9N9gkzn7bTTMYRRUrjJUTppH9opNbzlcr38zAhNDEeRvGIhxx6/jRZ0xk1SqQhYh08M3URpvIDbh/Umm7NO/cN6ZX8ogrrMSRfoYvk2u4gioX5qfyIDSVwiVztMjkPdZ/rhU= pyry@opencrvs.org
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDcVKepFZMsfxinL9vEbR7l9goXFTbK80s746USf5jHrFTuTDsrsa5Jq+HQaSjLHq/ni6FIq2BJ0+wdk2paqXHO41tBKjKQMd88PkGLwaM/0jNnXdSrva0XWHKh3OFxl0RsF803r9gSs3K2As3nUZlvhRDDKyE7XfQ5J/irdADylWjBwjVdIIuTaxd0ZSSoZ9FIQlzOT9qbr3xvZjYFpFXaTmQPq4cTRnl78Kq+H6BFyAey3LYjK91ZrbwUfx11QTT0Xb8yxMSTSU8UX2VHi1t+tWBefz3Qs6V+xwNLfZjhxef/9jvF65b2tK7w5aZaJ95cxaW+TL0tRecaixEwoVAl/AvWuW3NvlBSuonwkw5v+rPAyT0/Zr/CTMJcGu3VFwsvDWVraYMwi2g4Nmkl4xi9HZTxSiHGvdmWRVY+UV950eCZ2oYDO460xSyEHzrOqSQr4WluZtrwq+Iv9bb7OIGUjuSmkWocoSqsYKHY7d6KRjAhKIt6aSry6BmOE29w1hB1wo8w9DhCQdMHD0eCyFS7aM/VjqJo0whxgfkroujrgB1Pw/hSvBWc0svbhJOY/znjvJiJTjMb6Iq1GmCizf+C+lJAZLLamH2l06V9SUcq4kJyCVsWbW0ePME5M6gMIeT9vpMZvi1Ja/9bMUttvkq+muiyld4jzkliWud39ZAxSw== github-actions-deployment@opencrvs.org
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7m25EEqcOEBTnNTTtB+Rn2/djWVQOB+O3g/zBhDKZ/lZP6ow+44m4Ud6i5jKiYitxo5eLJoI4vc+HNe8a9Jj7g5xi830e/67fRtMxZexJFEQOZBCb5eZ+VZbeVy7NiQIITQSXONvHWMwVvDzYKod+rwlLh04hDVmIg/yVAny0/wvNqczQoyOcCi9QCKqby3IeG81sUlX0gtwjd6XwxBHvC3HCpKT6DbS8bQSQUP6DDtiAHUyvlxmdTNmmfRP7UgmsY2w5czUiojzygZdiNpgRt82ueXQ4bozZ79ouS62XMf887dGAAKimiooQ/FCjfvDJzU0V6TI/7t3jQr01wwMX523bjxCZQ9ZGb8IBP2wJpWdUl6tU7ytrJnSxRhOLTowPUzwNRL6ggzfoYn0RyK8dXRkaBKVWZAYMgsfNT71XWKqtk24MG3UipLn74oQnvP1T2NFZo0NJf3JkjykMdA+umDAUIRDW6kOCqqzQ8M4fN6a9jgZFa0qbPSNSIuxQWx0= pyry+macbook@opencrvs.org
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWIF63S4f3z9wQMvWibmvl7MPuJ6EVrkP0HuvgNhcs/4DZYMcR/GRBvV4ldOSYMlBevIXycgGzNDxKJgENUuwIWanjBu7uVAHyD6+cIRD1h63qq7Cjv/2HYTfBDKOrKzPOhA6zWvKO0ZGWsjRXk5LWMCbKOkvKJCxOpj/NVBxeE4FTK5YADYPV3OSsmBtqTHrVLm2sMmShU/2hMYYswWkobidjX65+nK/X+3C+yJbHwiydVvn+QCrFlFfCLPWKe8rUpOxyxofPqWVQh6CHhHfT8okaOc9sOE8Qeip9ljo84DftJh3Xm3ynOdWK1hH2BvRvxNadWqcE1qECbkg4tx2x riku.rouvila@gmail.com
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDk15q1EI7FXqX9sgSpO7u89ZjcZV00k2yyq/9YNLk2XWHE54qPhOdaPPgJyuIhgDGQB20uDow/E8mIkPHNstX/Gp0GXn06L7fd/BfwFmFWi0YhLwvX5RaYjm1vIkCLDZrYQiH/GBP9GKMJv3DGORA1tWhFBKIerDwtDTBFC0ysT/nmHSEq1xYb5cSj55UaSyIQUjd1UgqO98OhzItXX4ZWeUil5gEC014dZxNMwM08F6X1XGsy5u6CP4CtpcMGk3fWQz+AdcL0nHZoLjXnIMBNLTyBjThQvupZFhLkKvqOxwQkzEBPjfaQQadnFg0N4rpMrUYqakkpAhgdwmemv13jZk41m5jofS+C4R2uBAb6dbPI0YiRgqaj1kSBGgEEPNhtT9Y0+nrJhmrypLxD0TnDl+hI/EfNpJd4TravCyjpsxUsLRpBp9A3rPAxkHrAt59r0rdCsp57KZ2dGPXJU0QPC30XJrVg05cOQdzPvfJn2Qsx+2JFW2cR4X+R2bWD6k9g8ItFq87DfN2LIeXArffkG735sCR12HCKkyyA8bS6HVr/nAxohb5UvN1HafLmL61gwbsv3OtVkpxT+SNqoXutDkqHW3+efu27dsGLdXsYyQxELZoKkJLJJW4ToU6jTvb3v9wqIEHjayBdGERH06SdXN38BFUMIa44MJVC61h/uw== runner@fv-az1386-243
\ No newline at end of file
diff --git a/src/api/certificate-configuration/handler.ts b/src/api/certificate-configuration/handler.ts
index 2e2e1d2ea..26faf7e74 100644
--- a/src/api/certificate-configuration/handler.ts
+++ b/src/api/certificate-configuration/handler.ts
@@ -27,7 +27,7 @@ export function certificateConfigurationHandler(): Configuration {
fonts: {
['Noto Sans']: {
normal: `${COUNTRY_CONFIG_URL}/fonts/NotoSans-Regular.ttf`,
- bold: `${COUNTRY_CONFIG_URL}/fonts/NotoSans-SemiBold.ttf`,
+ bold: `${COUNTRY_CONFIG_URL}/fonts/NotoSans-Bold.ttf`,
italics: `${COUNTRY_CONFIG_URL}/fonts/NotoSans-Regular.ttf`,
bolditalics: `${COUNTRY_CONFIG_URL}/fonts/NotoSans-Regular.ttf`
}
diff --git a/src/api/content/client/client.json b/src/api/content/client/client.json
index 5d0c9a654..8e5203e98 100644
--- a/src/api/content/client/client.json
+++ b/src/api/content/client/client.json
@@ -848,6 +848,7 @@
"fieldAgentHome.requireUpdatesCountLoading": "Checking your declarations",
"fieldAgentHome.sentForReviewCount": "Sent for review ({total})",
"fieldAgentHome.zeroUpdatesText": "No declarations require updates",
+ "form.customField.label.numberOfDependants": "No. of dependants",
"form.field.label.addFile": "Upload",
"form.field.showLabel": "Show",
"form.field.hideLabel": "Hide",
@@ -1254,11 +1255,11 @@
"form.section.information.name": "Information",
"form.section.information.birth.bullet1": "I am going to help you make a declaration of birth.",
"form.section.information.birth.bullet2": "As the legal Informant it is important that all the information provided by you is accurate.",
- "form.section.information.birth.bullet3": "Once the declaration is processed you will receive you will receive an SMS to tell you when to visit the office to collect the certificate - Take your ID with you.",
+ "form.section.information.birth.bullet3": "Once the declaration is processed you will receive you will receive an email to tell you when to visit the office to collect the certificate - Take your ID with you.",
"form.section.information.birth.bullet4": "Make sure you collect the certificate. A birth certificate is critical for this child, especially to make their life easy later on. It will help to access health services, school examinations and government benefits.",
"form.section.information.death.bullet1": "I am going to help you make a declaration of death.",
"form.section.information.death.bullet2": "As the legal Informant it is important that all the information provided by you is accurate.",
- "form.section.information.death.bullet3": "Once the declaration is processed you will receive you will receive an SMS to tell you when to visit the office to collect the certificate - Take your ID with you.",
+ "form.section.information.death.bullet3": "Once the declaration is processed you will receive you will receive an email to tell you when to visit the office to collect the certificate - Take your ID with you.",
"form.section.information.death.bullet4": "Make sure you collect the certificate. A death certificate is critical to support with inheritance claims and to resolve the affairs of the deceased e.g. closing bank accounts and setting loans.",
"form.section.declaration.title": "Declaration details",
"form.section.documents.birth.requirements": "The following documents are required",
@@ -1289,6 +1290,7 @@
"home.header.placeHolderBrnDrn": "Search for a BRN/DRN",
"home.header.placeholderName": "Search for a name",
"home.header.placeHolderPhone": "Search for a phone no.",
+ "home.header.placeHolderId": "Search for an ID",
"home.header.placeHolderNationalId": "Search for a national ID.",
"home.header.placeHolderTrackingId": "Search for a tracking ID",
"home.header.settingsTitle": "Settings",
@@ -1411,12 +1413,14 @@
"form.field.label.docTypeMarriageNotice": "Notice of marriage",
"form.field.label.proofOfGroomsID": "Proof of groom's identity",
"form.field.label.proofOfBridesID": "Proof of bride's identity",
+ "form.customField.label.reasonForLateRegistrationBirth": "Reason for delayed registration",
+ "form.customField.label.reasonForLateRegistrationDeath": "Reason for late registration",
"misc.createDescription": "Choose a PIN that doesn't have 4 repeating digits or sequential numbers",
"misc.createTitle": "Create a PIN",
- "misc.description.Complete": "The informant will receive an SMS with a registration number that they can use to collect their certificate.",
+ "misc.description.Complete": "The informant will receive an email with a registration number that they can use to collect their certificate.",
"misc.description.inComplete": "Please add mandatory information before sending for approval.",
"misc.newPass.header": "Choose a new password",
- "misc.newPass.instruction": "Create a unique password - one that you don’t use for other websites or applications.",
+ "misc.newPass.instruction": "Create a unique password - one that you don't use for other websites or applications. A secure and easy to remember passphrase could include three random words, while avoiding the use of personal info.",
"misc.notif.declarationsSynced": "As you have connectivity, we can synchronize your declarations.",
"misc.notif.draftsSaved": "Your draft has been saved",
"misc.notif.outboxText": "Outbox ({num})",
@@ -1464,7 +1468,7 @@
"navigation.leaderboards": "Leaderboards",
"navigation.dashboard": "Dashboard",
"navigation.report": "Report",
- "password.cases": "Contain upper and lower cases",
+ "password.cases": "At least one upper and lower case character",
"password.label.confirm": "Confirm password",
"password.label.current": "Current password",
"password.label.new": "New password",
@@ -2960,6 +2964,7 @@
"fieldAgentHome.requireUpdatesCountLoading": "Vérification de vos déclarations",
"fieldAgentHome.sentForReviewCount": "Envoyées pour révision ({total})",
"fieldAgentHome.zeroUpdatesText": "Aucune déclaration ne nécessite de mise à jour",
+ "form.customField.label.numberOfDependants": "Nombre de personnes à charge",
"form.field.showLabel": "Afficher",
"form.field.hideLabel": "Cacher",
"form.field.nidNotVerified": "Authentifier",
@@ -3329,6 +3334,8 @@
"form.field.select.placeholder": "Sélectionnez",
"form.field.tooltip.tooltipNationalID": "Il s'agit d'une info-bulle pour guider l'utilisateur dans la saisie de l'identifiant national.",
"form.field.dateRangepicker.checkbox.dateLabel": "{rangeStart} à {rangeEnd}",
+ "form.customField.label.reasonForLateRegistrationBirth": "Raison du retard d'inscription",
+ "form.customField.label.reasonForLateRegistrationDeath": "Raison de l'inscription tardive",
"form.group.reasonNotApplying.parents": "Pourquoi la mère et le père ne font-ils pas de demande ?",
"form.preview.group.label.english.name": "Nom anglais",
"form.preview.group.label.father.english.name": "Nom anglais du père",
@@ -3366,11 +3373,11 @@
"form.section.information.name": "Informations",
"form.section.information.birth.bullet1": "Je vais vous aider à faire une déclaration de naissance.",
"form.section.information.birth.bullet2": "En tant qu'informateur légal, il est important que toutes les informations que vous fournissez soient exactes.",
- "form.section.information.birth.bullet3": "Une fois la déclaration traitée, vous recevrez un SMS vous indiquant quand vous rendre au bureau pour retirer le certificat - Munissez-vous d'une pièce d'identité.",
+ "form.section.information.birth.bullet3": "Une fois la déclaration traitée, vous recevrez un courriel vous indiquant quand vous rendre au bureau pour retirer le certificat - Munissez-vous d'une pièce d'identité.",
"form.section.information.birth.bullet4": "Veillez à récupérer le certificat. Un certificat de naissance est essentiel pour cet enfant, notamment pour lui faciliter la vie plus tard. Il l'aidera à accéder aux services de santé, aux examens scolaires et aux prestations de l'État.",
"form.section.information.death.bullet1": "Je vais vous aider à faire une déclaration de décès.",
"form.section.information.death.bullet2": "En tant qu'informateur légal, il est important que toutes les informations que vous fournissez soient exactes.",
- "form.section.information.death.bullet3": "Une fois la déclaration traitée, vous recevrez un SMS vous indiquant quand vous rendre au bureau pour retirer le certificat - Munissez-vous d'une pièce d'identité.",
+ "form.section.information.death.bullet3": "Une fois la déclaration traitée, vous recevrez un courriel vous indiquant quand vous rendre au bureau pour retirer le certificat - Munissez-vous d'une pièce d'identité.",
"form.section.information.death.bullet4": "Veillez à récupérer le certificat. Le certificat de décès est essentiel pour les demandes d'héritage et pour régler les affaires de la personne décédée, par exemple la fermeture des comptes bancaires et la mise en place des prêts.",
"form.section.declaration.title": "Détails de la déclaration",
"form.section.documents.birth.requirements": "Les documents suivants sont requis",
@@ -3401,6 +3408,7 @@
"home.header.placeHolderBrnDrn": "Recherche d'un BRN/DRN",
"home.header.placeholderName": "Rechercher un nom",
"home.header.placeHolderPhone": "Recherche d'un numéro de téléphone",
+ "home.header.placeHolderId": "Recherche d'un ID",
"home.header.placeHolderNationalId": "Recherche d'une carte d'identité nationale",
"home.header.placeHolderTrackingId": "Recherche d'un ID de suivi",
"home.header.settingsTitle": "Paramètres",
@@ -3525,10 +3533,10 @@
"form.field.label.proofOfBridesID": "Preuve de l'identité de la mariée",
"misc.createDescription": "Choisissez un code PIN qui ne comporte pas 4 chiffres répétitifs ou des numéros séquentiels.",
"misc.createTitle": "Créer un code PIN",
- "misc.description.Complete": "En envoyant pour approbation, vous confirmez que la déclaration est prête à être approuvée.",
+ "misc.description.Complete": "L'informateur recevra un courriel contenant un numéro d'enregistrement qu'il pourra utiliser pour retirer son certificat.",
"misc.description.inComplete": "Des informations obligatoires sont manquantes. Veuillez ajouter ces informations afin de pouvoir les envoyer pour approbation.",
"misc.newPass.header": "Choisissez un nouveau mot de passe",
- "misc.newPass.instruction": "Nous vous recommandons de créer un mot de passe unique - un mot de passe que vous n'utilisez pas pour un autre site Web ou une autre application. Remarque. Vous ne pouvez pas réutiliser votre ancien mot de passe une fois que vous l'avez modifié.",
+ "misc.newPass.instruction": "Créez un mot de passe unique, que vous n'utilisez pas pour d'autres sites web ou applications. Une phrase de passe sûre et facile à retenir pourrait inclure trois mots aléatoires, tout en évitant d'utiliser des informations personnelles.",
"misc.notif.declarationsSynced": "Comme vous disposez d'une connectivité, nous pouvons synchroniser vos déclarations.",
"misc.notif.draftsSaved": "Votre brouillon a été enregistré",
"misc.notif.outboxText": "Boîte d'envoi({num})",
@@ -3576,7 +3584,7 @@
"navigation.leaderboards": "Classements",
"navigation.dashboard": "Tableau de bord",
"navigation.report": "Rapport",
- "password.cases": "Contient des majuscules et des minuscules",
+ "password.cases": "Au moins un caractère majuscule et minuscule",
"password.label.confirm": "Confirmez le mot de passe",
"password.label.current": "Mot de passe actuel",
"password.label.new": "Nouveau mot de passe",
@@ -4233,4 +4241,4 @@
}
}
]
-}
+}
\ No newline at end of file
diff --git a/src/api/content/client/descriptions.json b/src/api/content/client/descriptions.json
index 0d42e8c5b..6db577427 100644
--- a/src/api/content/client/descriptions.json
+++ b/src/api/content/client/descriptions.json
@@ -271,8 +271,6 @@
"constants.issueToInformant": "Issuance of death to informant",
"constants.issueConfirmationMessage": "Confirmation of issuance",
"constants.idCheckWithoutVerify": "Issuance without the confirmation of proof",
- "form.field.label.UNION": "Label for Union",
- "form.field.label.DIVISION": "Label for Division",
"form.field.label.district": "Label for District",
"form.field.label.cityUrbanOption": "Label for City",
"form.field.label.state": "Label for State",
diff --git a/src/api/content/login/login.json b/src/api/content/login/login.json
index 33050f847..cbc5576fa 100644
--- a/src/api/content/login/login.json
+++ b/src/api/content/login/login.json
@@ -64,10 +64,10 @@
"resetCredentials.success.page.subtitle.phone": "{forgottenItem, select, username {Check your phone for a reminder of your username} password {You can now login with your new password} other {}}",
"resetCredentials.success.page.subtitle.email": "{forgottenItem, select, username {Check your email for a reminder of your username} password {You can now login with your new password} other {}}",
"misc.newPass.header": "Choose a new password",
- "misc.newPass.instruction": "Create a unique password one that you don't use for another website or application",
+ "misc.newPass.instruction": "Create a unique password - one that you don't use for other websites or applications. A secure and easy to remember passphrase could include three random words, while avoiding the use of personal info.",
"password.label.confirm": "Confirm password",
"password.label.new": "New password",
- "password.cases": "Contain upper and lower cases",
+ "password.cases": "At least one upper and lower case character",
"password.match": "Passwords match",
"password.minLength": "{min} characters minimum",
"password.mismatch": "Passwords do not match",
diff --git a/src/api/fonts/NotoSans-Bold.ttf b/src/api/fonts/NotoSans-Bold.ttf
new file mode 100644
index 000000000..d84248ed1
Binary files /dev/null and b/src/api/fonts/NotoSans-Bold.ttf differ
diff --git a/src/data-seeding/certificates/README.md b/src/data-seeding/certificates/README.md
deleted file mode 100644
index 39222736f..000000000
--- a/src/data-seeding/certificates/README.md
+++ /dev/null
@@ -1,236 +0,0 @@
-These are all the available certificate handlebars in OpenCRVS
-
-### ALL EVENTS:
-registrationNumber
-qrCode
-certificateDate
-registrar
-registrationAgent
-registrarName
-role
-registrarSignature
-registrationDate
-registrationLocation
-contactEmail
-contactPhoneNumber
-eventDate
-informantType
-informantFirstName
-informantFamilyName
-informantBirthDate
-informantNationality
-informantNID
-countryPrimaryInformant
-statePrimaryInformant
-districtPrimaryInformant
-cityPrimaryInformant
-addressLine3UrbanOptionPrimaryInformant
-addressLine2UrbanOptionPrimaryInformant
-addressLine1UrbanOptionPrimaryInformant
-postalCodePrimaryInformant
-addressLine1RuralOptionPrimaryInformant
-internationalStatePrimaryInformant
-internationalDistrictPrimaryInformant
-internationalCityPrimaryInformant
-internationalAddressLine1PrimaryInformant
-internationalAddressLine2PrimaryInformant
-internationalAddressLine3PrimaryInformant
-internationalPostalCodePrimaryInformant
-
-### SPECIFICALLY BIRTH:
-mosipAid
-mosipAIDLabel
-birthConfigurableIdentifier1
-birthConfigurableIdentifier2
-birthConfigurableIdentifier3
-placeOfBirth
-attendantAtBirth
-multipleBirth
-weightAtBirth
-birthType
-childFirstName
-childFamilyName
-childGender
-motherReasonNotApplying
-motherBirthDate
-motherFirstName
-motherFamilyName
-motherNationality
-motherNID
-motherMaritalStatus
-motherOccupation
-motherEducationalAttainment
-fatherBirthDate
-fatherFirstName
-fatherFamilyName
-fatherNationality
-fatherNID
-fatherMaritalStatus
-fatherOccupation
-fatherEducationalAttainment
-countryPlaceofbirth
-statePlaceofbirth
-districtPlaceofbirth
-cityPlaceofbirth
-addressLine3UrbanOptionPlaceofbirth
-addressLine2UrbanOptionPlaceofbirth
-addressLine1UrbanOptionPlaceofbirth
-postalCodePlaceofbirth
-addressLine1RuralOptionPlaceofbirth
-internationalStatePlaceofbirth
-internationalDistrictPlaceofbirth
-internationalCityPlaceofbirth
-internationalAddressLine1Placeofbirth
-internationalAddressLine2Placeofbirth
-internationalAddressLine3Placeofbirth
-internationalPostalCodePlaceofbirth
-countryPrimaryMother
-statePrimaryMother
-districtPrimaryMother
-cityPrimaryMother
-addressLine3UrbanOptionPrimaryMother
-addressLine2UrbanOptionPrimaryMother
-addressLine1UrbanOptionPrimaryMother
-postalCodePrimaryMother
-addressLine1RuralOptionPrimaryMother
-internationalStatePrimaryMother
-internationalDistrictPrimaryMother
-internationalCityPrimaryMother
-internationalAddressLine1PrimaryMother
-internationalAddressLine2PrimaryMother
-internationalAddressLine3PrimaryMother
-internationalPostalCodePrimaryMother
-fatherReasonNotApplying
-countryPrimaryFather
-statePrimaryFather
-districtPrimaryFather
-cityPrimaryFather
-addressLine3UrbanOptionPrimaryFather
-addressLine2UrbanOptionPrimaryFather
-addressLine1UrbanOptionPrimaryFather
-postalCodePrimaryFather
-addressLine1RuralOptionPrimaryFather
-internationalStatePrimaryFather
-internationalDistrictPrimaryFather
-internationalCityPrimaryFather
-internationalAddressLine1PrimaryFather
-internationalAddressLine2PrimaryFather
-internationalAddressLine3PrimaryFather
-internationalPostalCodePrimaryFather
-
-### SPECIFICALLY DEATH:
-deceasedFirstName
-deceasedFamilyName
-deceasedGender
-deceasedBirthDate
-deceasedNationality
-deceasedNID
-deceasedMaritalStatus
-countryPrimaryDeceased
-statePrimaryDeceased
-districtPrimaryDeceased
-cityPrimaryDeceased
-addressLine3UrbanOptionPrimaryDeceased
-addressLine2UrbanOptionPrimaryDeceased
-addressLine1UrbanOptionPrimaryDeceased
-postalCodePrimaryDeceased
-addressLine1RuralOptionPrimaryDeceased
-internationalStatePrimaryDeceased
-internationalDistrictPrimaryDeceased
-internationalCityPrimaryDeceased
-internationalAddressLine1PrimaryDeceased
-internationalAddressLine2PrimaryDeceased
-internationalAddressLine3PrimaryDeceased
-internationalPostalCodePrimaryDeceased
-mannerOfDeath
-causeOfDeathEstablished
-causeOfDeathMethod
-deathDescription
-placeOfDeath
-countryPlaceofdeath
-statePlaceofdeath
-districtPlaceofdeath
-cityPlaceofdeath
-addressLine3UrbanOptionPlaceofdeath
-addressLine2UrbanOptionPlaceofdeath
-addressLine1UrbanOptionPlaceofdeath
-postalCodePlaceofdeath
-addressLine1RuralOptionPlaceofdeath
-internationalStatePlaceofdeath
-internationalDistrictPlaceofdeath
-internationalCityPlaceofdeath
-internationalAddressLine1Placeofdeath
-internationalAddressLine2Placeofdeath
-internationalAddressLine3Placeofdeath
-internationalPostalCodePlaceofdeath
-
-### SPECIFICALLY MARRIAGE:
-groomSignature
-brideSignature
-witnessOneSignature
-witnessTwoSignature
-groomFirstName
-groomFamilyName
-groomBirthDate
-groomNationality
-groomNID
-groomMarriedLastNameEng
-countryPrimaryGroom
-statePrimaryGroom
-districtPrimaryGroom
-cityPrimaryGroom
-addressLine3UrbanOptionPrimaryGroom
-addressLine2UrbanOptionPrimaryGroom
-addressLine1UrbanOptionPrimaryGroom
-postalCodePrimaryGroom
-addressLine1RuralOptionPrimaryGroom
-internationalStatePrimaryGroom
-internationalDistrictPrimaryGroom
-internationalCityPrimaryGroom
-internationalAddressLine1PrimaryGroom
-internationalAddressLine2PrimaryGroom
-internationalAddressLine3PrimaryGroom
-internationalPostalCodePrimaryGroom
-brideFirstName
-brideFamilyName
-brideBirthDate
-brideNationality
-brideNID
-brideMarriedLastNameEng
-countryPrimaryBride
-statePrimaryBride
-districtPrimaryBride
-cityPrimaryBride
-addressLine3UrbanOptionPrimaryBride
-addressLine2UrbanOptionPrimaryBride
-addressLine1UrbanOptionPrimaryBride
-postalCodePrimaryBride
-addressLine1RuralOptionPrimaryBride
-internationalStatePrimaryBride
-internationalDistrictPrimaryBride
-internationalCityPrimaryBride
-internationalAddressLine1PrimaryBride
-internationalAddressLine2PrimaryBride
-internationalAddressLine3PrimaryBride
-internationalPostalCodePrimaryBride
-typeOfMarriage
-countryPlaceofmarriage
-statePlaceofmarriage
-districtPlaceofmarriage
-cityPlaceofmarriage
-addressLine3UrbanOptionPlaceofmarriage
-addressLine2UrbanOptionPlaceofmarriage
-addressLine1UrbanOptionPlaceofmarriage
-postalCodePlaceofmarriage
-addressLine1RuralOptionPlaceofmarriage
-internationalStatePlaceofmarriage
-internationalDistrictPlaceofmarriage
-internationalCityPlaceofmarriage
-internationalAddressLine1Placeofmarriage
-internationalAddressLine2Placeofmarriage
-internationalAddressLine3Placeofmarriage
-internationalPostalCodePlaceofmarriage
-witnessOneFirstName
-witnessOneFamilyName
-witnessTwoFirstName
-witnessTwoFamilyName
diff --git a/src/data-seeding/certificates/handler.ts b/src/data-seeding/certificates/handler.ts
index ede4b901d..1aa2fbf74 100644
--- a/src/data-seeding/certificates/handler.ts
+++ b/src/data-seeding/certificates/handler.ts
@@ -16,23 +16,23 @@ export async function certificateHandler(_: Request, h: ResponseToolkit) {
const Certificates = [
{
event: 'birth',
- fileName: 'farajaland-birth-certificate-v1.svg',
+ fileName: 'Farajaland-birth-certificate-v2.svg',
svgCode: readFileSync(
- './src/data-seeding/certificates/source/BirthCertificate.svg'
+ './src/data-seeding/certificates/source/Farajaland-birth-certificate-v2.svg'
).toString()
},
{
event: 'death',
- fileName: 'farajaland-death-certificate-v1.svg',
+ fileName: 'Farajaland-death-certificate-v2.svg',
svgCode: readFileSync(
- './src/data-seeding/certificates/source/DeathCertificate.svg'
+ './src/data-seeding/certificates/source/Farajaland-death-certificate-v2.svg'
).toString()
},
{
event: 'marriage',
- fileName: 'farajaland-marriage-certificate-v1.svg',
+ fileName: 'Farajaland-marriage-certificate-v2.svg',
svgCode: readFileSync(
- './src/data-seeding/certificates/source/MarriageCertificate.svg'
+ './src/data-seeding/certificates/source/Farajaland-marriage-certificate-v2.svg'
).toString()
}
]
diff --git a/src/data-seeding/certificates/source/BirthCertificate.svg b/src/data-seeding/certificates/source/BirthCertificate.svg
deleted file mode 100644
index 7bfb0afa4..000000000
--- a/src/data-seeding/certificates/source/BirthCertificate.svg
+++ /dev/null
@@ -1,98 +0,0 @@
-
diff --git a/src/data-seeding/certificates/source/DeathCertificate.svg b/src/data-seeding/certificates/source/DeathCertificate.svg
deleted file mode 100644
index fc9677790..000000000
--- a/src/data-seeding/certificates/source/DeathCertificate.svg
+++ /dev/null
@@ -1,94 +0,0 @@
-
diff --git a/src/data-seeding/certificates/source/Farajaland-birth-certificate-v2.svg b/src/data-seeding/certificates/source/Farajaland-birth-certificate-v2.svg
new file mode 100644
index 000000000..87172cd87
--- /dev/null
+++ b/src/data-seeding/certificates/source/Farajaland-birth-certificate-v2.svg
@@ -0,0 +1,185 @@
+
diff --git a/src/data-seeding/certificates/source/Farajaland-death-certificate-v2.svg b/src/data-seeding/certificates/source/Farajaland-death-certificate-v2.svg
new file mode 100644
index 000000000..a2770a38c
--- /dev/null
+++ b/src/data-seeding/certificates/source/Farajaland-death-certificate-v2.svg
@@ -0,0 +1,167 @@
+
diff --git a/src/data-seeding/certificates/source/Farajaland-marriage-certificate-v2.svg b/src/data-seeding/certificates/source/Farajaland-marriage-certificate-v2.svg
new file mode 100644
index 000000000..a3615ede4
--- /dev/null
+++ b/src/data-seeding/certificates/source/Farajaland-marriage-certificate-v2.svg
@@ -0,0 +1,178 @@
+
diff --git a/src/data-seeding/certificates/source/MarriageCertificate.svg b/src/data-seeding/certificates/source/MarriageCertificate.svg
deleted file mode 100644
index af425b8bb..000000000
--- a/src/data-seeding/certificates/source/MarriageCertificate.svg
+++ /dev/null
@@ -1,108 +0,0 @@
-
diff --git a/src/form/addresses/index.ts b/src/form/addresses/index.ts
index ca63ae060..e8bc1efb1 100644
--- a/src/form/addresses/index.ts
+++ b/src/form/addresses/index.ts
@@ -12,9 +12,12 @@
import {
FATHER_DETAILS_DONT_EXIST,
MOTHER_DETAILS_DONT_EXIST,
+ SPOUSE_DETAILS_DONT_EXIST,
detailsDontExist,
hideIfInformantBrideOrGroom,
+ hideIfInformantSpouse,
informantNotMotherOrFather,
+ isInformantSpouse,
mothersDetailsDontExistOnOtherPage,
primaryAddressSameAsOtherPrimaryAddress /*,
SPOUSE_DETAILS_DONT_EXIST*/
@@ -52,7 +55,7 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
// OPTIONS ARE THE FULL PLACE OF EVENT FIELDS, STANDARD ADDRESS FIELDS, ADDRESS SUBSECTION DIVIDERS, OR RADIO BUTTONS TO SIMPLIFY FORM ENTRY
// PLACE OF BIRTH ADDRESS FIELDS
- precedingFieldId: 'birth.child.child-view-group.childBirthDate',
+ precedingFieldId: 'birth.child.child-view-group.reasonForLateRegistration',
configurations: [{ config: EventLocationAddressCases.PLACE_OF_BIRTH }]
},
{
@@ -149,7 +152,7 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
},
{
// DECEASED ADDRESS FIELDS
- precedingFieldId: 'death.deceased.deceased-view-group.maritalStatus',
+ precedingFieldId: 'death.deceased.deceased-view-group.numberOfDependants',
configurations: [
{
config: AddressSubsections.PRIMARY_ADDRESS_SUBSECTION,
@@ -167,22 +170,24 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
},
{
// INFORMANT ADDRESS FIELDS
- precedingFieldId: 'death.informant.informant-view-group.informantID',
+ precedingFieldId:
+ 'death.informant.informant-view-group.informantBirthRegistrationNumber',
configurations: [
{
config: AddressCopyConfigCases.PRIMARY_ADDRESS_SAME_AS_OTHER_PRIMARY,
label: formMessageDescriptors.primaryAddressSameAsDeceasedsPrimary,
+ conditionalCase: `${isInformantSpouse}`,
xComparisonSection: 'informant',
yComparisonSection: 'deceased'
},
{
config: AddressSubsections.PRIMARY_ADDRESS_SUBSECTION,
label: formMessageDescriptors.informantPrimaryAddress,
- conditionalCase: `${primaryAddressSameAsOtherPrimaryAddress}`
+ conditionalCase: `${primaryAddressSameAsOtherPrimaryAddress} || ${hideIfInformantSpouse[0].expression}`
},
{
config: AddressCases.PRIMARY_ADDRESS,
- conditionalCase: `${primaryAddressSameAsOtherPrimaryAddress}`
+ conditionalCase: `${primaryAddressSameAsOtherPrimaryAddress} || ${hideIfInformantSpouse[0].expression}`
} /*,
{
config: AddressSubsections.SECONDARY_ADDRESS_SUBSECTION,
@@ -229,7 +234,7 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
conditionalCase: `((${FATHER_DETAILS_DONT_EXIST} || ${primaryAddressSameAsOtherPrimaryAddress}) && !(${mothersDetailsDontExistOnOtherPage}) || ((${detailsDontExist}) && (${mothersDetailsDontExistOnOtherPage})))`
}
]
- },
+ },*/
{
// SPOUSE ADDRESS FIELDS
precedingFieldId: 'death.spouse.spouse-view-group.spouse-nid-seperator',
@@ -251,7 +256,7 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
conditionalCase: `((${SPOUSE_DETAILS_DONT_EXIST} || ${primaryAddressSameAsOtherPrimaryAddress}) || (${detailsDontExist}))`
}
]
- },*/
+ },
{
// PLACE OF MARRIAGE ADDRESS FIELDS
precedingFieldId:
@@ -301,7 +306,7 @@ export const defaultAddressConfiguration: IAddressConfiguration[] = [
{
// INFORMANT ADDRESS FIELDS
precedingFieldId:
- 'marriage.informant.who-is-applying-view-group.informantID',
+ 'marriage.informant.who-is-applying-view-group.informantBirthRegistrationNumber',
configurations: [
{
config: AddressSubsections.PRIMARY_ADDRESS_SUBSECTION,
diff --git a/src/form/birth/certificate-handlebars.ts b/src/form/birth/certificate-handlebars.ts
index b49985254..bba9dc187 100644
--- a/src/form/birth/certificate-handlebars.ts
+++ b/src/form/birth/certificate-handlebars.ts
@@ -29,7 +29,29 @@ export const certificateHandlebars = {
birthConfigurableIdentifier1: 'birthConfigurableIdentifier1',
birthConfigurableIdentifier2: 'birthConfigurableIdentifier2',
birthConfigurableIdentifier3: 'birthConfigurableIdentifier3',
- placeOfBirth: 'placeOfBirth',
+ placeOfBirth: 'placeOfBirth', // equal to the full place of birth
+ placeOfBirthFacility: 'placeOfBirthFacility', // equal to either the name of a HEALTH_FACILITY or undefined
+ countryPlaceofbirth: 'countryPlaceofbirth',
+ statePlaceofbirth: 'statePlaceofbirth', // @deprecated use statePlaceofbirthId instead: Refer to https://github.com/opencrvs/opencrvs-farajaland/pull/815
+ statePlaceofbirthId: 'statePlaceofbirthId', // Use with location helper like this: {{location statePlaceofbirthId 'name'}}
+ districtPlaceofbirth: 'districtPlaceofbirth', // @deprecated use districtPlaceofbirthId instead: Refer to https://github.com/opencrvs/opencrvs-farajaland/pull/815
+ districtPlaceofbirthId: 'districtPlaceofbirthId', // Use with location helper like this: {{location districtPlaceofbirthId 'name'}}
+ cityPlaceofbirth: 'cityPlaceofbirth',
+ addressLine3UrbanOptionPlaceofbirth: 'addressLine3UrbanOptionPlaceofbirth',
+ addressLine2UrbanOptionPlaceofbirth: 'addressLine2UrbanOptionPlaceofbirth',
+ addressLine1UrbanOptionPlaceofbirth: 'addressLine1UrbanOptionPlaceofbirth',
+ postalCodePlaceofbirth: 'postalCodePlaceofbirth',
+ addressLine1RuralOptionPlaceofbirth: 'addressLine1RuralOptionPlaceofbirth',
+ internationalStatePlaceofbirth: 'internationalStatePlaceofbirth',
+ internationalDistrictPlaceofbirth: 'internationalDistrictPlaceofbirth',
+ internationalCityPlaceofbirth: 'internationalCityPlaceofbirth',
+ internationalAddressLine1Placeofbirth:
+ 'internationalAddressLine1Placeofbirth',
+ internationalAddressLine2Placeofbirth:
+ 'internationalAddressLine2Placeofbirth',
+ internationalAddressLine3Placeofbirth:
+ 'internationalAddressLine3Placeofbirth',
+ internationalPostalCodePlaceofbirth: 'internationalPostalCodePlaceofbirth',
informantType: 'informantType',
attendantAtBirth: 'attendantAtBirth',
multipleBirth: 'multipleBirth',
@@ -43,13 +65,19 @@ export const certificateHandlebars = {
informantFamilyName: 'informantFamilyName',
informantBirthDate: 'informantBirthDate',
informantNationality: 'informantNationality',
- informantNID: 'informantNID',
+ informantNationalId: 'informantNationalId',
+ informantPassport: 'informantPassport',
+ informantAliedId: 'informantAliedId',
+ informantRefugeeId: 'informantRefugeeId',
motherReasonNotApplying: 'motherReasonNotApplying',
motherBirthDate: 'motherBirthDate',
motherFirstName: 'motherFirstName',
motherFamilyName: 'motherFamilyName',
motherNationality: 'motherNationality',
- motherNID: 'motherNID',
+ motherNationalId: 'motherNationalId',
+ motherPassport: 'motherPassport',
+ motherAliedId: 'motherAliedId',
+ motherRefugeeId: 'motherRefugeeId',
motherMaritalStatus: 'motherMaritalStatus',
motherOccupation: 'motherOccupation',
motherEducationalAttainment: 'motherEducationalAttainment',
@@ -57,36 +85,18 @@ export const certificateHandlebars = {
fatherFirstName: 'fatherFirstName',
fatherFamilyName: 'fatherFamilyName',
fatherNationality: 'fatherNationality',
- fatherNID: 'fatherNID',
+ fatherNationalId: 'fatherNationalId',
+ fatherPassport: 'fatherPassport',
+ fatherAliedId: 'fatherAliedId',
+ fatherRefugeeId: 'fatherRefugeeId',
fatherMaritalStatus: 'fatherMaritalStatus',
fatherOccupation: 'fatherOccupation',
fatherEducationalAttainment: 'fatherEducationalAttainment',
- countryPlaceofbirth: 'countryPlaceofbirth',
- statePlaceofbirth: 'statePlaceofbirth', // @deprecated use statePlaceofbirthId instead
- statePlaceofbirthId: 'statePlaceofbirthId',
- districtPlaceofbirth: 'districtPlaceofbirth', // @deprecated use districtPlaceofbirthId instead
- districtPlaceofbirthId: 'districtPlaceofbirthId',
- cityPlaceofbirth: 'cityPlaceofbirth',
- addressLine3UrbanOptionPlaceofbirth: 'addressLine3UrbanOptionPlaceofbirth',
- addressLine2UrbanOptionPlaceofbirth: 'addressLine2UrbanOptionPlaceofbirth',
- addressLine1UrbanOptionPlaceofbirth: 'addressLine1UrbanOptionPlaceofbirth',
- postalCodePlaceofbirth: 'postalCodePlaceofbirth',
- addressLine1RuralOptionPlaceofbirth: 'addressLine1RuralOptionPlaceofbirth',
- internationalStatePlaceofbirth: 'internationalStatePlaceofbirth',
- internationalDistrictPlaceofbirth: 'internationalDistrictPlaceofbirth',
- internationalCityPlaceofbirth: 'internationalCityPlaceofbirth',
- internationalAddressLine1Placeofbirth:
- 'internationalAddressLine1Placeofbirth',
- internationalAddressLine2Placeofbirth:
- 'internationalAddressLine2Placeofbirth',
- internationalAddressLine3Placeofbirth:
- 'internationalAddressLine3Placeofbirth',
- internationalPostalCodePlaceofbirth: 'internationalPostalCodePlaceofbirth',
countryPrimaryInformant: 'countryPrimaryInformant',
- statePrimaryInformant: 'statePrimaryInformant', // @deprecated use statePrimaryInformantId instead
- statePrimaryInformantId: 'statePrimaryInformantId',
- districtPrimaryInformant: 'districtPrimaryInformant', // @deprecated use districtPrimaryInformantId instead
- districtPrimaryInformantId: 'districtPrimaryInformantId',
+ statePrimaryInformant: 'statePrimaryInformant', // @deprecated use statePrimaryInformantId instead: Refer to https://github.com/opencrvs/opencrvs-farajaland/pull/815
+ statePrimaryInformantId: 'statePrimaryInformantId', // Use with location helper like this: {{location statePrimaryInformantId 'name'}}
+ districtPrimaryInformant: 'districtPrimaryInformant', // @deprecated use districtPrimaryInformantId instead: Refer to https://github.com/opencrvs/opencrvs-farajaland/pull/815
+ districtPrimaryInformantId: 'districtPrimaryInformantId', // Use with location helper like this: {{location districtPrimaryInformantId 'name'}}
cityPrimaryInformant: 'cityPrimaryInformant',
addressLine3UrbanOptionPrimaryInformant:
'addressLine3UrbanOptionPrimaryInformant',
@@ -110,10 +120,10 @@ export const certificateHandlebars = {
internationalPostalCodePrimaryInformant:
'internationalPostalCodePrimaryInformant',
countryPrimaryMother: 'countryPrimaryMother',
- statePrimaryMother: 'statePrimaryMother', // @deprecated use statePrimaryMotherId instead
- statePrimaryMotherId: 'statePrimaryMotherId',
- districtPrimaryMother: 'districtPrimaryMother', // @deprecated use districtPrimaryMotherId instead
- districtPrimaryMotherId: 'districtPrimaryMotherId',
+ statePrimaryMother: 'statePrimaryMother', // @deprecated use statePrimaryMotherId instead: Refer to https://github.com/opencrvs/opencrvs-farajaland/pull/815
+ statePrimaryMotherId: 'statePrimaryMotherId', // Use with location helper like this: {{location statePrimaryMotherId 'name'}}
+ districtPrimaryMother: 'districtPrimaryMother', // @deprecated use districtPrimaryMotherId instead: Refer to https://github.com/opencrvs/opencrvs-farajaland/pull/815
+ districtPrimaryMotherId: 'districtPrimaryMotherId', // Use with location helper like this: {{location districtPrimaryMotherId 'name'}}
cityPrimaryMother: 'cityPrimaryMother',
addressLine3UrbanOptionPrimaryMother: 'addressLine3UrbanOptionPrimaryMother',
addressLine2UrbanOptionPrimaryMother: 'addressLine2UrbanOptionPrimaryMother',
@@ -132,10 +142,10 @@ export const certificateHandlebars = {
internationalPostalCodePrimaryMother: 'internationalPostalCodePrimaryMother',
fatherReasonNotApplying: 'fatherReasonNotApplying',
countryPrimaryFather: 'countryPrimaryFather',
- statePrimaryFather: 'statePrimaryFather', // @deprecated use statePrimaryFatherId instead
- statePrimaryFatherId: 'statePrimaryFatherId',
- districtPrimaryFather: 'districtPrimaryFather', // @deprecated use districtPrimaryFatherId instead
- districtPrimaryFatherId: 'districtPrimaryFatherId',
+ statePrimaryFather: 'statePrimaryFather', // @deprecated use statePrimaryFatherId instead: Refer to https://github.com/opencrvs/opencrvs-farajaland/pull/815
+ statePrimaryFatherId: 'statePrimaryFatherId', // Use with location helper like this: {{location statePrimaryFatherId 'name'}}
+ districtPrimaryFather: 'districtPrimaryFather', // @deprecated use districtPrimaryFatherId instead: Refer to https://github.com/opencrvs/opencrvs-farajaland/pull/815
+ districtPrimaryFatherId: 'districtPrimaryFatherId', // Use with location helper like this: {{location districtPrimaryFatherId 'name'}}
cityPrimaryFather: 'cityPrimaryFather',
addressLine3UrbanOptionPrimaryFather: 'addressLine3UrbanOptionPrimaryFather',
addressLine2UrbanOptionPrimaryFather: 'addressLine2UrbanOptionPrimaryFather',
diff --git a/src/form/birth/index.ts b/src/form/birth/index.ts
index b56f9a84c..1231ab35b 100644
--- a/src/form/birth/index.ts
+++ b/src/form/birth/index.ts
@@ -19,7 +19,6 @@ import {
getFirstNameField,
getNationality,
otherInformantType,
- getNationalID,
getDetailsExist,
getReasonNotExisting
} from '../common/common-required-fields'
@@ -60,11 +59,10 @@ import {
fatherFamilyNameConditionals,
informantNotMotherOrFather,
detailsExistConditional,
- ageOfIndividualConditionals,
+ ageOfIndividualValidators,
ageOfParentsConditionals
} from '../common/default-validation-conditionals'
import {
- getNationalIDValidators,
informantFirstNameConditionals,
informantFamilyNameConditionals,
informantBirthDateConditionals,
@@ -75,6 +73,8 @@ import { documentsSection, registrationSection } from './required-sections'
import { certificateHandlebars } from './certificate-handlebars'
import { getSectionMapping } from '@countryconfig/utils/mapping/section/birth/mapping-utils'
import { getCommonSectionMapping } from '@countryconfig/utils/mapping/field-mapping-utils'
+import { getReasonForLateRegistration } from '../custom-fields'
+import { getIDNumberFields, getIDType } from '../custom-fields'
// import { createCustomFieldExample } from '../custom-fields'
// ======================= FORM CONFIGURATION =======================
@@ -189,6 +189,7 @@ export const birthForm: ISerializedForm = {
isValidChildBirthDate,
certificateHandlebars.eventDate
), // Required field.
+ getReasonForLateRegistration('birth'),
// PLACE OF BIRTH FIELDS WILL RENDER HERE
divider('place-of-birth-seperator'),
attendantAtBirth,
@@ -251,17 +252,22 @@ export const birthForm: ISerializedForm = {
exactDateOfBirthUnknownConditional.concat(
hideIfInformantMotherOrFather
),
- ageOfIndividualConditionals
+ ageOfIndividualValidators
),
getNationality(
certificateHandlebars.informantNationality,
hideIfInformantMotherOrFather
), // Required field.
- getNationalID(
- 'informantID',
+ getIDType(
+ 'birth',
+ 'informant',
hideIfNidIntegrationEnabled.concat(hideIfInformantMotherOrFather),
- getNationalIDValidators('informant'),
- certificateHandlebars.informantNID
+ true
+ ),
+ ...getIDNumberFields(
+ 'informant',
+ hideIfNidIntegrationEnabled.concat(hideIfInformantMotherOrFather),
+ true
),
// preceding field of address fields
divider('informant-nid-seperator', [
@@ -331,11 +337,16 @@ export const birthForm: ISerializedForm = {
certificateHandlebars.motherNationality,
detailsExist
), // Required field.
- getNationalID(
- 'iD',
+ getIDType(
+ 'birth',
+ 'mother',
+ hideIfNidIntegrationEnabled.concat(detailsExist),
+ true
+ ),
+ ...getIDNumberFields(
+ 'mother',
hideIfNidIntegrationEnabled.concat(detailsExist),
- getNationalIDValidators('mother'),
- certificateHandlebars.motherNID
+ true
),
// preceding field of address fields
divider('mother-nid-seperator', detailsExist),
@@ -348,7 +359,12 @@ export const birthForm: ISerializedForm = {
}
]),
getEducation(certificateHandlebars.motherEducationalAttainment),
- getOccupation(certificateHandlebars.motherOccupation),
+ getOccupation(certificateHandlebars.motherOccupation, [
+ {
+ action: 'hide',
+ expression: '!values.detailsExist'
+ }
+ ]),
multipleBirth
],
previewGroups: [motherNameInEnglish]
@@ -410,11 +426,16 @@ export const birthForm: ISerializedForm = {
certificateHandlebars.fatherNationality,
detailsExist
), // Required field.
- getNationalID(
- 'iD',
+ getIDType(
+ 'birth',
+ 'father',
+ hideIfNidIntegrationEnabled.concat(detailsExist),
+ true
+ ),
+ ...getIDNumberFields(
+ 'father',
hideIfNidIntegrationEnabled.concat(detailsExist),
- getNationalIDValidators('father'),
- certificateHandlebars.fatherNID
+ true
),
// preceding field of address fields
divider('father-nid-seperator', detailsExist),
@@ -427,7 +448,12 @@ export const birthForm: ISerializedForm = {
}
]),
getEducation(certificateHandlebars.fatherEducationalAttainment),
- getOccupation(certificateHandlebars.fatherOccupation)
+ getOccupation(certificateHandlebars.fatherOccupation, [
+ {
+ action: 'hide',
+ expression: '!values.detailsExist'
+ }
+ ])
],
previewGroups: [fatherNameInEnglish]
}
diff --git a/src/form/common/certificate/handlebars/helpers.ts b/src/form/common/certificate/handlebars/helpers.ts
index 335d73782..e19250d90 100644
--- a/src/form/common/certificate/handlebars/helpers.ts
+++ b/src/form/common/certificate/handlebars/helpers.ts
@@ -4,6 +4,7 @@ import { type IntlShape } from 'react-intl'
type FactoryProps = {
intl: IntlShape
}
+// An example helper showing how to access i18n properties
export function noop(props: FactoryProps): Handlebars.HelperDelegate {
return function (this: any, value: string) {
// eslint-disable-next-line no-console
@@ -12,3 +13,13 @@ export function noop(props: FactoryProps): Handlebars.HelperDelegate {
return value
}
}
+
+/** console.logs available handlebar variables with the handlebar: {{debug}} */
+export function debug(): Handlebars.HelperDelegate {
+ return function (this: any, value: string) {
+ // eslint-disable-next-line no-console
+ console.log(this)
+
+ return value
+ }
+}
diff --git a/src/form/common/common-optional-fields.ts b/src/form/common/common-optional-fields.ts
index 932682981..419125a8a 100644
--- a/src/form/common/common-optional-fields.ts
+++ b/src/form/common/common-optional-fields.ts
@@ -55,7 +55,8 @@ export const exactDateOfBirthUnknown = (
export const getAgeOfIndividualInYears = (
label: MessageDescriptor,
conditionals: Conditional[],
- validators: Validator[]
+ validators: Validator[],
+ certificateHandlebar?: string
): SerializedFormField => ({
name: 'ageOfIndividualInYears',
type: 'NUMBER',
@@ -65,7 +66,10 @@ export const getAgeOfIndividualInYears = (
validator: validators,
conditionals,
postfix: 'years',
- inputFieldWidth: '78px'
+ inputFieldWidth: '78px',
+ ...(certificateHandlebar && {
+ mapping: getFieldMapping('ageOfIndividualInYears', certificateHandlebar)
+ })
})
export const getMaritalStatus = (
@@ -160,7 +164,8 @@ export const getNIDVerificationButton = (
labelForOffline: formMessageDescriptors.nidOffline
})
export const getOccupation = (
- certificateHandlebar: string
+ certificateHandlebar: string,
+ conditionals: Conditional[] = []
): SerializedFormField => ({
name: 'occupation',
type: 'TEXT',
@@ -172,12 +177,7 @@ export const getOccupation = (
required: false,
initialValue: '',
validator: [],
- conditionals: [
- {
- action: 'hide',
- expression: '!values.detailsExist'
- }
- ],
+ conditionals,
mapping: getFieldMapping('occupation', certificateHandlebar)
})
diff --git a/src/form/common/default-validation-conditionals.ts b/src/form/common/default-validation-conditionals.ts
index ebd96232f..093c2b7a8 100644
--- a/src/form/common/default-validation-conditionals.ts
+++ b/src/form/common/default-validation-conditionals.ts
@@ -109,6 +109,16 @@ export const hideIfInformantMotherOrFather = [
}
]
+export const isInformantSpouse =
+ '!values.informantType || values.informantType==="SPOUSE"'
+
+export const hideIfInformantSpouse = [
+ {
+ action: 'hide',
+ expression: isInformantSpouse
+ }
+]
+
export const mothersDetailsExistConditionals = [
{
action: 'hide',
@@ -241,7 +251,7 @@ export const brideOrGroomAgeValidators = [
}
] satisfies Validator[]
-export const ageOfIndividualConditionals: Validator[] = [
+export const ageOfIndividualValidators: Validator[] = [
{
operation: 'range',
parameters: [12, 120]
@@ -253,7 +263,7 @@ export const ageOfIndividualConditionals: Validator[] = [
]
export const ageOfParentsConditionals = [
- ...ageOfIndividualConditionals,
+ ...ageOfIndividualValidators,
{
operation: 'isValidParentsBirthDate',
parameters: [10, true]
diff --git a/src/form/custom-fields.ts b/src/form/custom-fields.ts
index b6f8e6d23..b92e4dc57 100644
--- a/src/form/custom-fields.ts
+++ b/src/form/custom-fields.ts
@@ -8,9 +8,13 @@
*
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
*/
-
-import { SerializedFormField } from './types/types'
+import { MessageDescriptor } from 'react-intl'
+import { formMessageDescriptors } from './common/messages'
+import { Conditional, SerializedFormField } from './types/types'
import { getCustomFieldMapping } from '@countryconfig/utils/mapping/field-mapping-utils'
+import { getNationalIDValidators } from './common/default-validation-conditionals'
+import { camelCase } from 'lodash'
+import { uppercaseFirstLetter } from '@countryconfig/utils'
// ======================= CUSTOM FIELD CONFIGURATION =======================
@@ -41,7 +45,189 @@ export function createCustomFieldExample(): SerializedFormField {
initialValue: '',
validator: [], // EDIT VALIDATORS AS YOU SEE FIT
mapping: getCustomFieldMapping(fieldId), // ALL CUSTOM FIELDS MUST USE THIS MAPPING FUNCTION
- conditionals: [], // EDIT VALIDATORS AS YOU SEE FIT
+ conditionals: [], // EDIT CONDITIONALS AS YOU SEE FIT
+ maxLength: 250
+ }
+}
+
+export function getReasonForLateRegistration(
+ event: string
+): SerializedFormField {
+ const fieldName: string = 'reasonForLateRegistration'
+ const fieldId: string =
+ event === 'birth'
+ ? `birth.child.child-view-group.${fieldName}`
+ : `death.deathEvent.death-event-details.${fieldName}`
+ const label: MessageDescriptor =
+ event === 'birth'
+ ? {
+ id: 'form.customField.label.reasonForLateRegistrationBirth',
+ description:
+ 'A form field that asks the reason for a late registration.',
+ defaultMessage: 'Reason for delayed registration'
+ }
+ : {
+ id: 'form.customField.label.reasonForLateRegistrationDeath',
+ description:
+ 'A form field that asks the reason for a late registration.',
+ defaultMessage: 'Reason for late registration'
+ }
+ const expression: string =
+ event === 'birth'
+ ? 'const pattern = /^\\d{4}-\\d{2}-\\d{2}$/; const today = new Date(); const eventDatePlusLateRegistrationTarget = new Date(values.childBirthDate); const lateRegistrationTarget = offlineCountryConfig && offlineCountryConfig.config.BIRTH.LATE_REGISTRATION_TARGET; eventDatePlusLateRegistrationTarget.setDate(eventDatePlusLateRegistrationTarget.getDate() + lateRegistrationTarget); !pattern.test(values.childBirthDate) || today < eventDatePlusLateRegistrationTarget;'
+ : 'const pattern = /^\\d{4}-\\d{2}-\\d{2}$/; const today = new Date(); const eventDatePlusLateRegistrationTarget = new Date(values.deathDate); const lateRegistrationTarget = offlineCountryConfig && offlineCountryConfig.config.DEATH.REGISTRATION_TARGET; eventDatePlusLateRegistrationTarget.setDate(eventDatePlusLateRegistrationTarget.getDate() + lateRegistrationTarget); !pattern.test(values.deathDate) || today < eventDatePlusLateRegistrationTarget;'
+
+ return {
+ name: fieldName,
+ customQuestionMappingId: fieldId,
+ custom: true,
+ required: true,
+ type: 'TEXT',
+ label,
+ initialValue: '',
+ validator: [],
+ mapping: getCustomFieldMapping(fieldId),
+ conditionals: [
+ {
+ action: 'hide',
+ expression
+ }
+ ], // EDIT CONDITIONALS AS YOU SEE FIT
+ maxLength: 250
+ }
+}
+
+type ArrayElement = ArrayType extends readonly (infer ElementType)[]
+ ? ElementType
+ : never
+
+const idTypeOptions = [
+ {
+ value: 'NATIONAL_ID' as const,
+ label: {
+ defaultMessage: 'National ID',
+ description: 'Option for form field: Type of ID',
+ id: 'form.field.label.iDTypeNationalID'
+ }
+ },
+ {
+ value: 'PASSPORT' as const,
+ label: {
+ defaultMessage: 'Passport',
+ description: 'Option for form field: Type of ID',
+ id: 'form.field.label.iDTypePassport'
+ }
+ },
+ {
+ value: 'BIRTH_REGISTRATION_NUMBER' as const,
+ label: {
+ defaultMessage: 'Birth Registration Number',
+ description: 'Option for form field: Type of ID',
+ id: 'form.field.label.iDTypeBRN'
+ }
+ },
+ {
+ value: 'NONE' as const,
+ label: {
+ defaultMessage: 'None',
+ description: 'Option for form field: Type of ID',
+ id: 'form.field.label.iDTypeNone'
+ }
+ }
+]
+
+type IDType = ArrayElement['value']
+
+export function getIDType(
+ event: string,
+ sectionId: string,
+ conditionals: Conditional[] = [],
+ required: boolean
+): SerializedFormField {
+ const fieldName: string = `${sectionId}IdType`
+ const fieldId: string = `${event}.${sectionId}.${sectionId}-view-group.${fieldName}`
+ return {
+ name: fieldName,
+ customQuestionMappingId: fieldId,
+ custom: true,
+ required,
+ type: 'SELECT_WITH_OPTIONS',
+ label: {
+ id: 'form.field.label.iDType',
+ description: 'A form field that asks for the type of ID.',
+ defaultMessage: 'Type of ID'
+ },
+ initialValue: '',
+ validator: [],
+ mapping: getCustomFieldMapping(fieldId),
+ placeholder: formMessageDescriptors.formSelectPlaceholder,
+ conditionals,
+ options: idTypeOptions
+ }
+}
+
+function getValidators(configCase: string, idValue: IDType) {
+ if (idValue === 'NATIONAL_ID') {
+ return getNationalIDValidators(configCase)
+ }
+ return []
+}
+
+export function getIDNumber(
+ sectionId: string,
+ idValue: IDType,
+ conditionals: Conditional[] = [],
+ required: boolean
+): SerializedFormField {
+ const fieldName: string = `${sectionId}${uppercaseFirstLetter(
+ camelCase(idValue)
+ )}`
+ const validators = getValidators(sectionId, idValue)
+ // eslint-disable-next-line no-console
+ console.log('Custom field addded with handlebar: ', fieldName)
+ return {
+ name: fieldName,
+ required,
+ type: 'TEXT',
+ custom: true,
+ label: {
+ id: 'form.field.label.iD',
+ description: 'A form field that asks for the id number.',
+ defaultMessage: 'ID number'
+ },
+ initialValue: '',
+ validator: validators,
+ mapping: {
+ template: {
+ fieldName: fieldName,
+ operation: 'identityToFieldTransformer',
+ parameters: ['id', idValue]
+ },
+ mutation: {
+ operation: 'fieldToIdentityTransformer',
+ parameters: ['id', idValue]
+ },
+ query: {
+ operation: 'identityToFieldTransformer',
+ parameters: ['id', idValue]
+ }
+ },
+ conditionals: [
+ {
+ action: 'hide',
+ expression: `(values.${sectionId}IdType!=="${idValue}") || (values.${sectionId}IdType==="NONE")`
+ }
+ ].concat(conditionals),
maxLength: 250
}
}
+
+export function getIDNumberFields(
+ section: string,
+ conditionals: Conditional[] = [],
+ required: boolean
+) {
+ return idTypeOptions
+ .filter((opt) => opt.value !== 'NONE')
+ .map((opt) => getIDNumber(section, opt.value, conditionals, required))
+}
diff --git a/src/form/death/certficate-handlebars.ts b/src/form/death/certficate-handlebars.ts
index 970bbfb4e..d4fc732cf 100644
--- a/src/form/death/certficate-handlebars.ts
+++ b/src/form/death/certficate-handlebars.ts
@@ -30,7 +30,10 @@ export const certificateHandlebars = {
deceasedGender: 'deceasedGender',
deceasedBirthDate: 'deceasedBirthDate',
deceasedNationality: 'deceasedNationality',
- deceasedNID: 'deceasedNID',
+ deceasedNationalId: 'deceasedNationalId',
+ deceasedPassport: 'deceasedPassport',
+ deceasedAliedId: 'deceasedAliedId',
+ deceasedRefugeeId: 'deceasedRefugeeId',
deceasedMaritalStatus: 'deceasedMaritalStatus',
countryPrimaryDeceased: 'countryPrimaryDeceased',
statePrimaryDeceased: 'statePrimaryDeceased', // @deprecated use statePrimaryDeceasedId instead
@@ -38,6 +41,7 @@ export const certificateHandlebars = {
districtPrimaryDeceased: 'districtPrimaryDeceased', // @deprecated use districtPrimaryDeceasedId instead
districtPrimaryDeceasedId: 'districtPrimaryDeceasedId',
cityPrimaryDeceased: 'cityPrimaryDeceased',
+ ageOfDeceasedInYears: 'ageOfDeceasedInYears',
addressLine3UrbanOptionPrimaryDeceased:
'addressLine3UrbanOptionPrimaryDeceased',
addressLine2UrbanOptionPrimaryDeceased:
@@ -62,8 +66,12 @@ export const certificateHandlebars = {
causeOfDeathEstablished: 'causeOfDeathEstablished',
causeOfDeathMethod: 'causeOfDeathMethod',
deathDescription: 'deathDescription',
- placeOfDeath: 'placeOfDeath',
- countryPlaceofdeath: 'countryPlaceofdeath',
+ placeOfDeath: 'placeOfDeath', // equal to either the name of a HEALTH_FACILITY or undefined
+ placeOfDeathCountry: 'placeOfDeathCountry', // used where event occurs in a HEALTH_FACILITY
+ placeOfDeathDistrict: 'placeOfDeathDistrict', // used where event occurs in a HEALTH_FACILITY
+ placeOfDeathFacility: 'placeOfDeathFacility', // used where event occurs in a HEALTH_FACILITY
+ placeOfDeathState: 'placeOfDeathState', // used where event occurs in a HEALTH_FACILITY
+ countryPlaceofdeath: 'countryPlaceofdeath', // THE FOLLOWING are used where event occurs in a PRIVATE_HOME or OTHER therefore placeOfBirth is undefined
statePlaceofdeath: 'statePlaceofdeath', // @deprecated use statePlaceofdeathId instead
statePlaceofdeathId: 'statePlaceofdeathId',
districtPlaceofdeath: 'districtPlaceofdeath', // @deprecated use districtPlaceofdeathId instead
@@ -89,7 +97,10 @@ export const certificateHandlebars = {
informantFamilyName: 'informantFamilyName',
informantBirthDate: 'informantBirthDate',
informantNationality: 'informantNationality',
- informantNID: 'informantNID',
+ informantNationalId: 'informantNationalId',
+ informantPassport: 'informantPassport',
+ informantAliedId: 'informantAliedId',
+ informantRefugeeId: 'informantRefugeeId',
countryPrimaryInformant: 'countryPrimaryInformant',
statePrimaryInformant: 'statePrimaryInformant', // @deprecated use statePrimaryInformantId instead
statePrimaryInformantId: 'statePrimaryInformantId',
@@ -122,7 +133,10 @@ export const certificateHandlebars = {
spouseReasonNotApplying: 'spouseReasonNotApplying',
spouseBirthDate: 'spouseBirthDate',
spouseNationality: 'spouseNationality',
- spouseNID: 'spouseNID',
+ spouseNationalId: 'spouseNationalId',
+ spousePassport: 'spousePassport',
+ spouseAliedId: 'spouseAliedId',
+ spouseRefugeeId: 'spouseRefugeeId',
spouseOccupation: 'spouseOccupation',
spouseEducationalAttainment: 'spouseEducationalAttainment',
countryPrimarySpouse: 'countryPrimarySpouse',
@@ -151,7 +165,10 @@ export const certificateHandlebars = {
motherFirstName: 'motherFirstName',
motherFamilyName: 'motherFamilyName',
motherNationality: 'motherNationality',
- motherNID: 'motherNID',
+ motherNationalId: 'motherNationalId',
+ motherPassport: 'motherPassport',
+ motherAliedId: 'motherAliedId',
+ motherRefugeeId: 'motherRefugeeId',
motherMaritalStatus: 'motherMaritalStatus',
motherOccupation: 'motherOccupation',
motherEducationalAttainment: 'motherEducationalAttainment',
@@ -159,7 +176,10 @@ export const certificateHandlebars = {
fatherFirstName: 'fatherFirstName',
fatherFamilyName: 'fatherFamilyName',
fatherNationality: 'fatherNationality',
- fatherNID: 'fatherNID',
+ fatherNationalId: 'fatherNationalId',
+ fatherPassport: 'fatherPassport',
+ fatherAliedId: 'fatherAliedId',
+ fatherRefugeeId: 'fatherRefugeeId',
fatherMaritalStatus: 'fatherMaritalStatus',
fatherOccupation: 'fatherOccupation',
fatherEducationalAttainment: 'fatherEducationalAttainment',
diff --git a/src/form/death/custom-fields.ts b/src/form/death/custom-fields.ts
new file mode 100644
index 000000000..2b3add283
--- /dev/null
+++ b/src/form/death/custom-fields.ts
@@ -0,0 +1,37 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * OpenCRVS is also distributed under the terms of the Civil Registration
+ * & Healthcare Disclaimer located at http://opencrvs.org/license.
+ *
+ * Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
+ */
+
+import { SerializedFormField } from '../types/types'
+import { getCustomFieldMapping } from '@countryconfig/utils/mapping/field-mapping-utils'
+
+export function getNumberOfDependants(): SerializedFormField {
+ const fieldName: string = 'numberOfDependants'
+ const fieldId: string = `death.deceased.deceased-view-group.${fieldName}`
+
+ return {
+ name: fieldName,
+ customQuestionMappingId: fieldId,
+ custom: true,
+ required: false,
+ type: 'NUMBER',
+ label: {
+ id: 'form.customField.label.numberOfDependants',
+ description:
+ 'A form field that asks for the persons number of dependants.',
+ defaultMessage: 'No. of dependants'
+ },
+ initialValue: '',
+ validator: [],
+ mapping: getCustomFieldMapping(fieldId),
+ conditionals: [],
+ inputFieldWidth: '64px'
+ }
+}
diff --git a/src/form/death/index.ts b/src/form/death/index.ts
index 04df309e2..48bec5381 100644
--- a/src/form/death/index.ts
+++ b/src/form/death/index.ts
@@ -25,9 +25,8 @@ import {
getFirstNameField,
getNationality,
otherInformantType,
- getNationalID /*,
getDetailsExist,
- getReasonNotExisting*/
+ getReasonNotExisting
} from '../common/common-required-fields'
import {
deathInformantType,
@@ -40,42 +39,46 @@ import {
import { formMessageDescriptors } from '../common/messages'
import { Event, ISerializedForm } from '../types/types'
import {
- getNationalIDValidators,
- hideIfNidIntegrationEnabled,
informantBirthDateConditionals,
informantFamilyNameConditionals,
- ageOfIndividualConditionals,
+ ageOfIndividualValidators,
ageOfDeceasedConditionals,
informantFirstNameConditionals,
exactDateOfBirthUnknownConditional,
isValidBirthDate /*,
- spouseFirstNameConditionals,
- spouseFamilyNameConditionals,
- spouseBirthDateConditionals,
fathersDetailsExistConditionals,
fatherFirstNameConditionals,
fatherFamilyNameConditionals,
fathersBirthDateConditionals,
parentsBirthDateValidators,
detailsExistConditional,
- detailsExist,
motherFirstNameConditionals,
motherFamilyNameConditionals,
mothersBirthDateConditionals,
- mothersDetailsExistConditionals,
- spouseDetailsExistConditionals*/
+ mothersDetailsExistConditionals,*/,
+ spouseDetailsExistConditionals,
+ detailsExist,
+ spouseBirthDateConditionals,
+ spouseFamilyNameConditionals,
+ spouseFirstNameConditionals,
+ hideIfInformantSpouse,
+ hideIfNidIntegrationEnabled
} from '../common/default-validation-conditionals'
import { documentsSection, registrationSection } from './required-sections'
import {
deceasedNameInEnglish,
informantNameInEnglish /*,
fatherNameInEnglish,
- motherNameInEnglish,
- spouseNameInEnglish*/
+ motherNameInEnglish,*/,
+ spouseNameInEnglish
} from '../common/preview-groups'
import { certificateHandlebars } from './certficate-handlebars'
import { getCommonSectionMapping } from '@countryconfig/utils/mapping/field-mapping-utils'
+import { getNumberOfDependants } from '@countryconfig/form/death/custom-fields'
+import { getIDNumberFields, getIDType } from '@countryconfig/form/custom-fields'
+import { getSectionMapping } from '@countryconfig/utils/mapping/section/death/mapping-utils'
//import { getSectionMapping } from '@countryconfig/utils/mapping/section/death/mapping-utils'
+import { getReasonForLateRegistration } from '../custom-fields'
// import { createCustomFieldExample } from '../custom-fields'
@@ -196,16 +199,14 @@ export const deathForm = {
getAgeOfIndividualInYears(
formMessageDescriptors.ageOfDeceased,
exactDateOfBirthUnknownConditional,
- ageOfDeceasedConditionals
+ ageOfDeceasedConditionals,
+ certificateHandlebars.ageOfDeceasedInYears
),
getNationality(certificateHandlebars.deceasedNationality, []),
- getNationalID(
- 'deceasedID',
- [],
- getNationalIDValidators('deceased'),
- certificateHandlebars.deceasedNID
- ),
- getMaritalStatus(certificateHandlebars.deceasedMaritalStatus, [])
+ getIDType('death', 'deceased', [], true),
+ ...getIDNumberFields('deceased', [], true),
+ getMaritalStatus(certificateHandlebars.deceasedMaritalStatus, []),
+ getNumberOfDependants()
],
previewGroups: [deceasedNameInEnglish]
}
@@ -229,6 +230,7 @@ export const deathForm = {
}
]
),
+ getReasonForLateRegistration('death'),
getMannerOfDeath,
getCauseOfDeath,
getCauseOfDeathMethod,
@@ -251,17 +253,17 @@ export const deathForm = {
otherInformantType(Event.Death),
getFirstNameField(
'informantNameInEnglish',
- informantFirstNameConditionals,
+ informantFirstNameConditionals.concat(hideIfInformantSpouse),
certificateHandlebars.informantFirstName
), // Required field. In Farajaland, we have built the option to integrate with MOSIP. So we have different conditionals for each name to check MOSIP responses. You could always refactor firstNamesEng for a basic setup
getFamilyNameField(
'informantNameInEnglish',
- informantFamilyNameConditionals,
+ informantFamilyNameConditionals.concat(hideIfInformantSpouse),
certificateHandlebars.informantFamilyName
), // Required field.
getBirthDate(
'informantBirthDate',
- informantBirthDateConditionals,
+ informantBirthDateConditionals.concat(hideIfInformantSpouse),
[
{
operation: 'dateFormatIsCorrect',
@@ -274,21 +276,29 @@ export const deathForm = {
],
certificateHandlebars.informantBirthDate
), // Required field.
- exactDateOfBirthUnknown([]),
+ exactDateOfBirthUnknown(hideIfInformantSpouse),
getAgeOfIndividualInYears(
formMessageDescriptors.ageOfInformant,
- exactDateOfBirthUnknownConditional,
- ageOfIndividualConditionals
+ exactDateOfBirthUnknownConditional.concat(hideIfInformantSpouse),
+ ageOfIndividualValidators
),
- getNationality(certificateHandlebars.informantNationality, []),
- getNationalID(
- 'informantID',
- hideIfNidIntegrationEnabled,
- getNationalIDValidators('informant'),
- certificateHandlebars.informantNID
+ getNationality(
+ certificateHandlebars.informantNationality,
+ hideIfInformantSpouse
+ ),
+ getIDType(
+ 'death',
+ 'informant',
+ hideIfNidIntegrationEnabled.concat(hideIfInformantSpouse),
+ true
+ ),
+ ...getIDNumberFields(
+ 'informant',
+ hideIfNidIntegrationEnabled.concat(hideIfInformantSpouse),
+ true
),
// ADDRESS FIELDS WILL RENDER HERE
- divider('informant-address-separator'),
+ divider('informant-address-separator', hideIfInformantSpouse),
registrationPhone,
registrationEmail
],
@@ -297,9 +307,6 @@ export const deathForm = {
],
mapping: getCommonSectionMapping('informant')
},
- /*
- OTHER POSSIBLE SECTIONS FOR DEATH INCLUDE:
-
{
id: 'spouse',
viewType: 'form',
@@ -340,21 +347,18 @@ export const deathForm = {
],
certificateHandlebars.spouseBirthDate
), // Required field.
- exactDateOfBirthUnknown([]),
+ exactDateOfBirthUnknown(detailsExist),
getAgeOfIndividualInYears(
formMessageDescriptors.ageOfSpouse,
- exactDateOfBirthUnknownConditional
+ exactDateOfBirthUnknownConditional.concat(detailsExist),
+ ageOfIndividualValidators
),
getNationality(
certificateHandlebars.spouseNationality,
detailsExist
),
- getNationalID(
- 'iD',
- hideIfNidIntegrationEnabled.concat(detailsExist),
- getNationalIDValidators('spouse'),
- certificateHandlebars.spouseNID
- ),
+ getIDType('death', 'spouse', detailsExist, true),
+ ...getIDNumberFields('spouse', detailsExist, true),
// preceding field of address fields
divider('spouse-nid-seperator', detailsExist),
// ADDRESS FIELDS WILL RENDER HERE
@@ -365,6 +369,8 @@ export const deathForm = {
],
mapping: getSectionMapping('spouse')
},
+ /*
+ OTHER POSSIBLE SECTIONS FOR DEATH INCLUDE:
{
id: 'mother',
viewType: 'form',
@@ -418,7 +424,12 @@ export const deathForm = {
divider('mother-nid-seperator', detailsExist),
// ADDRESS FIELDS WILL RENDER HERE
divider('mother-address-seperator', detailsExist),
- getOccupation(certificateHandlebars.motherOccupation)
+ getOccupation(certificateHandlebars.motherOccupation, [
+ {
+ action: 'hide',
+ expression: '!values.detailsExist'
+ }
+ ])
],
previewGroups: [motherNameInEnglish]
}
@@ -486,7 +497,12 @@ export const deathForm = {
divider('father-nid-seperator', detailsExist),
// ADDRESS FIELDS WILL RENDER HERE
divider('father-address-seperator', detailsExist),
- getOccupation(certificateHandlebars.fatherOccupation)
+ getOccupation(certificateHandlebars.fatherOccupation, [
+ {
+ action: 'hide',
+ expression: '!values.detailsExist'
+ }
+ ])
],
previewGroups: [fatherNameInEnglish]
}
diff --git a/src/form/marriage/certificate-handlebars.ts b/src/form/marriage/certificate-handlebars.ts
index 7719151b8..ca8457953 100644
--- a/src/form/marriage/certificate-handlebars.ts
+++ b/src/form/marriage/certificate-handlebars.ts
@@ -30,7 +30,10 @@ export const certificateHandlebars = {
informantFamilyName: 'informantFamilyName',
informantBirthDate: 'informantBirthDate',
informantNationality: 'informantNationality',
- informantNID: 'informantNID',
+ informantNationalId: 'informantNationalId',
+ informantPassport: 'informantPassport',
+ informantAliedId: 'informantAliedId',
+ informantRefugeeId: 'informantRefugeeId',
countryPrimaryInformant: 'countryPrimaryInformant',
statePrimaryInformant: 'statePrimaryInformant', // @deprecated use statePrimaryInformantId instead
statePrimaryInformantId: 'statePrimaryInformantId',
@@ -66,7 +69,10 @@ export const certificateHandlebars = {
groomFamilyName: 'groomFamilyName',
groomBirthDate: 'groomBirthDate',
groomNationality: 'groomNationality',
- groomNID: 'groomNID',
+ groomNationalId: 'groomNationalId',
+ groomPassport: 'groomPassport',
+ groomAliedId: 'groomAliedId',
+ groomRefugeeId: 'groomRefugeeId',
groomMarriedLastNameEng: 'groomMarriedLastNameEng',
countryPrimaryGroom: 'countryPrimaryGroom',
statePrimaryGroom: 'statePrimaryGroom', // @deprecated use statePrimaryGroomId instead
@@ -93,7 +99,10 @@ export const certificateHandlebars = {
brideFamilyName: 'brideFamilyName',
brideBirthDate: 'brideBirthDate',
brideNationality: 'brideNationality',
- brideNID: 'brideNID',
+ brideNationalId: 'brideNationalId',
+ bridePassport: 'bridePassport',
+ brideAliedId: 'brideAliedId',
+ brideRefugeeId: 'brideRefugeeId',
brideMarriedLastNameEng: 'brideMarriedLastNameEng',
countryPrimaryBride: 'countryPrimaryBride',
statePrimaryBride: 'statePrimaryBride', // @deprecated use statePrimaryBrideId instead
diff --git a/src/form/marriage/index.ts b/src/form/marriage/index.ts
index ff9b820b6..c88cab80b 100644
--- a/src/form/marriage/index.ts
+++ b/src/form/marriage/index.ts
@@ -21,8 +21,7 @@ import {
getFamilyNameField,
getFirstNameField,
getNationality,
- otherInformantType,
- getNationalID
+ otherInformantType
} from '../common/common-required-fields'
import {
formMessageDescriptors,
@@ -41,10 +40,9 @@ import {
} from './required-fields'
import { Event, ISerializedForm } from '../types/types'
import {
- ageOfIndividualConditionals,
+ ageOfIndividualValidators,
brideOrGroomAgeValidators,
- exactDateOfBirthUnknownConditional,
- getNationalIDValidators
+ exactDateOfBirthUnknownConditional
} from '../common/default-validation-conditionals'
import {
hideIfInformantBrideOrGroom,
@@ -60,6 +58,7 @@ import {
} from '../common/preview-groups'
import { certificateHandlebars } from './certificate-handlebars'
import { getCommonSectionMapping } from '@countryconfig/utils/mapping/field-mapping-utils'
+import { getIDNumberFields, getIDType } from '../custom-fields'
// import { createCustomFieldExample } from '../custom-fields'
@@ -131,17 +130,22 @@ export const marriageForm: ISerializedForm = {
exactDateOfBirthUnknownConditional.concat(
hideIfInformantBrideOrGroom
),
- ageOfIndividualConditionals
+ ageOfIndividualValidators
),
getNationality(
certificateHandlebars.informantNationality,
hideIfInformantBrideOrGroom
), // Required field
- getNationalID(
- 'informantID',
+ getIDType(
+ 'marriage',
+ 'informant',
hideIfInformantBrideOrGroom,
- getNationalIDValidators('informant'),
- certificateHandlebars.informantNID
+ true
+ ),
+ ...getIDNumberFields(
+ 'informant',
+ hideIfInformantBrideOrGroom,
+ true
),
// ADDRESS FIELDS WILL RENDER HERE
registrationPhone,
@@ -190,12 +194,8 @@ export const marriageForm: ISerializedForm = {
brideOrGroomAgeValidators
),
getNationality(certificateHandlebars.groomNationality, []), // Required field
- getNationalID(
- 'iD',
- [],
- getNationalIDValidators('groom'),
- certificateHandlebars.groomNID
- ),
+ getIDType('marriage', 'groom', [], true),
+ ...getIDNumberFields('groom', [], true),
getMarriedLastName(certificateHandlebars.groomMarriedLastNameEng)
],
previewGroups: [groomNameInEnglish]
@@ -240,12 +240,8 @@ export const marriageForm: ISerializedForm = {
brideOrGroomAgeValidators
),
getNationality(certificateHandlebars.brideNationality, []), // Required field
- getNationalID(
- 'iD',
- [],
- getNationalIDValidators('bride'),
- certificateHandlebars.brideNID
- ),
+ getIDType('marriage', 'bride', [], true),
+ ...getIDNumberFields('bride', [], true),
getMarriedLastName(certificateHandlebars.brideMarriedLastNameEng)
],
previewGroups: [brideNameInEnglish]
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 65359e53c..97792ba75 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -272,3 +272,7 @@ export function createCustomFieldHandlebarName(fieldId: string) {
fieldIdNameArray[fieldIdNameArray.length - 1]
}`
}
+
+export function uppercaseFirstLetter(str: string) {
+ return str.charAt(0).toUpperCase() + str.slice(1)
+}
diff --git a/src/utils/mapping/field-mapping-utils.ts b/src/utils/mapping/field-mapping-utils.ts
index 8839d3bef..ef5f5823a 100644
--- a/src/utils/mapping/field-mapping-utils.ts
+++ b/src/utils/mapping/field-mapping-utils.ts
@@ -116,6 +116,13 @@ export function getFieldMapping(
operation: 'ignoreFieldTransformer'
}
}
+ case 'ageOfIndividualInYears':
+ return {
+ template: {
+ operation: 'plainInputTransformer',
+ fieldName: certificateHandlebar
+ }
+ }
case 'informantType':
return {
mutation: {