Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
run: |
git clone https://github.com/opencrvs/opencrvs-farajaland.git

# Get latest version hashes from repos if they are not given as inputs
# Get the latest version hashes from repos if they are not given as inputs
- name: Get COUNTRY_CONFIG_VERSION
if: ${{ !inputs.farajaland-image-tag }}
run: |
Expand Down
147 changes: 146 additions & 1 deletion packages/client/src/forms/configuration/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
ISerializedForm,
DeathSection,
TEXTAREA
} from '@client/forms/index'
} from '@client/forms'
import { formMessageDescriptors } from '@client/i18n/messages'
import { messages as informantMessageDescriptors } from '@client/i18n/messages/views/selectInformant'
import {
Expand Down Expand Up @@ -1412,6 +1412,85 @@ export const registerForms: IDefaultRegisterForms = {
}
}
},
{
name: 'placeOfBirth',
customisable: false,
type: 'SELECT_WITH_OPTIONS',
previewGroup: 'placeOfBirth',
ignoreFieldLabelOnErrorMessage: true,
label: formMessageDescriptors.motherPlaceOfBirth,
required: true,
initialValue: '',
validate: [],
placeholder: formMessageDescriptors.formSelectPlaceholder,
options: [
{
value: 'HEALTH_FACILITY',
label: formMessageDescriptors.healthInstitution
},
{
value: 'PRIVATE_HOME',
label: formMessageDescriptors.privateHome
},
{
value: 'OTHER',
label: formMessageDescriptors.otherInstitution
}
],
mapping: {
mutation: {
operation: 'birthEventLocationMutationTransformer',
parameters: []
},
query: {
operation: 'eventLocationTypeQueryTransformer',
parameters: []
}
}
},
{
name: 'dateOfLastLivingDeath',
type: 'DATE',
label: formMessageDescriptors.dateOfLastLivingDeath,
conditionals: [
{
action: 'hide',
expression:
'!values.detailsExist && !mothersDetailsExistBasedOnContactAndInformant'
}
],
required: true,
initialValue: '',
validate: [
{
operation: 'dateFormatIsCorrect',
parameters: []
},
{
operation: 'dateInPast',
parameters: []
},
{
operation: 'isValidParentsBirthDate',
parameters: [5]
}
],
mapping: {
template: {
operation: 'dateFormatTransformer',
fieldName: 'dateOfLastLivingDeath',
parameters: ['birthDate', 'en', 'do MMMM yyyy']
},
mutation: {
operation: 'longDateTransformer',
parameters: ['birthDate']
},
query: {
operation: 'fieldValueTransformer',
parameters: ['birthDate']
}
}
},
{
name: 'firstNamesEng',
previewGroup: 'motherNameInEnglish',
Expand Down Expand Up @@ -1640,6 +1719,62 @@ export const registerForms: IDefaultRegisterForms = {
}
}
},
{
name: 'durationOfResidence',
type: 'NUMBER',
label: {
defaultMessage: 'Duration of residence',
description: 'text for duration of residence form field',
id: 'form.field.label.durationOfResidence'
},
customisable: true,
required: false,
initialValue: '',
validate: [],
conditionals: [
{
action: 'hide',
expression:
'!values.detailsExist && !mothersDetailsExistBasedOnContactAndInformant'
}
],
mapping: {
template: {
fieldName: 'DurationOfResidence',
operation: 'plainInputTransformer'
}
}
},
{
name: 'phoneNumber',
type: 'TEL',
label: {
defaultMessage: 'Phone Number of Mother',
description: 'Field for phone number of mother',
id: 'form.field.label.phoneNumber'
},
customisable: true,
required: false,
initialValue: '',
validate: [
{
operation: 'phoneNumberFormat'
}
],
conditionals: [
{
action: 'hide',
expression:
'!values.detailsExist && !mothersDetailsExistBasedOnContactAndInformant'
}
],
mapping: {
template: {
fieldName: 'motherPhoneNumber',
operation: 'plainInputTransformer'
}
}
},
{
name: 'educationalAttainment',
type: 'SELECT_WITH_OPTIONS',
Expand Down Expand Up @@ -1713,6 +1848,16 @@ export const registerForms: IDefaultRegisterForms = {
},
fieldToRedirect: 'familyNameEng',
delimiter: ' '
},
{
id: 'placeOfBirth',
label: {
defaultMessage: 'Place of birth',
description: "Group label for mother's Place of Birth",
id: 'form.preview.group.label.mother.placeOfBirth'
},
fieldToRedirect: 'placeOfBirth',
delimiter: ' '
}
]
}
Expand Down
18 changes: 18 additions & 0 deletions packages/client/src/i18n/messages/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ interface IFormMessages
defaultLabel: MessageDescriptor
deliveryAddress: MessageDescriptor
deliveryInstitution: MessageDescriptor
dateOfLastLivingDeath: MessageDescriptor
motherPhoneNumber: MessageDescriptor
deny: MessageDescriptor
district: MessageDescriptor
docTaxReceipt: MessageDescriptor
Expand Down Expand Up @@ -230,6 +232,7 @@ interface IFormMessages
phoneNumber: MessageDescriptor
phoneVerificationWarning: MessageDescriptor
placeOfBirth: MessageDescriptor
motherPlaceOfBirth: MessageDescriptor
postCode: MessageDescriptor
presentBoth: MessageDescriptor
presentFather: MessageDescriptor
Expand Down Expand Up @@ -774,6 +777,16 @@ export const formMessageDescriptors: IFormMessages = {
description: 'Title of the primary adress ',
id: 'form.field.label.primaryAddress'
},
dateOfLastLivingDeath: {
defaultMessage: 'Date of last living death',
description: 'Date of last living death',
id: 'form.field.label.dateOfLastLivingDeath'
},
motherPhoneNumber: {
defaultMessage: 'phone number of Mother',
description: 'Phone Number of MOther',
id: 'form.field.label.motherPhoneNumber'
},
dateOfMarriage: {
defaultMessage: 'Date of marriage',
description: 'Option for form field: Date of marriage',
Expand Down Expand Up @@ -1512,6 +1525,11 @@ export const formMessageDescriptors: IFormMessages = {
description: 'Label for form field: Place of delivery',
id: 'form.field.label.placeOfBirth'
},
motherPlaceOfBirth: {
defaultMessage: 'Place of Birth',
description: 'Label for form field: Place of Birth',
id: 'form.field.label.motherPlaceOfBirth'
},
nameInEnglishPreviewGroup: {
defaultMessage: 'English name',
description: 'Label for child name in english',
Expand Down