Skip to content

Commit 0fc50a9

Browse files
authored
Merge pull request #1157 from opencrvs/ocrvs-10890
Add temporary conditional to approve action
2 parents 254025c + 90c0e79 commit 0fc50a9

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"@hapi/boom": "^9.1.1",
6464
"@hapi/hapi": "^20.0.1",
6565
"@hapi/inert": "^6.0.3",
66-
"@opencrvs/toolkit": "1.9.0-rc.8476ac9",
66+
"@opencrvs/toolkit": "1.9.0-rc.8a42cc8",
6767
"@types/chalk": "^2.2.0",
6868
"@types/csv2json": "^1.4.0",
6969
"@types/fhir": "^0.0.30",

src/form/tennis-club-membership.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -892,15 +892,6 @@ export const tennisClubMembershipEvent = defineConfig({
892892
},
893893
review: TENNIS_CLUB_DECLARATION_REVIEW
894894
},
895-
{
896-
type: ActionType.DELETE,
897-
label: {
898-
defaultMessage: 'Delete draft',
899-
description:
900-
'This is shown as the action name anywhere the user can trigger the action from',
901-
id: 'event.tennis-club-membership.action.delete.label'
902-
}
903-
},
904895
{
905896
type: ActionType.VALIDATE,
906897
label: {

src/form/v2/birth/index.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
ConditionalType,
1515
defineConfig,
1616
field,
17+
flag,
1718
not
1819
} from '@opencrvs/toolkit/events'
1920
import {
@@ -228,12 +229,6 @@ export const birthEvent = defineConfig({
228229
'This is shown as the action name anywhere the user can trigger the action from',
229230
id: 'event.birth.action.approve.label'
230231
},
231-
supportingCopy: {
232-
defaultMessage:
233-
'This birth has been registered late. You are now approving it for further validation and registration.',
234-
description: 'This is the confirmation text for the approve action',
235-
id: 'event.birth.action.approve.confirmationText'
236-
},
237232
form: [
238233
{
239234
id: 'notes',
@@ -249,11 +244,23 @@ export const birthEvent = defineConfig({
249244
flags: [
250245
{ id: 'approval-required-for-late-registration', operation: 'remove' }
251246
],
247+
conditionals: [
248+
{
249+
type: ConditionalType.SHOW,
250+
conditional: flag('approval-required-for-late-registration')
251+
}
252+
],
252253
auditHistoryLabel: {
253254
defaultMessage: 'Approved',
254255
description:
255256
'The label to show in audit history for the approve action',
256257
id: 'event.birth.action.approve.audit-history-label'
258+
},
259+
supportingCopy: {
260+
defaultMessage:
261+
'This birth has been registered late. You are now approving it for further validation and registration.',
262+
description: 'This is the confirmation text for the approve action',
263+
id: 'event.birth.action.approve.confirmationText'
257264
}
258265
},
259266
{

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,10 @@
834834
dependencies:
835835
"@octokit/openapi-types" "^18.0.0"
836836

837-
"@opencrvs/[email protected].8476ac9":
838-
version "1.9.0-rc.8476ac9"
839-
resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.0-rc.8476ac9.tgz#6794f0e137dc7dd2bd61f42478a79fddfe963902"
840-
integrity sha512-Aqj5E+p+5iMhBjtH007JG7osgd5zCv60GZ2ltcGirAv7C89PWXFeTRumOUpXGMNCdhN2prfIRq32P3ZpXQxXHg==
837+
"@opencrvs/[email protected].8a42cc8":
838+
version "1.9.0-rc.8a42cc8"
839+
resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.0-rc.8a42cc8.tgz#29d8299ce1feed7b2d71f6eec1c89d5fb7a0c6dc"
840+
integrity sha512-GCVX2eIHcZdc8GlmQT+RISlJjt0eU0ftld5Nd3lLwsso7lkVNQa7sY/LdbvMZ6dcgx9sdYUr32pgeEwL8iUMYw==
841841
dependencies:
842842
"@trpc/client" "11.4.3"
843843
"@trpc/server" "11.4.3"

0 commit comments

Comments
 (0)