Skip to content

Commit

Permalink
fix bug related to income field showing zero value
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-solo committed Oct 7, 2024
1 parent 8240387 commit 36f6f57
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions components/FieldFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ const FieldFactory: React.FC<FieldProps> = ({
onChange={debounce((e) => handleOnChange(field, e.target.value), 100)}
placeholder={field.config.placeholder ?? ''}
value={
field.key === FieldKey.INCOME_WORK ||
field.key === FieldKey.PARTNER_INCOME_WORK
field.value
? field.value
: field.key === FieldKey.INCOME_WORK ||
field.key === FieldKey.PARTNER_INCOME_WORK
? field.config.default
: field.value
}
Expand Down
2 changes: 1 addition & 1 deletion components/StepperPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ const StepperPage: React.FC = () => {
title={
tsln._language === 'en'
? `Step ${activeStep} of ${totalSteps}: ${steps[activeStep].title}`
: `Étape ${activeStep} de ${totalSteps}: ${steps[activeStep].title}`
: `Étape ${activeStep} de ${totalSteps} : ${steps[activeStep].title}`
}
previousProps={{
id: 'previous',
Expand Down
2 changes: 1 addition & 1 deletion i18n/api/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const en: Translations = {
[FieldCategory.AGE]: 'Age',
[FieldCategory.INCOME]: 'Income',
[FieldCategory.LEGAL]: 'Legal status',
[FieldCategory.RESIDENCE]: 'Residence history',
[FieldCategory.RESIDENCE]: 'Residence',
[FieldCategory.MARITAL]: 'Marital status',
},
result: {
Expand Down
2 changes: 1 addition & 1 deletion i18n/api/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const fr: Translations = {
[FieldCategory.AGE]: 'Âge',
[FieldCategory.INCOME]: 'Revenu',
[FieldCategory.LEGAL]: 'Statut légal',
[FieldCategory.RESIDENCE]: 'Historique de résidence',
[FieldCategory.RESIDENCE]: 'Résidence',
[FieldCategory.MARITAL]: 'État matrimonial',
},
result: {
Expand Down

0 comments on commit 36f6f57

Please sign in to comment.