diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f23564ce418..091c02c4020 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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: | diff --git a/packages/client/src/forms/configuration/default.ts b/packages/client/src/forms/configuration/default.ts index 9bdb60c7be2..a89f90c04a8 100644 --- a/packages/client/src/forms/configuration/default.ts +++ b/packages/client/src/forms/configuration/default.ts @@ -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 { @@ -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', @@ -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', @@ -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: ' ' } ] } diff --git a/packages/client/src/i18n/messages/form.ts b/packages/client/src/i18n/messages/form.ts index 789e3f65c4a..2a51809e6d8 100644 --- a/packages/client/src/i18n/messages/form.ts +++ b/packages/client/src/i18n/messages/form.ts @@ -114,6 +114,8 @@ interface IFormMessages defaultLabel: MessageDescriptor deliveryAddress: MessageDescriptor deliveryInstitution: MessageDescriptor + dateOfLastLivingDeath: MessageDescriptor + motherPhoneNumber: MessageDescriptor deny: MessageDescriptor district: MessageDescriptor docTaxReceipt: MessageDescriptor @@ -230,6 +232,7 @@ interface IFormMessages phoneNumber: MessageDescriptor phoneVerificationWarning: MessageDescriptor placeOfBirth: MessageDescriptor + motherPlaceOfBirth: MessageDescriptor postCode: MessageDescriptor presentBoth: MessageDescriptor presentFather: MessageDescriptor @@ -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', @@ -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',