From 4f5fbbd28fa704db3e9182d74e7db7ca0749654b Mon Sep 17 00:00:00 2001 From: cibelius Date: Thu, 11 Dec 2025 15:52:49 +0700 Subject: [PATCH 1/9] progress with config --- src/api/action-confirmation.md | 1 - src/data-seeding/roles/roles.ts | 6 +-- src/form/tennis-club-membership.ts | 9 ---- src/form/v2/birth/index.ts | 80 +++++++++++++++++++----------- src/form/v2/death/index.ts | 41 +-------------- src/translations/client.csv | 3 ++ 6 files changed, 60 insertions(+), 80 deletions(-) diff --git a/src/api/action-confirmation.md b/src/api/action-confirmation.md index 86ee468790..64099b0567 100644 --- a/src/api/action-confirmation.md +++ b/src/api/action-confirmation.md @@ -8,7 +8,6 @@ The following actions currently support action confirmation: - `ActionType.NOTIFY` - `ActionType.DECLARE` -- `ActionType.VALIDATE` - `ActionType.REGISTER` - `ActionType.REJECT` - `ActionType.ARCHIVE` diff --git a/src/data-seeding/roles/roles.ts b/src/data-seeding/roles/roles.ts index 3e4de779e4..c612577581 100644 --- a/src/data-seeding/roles/roles.ts +++ b/src/data-seeding/roles/roles.ts @@ -175,12 +175,12 @@ export const roles: Role[] = [ 'record.read[event=birth|death|tennis-club-membership]', 'record.declare[event=birth|death|tennis-club-membership]', 'record.declared.edit[event=birth|death|tennis-club-membership]', - 'record.declared.validate[event=birth|death|tennis-club-membership]', 'record.declared.reject[event=birth|death|tennis-club-membership]', 'record.declared.archive[event=birth|death|tennis-club-membership]', 'record.declared.review-duplicates[event=birth|death|tennis-club-membership]', 'record.registered.print-certified-copies[event=birth|death|tennis-club-membership]', - 'record.registered.request-correction[event=birth|death|tennis-club-membership]' + 'record.registered.request-correction[event=birth|death|tennis-club-membership]', + 'record.custom-action[event=birth,customActionType=VALIDATE_DECLARATION]' ] }, { @@ -229,7 +229,7 @@ export const roles: Role[] = [ 'record.registered.print-certified-copies[event=birth|death|tennis-club-membership]', 'record.registered.correct[event=birth|death|tennis-club-membership]', 'record.unassign-others[event=birth|death|tennis-club-membership]', - 'record.custom-action[event=birth,customActionType=ISSUE_CERTIFIED_COPY]' + 'record.custom-action[event=birth,customActionType=ISSUE_CERTIFIED_COPY|VALIDATE_DECLARATION]' ] }, { diff --git a/src/form/tennis-club-membership.ts b/src/form/tennis-club-membership.ts index 6ebcbf6cd3..20cb272a43 100644 --- a/src/form/tennis-club-membership.ts +++ b/src/form/tennis-club-membership.ts @@ -901,15 +901,6 @@ export const tennisClubMembershipEvent = defineConfig({ }, review: TENNIS_CLUB_DECLARATION_REVIEW }, - { - type: ActionType.VALIDATE, - label: { - defaultMessage: 'Validate', - description: - 'This is shown as the action name anywhere the user can trigger the action from', - id: 'event.tennis-club-membership.action.validate.label' - } - }, { type: ActionType.REGISTER, label: { diff --git a/src/form/v2/birth/index.ts b/src/form/v2/birth/index.ts index bd46477aac..0483d0d7db 100644 --- a/src/form/v2/birth/index.ts +++ b/src/form/v2/birth/index.ts @@ -18,7 +18,9 @@ import { flag, InherentFlags, not, - status + or, + status, + user } from '@opencrvs/toolkit/events' import { BIRTH_DECLARATION_FORM, @@ -238,9 +240,57 @@ export const birthEvent = defineConfig({ ), field('child.dob').isBefore().now() ) + }, + { + id: 'validated', + operation: 'add', + conditional: or( + user.hasRole('REGISTRATION_AGENT'), + user.hasRole('LOCAL_REGISTRAR') + ) } ] }, + { + type: ActionType.CUSTOM, + customActionType: 'VALIDATE_DECLARATION', + icon: 'Stamp', + label: { + defaultMessage: 'Validate declaration', + description: + 'This is shown as the action name anywhere the user can trigger the action from', + id: 'event.birth.custom.action.validate-declaration.label' + }, + conditionals: [ + { + type: ConditionalType.SHOW, + conditional: and(status('DECLARED'), not(flag('validated'))) + }, + { + type: ConditionalType.ENABLE, + conditional: not(flag(InherentFlags.POTENTIAL_DUPLICATE)) + } + ], + flags: [{ id: 'validated', operation: 'add' }], + form: [ + { + id: 'comments', + type: 'TEXTAREA', + label: { + defaultMessage: 'Comments', + description: + 'This is the label for the comments field for the validate declaration action', + id: 'event.birth.custom.action.validate-declaration.field.comments.label' + } + } + ], + auditHistoryLabel: { + defaultMessage: 'Validated', + description: + 'The label to show in audit history for the validate action', + id: 'event.birth.custom.action.validate-declaration.audit-history-label' + } + }, { type: ActionType.CUSTOM, customActionType: 'APPROVE_DECLARATION', @@ -353,33 +403,6 @@ export const birthEvent = defineConfig({ id: 'event.birth.action.issued.audit-history-label' } }, - { - type: ActionType.VALIDATE, - label: { - defaultMessage: 'Validate', - description: - 'This is shown as the action name anywhere the user can trigger the action from', - id: 'event.birth.action.validate.label' - }, - conditionals: [ - { - type: ConditionalType.ENABLE, - conditional: not(flag('approval-required-for-late-registration')) - }, - { type: ConditionalType.SHOW, conditional: not(flag('validated')) } - ], - flags: [{ id: 'validated', operation: 'add' }], - deduplication: { - id: 'birth-deduplication', - label: { - defaultMessage: 'Detect duplicate', - description: - 'This is shown as the action name anywhere the user can trigger the action from', - id: 'event.birth.action.detect-duplicate.label' - }, - query: dedupConfig - } - }, { type: ActionType.REJECT, label: { @@ -398,6 +421,7 @@ export const birthEvent = defineConfig({ 'This is shown as the action name anywhere the user can trigger the action from', id: 'event.birth.action.register.label' }, + flags: [{ id: 'validated', operation: 'remove' }], conditionals: [ { type: ConditionalType.ENABLE, diff --git a/src/form/v2/death/index.ts b/src/form/v2/death/index.ts index 9d32f0e1c9..c569c092b5 100644 --- a/src/form/v2/death/index.ts +++ b/src/form/v2/death/index.ts @@ -12,9 +12,7 @@ import { ActionType, ConditionalType, defineConfig, - field, - not, - flag + field } from '@opencrvs/toolkit/events' import { DEATH_DECLARATION_REVIEW, @@ -47,17 +45,6 @@ export const deathEvent = defineConfig({ description: 'This is a fallback title if actual title resolves to empty string' }, - flags: [ - { - id: 'validated', - label: { - id: 'event.death.flag.validated', - defaultMessage: 'Validated', - description: 'Flag label for validated' - }, - requiresAction: true - } - ], summary: { fields: [ { @@ -206,29 +193,6 @@ export const deathEvent = defineConfig({ query: dedupConfig } }, - { - type: ActionType.VALIDATE, - label: { - defaultMessage: 'Validate', - description: - 'This is shown as the action name anywhere the user can trigger the action from', - id: 'event.death.action.validate.label' - }, - conditionals: [ - { type: ConditionalType.SHOW, conditional: not(flag('validated')) } - ], - flags: [{ id: 'validated', operation: 'add' }], - deduplication: { - id: 'death-deduplication', - label: { - defaultMessage: 'Detect duplicate', - description: - 'This is shown as the action name anywhere the user can trigger the action from', - id: 'event.death.action.detect-duplicate.label' - }, - query: dedupConfig - } - }, { type: ActionType.REJECT, label: { @@ -236,8 +200,7 @@ export const deathEvent = defineConfig({ description: 'This is shown as the action name anywhere the user can trigger the action from', id: 'event.death.action.reject.label' - }, - flags: [{ id: 'validated', operation: 'remove' }] + } }, { type: ActionType.REGISTER, diff --git a/src/translations/client.csv b/src/translations/client.csv index 8ce2befbc6..7ced54e466 100644 --- a/src/translations/client.csv +++ b/src/translations/client.csv @@ -886,6 +886,9 @@ event.birth.summary.informant.contact.empty,This is shown when there is no infor event.birth.summary.informant.contact.label,This is the label for the informant information,Contact,Contact event.birth.summary.informant.contact.value,This is the contact value of the informant,{informant.phoneNo} {informant.email},{informant.phoneNo} {informant.email} event.birth.title,This is the title of the summary,{child.name.firstname} {child.name.surname},{child.name.firstname} {child.name.surname} +event.birth.custom.action.validate-declaration.field.comments.label,This is the label for the comments field for the validate declaration action,Comments,Commentaires +event.birth.custom.action.validate-declaration.audit-history-label,The label to show in audit history for the validate action,Validated,Validé +event.birth.custom.action.validate-declaration.label,This is shown as the action name anywhere the user can trigger the action from,Validate declaration,Valider la déclaration event.death.action.Read.label,This is shown as the action name anywhere the user can trigger the action from,Read,Lire event.death.action.certificate.form.cancel,This is the label for the verification cancellation button,Identity does not match,L'identité ne correspond pas event.death.action.certificate.form.cancel.confirmation.body,This is the body for the verification cancellation modal,"Please be aware that if you proceed, you will be responsible for issuing a certificate without the necessary proof of ID from the collector","Veuillez noter que si vous continuez, vous serez responsable de la délivrance d'un certificat sans la preuve d'identité nécessaire du collecteur." From b05cde9c0386fb505916670b4346a5ac8c67d2b1 Mon Sep 17 00:00:00 2001 From: cibelius Date: Mon, 15 Dec 2025 12:59:52 +0700 Subject: [PATCH 2/9] add flag config --- src/form/v2/death/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/form/v2/death/index.ts b/src/form/v2/death/index.ts index cb7ad92ce7..50db76dbef 100644 --- a/src/form/v2/death/index.ts +++ b/src/form/v2/death/index.ts @@ -164,6 +164,17 @@ export const deathEvent = defineConfig({ } ] }, + flags: [ + { + id: 'validated', + label: { + id: 'event.birth.flag.validated', + defaultMessage: 'Validated', + description: 'Flag label for validated' + }, + requiresAction: true + } + ], actions: [ { type: ActionType.READ, From 1588327f579793f6a56d2e747de0d640ed724ec2 Mon Sep 17 00:00:00 2001 From: cibelius Date: Mon, 15 Dec 2025 14:47:52 +0700 Subject: [PATCH 3/9] fix roles --- src/data-seeding/roles/roles.ts | 5 ++-- src/form/v2/death/index.ts | 47 ++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/data-seeding/roles/roles.ts b/src/data-seeding/roles/roles.ts index a6863810b3..9be02e590b 100644 --- a/src/data-seeding/roles/roles.ts +++ b/src/data-seeding/roles/roles.ts @@ -180,7 +180,7 @@ export const roles: Role[] = [ 'record.declared.review-duplicates[event=birth|death|tennis-club-membership]', 'record.registered.print-certified-copies[event=birth|death|tennis-club-membership]', 'record.registered.request-correction[event=birth|death|tennis-club-membership]', - 'record.custom-action[event=birth,customActionType=VALIDATE_DECLARATION]' + 'record.custom-action[event=birth|death,customActionType=VALIDATE_DECLARATION]' ] }, { @@ -229,7 +229,8 @@ export const roles: Role[] = [ 'record.registered.print-certified-copies[event=birth|death|tennis-club-membership]', 'record.registered.correct[event=birth|death|tennis-club-membership]', 'record.unassign-others[event=birth|death|tennis-club-membership]', - 'record.custom-action[event=birth,customActionType=ESCALATE|ISSUE_CERTIFIED_COPY|VALIDATE_DECLARATION]' + 'record.custom-action[event=birth,customActionType=ESCALATE|ISSUE_CERTIFIED_COPY|VALIDATE_DECLARATION]', + 'record.custom-action[event=death,customActionType=VALIDATE_DECLARATION]' ] }, { diff --git a/src/form/v2/death/index.ts b/src/form/v2/death/index.ts index 50db76dbef..13ad122e14 100644 --- a/src/form/v2/death/index.ts +++ b/src/form/v2/death/index.ts @@ -14,7 +14,12 @@ import { defineConfig, field, or, - user + user, + and, + status, + not, + flag, + InherentFlags } from '@opencrvs/toolkit/events' import { DEATH_DECLARATION_REVIEW, @@ -216,6 +221,46 @@ export const deathEvent = defineConfig({ } ] }, + { + type: ActionType.CUSTOM, + customActionType: 'VALIDATE_DECLARATION', + icon: 'Stamp', + label: { + defaultMessage: 'Validate declaration', + description: + 'This is shown as the action name anywhere the user can trigger the action from', + id: 'event.birth.custom.action.validate-declaration.label' + }, + conditionals: [ + { + type: ConditionalType.SHOW, + conditional: and(status('DECLARED'), not(flag('validated'))) + }, + { + type: ConditionalType.ENABLE, + conditional: not(flag(InherentFlags.POTENTIAL_DUPLICATE)) + } + ], + flags: [{ id: 'validated', operation: 'add' }], + form: [ + { + id: 'comments', + type: 'TEXTAREA', + label: { + defaultMessage: 'Comments', + description: + 'This is the label for the comments field for the validate declaration action', + id: 'event.birth.custom.action.validate-declaration.field.comments.label' + } + } + ], + auditHistoryLabel: { + defaultMessage: 'Validated', + description: + 'The label to show in audit history for the validate action', + id: 'event.birth.custom.action.validate-declaration.audit-history-label' + } + }, { type: ActionType.REJECT, label: { From 924adfa90e710f92dd5f6bbc53b12d7c8d520fda Mon Sep 17 00:00:00 2001 From: cibelius Date: Mon, 15 Dec 2025 16:19:36 +0700 Subject: [PATCH 4/9] upgrade toolkit --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7604815c46..38a397a035 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@hapi/boom": "^9.1.1", "@hapi/hapi": "^20.0.1", "@hapi/inert": "^6.0.3", - "@opencrvs/toolkit": "1.9.2-rc.db73c78", + "@opencrvs/toolkit": "1.9.2-rc.2064449", "@types/chalk": "^2.2.0", "@types/csv2json": "^1.4.0", "@types/fhir": "^0.0.30", diff --git a/yarn.lock b/yarn.lock index 0372cde166..8ae2763a75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -834,10 +834,10 @@ dependencies: "@octokit/openapi-types" "^18.0.0" -"@opencrvs/toolkit@1.9.2-rc.db73c78": - version "1.9.2-rc.db73c78" - resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.2-rc.db73c78.tgz#b389acb0f6f9ba6f54b50f037bcec92dcdfa2536" - integrity sha512-2ekht7jBpn1MxKL0AOMRGrfL1fx2dM9akxAD5GU2pfr3x7zjABeMsEtMtCcrXFYhJhaXIooSKk4XofXjXz4wTg== +"@opencrvs/toolkit@1.9.2-rc.2064449": + version "1.9.2-rc.2064449" + resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.2-rc.2064449.tgz#9afa3739eafcd01245a0998edcdafbb2467a7368" + integrity sha512-dKKhvvoSqL7dyIxdxy7rhe85+NDSxxye+ibOQq5K10t8/jJc5QDCnwsRXzvb4N6ValNA/glLfgwpezQNEEYlNQ== dependencies: "@trpc/client" "11.4.3" "@trpc/server" "11.4.3" From 45819c5d93af308ce59961b109d4df3deaad7dd5 Mon Sep 17 00:00:00 2001 From: cibelius Date: Mon, 15 Dec 2025 16:27:10 +0700 Subject: [PATCH 5/9] fix conf --- src/api/workqueue/workqueueConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/workqueue/workqueueConfig.ts b/src/api/workqueue/workqueueConfig.ts index 0017318915..954867161b 100644 --- a/src/api/workqueue/workqueueConfig.ts +++ b/src/api/workqueue/workqueueConfig.ts @@ -29,7 +29,7 @@ export const Workqueues = defineWorkqueues([ query: {}, actions: [ { - type: 'VALIDATE', + type: 'DECLARE', conditionals: [] } ] From 8342064c021823aff0cbe43d11d6eeb877853b2f Mon Sep 17 00:00:00 2001 From: cibelius Date: Mon, 15 Dec 2025 21:09:45 +0700 Subject: [PATCH 6/9] fix translation --- src/form/v2/birth/index.ts | 7 +++++++ src/translations/client.csv | 1 + 2 files changed, 8 insertions(+) diff --git a/src/form/v2/birth/index.ts b/src/form/v2/birth/index.ts index ca9ed979d5..521b852e80 100644 --- a/src/form/v2/birth/index.ts +++ b/src/form/v2/birth/index.ts @@ -280,6 +280,13 @@ export const birthEvent = defineConfig({ 'This is shown as the action name anywhere the user can trigger the action from', id: 'event.birth.custom.action.validate-declaration.label' }, + supportingCopy: { + defaultMessage: + 'Approving this declaration confirms it as legally accepted and eligible for registration.', + description: + 'This is the supporting copy for the Validate declaration -action', + id: 'event.birth.custom.action.validate-declaration.supportingCopy' + }, conditionals: [ { type: ConditionalType.SHOW, diff --git a/src/translations/client.csv b/src/translations/client.csv index e752dfb49c..8469311bf5 100644 --- a/src/translations/client.csv +++ b/src/translations/client.csv @@ -895,6 +895,7 @@ event.birth.title,This is the title of the summary,{child.name.firstname} {child event.birth.custom.action.validate-declaration.field.comments.label,This is the label for the comments field for the validate declaration action,Comments,Commentaires event.birth.custom.action.validate-declaration.audit-history-label,The label to show in audit history for the validate action,Validated,Validé event.birth.custom.action.validate-declaration.label,This is shown as the action name anywhere the user can trigger the action from,Validate declaration,Valider la déclaration +event.birth.custom.action.validate-declaration.supportingCopy,This is the supporting copy for the Validate declaration -action,Approving this declaration confirms it as legally accepted and eligible for registration.,L'approbation de cette déclaration confirme qu'elle est légalement acceptée et éligible à l'enregistrement. event.death.action.Read.label,This is shown as the action name anywhere the user can trigger the action from,Read,Lire event.death.action.certificate.form.cancel,This is the label for the verification cancellation button,Identity does not match,L'identité ne correspond pas event.death.action.certificate.form.cancel.confirmation.body,This is the body for the verification cancellation modal,"Please be aware that if you proceed, you will be responsible for issuing a certificate without the necessary proof of ID from the collector","Veuillez noter que si vous continuez, vous serez responsable de la délivrance d'un certificat sans la preuve d'identité nécessaire du collecteur." From 9c41ae92bf747e4faeb1f4fc76a952b5666ecaa5 Mon Sep 17 00:00:00 2001 From: jamil314 Date: Mon, 15 Dec 2025 19:37:37 +0600 Subject: [PATCH 7/9] chore: sort translations --- src/translations/client.csv | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/translations/client.csv b/src/translations/client.csv index 8469311bf5..85ab51ae75 100644 --- a/src/translations/client.csv +++ b/src/translations/client.csv @@ -18,8 +18,8 @@ actionModal.confirm,The label for confirm button of action modal,Confirm,Confirm actionModal.description,The description for action modal,The informant will be notified of this decision and a record of this decision will be recorded,L'informateur sera informé de cette décision et celle-ci sera consignée dans un dossier. actionModal.description.incomplete,Description shown in the action modal when a declaration is incomplete,This incomplete declaration will be submitted for review.,Cette déclaration incomplète sera soumise à l'examen. actionModal.title,The title for action modal,"{action, select, declare{Declare} other{{action}}} the member?","{action, select, declare{Declare} other{{action}}} the member?" -actions.notify,Notify action label,Notify,Notifier actions.edit,Edit action label,Edit,Modifier +actions.notify,Notify action label,Notify,Notifier advancedSearch.accordion.hide,Label for hide button when accordion is closed,Hide,Cacher advancedSearch.accordion.show,Label for show button when accordion is closed,Show,Voir advancedSearch.form.childDetails,The title of Child details accordion,Child details,information de l'enfant @@ -778,6 +778,8 @@ duplicates.content.subtitle,Duplicates content subtitle message,"This record was duplicates.content.title,Duplicates content title message,Is {name} ({trackingId}) a duplicate?,Est-ce que {name} ({trackingId}) est un doublon? duplicates.review.header,Review page header for duplicates declarations,Potential {event} duplicate review,Potentiel {event} examen de doublon duplicates.warning,The warning message shown when a declaration has potential duplicates,Potential duplicate of record {trackingId},Duplicata potentiel de l'enregistrement {trackingId} +editPageBanner.declaredMessage,The message for the edit page banner,You are editing a record declared by {name} ({role} at {location}),Vous modifiez un dossier déclaré par {name} ({role} à {location}) +editPageBanner.notifiedMessage,The message for the edit page banner,You are editing a record notified by {name} ({role} at {location}),Vous modifiez un dossier déclaré par {name} ({role} à {location}) email.label.confirmation,Confirmation email address message,A verification code has been sent to {email},Un code de vérification a été envoyé à {email} error.child.weightAtBirth.invalidNumberRange,This is the error message for invalid number range,Must be within 0 and 6,Doit être compris entre 0 et 6 error.code,Error code,401,401 @@ -801,15 +803,6 @@ event.action.declare.form.section.person.field.age.error,Error message for inval event.action.notAvailableForEvent,Shown when user tries to perform an action that is not available for the event,The action you're trying to perform is not available for this event anymore,L'action que vous essayez d'effectuer n'est plus disponible pour cet événement event.action.outbox-retry.label,Label for retry button for outbox,Retry,Réessayer event.action.review-correction.label,Label for review correction button in dropdown menu,Review correction request,Revoir la demande de correction -event.edit.registerWithEdits.label,Label for "Register with edits" in edit action menu,Register with edits,Enregistrer avec modifications -event.edit.declareWithEdits.label,Label for "Declare with edits" in edit action menu,Declare with edits,Déclarer avec modifications -event.edit.registerWithEdits.description,Description for "Register with edits" in edit action menu,Are you sure you want to register this event with these edits?,Êtes-vous sûr de vouloir enregistrer cet événement avec ces modifications ? -event.edit.declareWithEdits.description,Description for "Declare with edits" in edit action menu,Are you sure you want to edit this declaration? By confirming you are redeclaring this event and override past changes...,Êtes-vous sûr de vouloir modifier cette déclaration ? En confirmant, vous redéclarez cet événement et remplacez les modifications précédentes... -event.edit.notifyWithEdits.label,Label for "Notify with edits" in edit action menu,Notify with edits,Notifier avec modifications -event.edit.notifyWithEdits.description,Description for "Notify with edits" in edit action menu,Are you sure you want to notify this event with these edits?,Êtes-vous sûr de vouloir notifier cet événement avec ces modifications ? -event.edit.comment.label,The label for the comment,Comments,Commentaires -editPageBanner.declaredMessage,The message for the edit page banner,You are editing a record declared by {name} ({role} at {location}),Vous modifiez un dossier déclaré par {name} ({role} à {location}) -editPageBanner.notifiedMessage,The message for the edit page banner,You are editing a record notified by {name} ({role} at {location}),Vous modifiez un dossier déclaré par {name} ({role} à {location}) event.birth.action.approve.confirmationText,This is the confirmation text for the approve action,This birth has been registered late. You are now approving it for further validation and registration.,Cette naissance a été enregistrée en retard. Vous l'approuvez maintenant pour une validation et un enregistrement supplémentaires. event.birth.action.approve.label,This is shown as the action name anywhere the user can trigger the action from,Approve declaration,Approuver la déclaration event.birth.action.archive.label,Label for archive record button in dropdown menu,Archive,Aarchiver @@ -1069,6 +1062,13 @@ event.death.summary.informant.contact.value,This is the contact value of the inf event.death.title,This is the title of the summary,{deceased.name.firstname} {deceased.name.surname},{deceased.name.firstname} {deceased.name.surname} event.default.action.certificate.template.type.label,Select certificate template,Type,Taper event.default.action.certificate.template.type.notFound,Select certificate template options not found,"No template available for this event, contact Admin","Aucun modèle disponible pour cette event, contactez l’admin" +event.edit.comment.label,The label for the comment,Comments,Commentaires +event.edit.declareWithEdits.description,Description for `Declare with edits` in edit action menu,Are you sure you want to edit this declaration? By confirming you are redeclaring this event and override past changes...,"Êtes-vous sûr de vouloir modifier cette déclaration ? En confirmant, vous redéclarez cet événement et remplacez les modifications précédentes..." +event.edit.declareWithEdits.label,Label for `Declare with edits` in edit action menu,Declare with edits,Déclarer avec modifications +event.edit.notifyWithEdits.description,Description for `Notify with edits` in edit action menu,Are you sure you want to notify this event with these edits?,Êtes-vous sûr de vouloir notifier cet événement avec ces modifications ? +event.edit.notifyWithEdits.label,Label for `Notify with edits` in edit action menu,Notify with edits,Notifier avec modifications +event.edit.registerWithEdits.description,Description for `Register with edits` in edit action menu,Are you sure you want to register this event with these edits?,Êtes-vous sûr de vouloir enregistrer cet événement avec ces modifications ? +event.edit.registerWithEdits.label,Label for `Register with edits` in edit action menu,Register with edits,Enregistrer avec modifications event.history.role,Label for the role in event history,"{role, select, LOCAL_REGISTRAR {Local Registrar} FIELD_AGENT {Field Agent} POLICE_OFFICER {Police Officer} REGISTRATION_AGENT {Registration Agent} HEALTHCARE_WORKER {Healthcare Worker} HOSPITAL_CLERK {Hospital Clerk} LOCAL_SYSTEM_ADMIN {Administrator} NATIONAL_REGISTRAR {Registrar General} PERFORMANCE_MANAGER {Operations Manager} NATIONAL_SYSTEM_ADMIN {National Administrator} COMMUNITY_LEADER {Community Leader} HEALTH {Health integration} IMPORT {Import integration} NATIONAL_ID {National ID integration} RECORD_SEARCH {Record search integration} WEBHOOK {Webhook} PROVINCIAL_REGISTRAR {Provincial Registrar} other {Unknown}}","{role, select, LOCAL_REGISTRAR {Officier d'état civil local} POLICE_OFFICER {Agent de police} FIELD_AGENT {Agent de terrain} REGISTRATION_AGENT {Agent d'enregistrement} HEALTHCARE_WORKER {Professionnel de santé} PERFORMANCE_MANAGER {Responsable des opérations} LOCAL_SYSTEM_ADMIN {Administrateur} NATIONAL_SYSTEM_ADMIN {Administrateur national} NATIONAL_REGISTRAR {Registraire général} HOSPITAL_CLERK {Employé administratif à l'hôpital} HEALTH {Intégration santé} IMPORT {Intégration d'importation} NATIONAL_ID {Intégration ID nationale} RECORD_SEARCH {Intégration de recherche d'enregistrements} WEBHOOK {Webhook} COMMUNITY_LEADER {Responsable communautaire} PROVINCIAL_REGISTRAR {Registraire provincial} other {Inconnu}}" event.history.system,Name for system initiated actions in the event history,System,System event.history.systemDefaultName,Fallback for system integration name in the event history,System integration,Intégration système @@ -1137,12 +1137,12 @@ event.tennis-club-membership.summary.field.recommender.firstname.empty,Shown whe event.tennis-club-membership.summary.field.recommender.firstname.label,Label for the recommender's first name field,Recommender's First Name,Recommender's First Name event.tennis-club-membership.summary.field.recommender.id.empty,Shown when the recommender id is missing in summary,Recommender's id missing,Recommender's id missing event.tennis-club-membership.summary.field.recommender.id.label,Label for the recommender's ID field,Recommender's ID,Recommender's ID -events.overview.tabs.record,Title of the Record tab,Record,Enregistrement -events.overview.tabs.audit,Title of the Audit tab,Audit,Audit events.history.status,Events status history,"{status, select, Requested {Waiting for external validation} other {{action, select, CREATE {Declaration started} NOTIFY {Notified} EDIT {Edited} VALIDATE {Sent for approval} DRAFT {Draft} DECLARE {Sent for review} REGISTER {Registered} PRINT_CERTIFICATE {Certified} REJECT {Rejected} ARCHIVE {Archived} DUPLICATE_DETECTED {Flagged as potential duplicate} MARKED_AS_DUPLICATE {Marked as a duplicate} MARK_AS_NOT_DUPLICATE {Marked not a duplicate} CORRECTED {Record corrected} REQUEST_CORRECTION {Correction requested} APPROVE_CORRECTION {Correction approved} REJECT_CORRECTION {Correction rejected} READ {Viewed} ASSIGN {Assigned} UNASSIGN {Unassigned} UPDATE {Updated} other {Unknown}}}}","{status, select, Requested {En attente de validation externe} other {{action, select, CREATE {Déclaration commencée} NOTIFY {Envoyé incomplet} EDIT {Modifié} VALIDATE {Envoyé pour approbation} DRAFT {Brouillon} DECLARE {Envoyé pour révision} REGISTER {Enregistré} PRINT_CERTIFICATE {Certifié} REJECT {Rejeté} ARCHIVE {Archivé} DUPLICATE_DETECTED {Marqué comme doublon} MARKED_AS_DUPLICATE {Marqué comme doublon} MARK_AS_NOT_DUPLICATE {Marqué comme non en doublon} CORRECTED {Enregistrement corrigé} REQUEST_CORRECTION {Correction demandée} APPROVE_CORRECTION {Correction approuvée} REJECT_CORRECTION {Correction refusée} READ {Consulté} ASSIGN {Attribué} UNASSIGN {Désattribué} UPDATE {Mis à jour} other {Inconnu}}}}" events.outbox.processingAction,Message in outbox when processing action,"{action, select, DECLARE {Sending} REGISTER {Registering} VALIDATE {Sending for approval} NOTIFY {Sending} REJECT {Sending for updates} ARCHIVE {Archiving} PRINT_CERTIFICATE {Certifying} REQUEST_CORRECTION {Requesting correction} APPROVE_CORRECTION {Approving correction} REJECT_CORRECTION {Rejecting correction} ASSIGN {Assigning} UNASSIGN {Unassigning} other {processing action}}","{action, select, DECLARE {Envoi} REGISTER {Enregistrement} VALIDATE {Envoi pour approbation} NOTIFY {Envoi} REJECT {Envoi pour mise à jour} ARCHIVE {Archivage} PRINT_CERTIFICATE {Certification} REQUEST_CORRECTION {Demande de correction} APPROVE_CORRECTION {Approbation de la correction} REJECT_CORRECTION {Rejet de la correction} ASSIGN {Attribution} UNASSIGN {Désattribution} other {action en cours}}" events.outbox.waitingForAction,Message in outbox when waiting for action,"Waiting to {action, select, DECLARE {send} CREATE {send} REGISTER {register} VALIDATE {send for approval} NOTIFY {send} REJECT {send for updates} ARCHIVE {archive} PRINT_CERTIFICATE {certify} REQUEST_CORRECTION {request correction} APPROVE_CORRECTION {approve correction} REJECT_CORRECTION {reject correction} ASSIGN {assign} UNASSIGN {unassign} other {action}}","En attente de {action, select, DECLARE {l'envoi} CREATE {l'envoi} REGISTER {l'enregistrement} VALIDATE {l'envoi pour approbation} NOTIFY {l'envoi} REJECT {l'envoi pour mise à jour} ARCHIVE {l'archivage} PRINT_CERTIFICATE {la certification} REQUEST_CORRECTION {la demande de correction} APPROVE_CORRECTION {l'approbation de la correction} REJECT_CORRECTION {le rejet de la correction} ASSIGN {l'attribution} UNASSIGN {la désattribution} other {l'action}}" events.overview.tabs.audit,Title of the Audit tab,Audit,Audit +events.overview.tabs.audit,Title of the Audit tab,Audit,Audit +events.overview.tabs.record,Title of the Record tab,Record,Enregistrement events.overview.tabs.record,Title of the Record tab,Record,Enregistrement events.status,Dynamic event status,"{status, select, OUTBOX {Syncing..} CREATED {Draft} VALIDATED {Validated} DRAFT {Draft} DECLARED {Declared} REGISTERED {Registered} CERTIFIED {Certified} REJECTED {Rejected} ARCHIVED {Archived} MARKED_AS_DUPLICATE {Marked as a duplicate} MARK_AS_NOT_DUPLICATE {Marked not a duplicate} NOTIFIED {In progress} other {Unknown}}","{status, select, OUTBOX {Synchronisation..} CREATED {Brouillon} VALIDATED {Validé} DRAFT {Brouillon} DECLARED {Déclaré} REGISTERED {Enregistré} CERTIFIED {Certifié} REJECTED {Nécessite une mise à jour} ARCHIVED {Archivé} MARKED_AS_DUPLICATE {Marqué comme doublon} MARK_AS_NOT_DUPLICATE {Marqué comme non en doublon} NOTIFIED {Notifié} other {Inconnu}}" exitModal.cancel, Modal cancel button,Cancel,Annuler @@ -1169,11 +1169,11 @@ fieldAgentHome.queryError,The text when error ocurred loading rejected declarati file.upload.fileSize.error,Error message when the selected file is too large,File size must be less than {maxSize}mb,La taille du fichier doit être inférieure à {maxSize}M file.upload.fileType.error,Error message when the selected file type is not supported,File format not supported. Please attach {types} (max {maxSize}mb),Format de fichier non pris en charge. Veuillez joindre un {types} (max {maxSize}mb) flags.builtin.correction-requested.label,Label for flag,Correction requested,Correction demandée +flags.builtin.edit-in-progress.label,Flag label for edit in progress,Edit in progress,Modification en cours flags.builtin.incomplete.label,Label for flag,Incomplete,Incomplet flags.builtin.pending-certification.label,Label for flag,Pending certification,En attente de certification flags.builtin.potential-duplicate.label,Label for flag,Potential duplicate,Doublon potentiel flags.builtin.rejected.label,Label for flag,Rejected,Rejeté -flags.builtin.edit-in-progress.label,Flag label for edit in progress,Edit in progress,Modification en cours form.birth.child.title,Form section title for Child,Child's details,information de l'enfant form.customField.label.numberOfDependants,,No. of dependants,Nombre de personnes à charge form.customField.label.reasonForLateRegistrationBirth,,Reason for delayed registration,Raison du retard d'inscription From b9a557db93e7a64aeb68abbeb0fd33ce593c04cd Mon Sep 17 00:00:00 2001 From: cibelius Date: Tue, 16 Dec 2025 09:22:23 +0700 Subject: [PATCH 8/9] upgrade toolkit --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 38a397a035..260fa6227d 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@hapi/boom": "^9.1.1", "@hapi/hapi": "^20.0.1", "@hapi/inert": "^6.0.3", - "@opencrvs/toolkit": "1.9.2-rc.2064449", + "@opencrvs/toolkit": "1.9.2-rc.a6c8a1e", "@types/chalk": "^2.2.0", "@types/csv2json": "^1.4.0", "@types/fhir": "^0.0.30", diff --git a/yarn.lock b/yarn.lock index 8ae2763a75..f547320641 100644 --- a/yarn.lock +++ b/yarn.lock @@ -834,10 +834,10 @@ dependencies: "@octokit/openapi-types" "^18.0.0" -"@opencrvs/toolkit@1.9.2-rc.2064449": - version "1.9.2-rc.2064449" - resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.2-rc.2064449.tgz#9afa3739eafcd01245a0998edcdafbb2467a7368" - integrity sha512-dKKhvvoSqL7dyIxdxy7rhe85+NDSxxye+ibOQq5K10t8/jJc5QDCnwsRXzvb4N6ValNA/glLfgwpezQNEEYlNQ== +"@opencrvs/toolkit@1.9.2-rc.a6c8a1e": + version "1.9.2-rc.a6c8a1e" + resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.2-rc.a6c8a1e.tgz#32e7c2819ddce84a248fade053da595ba311d708" + integrity sha512-WpyC+Jyb1xxexjGeUbkiuOiHeRenC1eOuGS2YxQfeoXZYuwrcftUfRo+xe+pKofCUxGOHd8Hddspi+FR8HrmfQ== dependencies: "@trpc/client" "11.4.3" "@trpc/server" "11.4.3" From 7b0d8ef7702c9bb8120114ff4c92fafac143d7a2 Mon Sep 17 00:00:00 2001 From: cibelius Date: Tue, 16 Dec 2025 12:35:07 +0700 Subject: [PATCH 9/9] fix workqueue config --- src/api/workqueue/workqueueConfig.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/api/workqueue/workqueueConfig.ts b/src/api/workqueue/workqueueConfig.ts index 954867161b..d1c67c0b31 100644 --- a/src/api/workqueue/workqueueConfig.ts +++ b/src/api/workqueue/workqueueConfig.ts @@ -404,17 +404,12 @@ export const Workqueues = defineWorkqueues([ description: 'Title of sent for approval workqueue' }, query: { - type: 'or', - clauses: [ - { - updatedBy: { type: 'exact', term: user('id') }, - flags: { noneOf: [InherentFlags.REJECTED] } - }, - { - flags: { anyOf: [InherentFlags.CORRECTION_REQUESTED, 'validated'] }, - updatedBy: { type: 'exact', term: user('id') } - } - ] + status: { type: 'anyOf', terms: ['DECLARED', 'NOTIFIED', 'REGISTERED'] }, + updatedBy: { type: 'exact', term: user('id') }, + flags: { + noneOf: [InherentFlags.REJECTED], + anyOf: [InherentFlags.CORRECTION_REQUESTED, 'validated'] + } }, actions: [], columns: [