From 9d4f06450edb6d158e044f3df6e18c475c0b7d75 Mon Sep 17 00:00:00 2001 From: Siyasanga Date: Tue, 1 Oct 2024 16:24:41 +0200 Subject: [PATCH] Ask surname first in the User details form we often receive requests from countries to have the surname first in this form, we have decided to satisfy that requirement by putting surname first for ALL countries. https://github.com/opencrvs/opencrvs-core/issues/6830 --- .../forms/user/fieldDefinitions/createUser.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/client/src/forms/user/fieldDefinitions/createUser.ts b/packages/client/src/forms/user/fieldDefinitions/createUser.ts index 37332d9fa9a..2fc6c9ee9db 100644 --- a/packages/client/src/forms/user/fieldDefinitions/createUser.ts +++ b/packages/client/src/forms/user/fieldDefinitions/createUser.ts @@ -79,38 +79,38 @@ export function userSectionFormType(): ISerializedFormSection { title: userFormMessages.userDetails, fields: [ { - name: 'firstNamesEng', + name: 'familyNameEng', type: TEXT, - label: userFormMessages.firstNameEn, + label: userFormMessages.lastNameEn, required: true, initialValue: '', validator: [{ operation: 'englishOnlyNameFormat' }], mapping: { mutation: { operation: 'fieldToNameTransformer', - parameters: ['en', 'firstNames'] + parameters: ['en', 'familyName'] }, query: { operation: 'nameToFieldTransformer', - parameters: ['en', 'firstNames'] + parameters: ['en', 'familyName'] } } }, { - name: 'familyNameEng', + name: 'firstNamesEng', type: TEXT, - label: userFormMessages.lastNameEn, + label: userFormMessages.firstNameEn, required: true, initialValue: '', validator: [{ operation: 'englishOnlyNameFormat' }], mapping: { mutation: { operation: 'fieldToNameTransformer', - parameters: ['en', 'familyName'] + parameters: ['en', 'firstNames'] }, query: { operation: 'nameToFieldTransformer', - parameters: ['en', 'familyName'] + parameters: ['en', 'firstNames'] } } },