11import { Certificate , HistoryItem } from './types.ts'
22
33export const collectorResolver = {
4- 'collector.requesterId' : ( data : Certificate ) => data . collector ?. relationship ,
4+ 'collector.requesterId' : ( data : Certificate ) =>
5+ other ( data ) ? 'SOMEONE_ELSE' : data . collector ?. relationship ,
56 'collector.OTHER.name' : ( data : Certificate ) =>
67 other ( data ) && {
78 surname : data . collector ?. name [ 0 ] . familyName , // TODO - I think I need to use the name resolver
@@ -14,11 +15,13 @@ export const collectorResolver = {
1415 other ( data ) && getId ( data ) . type ,
1516 'collector.PASSPORT.details' : ( data : Certificate ) =>
1617 getIdForType ( data , 'PASSPORT' ) ,
17- 'collector.DRIVING_LICENSE .details' : ( data : Certificate ) =>
18+ 'collector.DRIVING-LICENCE .details' : ( data : Certificate ) =>
1819 getIdForType ( data , 'DRIVING_LICENSE' ) ,
19- 'collector.REFUGEE_NUMBER.details' : ( data : Certificate ) =>
20+ 'collector.DRIVING-LICENSE.details' : ( data : Certificate ) =>
21+ getIdForType ( data , 'DRIVING_LICENSE' ) ,
22+ 'collector.REFUGEE-NUMBER.details' : ( data : Certificate ) =>
2023 getIdForType ( data , 'REFUGEE_NUMBER' ) ,
21- 'collector.ALIEN_NUMBER .details' : ( data : Certificate ) =>
24+ 'collector.ALIEN-NUMBER .details' : ( data : Certificate ) =>
2225 getIdForType ( data , 'ALIEN_NUMBER' ) ,
2326 'collector.OTHER.idTypeOther' : ( data : Certificate ) =>
2427 other ( data ) && getId ( data ) . otherType ,
@@ -41,6 +44,9 @@ export const collectorResolver = {
4144 'collector.collect.payment.data.beforeRegistrationTarget' : (
4245 data : Certificate
4346 ) => data . x , // TODO
47+ 'collector.collect.payment.data.afterRegistrationTarget' : (
48+ data : Certificate
49+ ) => data . x , // TODO
4450}
4551
4652export const correctionResolver = {
0 commit comments