File tree Expand file tree Collapse file tree 3 files changed +23
-6
lines changed
Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 6464 "@hapi/boom" : " ^9.1.1" ,
6565 "@hapi/hapi" : " ^20.0.1" ,
6666 "@hapi/inert" : " ^6.0.3" ,
67- "@opencrvs/toolkit" : " 0.0.9 -events" ,
67+ "@opencrvs/toolkit" : " 0.0.13 -events" ,
6868 "@types/chalk" : " ^2.2.0" ,
6969 "@types/csv2json" : " ^1.4.0" ,
7070 "@types/fhir" : " ^0.0.30" ,
Original file line number Diff line number Diff line change 1010 */
1111
1212import { defineConfig , defineForm } from '@opencrvs/toolkit/events'
13+
1314import {
1415 defineConditional ,
1516 or ,
1617 eventHasAction ,
1718 userHasScope ,
1819 and ,
1920 not ,
20- field
21+ field ,
22+ deduplication
2123} from '@opencrvs/toolkit/conditionals'
2224
2325const TENNIS_CLUB_FORM = defineForm ( {
@@ -288,6 +290,21 @@ export const tennisClubMembershipEvent = defineConfig({
288290 ]
289291 }
290292 ] ,
293+ deduplication : [
294+ {
295+ id : 'STANDARD CHECK' ,
296+ label : {
297+ defaultMessage : 'Standard check' ,
298+ description :
299+ 'This could be shown to the user in a reason for duplicate detected' ,
300+ id : '...'
301+ } ,
302+ query : deduplication . or ( [
303+ deduplication . field ( 'requester.phone' ) . strictMatches ( ) ,
304+ deduplication . field ( 'requester.name' ) . fuzzyMatches ( )
305+ ] )
306+ }
307+ ] ,
291308 actions : [
292309 {
293310 type : 'DECLARE' ,
Original file line number Diff line number Diff line change 790790 dependencies :
791791 " @octokit/openapi-types" " ^18.0.0"
792792
793- " @opencrvs/[email protected] .9 -events " :
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 ==
793+ " @opencrvs/[email protected] .13 -events " :
794+ version "0.0.13 -events"
795+ resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-0.0.13 -events.tgz#7b2c1fd73bba74c2cb6292a0ce4c6659e9711ee3 "
796+ integrity sha512-sdST83RXETbP6e1ETtM7VSUP2W+sYpz/DU9a8c036QlJ67I9306nuIqLePGU62pPggI8sI63fa2PL38bF3hAlg ==
797797 dependencies :
798798 ajv "^8.17.1"
799799
You can’t perform that action at this time.
0 commit comments