Skip to content

Commit ec79667

Browse files
authored
Merge pull request #1164 from david-roper/sex-for-custom-id
allow for custom identifier to have the option to enter subject's sex
2 parents 6b90dfe + 491788a commit ec79667

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

apps/web/src/features/session/components/StartSessionForm/StartSessionForm.tsx

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -105,34 +105,18 @@ export const StartSessionForm = ({ currentGroup, initialValues, readOnly, onSubm
105105
}
106106
},
107107
subjectDateOfBirth: {
108-
kind: 'dynamic',
109-
deps: ['subjectIdentificationMethod'],
110-
render({ subjectIdentificationMethod }) {
111-
return subjectIdentificationMethod === 'PERSONAL_INFO'
112-
? {
113-
kind: 'date',
114-
label: t('core.identificationData.dateOfBirth.label')
115-
}
116-
: null;
117-
}
108+
kind: 'date',
109+
label: t('core.identificationData.dateOfBirth.label')
118110
},
119111
subjectSex: {
120-
kind: 'dynamic',
121-
deps: ['subjectIdentificationMethod'],
122-
render({ subjectIdentificationMethod }) {
123-
return subjectIdentificationMethod === 'PERSONAL_INFO'
124-
? {
125-
description: t('core.identificationData.sex.description'),
126-
kind: 'string',
127-
label: t('core.identificationData.sex.label'),
128-
options: {
129-
FEMALE: t('core.identificationData.sex.female'),
130-
MALE: t('core.identificationData.sex.male')
131-
},
132-
variant: 'select'
133-
}
134-
: null;
135-
}
112+
description: t('core.identificationData.sex.description'),
113+
kind: 'string',
114+
label: t('core.identificationData.sex.label'),
115+
options: {
116+
FEMALE: t('core.identificationData.sex.female'),
117+
MALE: t('core.identificationData.sex.male')
118+
},
119+
variant: 'select'
136120
}
137121
}
138122
},

0 commit comments

Comments
 (0)