diff --git a/CHANGELOG.md b/CHANGELOG.md index 098549d6f..914379d2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ ### Breaking changes -- **Title** Description +- Existing implementations relying on database-stored SVGs need to be updated to use the new configuration-based approach. A migration needs to be run (defined in [migration](https://github.com/opencrvs/opencrvs-core/pull/7813/files#diff-e5472dec87399bb9f73f75ec379ceb6a32ca135bc01dd8d0eb8f7d7aaa0bc0b1)), and default certificate templates must be created for each event type, following the convention `${event}-certificate` as the certificate template ID. ### Improvements @@ -32,7 +32,7 @@ ### New features -- **Major new feature** Description +- **Refactored certificate handling:** SVGs are no longer stored in the database; streamlined configurations now include certificate details, and clients request SVGs directly via URLs. - Misc new feature - Add constant.humanName to allow coutries to have custom ordering on thier full name e.g start with `lastName` or `firstName` [#6830](https://github.com/opencrvs/opencrvs-core/issues/6830) diff --git a/infrastructure/monitoring/elastalert/rules/log-error-alert.yaml b/infrastructure/monitoring/elastalert/rules/log-error-alert.yaml new file mode 100644 index 000000000..fe10b84c8 --- /dev/null +++ b/infrastructure/monitoring/elastalert/rules/log-error-alert.yaml @@ -0,0 +1,38 @@ +# 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. +name: 'log-error-alert' +type: 'frequency' +index: 'kibana-alert-history-default' +is_enabled: true +num_events: 1 +realert: + minutes: 5 +terms_size: 50 +timeframe: + minutes: 5 +timestamp_field: '@timestamp' +timestamp_type: 'iso' +use_strftime_index: false +# https://github.com/Yelp/elastalert/issues/1260 +raw_count_keys: false +filter: + - bool: + should: + - term: + rule.name.keyword: + value: 'Error while backup ' + + +alert: post2 +http_post2_url: 'http://countryconfig:3040/email' +http_post2_payload: + subject: '{% raw %}{{DOMAIN}}{% endraw %}: {{rule.name}} 🚨' + html: 'Reason: {{kibana.alert.context.logs__alert__document__count.conditions}}. Login to https://kibana.{% raw %}{{DOMAIN}}{% endraw %} to view the alert.' + from: '{% raw %}{{SENDER_EMAIL_ADDRESS}}{% endraw %}' + to: '{% raw %}{{ALERT_EMAIL}}{% endraw %}' diff --git a/infrastructure/monitoring/kibana/config.ndjson b/infrastructure/monitoring/kibana/config.ndjson index f79787241..859588a23 100644 --- a/infrastructure/monitoring/kibana/config.ndjson +++ b/infrastructure/monitoring/kibana/config.ndjson @@ -1,6 +1,7 @@ {"attributes":{"actions":[{"actionRef":"preconfigured:preconfigured-alert-history-es-index","actionTypeId":".index","group":"metrics.inventory_threshold.fired","params":{"documents":["{\"@timestamp\":\"2024-08-06T07:57:35.644Z\",\"tags\":\"{{rule.tags}}\",\"rule\":{\"id\":\"{{rule.id}}\",\"name\":\"{{rule.name}}\",\"params\":{\"{{rule__type}}\":\"{{params}}\"},\"space\":\"{{rule.spaceId}}\",\"type\":\"{{rule.type}}\"},\"kibana\":{\"alert\":{\"id\":\"{{alert.id}}\",\"context\":{\"{{rule__type}}\":\"{{context}}\"},\"actionGroup\":\"{{alert.actionGroup}}\",\"actionGroupName\":\"{{alert.actionGroupName}}\"}},\"event\":{\"kind\":\"alert\"}}"]}}],"alertTypeId":"metrics.alert.inventory.threshold","apiKey":null,"apiKeyOwner":null,"consumer":"alerts","createdAt":"2023-11-17T12:01:46.420Z","createdBy":"elastic","enabled":false,"executionStatus":{"error":null,"lastExecutionDate":"2024-08-06T08:02:44.568Z","status":"pending"},"legacyId":null,"meta":{"versionApiKeyLastmodified":"7.17.18"},"muteAll":false,"mutedInstanceIds":[],"name":"Available disk space in root file system","notifyWhen":"onActionGroupChange","params":{"alertOnNoData":true,"criteria":[{"comparator":">=","customMetric":{"aggregation":"max","field":"system.filesystem.used.pct","id":"alert-custom-metric","type":"custom"},"metric":"custom","threshold":[0.7],"timeSize":1,"timeUnit":"h","warningComparator":">=","warningThreshold":[0.5]}],"filterQuery":"{\"bool\":{\"should\":[{\"match_phrase\":{\"system.filesystem.mount_point\":\"/hostfs\"}}],\"minimum_should_match\":1}}","filterQueryText":"system.filesystem.mount_point : \"/hostfs\"","nodeType":"host","sourceId":"default"},"schedule":{"interval":"1h"},"scheduledTaskId":null,"tags":["infra","opencrvs-builtin"],"throttle":null,"updatedAt":"2024-08-06T08:01:56.542Z","updatedBy":"elastic"},"coreMigrationVersion":"7.17.18","id":"14778650-8541-11ee-9002-2f37fdc4e5d5","migrationVersion":{"alert":"7.16.0"},"references":[],"sort":[1722931316554,643],"type":"alert","updated_at":"2024-08-06T08:01:56.554Z","version":"WzM5MywxXQ=="} {"attributes":{"actions":[{"actionRef":"preconfigured:preconfigured-alert-history-es-index","actionTypeId":".index","group":"threshold_met","params":{"documents":["{\"@timestamp\":\"2022-04-18T07:05:33.819Z\",\"tags\":\"{{rule.tags}}\",\"rule\":{\"id\":\"{{rule.id}}\",\"name\":\"{{rule.name}}\",\"params\":{\"{{rule__type}}\":\"{{params}}\"},\"space\":\"{{rule.spaceId}}\",\"type\":\"{{rule.type}}\"},\"kibana\":{\"alert\":{\"id\":\"{{alert.id}}\",\"context\":{\"{{rule__type}}\":\"{{context}}\"},\"actionGroup\":\"{{alert.actionGroup}}\",\"actionGroupName\":\"{{alert.actionGroupName}}\"}},\"event\":{\"kind\":\"alert\"}}"]}}],"alertTypeId":"apm.error_rate","apiKey":null,"apiKeyOwner":null,"consumer":"alerts","createdAt":"2022-06-01T11:30:27.033Z","createdBy":"opencrvs-admin","enabled":false,"executionStatus":{"error":null,"lastExecutionDate":"2024-02-07T08:28:08.400Z","status":"pending"},"legacyId":null,"meta":{"versionApiKeyLastmodified":"7.17.0"},"muteAll":false,"mutedInstanceIds":[],"name":"Error in service","notifyWhen":"onActionGroupChange","params":{"environment":"ENVIRONMENT_ALL","threshold":1,"windowSize":1,"windowUnit":"m"},"schedule":{"interval":"1m"},"scheduledTaskId":null,"tags":[],"throttle":null,"updatedAt":"2024-02-05T03:00:20.633Z","updatedBy":"opencrvs-admin"},"coreMigrationVersion":"7.17.0","id":"3b6722e0-e19e-11ec-ba8e-51649755648d","migrationVersion":{"alert":"7.16.0"},"references":[],"sort":[1707273006619,214975],"type":"alert","updated_at":"2024-02-07T02:30:06.619Z","version":"WzQ5MjAzNCwxOV0="} {"attributes":{"buildNum":46534,"defaultIndex":"metricbeat-*"},"coreMigrationVersion":"7.17.0","id":"7.17.0","migrationVersion":{"config":"7.13.0"},"references":[],"sort":[1707273006619,216009],"type":"config","updated_at":"2024-02-07T02:30:06.619Z","version":"WzQ5MjQyOCwxOV0="} +{"attributes":{"actions":[{"actionRef":"preconfigured:preconfigured-alert-history-es-index","actionTypeId":".index","frequency":{"notifyWhen":"onActionGroupChange","summary":false,"throttle":null},"group":"logs.threshold.fired","params":{"documents":["{\"@timestamp\":\"2024-12-23T09:50:26.528Z\",\"tags\":\"{{rule.tags}}\",\"rule\":{\"id\":\"{{rule.id}}\",\"name\":\"{{rule.name}}\",\"params\":{\"{{rule__type}}\":\"{{rule.params}}\"},\"space\":\"{{rule.spaceId}}\",\"type\":\"{{rule.type}}\"},\"kibana\":{\"alert\":{\"id\":\"{{alert.id}}\",\"context\":{\"{{rule__type}}\":\"{{context}}\"},\"actionGroup\":\"{{alert.actionGroup}}\",\"actionGroupName\":\"{{alert.actionGroupName}}\"}},\"event\":{\"kind\":\"alert\"}}"]},"uuid":"1504b514-82e5-47de-a6ef-60795788f7e6"}],"alertTypeId":"logs.alert.document.count","apiKey":null,"apiKeyCreatedByUser":null,"apiKeyOwner":null,"consumer":"alerts","createdAt":"2024-12-23T10:16:28.758Z","createdBy":"opencrvs-admin","enabled":false,"executionStatus":{"error":null,"lastExecutionDate":"2024-12-23T10:20:10.118Z","status":"pending","warning":null},"lastRun":{"alertsCount":{"active":1,"ignored":0,"new":1,"recovered":0},"outcome":"succeeded","outcomeMsg":null,"outcomeOrder":0,"warning":null},"legacyId":null,"meta":{"versionApiKeyLastmodified":"8.14.3"},"monitoring":{"run":{"calculated_metrics":{"p50":529,"p95":565,"p99":565,"success_ratio":1},"history":[{"duration":493,"success":true,"timestamp":1734948992101},{"duration":565,"success":true,"timestamp":1734949097318}],"last_run":{"metrics":{"duration":565,"gap_duration_s":null,"total_alerts_created":null,"total_alerts_detected":null,"total_indexing_duration_ms":null,"total_search_duration_ms":null},"timestamp":"2024-12-23T10:18:17.318Z"}}},"muteAll":false,"mutedInstanceIds":[],"name":"Error while backup ","nextRun":"2024-12-23T11:18:17.247Z","notifyWhen":null,"params":{"count":{"comparator":"more than or equals","value":1},"criteria":[{"comparator":"equals","field":"log.file.path","value":"/var/log/opencrvs-backup.error.log"}],"logView":{"logViewId":"log-view-reference-0","type":"log-view-reference"},"timeSize":1,"timeUnit":"h"},"revision":1,"running":false,"schedule":{"interval":"1h"},"scheduledTaskId":null,"snoozeSchedule":[],"tags":[],"throttle":null,"updatedAt":"2024-12-23T10:17:24.571Z","updatedBy":"opencrvs-admin"},"coreMigrationVersion":"8.8.0","created_at":"2024-12-23T10:17:24.572Z","id":"8caf3676-e78a-4e7c-ba85-c150df55901b","managed":false,"references":[{"id":"default","name":"param:log-view-reference-0","type":"infrastructure-monitoring-log-view"}],"sort":[1734949097887,115],"type":"alert","typeMigrationVersion":"10.1.0","updated_at":"2024-12-23T10:18:17.887Z","version":"WzgyNDExMyw0MDRd"} {"attributes":{"actions":[{"actionRef":"preconfigured:preconfigured-alert-history-es-index","actionTypeId":".index","group":"logs.threshold.fired","params":{"documents":["{\"@timestamp\":\"2023-11-22T08:25:47.329Z\",\"tags\":\"{{rule.tags}}\",\"rule\":{\"id\":\"{{rule.id}}\",\"name\":\"{{rule.name}}\",\"params\":{\"{{rule__type}}\":\"{{params}}\"},\"space\":\"{{rule.spaceId}}\",\"type\":\"{{rule.type}}\"},\"kibana\":{\"alert\":{\"id\":\"{{alert.id}}\",\"context\":{\"{{rule__type}}\":\"{{context}}\"},\"actionGroup\":\"{{alert.actionGroup}}\",\"actionGroupName\":\"{{alert.actionGroupName}}\"}},\"event\":{\"kind\":\"alert\"}}"]}}],"alertTypeId":"logs.alert.document.count","apiKey":null,"apiKeyOwner":null,"consumer":"alerts","createdAt":"2023-11-22T08:32:38.272Z","createdBy":"elastic","enabled":false,"executionStatus":{"error":null,"lastExecutionDate":"2024-02-07T08:28:08.400Z","status":"pending"},"legacyId":null,"meta":{"versionApiKeyLastmodified":"7.17.0"},"muteAll":false,"mutedInstanceIds":[],"name":"Error in backup logs","notifyWhen":"onActionGroupChange","params":{"count":{"comparator":"more than or equals","value":1},"criteria":[{"comparator":"matches","field":"message","value":"error"},{"comparator":"equals","field":"log.file.path","value":"/var/log/opencrvs-backup.log"}],"timeSize":1,"timeUnit":"h"},"schedule":{"interval":"1h"},"scheduledTaskId":null,"tags":[],"throttle":null,"updatedAt":"2024-02-07T02:27:22.558Z","updatedBy":"elastic"},"coreMigrationVersion":"7.17.0","id":"b166fcb0-8911-11ee-8111-2f3be9e93efc","migrationVersion":{"alert":"7.16.0"},"references":[],"sort":[1707294436464,232766],"type":"alert","updated_at":"2024-02-07T08:27:16.464Z","version":"WzQ5NTQzNCwxOV0="} {"attributes":{"anomalyThreshold":50,"description":"","fields":{"container":"container.id","host":"host.name","message":["message","@message"],"pod":"kubernetes.pod.uid","tiebreaker":"_doc","timestamp":"@timestamp"},"inventoryDefaultView":"0","logColumns":[{"timestampColumn":{"id":"5e7f964a-be8a-40d8-88d2-fbcfbdca0e2f"}},{"fieldColumn":{"field":"event.dataset","id":" eb9777a8-fcd3-420e-ba7d-172fff6da7a2"}},{"messageColumn":{"id":"b645d6da-824b-4723-9a2a-e8cece1645c0"}}],"logIndices":{"indexName":"logs-*,filebeat-*,kibana_sample_data_logs*,logstash*,ecs-logstash*","type":"index_name"},"metricAlias":"metrics-*,metricbeat-*","metricsExplorerDefaultView":"0","name":"Default"},"coreMigrationVersion":"7.17.0","id":"default","migrationVersion":{"infrastructure-ui-source":"7.16.2"},"references":[],"sort":[1707273006619,217714],"type":"infrastructure-ui-source","updated_at":"2024-02-07T02:30:06.619Z","version":"WzQ5MzAyNywxOV0="} {"attributes":{"actions":[{"actionRef":"preconfigured:preconfigured-alert-history-es-index","actionTypeId":".index","group":"query matched","params":{"documents":["{\"@timestamp\":\"2023-11-20T10:19:30.521Z\",\"tags\":\"{{rule.tags}}\",\"rule\":{\"id\":\"{{rule.id}}\",\"name\":\"{{rule.name}}\",\"params\":{\"{{rule__type}}\":\"{{params}}\"},\"space\":\"{{rule.spaceId}}\",\"type\":\"{{rule.type}}\"},\"kibana\":{\"alert\":{\"id\":\"{{alert.id}}\",\"context\":{\"{{rule__type}}\":\"{{context}}\"},\"actionGroup\":\"{{alert.actionGroup}}\",\"actionGroupName\":\"{{alert.actionGroupName}}\"}},\"event\":{\"kind\":\"alert\"}}"]}}],"alertTypeId":".es-query","apiKey":null,"apiKeyOwner":null,"consumer":"alerts","createdAt":"2023-11-20T09:12:19.237Z","createdBy":"elastic","enabled":false,"executionStatus":{"error":null,"lastExecutionDate":"2024-02-07T08:28:08.400Z","status":"pending"},"legacyId":null,"meta":{"versionApiKeyLastmodified":"7.17.0"},"muteAll":false,"mutedInstanceIds":[],"name":"Successful SSH login","notifyWhen":"onActionGroupChange","params":{"esQuery":"{ \"query\": { \"bool\": { \"must\": [ \n { \"term\": { \"log.file.path\": \"/var/log/auth.log\" } },\n { \"term\": { \"event.outcome\": \"success\" }}\n ] } } }","index":["filebeat-*"],"size":100,"threshold":[1],"thresholdComparator":">=","timeField":"@timestamp","timeWindowSize":1,"timeWindowUnit":"m"},"schedule":{"interval":"1m"},"scheduledTaskId":null,"tags":[],"throttle":null,"updatedAt":"2024-02-07T02:27:19.537Z","updatedBy":"elastic"},"coreMigrationVersion":"7.17.0","id":"e79aaa90-8784-11ee-b9ba-89bbe73df7ff","migrationVersion":{"alert":"7.16.0"},"references":[],"sort":[1707294457367,232778],"type":"alert","updated_at":"2024-02-07T08:27:37.367Z","version":"WzQ5NTQ0MCwxOV0="} diff --git a/infrastructure/server-setup/tasks/backups/crontab.yml b/infrastructure/server-setup/tasks/backups/crontab.yml index 52228dee6..affa17644 100644 --- a/infrastructure/server-setup/tasks/backups/crontab.yml +++ b/infrastructure/server-setup/tasks/backups/crontab.yml @@ -44,7 +44,7 @@ name: 'download opencrvs backup' minute: '30' hour: '0' - job: 'cd / && bash /opt/opencrvs/infrastructure/backups/download.sh --passphrase={{ backup_restore_encryption_passphrase }} --ssh_user={{ backup_server_user }} --ssh_host={{ backup_hostname }} --ssh_port={{ backup_port }} --remote_dir={{ backup_server_remote_source_directory }} >> /var/log/opencrvs-restore.log 2>&1' + job: 'bash /opt/opencrvs/infrastructure/backups/download.sh --passphrase={{ backup_restore_encryption_passphrase }} --ssh_user={{ backup_server_user }} --ssh_host={{ backup_hostname }} --ssh_port={{ backup_port }} --remote_dir={{ backup_server_remote_source_directory }} >> /var/log/opencrvs-restore.log 2>&1' state: "{{ 'present' if (backup_hostname is defined and backup_restore_encryption_passphrase and periodic_restore_from_backup) else 'absent' }}" - name: 'Setup crontab to restore the opencrvs data' @@ -54,5 +54,5 @@ name: 'restore opencrvs' minute: '0' hour: '1' - job: 'cd / && bash /opt/opencrvs/infrastructure/backups/restore.sh --replicas=1 >> /var/log/opencrvs-restore.log 2>&1' + job: 'bash /opt/opencrvs/infrastructure/backups/restore.sh --replicas=1 >> /var/log/opencrvs-restore.log 2>&1' state: "{{ 'present' if (backup_hostname is defined and backup_restore_encryption_passphrase and periodic_restore_from_backup) else 'absent' }}" diff --git a/src/api/certificate-configuration/handler.ts b/src/api/certificate-configuration/handler.ts deleted file mode 100644 index 26faf7e74..000000000 --- a/src/api/certificate-configuration/handler.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 { COUNTRY_CONFIG_URL } from '@countryconfig/constants' - -type FontFamilyTypes = { - normal: string - bold: string - italics: string - bolditalics: string -} - -type Configuration = Partial<{ - fonts: Record -}> - -export function certificateConfigurationHandler(): Configuration { - return { - fonts: { - ['Noto Sans']: { - normal: `${COUNTRY_CONFIG_URL}/fonts/NotoSans-Regular.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/certificates/handler.ts b/src/api/certificates/handler.ts index 658e04eb6..4a5f0b2e3 100644 --- a/src/api/certificates/handler.ts +++ b/src/api/certificates/handler.ts @@ -10,11 +10,185 @@ */ import { Request, ResponseToolkit } from '@hapi/hapi' -import { readFileSync } from 'fs' +import { Event } from '../../form/types/types' + +type FontFamilyTypes = { + normal: string + bold: string + italics: string + bolditalics: string +} +export interface ICertificateConfigData { + id: string + event: Event + label: { + id: string + defaultMessage: string + description: string + } + isDefault: boolean + fee: { + onTime: number + late: number + delayed: number + } + svgUrl: string + fonts?: Record +} export async function certificateHandler(request: Request, h: ResponseToolkit) { - const res = readFileSync( - `./src/api/certificates/source/Farajaland-${request.params.event}-certificate-v2.svg` - ).toString() - return h.response(res).code(200) + if (request.params.id) { + const filePath = `${__dirname}/source/${request.params.id}` + return h.file(filePath) + } + const certificateConfigs: ICertificateConfigData[] = [ + { + id: 'birth-certificate', + event: Event.Birth, + label: { + id: 'certificates.birth.certificate', + defaultMessage: 'Birth Certificate', + description: 'The label for a birth certificate' + }, + isDefault: true, + fee: { + onTime: 5, + late: 7, + delayed: 15 + }, + svgUrl: '/api/countryconfig/certificates/birth-certificate.svg', + fonts: { + 'Libre Baskerville': { + normal: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf', + bold: '/api/countryconfig/fonts/LibreBaskerville-Bold.ttf', + italics: '/api/countryconfig/fonts/LibreBaskerville-Italic.ttf', + bolditalics: '/api/countryconfig/fonts/LibreBaskerville-Regular.ttf' + } + } + }, + { + id: 'birth-certificate-certified-copy', + event: Event.Birth, + label: { + id: 'certificates.birth.certificate.copy', + defaultMessage: 'Birth Certificate certified copy', + description: 'The label for a birth certificate' + }, + isDefault: false, + fee: { + onTime: 8, + late: 11.5, + delayed: 17 + }, + svgUrl: + '/api/countryconfig/certificates/birth-certificate-certified-copy.svg', + fonts: { + 'Noto Sans': { + normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf', + italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf' + } + } + }, + { + id: 'death-certificate', + event: 'death' as Event.Death, + label: { + id: 'certificates.death.certificate', + defaultMessage: 'Death Certificate', + description: 'The label for a death certificate' + }, + isDefault: true, + fee: { + onTime: 3, + late: 5.7, + delayed: 12 + }, + svgUrl: '/api/countryconfig/certificates/death-certificate.svg', + fonts: { + 'Noto Sans': { + normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf', + italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf' + } + } + }, + { + id: 'death-certificate-certified-copy', + event: 'death' as Event.Death, + label: { + id: 'certificates.death.certificate.copy', + defaultMessage: 'Death Certificate certified copy', + description: 'The label for a death certificate' + }, + isDefault: false, + fee: { + onTime: 6, + late: 9, + delayed: 14.5 + }, + svgUrl: + '/api/countryconfig/certificates/death-certificate-certified-copy.svg', + fonts: { + 'Noto Sans': { + normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf', + italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf' + } + } + }, + { + id: 'marriage-certificate', + event: 'marriage' as Event.Marriage, + label: { + id: 'certificates.marriage.certificate', + defaultMessage: 'Marriage Certificate', + description: 'The label for a marriage certificate' + }, + isDefault: true, + fee: { + onTime: 4.4, + late: 6, + delayed: 13.5 + }, + svgUrl: '/api/countryconfig/certificates/marriage-certificate.svg', + fonts: { + 'Noto Sans': { + normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf', + italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf' + } + } + }, + { + id: 'marriage-certificate-certified-copy', + event: 'marriage' as Event.Marriage, + label: { + id: 'certificates.marriage.certificate.copy', + defaultMessage: 'Marriage Certificate certified copy', + description: 'The label for a marriage certificate' + }, + isDefault: false, + fee: { + onTime: 7, + late: 10.6, + delayed: 18 + }, + svgUrl: + '/api/countryconfig/certificates/marriage-certificate-certified-copy.svg', + fonts: { + 'Noto Sans': { + normal: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bold: '/api/countryconfig/fonts/NotoSans-Bold.ttf', + italics: '/api/countryconfig/fonts/NotoSans-Regular.ttf', + bolditalics: '/api/countryconfig/fonts/NotoSans-Regular.ttf' + } + } + } + ] + return certificateConfigs } diff --git a/src/api/certificates/source/Farajaland-birth-certificate-v2.svg b/src/api/certificates/source/Farajaland-birth-certificate-v2.svg deleted file mode 100644 index 6910fa727..000000000 --- a/src/api/certificates/source/Farajaland-birth-certificate-v2.svg +++ /dev/null @@ -1,165 +0,0 @@ - - - -{{#ifCond printInAdvance '!==' true}}{{/ifCond}} - -CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES A LA FALSIFIATION OU À LA MODIFICATION D'UN CERTIFICAT ET A L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITE - - - - - - - - - - - - - - - - - -FARAJALAND - - -{{certificateDate}} -Date of certification / Date de délivrance -{{location loggedInUser.officeId 'name'}}
{{location loggedInUser.districtId 'name'}}, {{location loggedInUser.stateId 'name'}}, Farajaland - -Place of certification / Lieu de délivrance - - - - - - -Registrar / L'Officier de l'État Civil -{{registrar.name}} -I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in pursuance of civil registration law / Je certifie que le présent certificat est une copie conforme du registre d'état civil et qu'il est délivré par l'autorité mandatée conformément à la loi sur l'état civil. - -REPUBLIC OF FARAJALAND / REPUBLIQUE DE FARAJALAND -CERTIFICATE OF BIRTH / ACTE DE NAISSANCE - -1. -Child’s full name /
Nom complet de l'enfant - -{{childFirstName}} {{childFamilyName}} - - -2. - /
Sexe -Sex - -{{childGender}} - - -3. - /
 -Date of birthDate de naissance - -{{eventDate}} - - -4. - /
 -Place of birthLieu de naissance - - - - {{#ifCond placeOfBirthFacility '===' undefined }} - {{location districtPlaceofbirthId 'name'}}{{internationalDistrictPlaceofbirth}}, - {{location statePlaceofbirthId 'name'}}{{internationalStatePlaceofbirth}}, {{countryPlaceofbirth}} - {{else}} - {{placeOfBirthFacility}} {{placeOfBirthState}}, {{placeOfBirthCountry}} - {{/ifCond}} - - - - -5. - /
 -Mother’s full nameNom complet de la mère - -{{motherFirstName}} {{motherFamilyName}} - - -6. -/
N -Father’s full name om complet du père - -{{fatherFirstName}} {{fatherFamilyName}} - - - -8. -Lieu d'enregistrement - -Place of registration / - -{{location registrar.officeId 'name'}}
{{location registrar.districtId 'name'}}, {{location registrar.stateId 'name'}}, Farajaland - - -9. - -Date of registration / -Date d'enregistrement - -{{registrationDate}} - - -10. -/
 -Registered by Enregistré par - -{{registrar.name}} - - - - -No. {{registrationNumber}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/api/certificates/source/Farajaland-death-certificate-v2.svg b/src/api/certificates/source/Farajaland-death-certificate-v2.svg deleted file mode 100644 index 994b425a3..000000000 --- a/src/api/certificates/source/Farajaland-death-certificate-v2.svg +++ /dev/null @@ -1,153 +0,0 @@ - - - -{{#ifCond printInAdvance '!==' true}}{{/ifCond}} - -CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES A LA FALSIFIATION OU À LA MODIFICATION D'UN CERTIFICAT ET A L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITE - - -{{certificateDate}} -Date of certification / Date de délivrance -{{location loggedInUser.officeId 'name'}}{{location loggedInUser.districtId 'name'}}, {{location loggedInUser.stateId 'name'}}, Farajaland -Place of certification / Lieu de certification - -Registrar / L'Officier de l'État Civil -{{registrar.name}} -I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in pursuance of civil registration law / Je certifie que le présent certificat est une copie conforme du registre d'état civil et qu'il est délivré par l'autorité mandatée conformément à la loi sur l'état civil. - -1. -Deceased full name /
Nom complet du défunt - -{{deceasedFirstName}} {{deceasedFamilyName}} - - -2. - /
Sexe -Sex - -{{deceasedGender}} - - -3. - /
 -Date of birthDate de naissance - - {{#ifCond ageOfDeceasedInYears '===' undefined }} - {{deceasedBirthDate}} - {{else}} - {{ageOfDeceasedInYears}} years old - {{/ifCond}} - - - -5. - /
 -Date of deathDate de deces - -{{eventDate}} - - -4. - /
 -Place of deathLieu de naissance - - - {{#ifCond placeOfDeathFacility '===' undefined }} - {{location districtPlaceofdeathId 'name'}}{{internationalDistrictPlaceofdeath}}, - {{location statePlaceofdeathId 'name'}}{{internationalStatePlaceofdeath}}, {{countryPlaceofdeath}} - {{else}} - {{placeOfDeathFacility}} {{placeOfDeathState}}, {{placeOfDeathCountry}} - {{/ifCond}} - - - - - - -5. -Lieu d'enregistrement - -Place of registration / - -{{location registrar.officeId 'name'}}
{{location registrar.districtId 'name'}}, {{location registrar.stateId 'name'}}, Farajaland - - -6. - -Date of registration / -Date d'enregistrement - -{{registrationDate}} - - -7. -/
 -Registered by Enregistré par - -{{registrar.name}} - - - - -No. {{registrationNumber}} - - - - - - - - - - - - - - - - - -FARAJALAND - - -REPUBLIC OF FARAJALAND / REPUBLIQUE DE FARAJALAND -CERTIFICATE OF DEATH / ACTE DE DEATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/api/certificates/source/Farajaland-marriage-certificate-v2.svg b/src/api/certificates/source/Farajaland-marriage-certificate-v2.svg deleted file mode 100644 index 7bd68e87b..000000000 --- a/src/api/certificates/source/Farajaland-marriage-certificate-v2.svg +++ /dev/null @@ -1,165 +0,0 @@ - - - - - -{{#ifCond printInAdvance '!==' true}}{{/ifCond}} - -CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES A LA FALSIFIATION OU À LA MODIFICATION D'UN CERTIFICAT ET A L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITE - - - - - - - - - - - - - - - - - -FARAJALAND - -{{certificateDate}} -Date of certification / Date de délivrance -{{location loggedInUser.officeId 'name'}}{{location loggedInUser.districtId 'name'}}, {{location loggedInUser.stateId 'name'}}, Farajaland -Place of certification / Lieu de certification - -Registrar / L'Officier de l'État Civil -{{registrar.name}} -I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in pursuance of civil registration law / Je certifie que le présent certificat est une copie conforme du registre d'état civil et qu'il est délivré par l'autorité mandatée conformément à la loi sur l'état civil. - -REPUBLIC OF FARAJALAND / REPUBLIQUE DE FARAJALAND -CERTIFICATE OF MARRIAGE / ACTE DE MARRIAGE - -1. -Groom’s full name /
Nom complet du marié - -{{groomFirstName}} {{groomFamilyName}} - - -2. -Bride’s full name /
Nom complet de la mariée - -{{brideFirstName}} {{brideFamilyName}} - - -3. - /
 -Date of marriageDate du mariage - -{{eventDate}} - - -4. - /
 -Place of marriageLieu de mariage - - - {{location districtPlaceofmarriageId 'name'}}{{internationalDistrictPlaceofmarriage}}, - {{location statePlaceofmarriageId 'name'}}{{internationalStatePlaceofmarriage}}, {{countryPlaceofmarriage}} - - - - -5. -Witnesses / Les témoins - -{{witnessOneFirstName}} {{witnessOneFamilyName}}
{{witnessTwoFirstName}} {{witnessTwoFamilyName}} - - - -6. -Lieu d'enregistrement - -Place of registration / - -{{location registrar.officeId 'name'}}
{{location registrar.districtId 'name'}}, {{location registrar.stateId 'name'}}, Farajaland - - -7. - -Date of registration / -Date d'enregistrement - -{{registrationDate}} - - -8. -/
 -Registered by Enregistré par - -{{registrar.name}} - - - -9. -Signatures of bride and groom / Signatures des mariés - -Groom / Marié - -Bride / Mariée - - - - -No. {{registrationNumber}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{{#ifCond printInAdvance '!==' true}}{{/ifCond}} - - - - diff --git a/src/api/certificates/source/birth-certificate-certified-copy.svg b/src/api/certificates/source/birth-certificate-certified-copy.svg new file mode 100644 index 000000000..a279fbb87 --- /dev/null +++ b/src/api/certificates/source/birth-certificate-certified-copy.svg @@ -0,0 +1,387 @@ + + + + + {{ordinalFormatDate registrar.date}} + + + Date of certification / Date de certification + + + + {{location registrar.officeId 'name'}}, {{location registrar.districtId 'name'}}, {{location registrar.stateId 'name'}}, Farajaland + + + Place of certification / Lieu de certification + + + 12345678912345678912345678900 + + + MOSIP Application ID / MOSIP Application ID + + + + Certified by: {{registrar.name}} + + + + CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE. A + CERTIFICATE IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES À LA FALSIFIATION OU À LA MODIFICATION + D'UN CERTIFICAT ET À L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITÉ + + + + + I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in pursuance + of civil registration and vital statistics law / J’attestation est une copie conforme de l'état civil et est délivré par + l'autorité mandatée conformément à la loi sur l'enregistrement et les statistiques de l'état civil + + + + + No. {{registrationNumber}} + + + + + + + + + + + + + + + + + + + + FARAJALAND + + + REPUBLIC OF FARAJALAND / REPUBLIC OF FARAJALAND + + + CERTIFIED COPY OF BIRTH RECORD / COPIE CERTIFIÉE DE L'ACTE DE NAISSANCE + + + + Child’s details / Détails de l'enfant + + + + 1. + + + Full name / Nom et prénom + + + + {{ childFirstName }} {{ childFamilyName }} + + + + + 2. + + + Sex / Sexe + + + + {{ childGender }} + + + + + 3. + + + Date of birth / Date de naissance + + + + {{ eventDate }} + + + + + 4. + + + Place of birth / Lieu de naissance + + + + {{#ifCond placeOfBirthFacility '===' undefined }} + {{location districtPlaceofbirthId 'name'}}{{internationalDistrictPlaceofbirth}}, + {{location statePlaceofbirthId 'name'}}{{internationalStatePlaceofbirth}}, {{countryPlaceofbirth}} + {{else}} + {{ placeOfBirthFacility }} + {{ placeOfBirthDistrict }}, {{ placeOfBirthState }}, {{ placeOfBirthCountry }} + {{/ifCond}} + + + + + Mother’s details / Détails de la mère + + + 5. + + + Full name / Nom complet + + + + {{ motherFirstName }} {{ motherFamilyName }} + + + + + 6. + + + Date of birth / Date de naissance + + + + {{#ifCond ageOfMotherInYears '===' undefined }} + {{motherBirthDate}} + {{else}} + {{ageOfMotherInYears}} years old + {{/ifCond}} + + + + + 7. + + + Resident at / Domicilié à + + + + {{#ifCond motherFirstName '!==' undefined }} + {{ districtPrimaryMother }}{{ internationalDistrictPrimaryMother }}, {{ statePrimaryMother }}{{ internationalStatePrimaryMother }}, {{ countryPrimaryMother }} + {{/ifCond}} + + + + + 8. + + + Nationality / Nationalité + + + + {{intl 'nationality' motherNationality}} + + + + + 9. + + + Occupation / Profession + + + + {{motherOccupation}} + + + + + Father’s details / Détails du père + + + 10. + + + Full name / Nom complet + + + + {{fatherFirstName}} {{fatherFamilyName}} + + + + + 11. + + + Date of birth / Date de naissance + + + + {{#ifCond ageOfFatherInYears '===' undefined }} + {{fatherBirthDate}} + {{else}} + {{ageOfFatherInYears}} years old + {{/ifCond}} + + + + + 12. + + + Resident at / Domicilié à + + + + {{#ifCond fatherFirstName '!==' undefined }} + {{ districtPrimaryFather }}{{ internationalDistrictPrimaryFather }}, {{ statePrimaryFather }}{{ internationalStatePrimaryFather }}, {{ countryPrimaryFather }} + {{/ifCond}} + + + + + 13. + + + Nationality / Nationalité + + + + {{intl 'nationality' fatherNationality}} + + + + + 14. + + + Occupation / Profession + + + + {{fatherOccupation}} + + + + + Registration details / Détails d'inscription + + + 15. + + + Informant full name / Informant full name + + + + {{informantFirstName}} {{informantFamilyName}} + {{getCamelCasedInformantType informantType otherInformantType}} + + + + + 16. + + + Place of registration / Inscrit à + + + + {{ registrar.district.name }}, {{ registrar.state.name }}, {{ registrar.country }} + + + + + + 17. + + + Date of registration / Date d'enregistrement + + + + {{{ ordinalFormatDate registrar.date }}} + + + + + 18. + + + Registered by / Enregistré par + + + + {{ registrar.name }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{#ifCond printInAdvance '!==' true}} + + {{/ifCond}} + \ No newline at end of file diff --git a/src/api/certificates/source/birth-certificate.svg b/src/api/certificates/source/birth-certificate.svg new file mode 100644 index 000000000..506461702 --- /dev/null +++ b/src/api/certificates/source/birth-certificate.svg @@ -0,0 +1,294 @@ + + + + + CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE + IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES A LA FALSIFIATION OU À LA MODIFICATION D'UN + CERTIFICAT ET A L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITE + + + + + + + + + + + + + + + + + + + + FARAJALAND + + + + + + + + + {{certificateDate}} + + + Date of certification / Date de délivrance + + + {{location loggedInUser.officeId 'name'}}
 + {{location loggedInUser.districtId 'name'}}, {{location loggedInUser.stateId 'name'}}, Farajaland + + + + + + Place of certification / Lieu de délivrance + + + {{mosipAid}} + + + {{#ifCond mosipAid '===' undefined }} + + {{else}} + {{mosipAIDLabel}} + {{/ifCond}} + + + + + + + + Registrar / L'Officier de l'État Civil + + + {{registrar.name}} + + + I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in pursuance + of civil registration law / Je certifie que le présent certificat est une copie conforme du registre d'état civil et qu'il + est délivré par l'autorité mandatée conformément à la loi sur l'état civil. + + + + + + REPUBLIC OF FARAJALAND / REPUBLIQUE DE FARAJALAND + + + CERTIFICATE OF BIRTH / ACTE DE NAISSANCE + + + + 1. + + + Child’s full name /
 + Nom complet de l'enfant + + + + {{childFirstName}} {{childFamilyName}} + + + + + 2. + + + /
 + Sexe + + + Sex + + + + {{childGender}} + + + + + 3. + + + /
 + + + Date of birth + Date de naissance + + + + {{eventDate}} + + + + + 4. + + + /
 + + + Place of birth + Lieu de naissance + + + + {{#ifCond placeOfBirthFacility '===' undefined }} + {{location districtPlaceofbirthId 'name'}}{{internationalDistrictPlaceofbirth}}, + {{location statePlaceofbirthId 'name'}}{{internationalStatePlaceofbirth}}, {{countryPlaceofbirth}} + {{else}} + {{placeOfBirthFacility}} + {{ placeOfBirthDistrict }}, {{placeOfBirthState}}, {{placeOfBirthCountry}} + {{/ifCond}} + + + + + 5. + + + /
 + + + Mother’s full name + Nom complet de la mère + + + + {{motherFirstName}} {{motherFamilyName}} + + + + + 6. + + + /
 + N + + + Father’s full name + om complet du père + + + + {{fatherFirstName}} {{fatherFamilyName}} + + + + + + 8. + + + Lieu d'enregistrement + + + + + + Place of registration / + + + + {{location registrar.officeId 'name'}}
 + {{location registrar.districtId 'name'}}, {{location registrar.stateId 'name'}}, Farajaland + + + + + 9. + + + + + + Date of registration / + + + Date d'enregistrement + + + + {{registrationDate}} + + + + + 10. + + + /
 + + + Registered by + Enregistré par + + + + {{registrar.name}} + + + + + + + No. {{registrationNumber}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{#ifCond printInAdvance '!==' true}} + + {{/ifCond}} + \ No newline at end of file diff --git a/src/api/certificates/source/death-certificate-certified-copy.svg b/src/api/certificates/source/death-certificate-certified-copy.svg new file mode 100644 index 000000000..804ee925e --- /dev/null +++ b/src/api/certificates/source/death-certificate-certified-copy.svg @@ -0,0 +1,286 @@ + + + + + {{certificateDate}} + + + Date of certification / Date de certification + + + + {{location registrar.officeId 'name'}}, {{location registrar.districtId 'name'}}, {{location registrar.stateId 'name'}}, Farajaland + + + Place of certification / Lieu de certification + + + 12345678912345678912345678900 + + + MOSIP Application ID / MOSIP Application ID + + + + Registrar {{registrar.name}} + + + I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in + pursuance of civil registration and vital statistics law / J’attestation est une copie conforme de l'état civil. et est + délivré par l'autorité mandatée conformément à la loi sur l'enregistrement et les statistiques de l'état civil + + + + + No. {{registrationNumber}} + + + + + Deceased details / Deceased details + + + + 1. + + + Full name / Nom et prénom + + + + {{ deceasedFirstName }} {{ deceasedFamilyName }} + + + + + 2. + + + Date of birth / Date de naissance + + + + {{deceasedBirthDate}} + + + + + 3. + + + Resident at / Domicilié à + + + + {{ districtPrimaryDeceased }}{{ internationalDistrictPrimaryDeceased }}, {{ statePrimaryDeceased }}{{ internationalStatePrimaryDeceased }}, {{ countryPrimaryDeceased }} + + + + + 4. + + + Marital status / Marital status + + + + {{deceasedMaritalStatus}} + + + + + + 5. + + + Nationality / Nationalité + + + + {{intl 'nationality' deceasedNationality}} + + + + + Event details / Dtails de l'événement + + + 6. + + + Date of death / Date de décès + + + + + {{eventDate}} + + + + + + 7. + + + Place of death / Lieu de décès + + + + {{#ifCond placeOfDeathFacility '===' undefined }} + {{location districtPlaceofdeathId 'name'}}{{internationalDistrictPlaceofdeath}}, + {{location statePlaceofdeathId 'name'}}{{internationalStatePlaceofdeath}}, {{countryPlaceofdeath}} + {{else}} + {{placeOfDeathFacility}} + {{placeOfDeathDistrict}}, {{placeOfDeathState}}, {{placeOfDeathCountry}} + {{/ifCond}} + + + + + 8. + + + Manner of death / Mode de décès + + + + {{mannerOfDeath}} + + + + + Registration details / Détails d'inscription + + + 9. + + + Informant full name / Nom complet de l’informateur + + + + {{informantFirstName}} {{informantFamilyName}} + {{getCamelCasedInformantType informantType otherInformantType}} + + + + + + 10. + + + Place of registration / Inscrit à + + + + {{registrar.district.name}}, {{registrar.state.name}}, {{registrar.country}} + + + + + + 11. + + + Date of registration / Date d'enregistrement + + + + {{ ordinalFormatDate registrar.date }} + + + + + 12. + + + Registered by / Enregistré par + + + + {{ registrar.name }} + + + + + + + + + + + + + + + + + + + FARAJALAND + + + REPUBLIC OF FARAJALAND / REPUBLIC OF FARAJALAND + + + CERTIFIED COPY OF DEATH RECORD / COPIE CERTIFIÉE DE L'ACTE DE DÉCÈS + + + + + CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE. A + CERTIFICATE IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES À LA FALSIFIATION OU À LA MODIFICATION + D'UN CERTIFICAT ET À L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITÉ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{#ifCond printInAdvance '!==' true}} + + {{/ifCond}} + \ No newline at end of file diff --git a/src/api/certificates/source/death-certificate.svg b/src/api/certificates/source/death-certificate.svg new file mode 100644 index 000000000..c489f10db --- /dev/null +++ b/src/api/certificates/source/death-certificate.svg @@ -0,0 +1,260 @@ + + + + + CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE + IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES A LA FALSIFIATION OU À LA MODIFICATION D'UN + CERTIFICAT ET A L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITE + + + + + + {{certificateDate}} + + + Date of certification / Date de délivrance + + + + {{location loggedInUser.officeId 'name'}} + {{location loggedInUser.districtId 'name'}}, {{location loggedInUser.stateId 'name'}}, Farajaland + + + Place of certification / Lieu de certification + + + + Registrar / L'Officier de l'État Civil + + + {{registrar.name}} + + + I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in pursuance + of civil registration law / Je certifie que le présent certificat est une copie conforme du registre d'état civil et qu'il + est délivré par l'autorité mandatée conformément à la loi sur l'état civil. + + + + 1. + + + Deceased full name /
 + Nom complet du défunt + + + + {{deceasedFirstName}} {{deceasedFamilyName}} + + + + + 2. + + + /
 + Sexe + + + Sex + + + + {{deceasedGender}} + + + + + 3. + + + /
 + + + Date of birth + Date de naissance + + + + {{deceasedBirthDate}} + + + + + + + + + 5. + + + /
 + + + Date of death + Date de deces + + + + {{eventDate}} + + + + + 4. + + + /
 + + + Place of death + Lieu de naissance + + + + {{#ifCond placeOfDeathFacility '===' undefined }} + {{location districtPlaceofdeathId 'name'}}{{internationalDistrictPlaceofdeath}}, + {{location statePlaceofdeathId 'name'}}{{internationalStatePlaceofdeath}}, {{countryPlaceofdeath}} + {{else}} + {{placeOfDeathFacility}} + {{placeOfDeathDistrict}}, {{placeOfDeathState}}, {{placeOfDeathCountry}} + {{/ifCond}} + + + + + + + + 5. + + + Lieu d'enregistrement + + + + + + Place of registration / + + + + {{location registrar.officeId 'name'}}
 + {{location registrar.districtId 'name'}}, {{location registrar.stateId 'name'}}, Farajaland + + + + + 6. + + + + + + Date of registration / + + + Date d'enregistrement + + + + {{registrationDate}} + + + + + 7. + + + /
 + + + Registered by + Enregistré par + + + + {{registrar.name}} + + + + + + + No. {{registrationNumber}} + + + + + + + + + + + + + + + + + + + + FARAJALAND + + + + + + + REPUBLIC OF FARAJALAND / REPUBLIQUE DE FARAJALAND + + + CERTIFICATE OF DEATH / ACTE DE DEATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{#ifCond printInAdvance '!==' true}} + + {{/ifCond}} + \ No newline at end of file diff --git a/src/api/certificates/source/marriage-certificate-certified-copy.svg b/src/api/certificates/source/marriage-certificate-certified-copy.svg new file mode 100644 index 000000000..174336193 --- /dev/null +++ b/src/api/certificates/source/marriage-certificate-certified-copy.svg @@ -0,0 +1,381 @@ + + + + + {{ordinalFormatDate registrar.date}} + + + Date of certification / Date de certification + + + + {{registrar.office.name}}, {{registrar.state.name}}, {{registrar.country}} + + + Place of certification / Lieu de certification + + + + Registrar {{registrar.name}} + + + + + + No. {{registrationNumber}} + + + + I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in + pursuance of civil registration and vital statistics law / J’attestation est une copie conforme de l'état civil. et est + délivré par l'autorité mandatée conformément à la loi sur l'enregistrement et les statistiques de l'état civil + + + + + Groom’s details / Groom’s details + + + + 1. + + + Full name / Nom et prénom + + + + {{groomFirstName}} {{groomFamilyName}} + + + + + 2. + + + Last name at birth + + + {{groomMarriedLastNameEng}} + + + + 2. + + + Date of birth / Date de naissance + + + + {{#ifCond ageOfGroomInYears '===' undefined }} + {{groomBirthDate}} + {{else}} + {{ageOfGroomInYears}} years old + {{/ifCond}} + + + + + + 4. + + + Resident at / Domicilié à + + + + {{districtPrimaryGroom}}{{internationalDistrictPrimaryGroom}}, {{statePrimaryGroom}}{{internationalStatePrimaryGroom}}, {{countryPrimaryGroom}} + + + + + 6. + + + Nationality / Nationalité + + + + {{intl 'nationality' groomNationality}} + + + + + Bride’s details / Bride’s details + + + 1. + + + Full name / Nom et prénom + + + + {{brideFirstName}} {{brideFamilyName}} + + + + + 2. + + + Last name at birth + + + {{brideMarriedLastNameEng}} + + + + + + + + + 2. + + + Date of birth / Date de naissance + + + + {{#ifCond ageOfBrideInYears '===' undefined }} + {{brideBirthDate}} + {{else}} + {{ageOfBrideInYears}} years old + {{/ifCond}} + + + + + + 4. + + + Resident at / Domicilié à + + + + {{districtPrimaryBride}}{{internationalDistrictPrimaryBride}}, {{statePrimaryBride}}{{internationalStatePrimaryBride}}, {{countryPrimaryBride}} + + + + + 6. + + + Nationality / Nationalité + + + + {{intl 'nationality' brideNationality}} + + + + + Event details / Event details + + + 12. + + + Date of marriage / Date of marriage + + + + {{eventDate}} + + + + + 11. + + + Place of marriage / Place of marriage + + + + {{location districtPlaceofmarriageId 'name'}}{{internationalDistrictPlaceofmarriage}}, {{location statePlaceofmarriageId 'name'}}{{internationalStatePlaceofmarriage}}, {{countryPlaceofmarriage}} + + + + + 13. + + + Type of marriage / Type of marriage + + + + {{typeOfMarriage}} + + + + + Witness details / Witness details + + + 11. + + + Witness 1 / Witness 1 + + + + {{witnessOneFirstName}} {{witnessOneFamilyName}} + {{witnessOneRelationship}}{{witnessOneRelationshipForOther}} + + + + + 11. + + + Witness 2 / Witness 2 + + + + {{witnessTwoFirstName}} {{witnessTwoFamilyName}} + {{witnessTwoRelationship}}{{witnessTwoRelationshipForOther}} + + + + + Registration details / Détails d'inscription + + + + 16. + + + Place of registration / Inscrit à + + + + {{registrar.district.name}}, {{registrar.state.name}}, {{registrar.country}} + + + + + + 17. + + + Date of registration / Date d'enregistrement + + + + {{ordinalFormatDate registrar.date}} + + + + + 18. + + + Registered by / Enregistré par + + + + {{registrar.name}} + + + + + + + + + + + + + + + + + + + FARAJALAND + + + REPUBLIC OF FARAJALAND / REPUBLIC OF FARAJALAND + + + CERTIFIED COPY OF MARRIAGE RECORD / COPIE CERTIFIÉE DE L'ACTE DE MARIAGE + + + + + CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE. A + CERTIFICATE IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES À LA FALSIFIATION OU À LA MODIFICATION + D'UN CERTIFICAT ET À L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITÉ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{#ifCond printInAdvance '!==' true}} + + {{/ifCond}} + \ No newline at end of file diff --git a/src/api/certificates/source/marriage-certificate.svg b/src/api/certificates/source/marriage-certificate.svg new file mode 100644 index 000000000..cb9b3f87c --- /dev/null +++ b/src/api/certificates/source/marriage-certificate.svg @@ -0,0 +1,268 @@ + + + + + CAUTION : THERE ARE OFFENCES RELATING TO FALSIFYING OR ALTERING A CERTIFICATE AND USING OR POSSESSING A FALSE CERTIFICATE + IS NOT PROOF OF IDENTITY / ATTENTION : IL EXISTE DES INFRACTIONS RELATIVES A LA FALSIFIATION OU À LA MODIFICATION D'UN + CERTIFICAT ET A L'UTILISATION OU LA POSSESSION D'UN FAUX CERTIFICAT. UN CERTIFICAT N'EST PAS UNE PREUVE D'IDENTITE + + + + + + + + + + + + + + + + + + + + FARAJALAND + + + + + {{certificateDate}} + + + Date of certification / Date de délivrance + + + + {{location loggedInUser.officeId 'name'}} + {{location loggedInUser.districtId 'name'}}, {{location loggedInUser.stateId 'name'}}, Farajaland + + + Place of certification / Lieu de certification + + + + Registrar / L'Officier de l'État Civil + + + {{registrar.name}} + + + I certify that this certificate is a true copy of the civil registry and is issued by the mandated authority in pursuance + of civil registration law / Je certifie que le présent certificat est une copie conforme du registre d'état civil et qu'il + est délivré par l'autorité mandatée conformément à la loi sur l'état civil. + + + + + + REPUBLIC OF FARAJALAND / REPUBLIQUE DE FARAJALAND + + + CERTIFICATE OF MARRIAGE / ACTE DE MARRIAGE + + + + 1. + + + Groom’s full name /
 + Nom complet du marié + + + + {{groomFirstName}} {{groomFamilyName}} + + + + + 2. + + + Bride’s full name /
 + Nom complet de la mariée + + + + {{brideFirstName}} {{brideFamilyName}} + + + + + 3. + + + /
 + + + Date of marriage + Date du mariage + + + + {{eventDate}} + + + + + 4. + + + /
 + + + Place of marriage + Lieu de mariage + + + + {{location districtPlaceofmarriageId 'name'}}{{internationalDistrictPlaceofmarriage}}, + {{location statePlaceofmarriageId 'name'}}{{internationalStatePlaceofmarriage}}, {{countryPlaceofmarriage}} + + + + + + 5. + + + Witnesses / + Les témoins + + + + {{witnessOneFirstName}} {{witnessOneFamilyName}}
 + {{witnessTwoFirstName}} {{witnessTwoFamilyName}} + + + + + + 6. + + + Lieu d'enregistrement + + + + + + Place of registration / + + + + {{location registrar.officeId 'name'}}
 + {{location registrar.districtId 'name'}}, {{location registrar.stateId 'name'}}, Farajaland + + + + + 7. + + + + + + Date of registration / + + + Date d'enregistrement + + + + {{registrationDate}} + + + + + 8. + + + /
 + + + Registered by + Enregistré par + + + + {{registrar.name}} + + + + + + 9. + + + Signatures of bride and groom / + Signatures des mariés + + + + Groom / Marié + + + + Bride / Mariée + + + + + + + No. {{registrationNumber}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{#ifCond printInAdvance '!==' true}} + + {{/ifCond}} + \ No newline at end of file diff --git a/src/api/fonts/LibreBaskerville-Bold.ttf b/src/api/fonts/LibreBaskerville-Bold.ttf new file mode 100644 index 000000000..f415f3e9f Binary files /dev/null and b/src/api/fonts/LibreBaskerville-Bold.ttf differ diff --git a/src/api/fonts/LibreBaskerville-Italic.ttf b/src/api/fonts/LibreBaskerville-Italic.ttf new file mode 100644 index 000000000..152c1e37c Binary files /dev/null and b/src/api/fonts/LibreBaskerville-Italic.ttf differ diff --git a/src/api/fonts/LibreBaskerville-Regular.ttf b/src/api/fonts/LibreBaskerville-Regular.ttf new file mode 100644 index 000000000..8b871395e Binary files /dev/null and b/src/api/fonts/LibreBaskerville-Regular.ttf differ 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 }), diff --git a/src/form/birth/certificate-handlebars.ts b/src/form/birth/certificate-handlebars.ts index 1bedb4c74..d7549d5d5 100644 --- a/src/form/birth/certificate-handlebars.ts +++ b/src/form/birth/certificate-handlebars.ts @@ -59,6 +59,9 @@ export const certificateHandlebars = { childFamilyName: 'childFamilyName', childGender: 'childGender', eventDate: 'eventDate', + ageOfFatherInYears: 'ageOfFatherInYears', + ageOfMotherInYears: 'ageOfMotherInYears', + ageOfInformantInYears: 'ageOfInformantInYears', informantFirstName: 'informantFirstName', informantFamilyName: 'informantFamilyName', informantBirthDate: 'informantBirthDate', diff --git a/src/form/birth/index.ts b/src/form/birth/index.ts index e1f0958b5..eeded40fb 100644 --- a/src/form/birth/index.ts +++ b/src/form/birth/index.ts @@ -257,7 +257,8 @@ export const birthForm: ISerializedForm = { exactDateOfBirthUnknownConditional.concat( hideIfInformantMotherOrFather ), - ageOfIndividualValidators + ageOfIndividualValidators, + certificateHandlebars.ageOfInformantInYears ), getNationality( certificateHandlebars.informantNationality, @@ -329,7 +330,8 @@ export const birthForm: ISerializedForm = { exactDateOfBirthUnknownConditional.concat( detailsExistConditional ), - ageOfParentsConditionals + ageOfParentsConditionals, + certificateHandlebars.ageOfMotherInYears ), getNationality( certificateHandlebars.motherNationality, @@ -407,7 +409,8 @@ export const birthForm: ISerializedForm = { exactDateOfBirthUnknownConditional.concat( detailsExistConditional ), - ageOfParentsConditionals + ageOfParentsConditionals, + certificateHandlebars.ageOfFatherInYears ), getNationality( certificateHandlebars.fatherNationality, diff --git a/src/form/common/certificate/handlebars/helpers.ts b/src/form/common/certificate/handlebars/helpers.ts index e19250d90..373ee12de 100644 --- a/src/form/common/certificate/handlebars/helpers.ts +++ b/src/form/common/certificate/handlebars/helpers.ts @@ -23,3 +23,53 @@ export function debug(): Handlebars.HelperDelegate { return value } } + +export function ordinalFormatDate(): Handlebars.HelperDelegate { + return function (dateString: string) { + const date = new Date(dateString.trim()) + const getOrdinalSuffix = (day: number) => { + if (day > 3 && day < 21) return day + 'th' + switch (day % 10) { + case 1: + return day + 'st' + case 2: + return day + 'nd' + case 3: + return day + 'rd' + default: + return day + 'th' + } + } + + // Format the date into ex: "11th November 2023" + const day = getOrdinalSuffix(date.getDate()) + const month = date.toLocaleString('default', { month: 'long' }) + const year = date.getFullYear() + + const formattedDate = `${day} ${month} ${year}` + return formattedDate + } +} + +export function getCamelCasedInformantType( + props: FactoryProps +): Handlebars.HelperDelegate { + return function (informantType: string, otherInformantType?: string) { + const camelCased = informantType + .toLowerCase() + .split('_') + .map((word, index) => + index === 0 ? word : word.charAt(0).toUpperCase() + word.slice(1) + ) + .join('') + + return props.intl.formatMessage( + { + id: `form.field.label.informantRelation.${camelCased}`, + description: 'Label for informant type', + defaultMessage: '' + }, + { otherInformantType } + ) + } +} diff --git a/src/form/death/certficate-handlebars.ts b/src/form/death/certficate-handlebars.ts index ed365c3c0..e118f0b13 100644 --- a/src/form/death/certficate-handlebars.ts +++ b/src/form/death/certficate-handlebars.ts @@ -46,6 +46,8 @@ export const certificateHandlebars = { 'addressLine2UrbanOptionPrimaryDeceased', addressLine1UrbanOptionPrimaryDeceased: 'addressLine1UrbanOptionPrimaryDeceased', + ageOfSpouseInYears: 'ageOfSpouseInYears', + ageOfInformantInYears: 'ageOfInformantInYears', postalCodePrimaryDeceased: 'postalCodePrimaryDeceased', addressLine1RuralOptionPrimaryDeceased: 'addressLine1RuralOptionPrimaryDeceased', diff --git a/src/form/death/index.ts b/src/form/death/index.ts index be4e9baef..997f9be39 100644 --- a/src/form/death/index.ts +++ b/src/form/death/index.ts @@ -285,7 +285,8 @@ export const deathForm = { getAgeOfIndividualInYears( formMessageDescriptors.ageOfInformant, exactDateOfBirthUnknownConditional.concat(hideIfInformantSpouse), - ageOfIndividualValidators + ageOfIndividualValidators, + certificateHandlebars.ageOfInformantInYears ), getNationality( certificateHandlebars.informantNationality, @@ -347,7 +348,8 @@ export const deathForm = { getAgeOfIndividualInYears( formMessageDescriptors.ageOfSpouse, exactDateOfBirthUnknownConditional.concat(detailsExist), - ageOfIndividualValidators + ageOfIndividualValidators, + certificateHandlebars.ageOfSpouseInYears ), getNationality( certificateHandlebars.spouseNationality, diff --git a/src/form/marriage/certificate-handlebars.ts b/src/form/marriage/certificate-handlebars.ts index c0e5f69a9..7aee2a392 100644 --- a/src/form/marriage/certificate-handlebars.ts +++ b/src/form/marriage/certificate-handlebars.ts @@ -34,6 +34,9 @@ export const certificateHandlebars = { informantPassport: 'informantPassport', informantAlienId: 'informantAlienId', informantRefugeeId: 'informantRefugeeId', + ageOfInformantInYears: 'ageOfInformantInYears', + ageOfGroomInYears: 'ageOfGroomInYears', + ageOfBrideInYears: 'ageOfBrideInYears', countryPrimaryInformant: 'countryPrimaryInformant', statePrimaryInformant: 'statePrimaryInformant', districtPrimaryInformant: 'districtPrimaryInformant', diff --git a/src/form/marriage/index.ts b/src/form/marriage/index.ts index 1892e2dff..4e53befd2 100644 --- a/src/form/marriage/index.ts +++ b/src/form/marriage/index.ts @@ -135,7 +135,8 @@ export const marriageForm: ISerializedForm = { exactDateOfBirthUnknownConditional.concat( hideIfInformantBrideOrGroom ), - ageOfIndividualValidators + ageOfIndividualValidators, + certificateHandlebars.ageOfInformantInYears ), getNationality( certificateHandlebars.informantNationality, @@ -196,7 +197,8 @@ export const marriageForm: ISerializedForm = { getAgeOfIndividualInYears( formMessageDescriptors.ageOfGroom, exactDateOfBirthUnknownConditional, - brideOrGroomAgeValidators + brideOrGroomAgeValidators, + certificateHandlebars.ageOfGroomInYears ), getNationality(certificateHandlebars.groomNationality, []), // Required field getIDType('marriage', 'groom', [], true), @@ -242,7 +244,8 @@ export const marriageForm: ISerializedForm = { getAgeOfIndividualInYears( formMessageDescriptors.ageOfBride, exactDateOfBirthUnknownConditional, - brideOrGroomAgeValidators + brideOrGroomAgeValidators, + certificateHandlebars.ageOfBrideInYears ), getNationality(certificateHandlebars.brideNationality, []), // Required field getIDType('marriage', 'bride', [], true), @@ -289,8 +292,8 @@ export const marriageForm: ISerializedForm = { [], certificateHandlebars.witnessOneFamilyName ), // Required field - getRelationshipToSpousesForWitness, // Required field - witnessRelationshipForOthers // Required field + getRelationshipToSpousesForWitness('witnessOneRelationship'), // Required field + witnessRelationshipForOthers('witnessOneRelationshipForOther') // Required field ], previewGroups: [witnessOneNameInEnglish] } @@ -316,8 +319,8 @@ export const marriageForm: ISerializedForm = { [], certificateHandlebars.witnessTwoFamilyName ), // Required field - getRelationshipToSpousesForWitness, // Required field - witnessRelationshipForOthers // Required field + getRelationshipToSpousesForWitness('witnessTwoRelationship'), // Required field + witnessRelationshipForOthers('witnessTwoRelationshipForOther') // Required field ], previewGroups: [witnessTwoNameInEnglish] } diff --git a/src/form/marriage/required-fields.ts b/src/form/marriage/required-fields.ts index 9f2238435..cd759e703 100644 --- a/src/form/marriage/required-fields.ts +++ b/src/form/marriage/required-fields.ts @@ -52,7 +52,9 @@ export const getMarriageDate: SerializedFormField = { mapping: getFieldMapping('marriageDate', certificateHandlebars.eventDate) } -export const getRelationshipToSpousesForWitness: SerializedFormField = { +export const getRelationshipToSpousesForWitness = ( + fieldName: string +): SerializedFormField => ({ name: 'relationship', type: 'SELECT_WITH_OPTIONS', label: formMessageDescriptors.relationshipToSpouses, @@ -60,10 +62,18 @@ export const getRelationshipToSpousesForWitness: SerializedFormField = { initialValue: '', validator: [], placeholder: formMessageDescriptors.formSelectPlaceholder, - options: witnessRelationshipOptions -} + options: witnessRelationshipOptions, + mapping: { + template: { + operation: 'selectTransformer', + fieldName + } + } +}) -export const witnessRelationshipForOthers: SerializedFormField = { +export const witnessRelationshipForOthers = ( + fieldName: string +): SerializedFormField => ({ name: 'otherRelationship', type: 'TEXT', label: formMessageDescriptors.other, @@ -76,8 +86,14 @@ export const witnessRelationshipForOthers: SerializedFormField = { action: 'hide', expression: '(values.relationship!=="OTHER")' } - ] -} + ], + mapping: { + template: { + operation: 'fieldValueTransformer', + fieldName + } + } +}) const marriageDocumentExtraValue = { GROOM: 'GROOM', diff --git a/src/form/types/types.ts b/src/form/types/types.ts index 302174f64..f922d6025 100644 --- a/src/form/types/types.ts +++ b/src/form/types/types.ts @@ -791,7 +791,7 @@ export type IDeclarationCertificate = { corrector?: Partial<{ type: RelationForCertificateCorrection }> hasShowedVerifiedDocument?: boolean payments?: Payment - data?: string + certificateTemplateId?: string } export interface IFileValue { diff --git a/src/index.ts b/src/index.ts index b53d05ecf..1945b81b9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,7 +63,6 @@ import { handlebarsHandler } from './form/common/certificate/handlebars/handler' import { trackingIDHandler } from './api/tracking-id/handler' import { dashboardQueriesHandler } from './api/dashboards/handler' import { fontsHandler } from './api/fonts/handler' -import { certificateConfigurationHandler } from './api/certificate-configuration/handler' import { recordNotificationHandler } from './api/record-notification/handler' import { customEventHandler } from '@countryconfig/api/custom-event/handler' @@ -245,13 +244,24 @@ export async function createServer() { server.route({ method: 'GET', - path: '/certificates/{event}.svg', + path: '/certificates/{id}', handler: certificateHandler, options: { tags: ['api', 'certificates'], description: 'Returns only one certificate metadata' } }) + + server.route({ + method: 'GET', + path: '/certificates', + handler: certificateHandler, + options: { + tags: ['api', 'certificates'], + description: 'Returns certificate metadata' + } + }) + // add ping route by default for health check server.route({ method: 'GET', @@ -280,17 +290,6 @@ export async function createServer() { } }) - server.route({ - method: 'GET', - path: '/certificate-configuration', - handler: certificateConfigurationHandler, - options: { - auth: false, - tags: ['api'], - description: 'Serves certificate configurations' - } - }) - server.route({ method: 'GET', path: '/client-config.js', diff --git a/src/translations/client.csv b/src/translations/client.csv index ef7424f70..490b69d5d 100644 --- a/src/translations/client.csv +++ b/src/translations/client.csv @@ -167,6 +167,14 @@ certificate.receipt.service.5year,,{event} registration after 5 years of event,{ certificate.receipt.service.targetDay,,{event} registration after 45 days of event,{event} Déclaration après 45 jours de l'événement. certificate.receipt.service.targetDay.amount,,৳ 25.00,৳ 25.00 certificate.receipt.subheader,Subheader for receipt on payment on certificate,{event} Registration after {DOBDiff} of {DOE},{event} Déclaration après {DOBDiff} de {DOE} +certificate.selectTemplate,Select certificate template,Type,Taper +certificate.selectedTemplate,Selected certificate template,Selected certificate template,Modèle de certificat sélectionné +certificates.birth.certificate,Birth Certificate,Birth Certificate,Acte de naissance +certificates.birth.certificate.copy,Birth Certificate Certified Copy,Birth Certificate Certified Copy,Copie certifiée conforme de l'acte de naissance +certificates.death.certificate,Death Certificate,Death Certificate,Certificat de décès +certificates.death.certificate.copy,Death Certificate Certified Copy,Death Certificate Certified Copy,Copie certifiée conforme du certificat de décès +certificates.marriage.certificate,Marriage Certificate,Marriage Certificate,Acte de mariage +certificates.marriage.certificate.copy,Marriage Certificate Certified Copy,Marriage Certificate Certified Copy,Copie certifiée conforme de l'acte de mariage changeEmail.validation.msg,Phone number validation message,Must be a valid email address,Doit être une adresse e-mail valide changeModal.cancel,The label for cancel button of change modal,Cancel,Annuler changeModal.continue,The label for continue button of change modal,Continue,Continuer @@ -1032,7 +1040,7 @@ form.field.label.informantRelation.headInst,,Head of the institution where the d form.field.label.informantRelation.legalGuardian,Label for option Legal Guardian,Legal guardian,Tuteur légal form.field.label.informantRelation.mother,Label for option mother,Mother,Mère form.field.label.informantRelation.officer,,Officer-in-charge of the road or public space where the death occurred,Officier responsable d'une route ou d'un espace public où le décès a eu lieu. -form.field.label.informantRelation.other,,Other(Specify),Autre(Précisez) +form.field.label.informantRelation.other,,Other ({otherInformantType}),Autre ({otherInformantType}) form.field.label.informantRelation.others,Label for option someone else,Someone else,Autre form.field.label.informantRelation.owner,,Owner of the house or building where the death occurred,Propriétaire de la maison ou du bâtiment où le décès a eu lieu. form.field.label.informantRelation.sister,Label for option Sister,Sister,Soeur @@ -1415,6 +1423,255 @@ misc.reEnterDescription,,Let's make sure we collected your PIN correctly,Assuron misc.reEnterTitle,The title displayed while creating a PIN,Re-enter your PIN,Saisissez à nouveau votre nouveau code PIN misc.session.expired,SessionExpire modal confirmation text,Your session has expired. Please login again.,Votre session a expiré. Veuillez vous connecter à nouveau. misc.title.declarationStatus,Title for review action component,Send for approval,Envoyer pour approbation +nationality.ABW,,Aruban,Arubais +nationality.AFG,,Afghan,Afghan +nationality.AGO,,Angolan,Angolais +nationality.AIA,,Anguillan,Anguillais +nationality.ALA,,Åland Islander,Insulaire d’Åland +nationality.ALB,,Albanian,Albanais +nationality.AND,,Andorran,Andorran +nationality.ARE,,Emirati,Emirien +nationality.ARG,,Argentine,Argentin +nationality.ARM,,Armenian,Arménien +nationality.ASM,,American Samoan,Samoan Américain +nationality.ATA,,Antarctic,Antarctique +nationality.ATF,,French Southern,Des Terres Australes et Antarctiques Françaises +nationality.ATG,,Antiguan/Barbudan,Antiguayen/Barbudien +nationality.AUS,,Australian,Australien +nationality.AUT,,Austrian,Autrichien +nationality.AZE,,Azerbaijani,Azerbaïdjanais +nationality.BDI,,Burundian,Burundais +nationality.BEL,,Belgian,Belge +nationality.BEN,,Beninese,Béninois +nationality.BES,,Dutch Caribbean,Caribéen Néerlandais +nationality.BFA,,Burkinabe,Burkinabé +nationality.BGD,,Bangladeshi,Bangladais +nationality.BGR,,Bulgarian,Bulgare +nationality.BHR,,Bahraini,Bahreïnien +nationality.BHS,,Bahamian,Bahaméen +nationality.BIH,,Bosnian/Herzegovinian,Bosnien/Herzégovinien +nationality.BLM,,Saint Barthélemy Islander,Insulaire de Saint-Barthélemy +nationality.BLR,,Belarusian,Biélorusse +nationality.BLZ,,Belizean,Bélizéen +nationality.BMU,,Bermudian,Bermudien +nationality.BOL,,Bolivian,Bolivien +nationality.BRA,,Brazilian,Brésilien +nationality.BRB,,Barbadian,Barbadien +nationality.BRN,,Bruneian,Brunéien +nationality.BTN,,Bhutanese,Bhoutanais +nationality.BVT,,Bouvet Islander,Insulaire de Bouvet +nationality.BWA,,Botswanan,Botswanais +nationality.CAF,,Central African,Centrafricain +nationality.CAN,,Canadian,Canadien +nationality.CCK,,Cocos Islander,Insulaire des Cocos +nationality.CHE,,Swiss,Suisse +nationality.CHL,,Chilean,Chilien +nationality.CHN,,Chinese,Chinois +nationality.CIV,,Ivorian,Ivoirien +nationality.CMR,,Cameroonian,Camerounais +nationality.COD,,Congolese (DRC),Congolais (RDC) +nationality.COG,,Congolese (Congo),Congolais (Congo) +nationality.COK,,Cook Islander,Insulaire des Cook +nationality.COL,,Colombian,Colombien +nationality.COM,,Comoran,Comorien +nationality.CPV,,Cape Verdean,Caboverdien +nationality.CRI,,Costa Rican,Costaricien +nationality.CUB,,Cuban,Cubain +nationality.CUW,,Curaçaoan,Curacien +nationality.CXR,,Christmas Islander,Insulaire de Christmas +nationality.CYM,,Caymanian,Caïmanais +nationality.CYP,,Cypriot,Chypriote +nationality.CZE,,Czech,Tchèque +nationality.DEU,,German,Allemand +nationality.DJI,,Djiboutian,Djiboutien +nationality.DMA,,Dominican,Dominicain +nationality.DNK,,Danish,Danois +nationality.DOM,,Dominican,Dominicain +nationality.DZA,,Algerian,Algérien +nationality.ECU,,Ecuadorian,Équatorien +nationality.EGY,,Egyptian,Égyptien +nationality.ERI,,Eritrean,Érythréen +nationality.ESH,,Sahrawi,Sahraoui +nationality.ESP,,Spanish,Espagnol +nationality.EST,,Estonian,Estonien +nationality.ETH,,Ethiopian,Éthiopien +nationality.FAR,,Farajalandian,Farajalandien +nationality.FIN,,Finnish,Finlandais +nationality.FJI,,Fijian,Fidjien +nationality.FLK,,Falkland Islander,Insulaire des Falkland +nationality.FRA,,French,Français +nationality.FRO,,Faroese,Féroïen +nationality.FSM,,Micronesian,Micronésien +nationality.GAB,,Gabonese,Gabonais +nationality.GBR,,British,Britannique +nationality.GEO,,Georgian,Géorgien +nationality.GGY,,Guernsey,Guernesiais +nationality.GHA,,Ghanaian,Ghanéen +nationality.GIB,,Gibraltarian,Gibraltarien +nationality.GIN,,Guinean,Guinéen +nationality.GLP,,Guadeloupean,Guadeloupéen +nationality.GMB,,Gambian,Gambien +nationality.GNB,,Bissau-Guinean,Bissau-Guinéen +nationality.GNQ,,Equatoguinean,Guinéen équatorial +nationality.GRC,,Greek,Grec +nationality.GRD,,Grenadian,Grenad +nationality.GRD,,Grenadian,Grenadien +nationality.GRL,,Greenlander,Groenlandais +nationality.GTM,,Guatemalan,Guatémaltèque +nationality.GUF,,French Guianese,Français de Guyane +nationality.GUM,,Guamanian,Guaméen +nationality.GUY,,Guyanese,Guyanais +nationality.HKG,,Hong Kong Special Administrative Region,Région Administrative Spéciale de Hong Kong +nationality.HMD,,Heard Islander,Îles Heard +nationality.HND,,Honduran,Hondurien +nationality.HRV,,Croatian,Croate +nationality.HTI,,Haitian,Haïtien +nationality.HUN,,Hungarian,Hongrois +nationality.IDN,,Indonesian,Indonésien +nationality.IMN,,Manx,Manxois +nationality.IND,,Indian,Indien +nationality.IOT,,British Indian Ocean Territory,Territoire britannique de l'océan Indien +nationality.IRL,,Irish,Irlandais +nationality.IRN,,Iranian,Iranien +nationality.IRQ,,Iraqi,Irakien +nationality.ISL,,Icelander,Islandais +nationality.ISR,,Israeli,Israélien +nationality.ITA,,Italian,Italien +nationality.JAM,,Jamaican,Jamaïcain +nationality.JEY,,Jersey,Jersiais +nationality.JOR,,Jordanian,Jordannien +nationality.JPN,,Japanese,Japonais +nationality.KAZ,,Kazakhstani,Kazakh +nationality.KEN,,Kenyan,Kényan +nationality.KGZ,,Kyrgyz,Kirghize +nationality.KHM,,Cambodian,Cambodgien +nationality.KIR,,Kiribati,Kiribatien +nationality.KNA,,Kittitian/Nevisian,Nevisien +nationality.KOR,,South Korean,Coréen du Sud +nationality.KWT,,Kuwaiti,Koweïtien +nationality.LBN,,Lebanese,Libanais +nationality.LBR,,Liberian,Libérien +nationality.LBY,,Libyan,Libyen +nationality.LCA,,Saint Lucian,Saint-Lucien +nationality.LIE,,Liechtensteiner,Liechtensteinois +nationality.LKA,,Sri Lankan,Sri Lankais +nationality.LSO,,Lesotho,Lesothan +nationality.LTU,,Lithuanian,Lituanien +nationality.LUX,,Luxembourgish,Luxembourgeois +nationality.LVA,,Latvian,Letton +nationality.MAC,,Macao Special Administrative Region,Région Administrative Spéciale de Macao +nationality.MAF,,Saint Martiner,Martiniquais +nationality.MAR,,Moroccan,Marocain +nationality.MCO,,Monégasque,Monégasque +nationality.MDA,,Moldovan,Moldave +nationality.MDG,,Madagascan,Malgache +nationality.MDV,,Maldivian,Maldivien +nationality.MEX,,Mexican,Mexicain +nationality.MHL,,Marshallese,Marshalles +nationality.MKD,,Macedonian,Macédonien +nationality.MLI,,Malian,Malien +nationality.MLT,,Maltese,Maltais +nationality.MMR,,Myanmarese,Myanmarais +nationality.MNE,,Montenegrin,Monténégrin +nationality.MNG,,Mongolian,Mongol +nationality.MNP,,Northern Marianan,Marianais +nationality.MOZ,,Mozambican,Mozambicain +nationality.MRT,,Mauritanian,Mauritanien +nationality.MSR,,Montserratian,Montserratien +nationality.MTQ,,Martinican,Martiniquais +nationality.MUS,,Mauritian,Mauricien +nationality.MWI,,Malawian,Malawite +nationality.MYS,,Malaysian,Malaisien +nationality.MYT,,Mayottean,Mayotien +nationality.NAM,,Namibian,Namibien +nationality.NCL,,New Caledonian,Calédonien +nationality.NER,,Nigerien,Nigérien +nationality.NFK,,Norfolk Islander,Îles Norfolk +nationality.NGA,,Nigerian,Nigérian +nationality.NIC,,Nicaraguan,Nicaraguayen +nationality.NIU,,Niuean,Niouéen +nationality.NLD,,Dutch,Néerlandais +nationality.NOR,,Norwegian,Norvégien +nationality.NPL,,Nepalese,Népalais +nationality.NRU,,Nauruan,Nauruan +nationality.NZL,,New Zealander,Néo-Zélandais +nationality.OMN,,Omani,Omanais +nationality.PAK,,Pakistani,Pakistanais +nationality.PAN,,Panamanian,Panaméen +nationality.PCN,,Pitcairn Islander,Pitcairnais +nationality.PER,,Peruvian,Péruvien +nationality.PHL,,Filipino,Philippin +nationality.PLW,,Palauan,Palaosien +nationality.PNG,,Papua New Guinean,Papouasien +nationality.POL,,Polish,Polonais +nationality.PRI,,Puerto Rican,Portoricain +nationality.PRK,,North Korean,Coréen du Nord +nationality.PRT,,Portuguese,Portugais +nationality.PRY,,Paraguayan,Paraguayen +nationality.PSE,,Palestinian,Palestinien +nationality.PYF,,French Polynesian,Polynésien +nationality.QAT,,Qatari,Qatarien +nationality.REU,,Reunionese,Réunionnais +nationality.ROU,,Romanian,Roumain +nationality.RUS,,Russian,Russe +nationality.RWA,,Rwandan,Rwandais +nationality.SAU,,Saudi,Saoudien +nationality.SDN,,Sudanese,Soudanais +nationality.SEN,,Senegalese,Sénégalais +nationality.SGP,,Singaporean,Singapourien +nationality.SGS,,South Georgian/South Sandwich Islander,Îles Sandwich du Sud +nationality.SHN,,Saint Helenian,Sainte-Hélène +nationality.SJM,,Svalbardian,Spitzbergien +nationality.SLB,,Solomon Islander,Salomonien +nationality.SLE,,Sierra Leonean,Sierra-Léonais +nationality.SLV,,Salvadoran,Salvadorien +nationality.SMR,,Sammarinese,Saint-Marinais +nationality.SOM,,Somali,Somalien +nationality.SPM,,Saint-Pierrais/Miquelonnais,Saint-Pierrais/Miquelonnais +nationality.SRB,,Serbian,Serbe +nationality.SSD,,South Sudanese,Soudanais du Sud +nationality.STP,,São Toméan,Santoméen +nationality.SUR,,Surinamese,Surinamien +nationality.SVK,,Slovak,Slovaque +nationality.SVN,,Slovene,Slovène +nationality.SWE,,Swedish,Suédois +nationality.SWZ,,Swazi,Swazi +nationality.SXM,,Sint Maartener,Saint-Martinois +nationality.SYC,,Seychellois,Seychellois +nationality.SYR,,Syrian,Syrien +nationality.TCA,,Turks and Caicos Islander,Îles Turques-et-Caïques +nationality.TCD,,Chadian,Tchadien +nationality.TGO,,Togolese,Togolais +nationality.THA,,Thai,Thaïlandais +nationality.TJK,,Tajikistani,Tadjik +nationality.TKL,,Tokelauan,Tokelauan +nationality.TKM,,Turkmen,Turkmène +nationality.TLS,,Timorese,Timorais +nationality.TON,,Tongan,Tongien +nationality.TTO,,Trinidadian/Tobagonian,Trinidadien +nationality.TUN,,Tunisian,Tunisien +nationality.TUR,,Turkish,Turc +nationality.TUV,,Tuvaluan,Tuvaluan +nationality.TZA,,Tanzanian,Tanzanien +nationality.UGA,,Ugandan,Ugandais +nationality.UKR,,Ukrainian,Ukrainien +nationality.UMI,,American,Américain +nationality.URY,,Uruguayan,Uruguayen +nationality.USA,,American,Américain +nationality.UZB,,Uzbekistani,Ouzbek +nationality.VAT,,Holy See,Saint-Siège +nationality.VCT,,Saint Vincentian,Saint-Vincentais +nationality.VEN,,Venezuelan,Vénézuélien +nationality.VGB,,British Virgin Islander,Îles Vierges britanniques +nationality.VIR,,Virgin Islander,Îles Vierges +nationality.VNM,,Vietnamese,Vietnamien +nationality.VUT,,Ni-Vanuatu,Ni-Vanuatu +nationality.WLF,,Wallis and Futuna Islander,Wallisien +nationality.WSM,,Samoan,Samoan +nationality.YEM,,Yemeni,Yéménite +nationality.ZAF,,South African,Sud-Africain +nationality.ZMB,,Zambian,Zambien +nationality.ZWE,,Zimbabwean,Zimbabwéen navigation.analytic,Analytic Group,Analytics,Analytique navigation.application,Application label in navigation,Application,Application navigation.approvals,Sent for approval label in navigation,Sent for approval,Envoyé pour approbation @@ -1551,6 +1808,7 @@ print.certificate.certificatePreview,The title for certificate preview form,Cert print.certificate.collectPayment,The label for collect payment paragraph,"Please collect the payment, print the receipt and hand it over to the payee.","Veuillez encaisser le paiement, imprimer le reçu et le remettre au bénéficiaire." print.certificate.collector.father,The label for select value when father is the collector of certificate,Father is collecting,Père print.certificate.collector.form.error,Form level error for collector form,Please select who is collecting the certificate,Veuillez sélectionner la personne qui collecte le certificat +print.certificate.collector.form.error.template,Form level error for collector form template type,Please select certificate type,Veuillez sélectionner le type de certificat print.certificate.collector.idCheck.title,The title for id check component,Verify their identity,Vérifier leur identité print.certificate.collector.idCheckDialog.title,The title for the dialog when details of the collector not verified,Print without proof of ID?,Continuer sans preuve d'identité ? print.certificate.collector.informant,The label for select value when informant is the collector of certificate,Informant is collecting,Informateur diff --git a/src/utils/mapping/field-mapping-utils.ts b/src/utils/mapping/field-mapping-utils.ts index 25f9200e6..54ef4c59e 100644 --- a/src/utils/mapping/field-mapping-utils.ts +++ b/src/utils/mapping/field-mapping-utils.ts @@ -296,7 +296,7 @@ export function getFieldMapping( return { template: { fieldName: certificateHandlebar, - operation: 'nationalityTransformer' + operation: 'plainInputTransformer' }, mutation: { operation: 'fieldToArrayTransformer'