File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
components/src/components/interface Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ import {
5454 MobileWrapper ,
5555 DesktopWrapper
5656} from '@opencrvs/components/lib/styleForPagination'
57+ import { userMessages } from '@client/i18n/messages'
5758
5859const ToolTipContainer = styled . span `
5960 text-align: center;
@@ -327,6 +328,10 @@ function FieldAgentListComponent(props: IProps) {
327328 ]
328329 }
329330
331+ function getFieldAgentTypeLabel ( type : string ) {
332+ return userMessages [ type ] ? intl . formatMessage ( userMessages [ type ] ) : type
333+ }
334+
330335 function getContent ( data ?: GQLSearchFieldAgentResult ) {
331336 const content =
332337 data &&
@@ -350,7 +355,7 @@ function FieldAgentListComponent(props: IProps) {
350355 return {
351356 name : getNameWithAvatar ( row . fullName || '' , row . avatar ) ,
352357 rawName : row . fullName || '' ,
353- type : row . type ,
358+ type : ( row . type && getFieldAgentTypeLabel ( row . type ) ) || '' ,
354359 officeName : ( office && office . displayLabel ) || '' ,
355360 startMonth : row . creationDate ,
356361 totalDeclarations : String ( row . totalNumberOfDeclarationStarted ) ,
Original file line number Diff line number Diff line change @@ -164,7 +164,13 @@ const statusOptions = [
164164const PrimaryContactLabelMapping = {
165165 MOTHER : formMessages . contactDetailsMother ,
166166 FATHER : formMessages . contactDetailsFather ,
167- INFORMANT : formMessages . contactDetailsInformant
167+ INFORMANT : formMessages . contactDetailsInformant ,
168+ OTHER_FAMILY_MEMBER : formMessages . otherFamilyMember ,
169+ LEGAL_GUARDIAN : formMessages . legalGuardian ,
170+ GRANDMOTHER : formMessages . grandmother ,
171+ GRANDFATHER : formMessages . grandfather ,
172+ BROTHER : formMessages . brother ,
173+ SISTER : formMessages . sister
168174}
169175
170176type PrimaryContact = keyof typeof PrimaryContactLabelMapping
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ const ContentWrapper = styled.span<{
182182 text-align: ${ ( { alignment } ) => ( alignment ? alignment . toString ( ) : 'left' ) } ;
183183 cursor: ${ ( { sortable } ) => ( sortable ? 'pointer' : 'default' ) } ;
184184 color: ${ ( { theme } ) => theme . colors . tertiary } ;
185+ padding: 0 4px;
185186`
186187const ValueWrapper = styled . span < {
187188 width : number
@@ -195,7 +196,7 @@ const ValueWrapper = styled.span<{
195196 justify-content: ${ ( { alignment } ) =>
196197 alignment === ColumnContentAlignment . RIGHT ? 'flex-end' : 'flex-start' } ;
197198 text-align: ${ ( { alignment } ) => ( alignment ? alignment . toString ( ) : 'left' ) } ;
198- padding-right: 8px ;
199+ padding: 0 4px ;
199200 align-self: center;
200201 ${ ( { color } ) => color && `color: ${ color } ;` }
201202`
You can’t perform that action at this time.
0 commit comments