Skip to content

Commit 5a65c81

Browse files
authored
add a delete draft action (#357)
1 parent 8501170 commit 5a65c81

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"@hapi/boom": "^9.1.1",
6565
"@hapi/hapi": "^20.0.1",
6666
"@hapi/inert": "^6.0.3",
67-
"@opencrvs/toolkit": "0.0.6-events",
67+
"@opencrvs/toolkit": "0.0.9-events",
6868
"@types/chalk": "^2.2.0",
6969
"@types/csv2json": "^1.4.0",
7070
"@types/fhir": "^0.0.30",

src/form/tennis-club-membership.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,17 @@ export const tennisClubMembershipEvent = defineConfig({
272272
forms: [TENNIS_CLUB_FORM],
273273
allowedWhen: defineConditional(not(eventHasAction('DECLARE')))
274274
},
275+
{
276+
type: 'DELETE',
277+
label: {
278+
defaultMessage: 'Delete draft',
279+
description:
280+
'This is shown as the action name anywhere the user can trigger the action from',
281+
id: 'event.tennis-club-membership.action.delete.label'
282+
},
283+
forms: [],
284+
allowedWhen: defineConditional(not(eventHasAction('DECLARE')))
285+
},
275286
{
276287
type: 'VALIDATE',
277288
label: {

yarn.lock

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,10 +790,12 @@
790790
dependencies:
791791
"@octokit/openapi-types" "^18.0.0"
792792

793-
"@opencrvs/toolkit@^0.0.5":
794-
version "0.0.5"
795-
resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-0.0.5.tgz#dbd3395b561c1eb3527b8cfc28b6e1dd301671f3"
796-
integrity sha512-Ex45aFUJ1iQwpYGMHhxVbhpuQFqVlmdSkNXz1phkM7KAzNtngL2KGIJCc6TFv4GKOHU/lLEfmGyrhIDCKlA7fQ==
793+
"@opencrvs/[email protected]":
794+
version "0.0.9-events"
795+
resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-0.0.9-events.tgz#a1d9d1d786f280171018964a5604cbb428bccd88"
796+
integrity sha512-unsHk3kjqlA4nkClkpmhNVK1c2oxAEuX66z4RsM19gvSPstqECRlCIpb1KboKh9tjofRBaOzQbj8vTZDqqsXmA==
797+
dependencies:
798+
ajv "^8.17.1"
797799

798800
799801
version "4.24.0"
@@ -1402,6 +1404,16 @@ ajv@^6.10.0, ajv@^6.12.4:
14021404
json-schema-traverse "^0.4.1"
14031405
uri-js "^4.2.2"
14041406

1407+
ajv@^8.17.1:
1408+
version "8.17.1"
1409+
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6"
1410+
integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==
1411+
dependencies:
1412+
fast-deep-equal "^3.1.3"
1413+
fast-uri "^3.0.1"
1414+
json-schema-traverse "^1.0.0"
1415+
require-from-string "^2.0.2"
1416+
14051417
ansi-escapes@^3.0.0:
14061418
version "3.2.0"
14071419
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
@@ -2532,6 +2544,11 @@ fast-safe-stringify@^2.1.1:
25322544
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884"
25332545
integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==
25342546

2547+
fast-uri@^3.0.1:
2548+
version "3.0.5"
2549+
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.5.tgz#19f5f9691d0dab9b85861a7bb5d98fca961da9cd"
2550+
integrity sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==
2551+
25352552
fastq@^1.6.0:
25362553
version "1.13.0"
25372554
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c"
@@ -3331,6 +3348,11 @@ json-schema-traverse@^0.4.1:
33313348
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
33323349
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
33333350

3351+
json-schema-traverse@^1.0.0:
3352+
version "1.0.0"
3353+
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
3354+
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
3355+
33343356
json-stable-stringify-without-jsonify@^1.0.1:
33353357
version "1.0.1"
33363358
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
@@ -4361,6 +4383,11 @@ repeat-string@^1.6.1:
43614383
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
43624384
integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==
43634385

4386+
require-from-string@^2.0.2:
4387+
version "2.0.2"
4388+
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
4389+
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
4390+
43644391
resolve-from@^3.0.0:
43654392
version "3.0.0"
43664393
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"

0 commit comments

Comments
 (0)