diff --git a/package.json b/package.json index 5b30236f0a..c9c64f771c 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@hapi/boom": "^9.1.1", "@hapi/hapi": "^20.0.1", "@hapi/inert": "^6.0.3", - "@opencrvs/toolkit": "1.9.0-rc.8476ac9", + "@opencrvs/toolkit": "1.9.0-rc.8a42cc8", "@types/chalk": "^2.2.0", "@types/csv2json": "^1.4.0", "@types/fhir": "^0.0.30", diff --git a/src/form/tennis-club-membership.ts b/src/form/tennis-club-membership.ts index 7fc0b1845b..0ae51c7619 100644 --- a/src/form/tennis-club-membership.ts +++ b/src/form/tennis-club-membership.ts @@ -892,15 +892,6 @@ export const tennisClubMembershipEvent = defineConfig({ }, review: TENNIS_CLUB_DECLARATION_REVIEW }, - { - type: ActionType.DELETE, - label: { - defaultMessage: 'Delete draft', - description: - 'This is shown as the action name anywhere the user can trigger the action from', - id: 'event.tennis-club-membership.action.delete.label' - } - }, { type: ActionType.VALIDATE, label: { diff --git a/src/form/v2/birth/index.ts b/src/form/v2/birth/index.ts index 5840015a70..5c073a5123 100644 --- a/src/form/v2/birth/index.ts +++ b/src/form/v2/birth/index.ts @@ -14,6 +14,7 @@ import { ConditionalType, defineConfig, field, + flag, not } from '@opencrvs/toolkit/events' import { @@ -228,12 +229,6 @@ export const birthEvent = defineConfig({ 'This is shown as the action name anywhere the user can trigger the action from', id: 'event.birth.action.approve.label' }, - supportingCopy: { - defaultMessage: - 'This birth has been registered late. You are now approving it for further validation and registration.', - description: 'This is the confirmation text for the approve action', - id: 'event.birth.action.approve.confirmationText' - }, form: [ { id: 'notes', @@ -249,11 +244,23 @@ export const birthEvent = defineConfig({ flags: [ { id: 'approval-required-for-late-registration', operation: 'remove' } ], + conditionals: [ + { + type: ConditionalType.SHOW, + conditional: flag('approval-required-for-late-registration') + } + ], auditHistoryLabel: { defaultMessage: 'Approved', description: 'The label to show in audit history for the approve action', id: 'event.birth.action.approve.audit-history-label' + }, + supportingCopy: { + defaultMessage: + 'This birth has been registered late. You are now approving it for further validation and registration.', + description: 'This is the confirmation text for the approve action', + id: 'event.birth.action.approve.confirmationText' } }, { diff --git a/yarn.lock b/yarn.lock index 77531b7907..d8af21da82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -834,10 +834,10 @@ dependencies: "@octokit/openapi-types" "^18.0.0" -"@opencrvs/toolkit@1.9.0-rc.8476ac9": - version "1.9.0-rc.8476ac9" - resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.0-rc.8476ac9.tgz#6794f0e137dc7dd2bd61f42478a79fddfe963902" - integrity sha512-Aqj5E+p+5iMhBjtH007JG7osgd5zCv60GZ2ltcGirAv7C89PWXFeTRumOUpXGMNCdhN2prfIRq32P3ZpXQxXHg== +"@opencrvs/toolkit@1.9.0-rc.8a42cc8": + version "1.9.0-rc.8a42cc8" + resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.0-rc.8a42cc8.tgz#29d8299ce1feed7b2d71f6eec1c89d5fb7a0c6dc" + integrity sha512-GCVX2eIHcZdc8GlmQT+RISlJjt0eU0ftld5Nd3lLwsso7lkVNQa7sY/LdbvMZ6dcgx9sdYUr32pgeEwL8iUMYw== dependencies: "@trpc/client" "11.4.3" "@trpc/server" "11.4.3"