Skip to content

Commit 228f7f7

Browse files
authored
Merge pull request #1056 from opencrvs/cihan-user-context
chore: add new field
2 parents dccddae + c44fa1d commit 228f7f7

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
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",

src/api/notification/informantNotification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/form/tennis-club-membership.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff 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'
2426
import { Event } from './types/types'
2527
import { 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
},

0 commit comments

Comments
 (0)