File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed
Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 6868 "@hapi/boom" : " ^9.1.1" ,
6969 "@hapi/hapi" : " ^20.0.1" ,
7070 "@hapi/inert" : " ^6.0.3" ,
71- "@opencrvs/toolkit" : " 1.8.1-rc.fa0e315 " ,
71+ "@opencrvs/toolkit" : " 1.8.1-rc.4cfe084 " ,
7272 "@types/chalk" : " ^2.2.0" ,
7373 "@types/csv2json" : " ^1.4.0" ,
7474 "@types/fhir" : " ^0.0.30" ,
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ async function getNotificationParams(
9898 const locations = await getLocations ( token )
9999
100100 const declaration = deepMerge (
101- aggregateActionDeclarations ( event , getEventConfig ( event . type ) ) ,
101+ aggregateActionDeclarations ( event ) ,
102102 pendingAction . declaration
103103 )
104104
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ import {
1919 FieldType ,
2020 PageTypes ,
2121 field ,
22- event
22+ event ,
23+ user ,
24+ or
2325} from '@opencrvs/toolkit/events'
2426import { Event } from './types/types'
2527import { MAX_NAME_LENGTH } from './v2/birth/validators'
@@ -148,6 +150,28 @@ const TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
148150 description : 'This is the label for the field' ,
149151 id : 'event.tennis-club-membership.action.declare.form.section.who.field.image.label'
150152 }
153+ } ,
154+ {
155+ id : 'applicant.isRecommendedByFieldAgent' ,
156+ type : FieldType . CHECKBOX ,
157+ analytics : true ,
158+ required : false ,
159+ label : {
160+ defaultMessage :
161+ 'Field shown when field agent is submitting application.' ,
162+ description : 'This is the label for the field' ,
163+ id : 'event.tennis-club-membership.action.declare.form.section.who.field.isRecommendedByFieldAgent.label'
164+ } ,
165+ conditionals : [
166+ {
167+ type : ConditionalType . SHOW ,
168+ conditional : or (
169+ user . hasRole ( 'SOCIAL_WORKER' ) ,
170+ user . hasRole ( 'FIELD_AGENT' ) ,
171+ user . hasRole ( 'HOSPITAL_CLERK' )
172+ )
173+ }
174+ ]
151175 }
152176 ]
153177 } ,
You can’t perform that action at this time.
0 commit comments