Skip to content

Commit

Permalink
Remove lang suffix for FamilyName field
Browse files Browse the repository at this point in the history
We no longer need the suffixes for the FamilyName field since we not really using it anywhere

#6830
  • Loading branch information
Siyasanga Mtshokotsha authored and Siyasanga Mtshokotsha committed Oct 8, 2024
1 parent a124bb6 commit 08556a2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/forms/user/fieldDefinitions/createUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export function userSectionFormType(): ISerializedFormSection {
title: userFormMessages.userDetails,
fields: [
{
name: 'familyNameEng',
name: 'familyName',
type: TEXT,
label: userFormMessages.lastNameEn,
label: userFormMessages.lastName,
required: true,
initialValue: '',
validator: [{ operation: 'englishOnlyNameFormat' }],
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/i18n/messages/views/userForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ export const messages = {
description: "User's English first name",
id: 'form.field.label.firstNameEN'
},
lastNameEn: {
lastName: {
defaultMessage: "User's surname",
description: "User's English surname",
id: 'form.field.label.lastNameEN'
id: 'form.field.label.lastName'
},
phoneNumber: {
defaultMessage: 'Phone number',
Expand Down
6 changes: 2 additions & 4 deletions packages/client/src/tests/util.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1446,8 +1446,7 @@ export const mockCompleteFormData = {
accountDetails: '',
assignedRegistrationOffice: '',
device: '',
familyName: 'হোসেন',
familyNameEng: 'Hossain',
familyName: 'Hossain',
firstNames: 'Jeff',
firstNamesEng: 'Jeff',
nid: '123456789',
Expand Down Expand Up @@ -1795,8 +1794,7 @@ export const mockDataWithRegistarRoleSelected = {
accountDetails: '',
assignedRegistrationOffice: '',
device: '',
familyName: 'হোসেন',
familyNameEng: 'Hossain',
familyName: 'Hossain',
firstNames: 'Jeff',
firstNamesEng: 'Jeff',
email: '[email protected]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class UserReviewFormComponent extends React.Component<
(field) => field.name === 'firstNamesEng'
) as IFormField
const familyNameEngField = fields.find(
(field) => field.name === 'familyNameEng'
(field) => field.name === 'familyName'
) as IFormField

return `${this.getValue(firstNamesEngField)} ${this.getValue(
Expand Down

0 comments on commit 08556a2

Please sign in to comment.