Skip to content

Commit

Permalink
fix: align label and required properties with legecy birth
Browse files Browse the repository at this point in the history
  • Loading branch information
jamil314 committed Jan 9, 2025
1 parent fd1019a commit a0a48ba
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions src/form/V2/birth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const BIRTH_FORM = defineForm({
type: 'TEXT',
required: true,
label: {
defaultMessage: 'First name',
defaultMessage: 'First name(s)',
description: 'This is the label for the field',
id: 'event.birth.action.declare.form.section.child.field.firstname.label'
}
Expand All @@ -377,7 +377,7 @@ const BIRTH_FORM = defineForm({
type: 'TEXT',
required: true,
label: {
defaultMessage: 'Surname',
defaultMessage: 'Last name',
description: 'This is the label for the field',
id: 'event.birth.action.declare.form.section.child.field.surname.label'
}
Expand Down Expand Up @@ -429,7 +429,7 @@ const BIRTH_FORM = defineForm({
type: 'TEXT', // @ToDo: select
required: true,
label: {
defaultMessage: 'Health Institute',
defaultMessage: 'Health Institution',
description: 'This is the label for the field',
id: 'event.birth.action.declare.form.section.child.field.birthLocation.label'
},
Expand Down Expand Up @@ -467,7 +467,7 @@ const BIRTH_FORM = defineForm({
{
id: 'child.attendantAtBirth',
type: 'SELECT',
required: true,
required: false,
label: {
defaultMessage: 'Attendant at birth',
description: 'This is the label for the field',
Expand All @@ -478,9 +478,9 @@ const BIRTH_FORM = defineForm({
{
id: 'child.birthType',
type: 'SELECT',
required: true,
required: false,
label: {
defaultMessage: 'Birth type',
defaultMessage: 'Type of birth',
description: 'This is the label for the field',
id: 'event.birth.action.declare.form.section.child.field.birthType.label'
},
Expand All @@ -489,7 +489,7 @@ const BIRTH_FORM = defineForm({
{
id: 'child.weightAtBirth',
type: 'TEXT',
required: true,
required: false,
label: {
defaultMessage: 'Weight at birth',
description: 'This is the label for the field',
Expand Down Expand Up @@ -535,7 +535,7 @@ const BIRTH_FORM = defineForm({
{
id: 'informant.phoneNo',
type: 'TEXT',
required: true,
required: false,
label: {
defaultMessage: 'Phone number',
description: 'This is the label for the field',
Expand Down Expand Up @@ -607,7 +607,7 @@ const BIRTH_FORM = defineForm({
type: 'TEXT',
required: false,
label: {
defaultMessage: 'No. of previous birth',
defaultMessage: 'No. of previous births',
description: 'This is the label for the field',
id: 'event.birth.action.declare.form.section.mother.field.previousBirths.label'
},
Expand Down
26 changes: 13 additions & 13 deletions src/form/V2/person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const getInformantFields = (person: string): FieldConfig[] => [
type: 'TEXT',
required: true,
label: {
defaultMessage: 'First name',
defaultMessage: 'First name(s)',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.firstname.label`
},
Expand All @@ -65,7 +65,7 @@ export const getInformantFields = (person: string): FieldConfig[] => [
type: 'TEXT',
required: true,
label: {
defaultMessage: 'Surname',
defaultMessage: 'Last name',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.surname.label`
},
Expand Down Expand Up @@ -146,7 +146,7 @@ export const getPersonInputFields = (person: string): FieldConfig[] => [
{
id: `${person}.maritalStatus`,
type: 'SELECT',
required: true,
required: false,
label: {
defaultMessage: 'Marital Status',
description: 'This is the label for the field',
Expand Down Expand Up @@ -198,7 +198,7 @@ const getIdFields = (person: string): FieldConfig[] => [
type: 'TEXT',
required: true,
label: {
defaultMessage: 'NID Number',
defaultMessage: 'ID Number',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.nid.label`
},
Expand All @@ -216,7 +216,7 @@ const getIdFields = (person: string): FieldConfig[] => [
type: 'TEXT',
required: true,
label: {
defaultMessage: 'Passport Number',
defaultMessage: 'ID Number',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.passport.label`
},
Expand All @@ -234,7 +234,7 @@ const getIdFields = (person: string): FieldConfig[] => [
type: 'TEXT',
required: true,
label: {
defaultMessage: 'Birth Registration Number',
defaultMessage: 'ID Number',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.brn.label`
},
Expand All @@ -261,7 +261,7 @@ export const getAddressFields = (person: string): FieldConfig[] => {
label: {
defaultMessage: 'State',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.address.state.label`
id: `event.birth.action.declare.form.section.${person}.field.address.other.state.label`
},
conditionals: []
},
Expand All @@ -272,7 +272,7 @@ export const getAddressFields = (person: string): FieldConfig[] => {
label: {
defaultMessage: 'District',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.address.district.label`
id: `event.birth.action.declare.form.section.${person}.field.address.other.district.label`
},
conditionals: []
},
Expand All @@ -283,7 +283,7 @@ export const getAddressFields = (person: string): FieldConfig[] => {
label: {
defaultMessage: 'City / Town',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.address.town.label`
id: `event.birth.action.declare.form.section.${person}.field.address.other.town.label`
},
conditionals: []
},
Expand All @@ -294,7 +294,7 @@ export const getAddressFields = (person: string): FieldConfig[] => {
label: {
defaultMessage: 'Address Line 1',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.address.addressLine1.label`
id: `event.birth.action.declare.form.section.${person}.field.address.other.addressLine1.label`
},
conditionals: []
},
Expand All @@ -305,7 +305,7 @@ export const getAddressFields = (person: string): FieldConfig[] => {
label: {
defaultMessage: 'Address Line 2',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.address.addressLine2.label`
id: `event.birth.action.declare.form.section.${person}.field.address.other.addressLine2.label`
},
conditionals: []
},
Expand All @@ -316,7 +316,7 @@ export const getAddressFields = (person: string): FieldConfig[] => {
label: {
defaultMessage: 'Address Line 3',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.address.addressLine3.label`
id: `event.birth.action.declare.form.section.${person}.field.address.other.addressLine3.label`
},
conditionals: []
},
Expand All @@ -327,7 +327,7 @@ export const getAddressFields = (person: string): FieldConfig[] => {
label: {
defaultMessage: 'Postcode / Zip',
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.address.zipCode.label`
id: `event.birth.action.declare.form.section.${person}.field.address.other.zipCode.label`
},
conditionals: []
}
Expand Down

0 comments on commit a0a48ba

Please sign in to comment.