Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events v2 collect certificate workflow boilerplate code #360

Merged
merged 11 commits into from
Feb 4, 2025
Prev Previous commit
Next Next commit
collector and payment info added collector action
tareq89 committed Jan 24, 2025
commit e01e37423f556fa7851b826e271b9fbd35d17e3f
19 changes: 18 additions & 1 deletion src/form/tennis-club-membership.ts
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@
field
} from '@opencrvs/toolkit/conditionals'

// import { defaultCertificateCollectorFormConfig } from '@opencrvs/toolkit/default'

const TENNIS_CLUB_FORM = defineForm({
label: {
id: 'event.tennis-club-membership.action.declare.form.label',
@@ -268,7 +270,7 @@
type: 'HIDE',
conditional: field(
'collector.requesterId'
).isUndefinedOrNotInArray(['OTHER'])

Check failure on line 273 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
],
options: [
@@ -338,7 +340,7 @@
type: 'HIDE',
conditional: field(
'collector.OTHER.idType'
).isUndefinedOrNotInArray(['PASSPORT'])

Check failure on line 343 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
},
@@ -356,7 +358,7 @@
type: 'HIDE',
conditional: field(
'collector.OTHER.idType'
).isUndefinedOrNotInArray(['DRIVING_LICENSE'])

Check failure on line 361 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
},
@@ -374,7 +376,7 @@
type: 'HIDE',
conditional: field(
'collector.OTHER.idType'
).isUndefinedOrNotInArray(['REFUGEE_NUMBER'])

Check failure on line 379 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
},
@@ -392,7 +394,7 @@
type: 'HIDE',
conditional: field(
'collector.OTHER.idType'
).isUndefinedOrNotInArray(['ALIEN_NUMBER'])

Check failure on line 397 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
},
@@ -410,7 +412,7 @@
type: 'HIDE',
conditional: field(
'collector.OTHER.idType'
).isUndefinedOrNotInArray(['OTHER'])

Check failure on line 415 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
},
@@ -428,7 +430,7 @@
type: 'HIDE',
conditional: field(
'collector.requesterId'
).isUndefinedOrNotInArray(['OTHER'])

Check failure on line 433 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
},
@@ -446,7 +448,7 @@
type: 'HIDE',
conditional: field(
'collector.requesterId'
).isUndefinedOrNotInArray(['OTHER'])

Check failure on line 451 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
},
@@ -465,7 +467,7 @@
type: 'HIDE',
conditional: field(
'collector.requesterId'
).isUndefinedOrNotInArray(['OTHER'])

Check failure on line 470 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
},
@@ -483,7 +485,7 @@
type: 'HIDE',
conditional: field(
'collector.requesterId'
).isUndefinedOrNotInArray(['OTHER'])

Check failure on line 488 in src/form/tennis-club-membership.ts

GitHub Actions / test

Property 'isUndefinedOrNotInArray' does not exist on type 'FieldAPI'.
}
]
}
@@ -744,7 +746,22 @@
not(eventHasAction('COLLECT_CERTIFICATE'))
)
),
forms: [TENNIS_CLUB_MEMBERSHIP_CERTIFICATE_COLLECTOR_FORM]
forms: [TENNIS_CLUB_MEMBERSHIP_CERTIFICATE_COLLECTOR_FORM],
verifyId: [
{
whenRequesterIs: 'collector.requesterId',
andRequesterValueIs: 'INFORMANT',
verifyTheseFields: [
'recommender.firstname',
'recommender.id',
'recommender.surname'
]
}
],
payment: {
registrationTarget: 30,
lateRegistrationTarget: 365
}
},
{
type: 'CUSTOM',