Skip to content

Commit

Permalink
fix: environmental form submission, and minor touch ups to form
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-mccombs committed Aug 27, 2021
1 parent 777440e commit 1284884
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const configArray = {
},
{
label: 'environmentalHealth.biggestProblemComm.label',
formikKey: 'biggestproblemofcommunity',
formikKey: 'biggestproblemofcommunity_v2',
value: '',
fieldType: 'selectMulti',
options: [
Expand All @@ -83,14 +83,14 @@ const configArray = {
value: 'AccessToBathrooms'
},
{
label: 'environmentalHealth.biggestProblemComm.HouseArrangement',
value: 'HouseArrangement'
label: 'environmentalHealth.biggestProblemComm.HouseRepairs',
value: 'HouseRepairs'
},
{
label: 'global.other',
value: 'other',
text: true,
textKey: '__biggestproblemofcommunity__other'
textKey: '__biggestproblemofcommunity_v2__other'
}
],
validation: false
Expand Down Expand Up @@ -151,7 +151,7 @@ const configArray = {
},
{
label: 'environmentalHealth.bathroomAccess.label',
formikKey: 'bathroomAccess',
formikKey: 'bathroomAccess_v2',
value: '',
fieldType: 'selectMulti',
options: [
Expand All @@ -171,7 +171,7 @@ const configArray = {
label: 'global.other',
value: 'other',
text: true,
textKey: '__bathroomAccess__other'
textKey: '__bathroomAccess_v2__other'
}
],
validation: false
Expand All @@ -195,7 +195,7 @@ const configArray = {
},
{
label: 'environmentalHealth.clinicAccess.label',
formikKey: 'clinicAccess',
formikKey: 'clinicAccess_v2',
value: '',
fieldType: 'selectMulti',
options: [
Expand All @@ -219,7 +219,7 @@ const configArray = {
label: 'global.other',
value: 'other',
text: true,
textKey: '__clinicAccess__other'
textKey: '__clinicAccess_v2__other'
}
],
validation: false
Expand Down Expand Up @@ -486,27 +486,30 @@ const configArray = {
},
{
label: 'environmentalHealth.numberChildrenUnder5.label',
formikKey: 'numberofChildrenLivinginHouseUndertheAgeof5',
formikKey: 'numberofChildrenLivinginHouseUndertheAgeof5_v2',
value: '',
fieldType: 'selectMulti',
options: [
{
label: 'environmentalHealth.numberChildrenUnder5.under_5',
value: 'under_5'
value: 'under_5',
text: true,
textKey: '__numberofChildrenLivinginHouseUndertheAgeof5_v2__under_5',
textQuestion: 'environmentalHealth.numberChildrenUnder5.under_5_textQuestion'
},
{
label: 'environmentalHealth.numberChildrenUnder5.6_12',
value: '6_12'
value: '6_12',
text: true,
textKey: '__numberofChildrenLivinginHouseUndertheAgeof5_v2__6_12',
textQuestion: 'environmentalHealth.numberChildrenUnder5.6_12_textQuestion'
},
{
label: 'environmentalHealth.numberChildrenUnder5.13_18',
value: '13_18'
},
{
label: 'global.other',
value: 'other',
value: '13_18',
text: true,
textKey: '__numberofChildrenLivinginHouseUndertheAgeof5__other'
textKey: '__numberofChildrenLivinginHouseUndertheAgeof5_v2__13_18',
textQuestion: 'environmentalHealth.numberChildrenUnder5.13_18_textQuestion'
}
],
validation: true
Expand Down
3 changes: 2 additions & 1 deletion domains/DataCollection/Forms/SupplementaryForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ const SupplementaryForm = ({

postSupplementaryForm(postParams).then(() => {
submitAction();
}, () => {
}, (error) => {
console.log(error)
// perhaps an alert to let the user know there was an error
setSubmitting(false);
});
Expand Down
11 changes: 7 additions & 4 deletions modules/i18n/english/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"Trash": "Trash",
"Street": "Street",
"AccessToBathrooms": "Access to Bathrooms",
"HouseArrangement": "House Arrangement"
"HouseRepairs": "House Repairs"
},
"waterAccess": {
"label": "Water Access",
Expand Down Expand Up @@ -184,7 +184,7 @@
"None": "None"
},
"medicalProblemsGo": "Where do you go for medical problems?",
"dentalAccess": "Where do you go for dental problems?",
"dentalAccess": "Do you have access to a dentist?",
"timesPerWeekTrash": {
"label": "Times per Week Trash is Collected",
"Never": "Never",
Expand Down Expand Up @@ -243,10 +243,13 @@
},
"numberIndividualsHouse": "Number of Individuals Living in the House",
"numberChildrenUnder5": {
"label": "Number of children living in this House under age of 5",
"label": "Are there any children living in the house in the following age groups?",
"under_5":"Less than 5",
"6_12": "6-12",
"13_18": "13-18"
"13_18": "13-18",
"under_5_textQuestion": "How many children under the age of 5?",
"6_12_textQuestion": "How many children between the ages of 6 - 12?",
"13_18_textQuestion": "How many children between the ages of 13 - 18?"
}
},
"evaluationMedical": {
Expand Down
9 changes: 6 additions & 3 deletions modules/i18n/kreyol/hk.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"Trash": "Fatra",
"Street": "Lari",
"AccessToBathrooms": "Aksè nan twalèt",
"HouseArrangement": "Aranjman kay la"
"HouseRepairs": "Reparasyon kay"
},
"waterAccess": {
"label": "Akse ak dlo",
Expand Down Expand Up @@ -184,7 +184,7 @@
"None": "Okenn"
},
"medicalProblemsGo": "Lew gen problem dokè ki kote wale?",
"dentalAccess": "Lew gen problem dan ki kote wale?",
"dentalAccess": "Èske ou gen aksè a yon dantis?",
"timesPerWeekTrash": {
"label": "Konbyen fwa yo ranmase fatra pa semèn",
"Never": "Pa janm",
Expand Down Expand Up @@ -246,7 +246,10 @@
"label": "Kantite timoun k ap viv nan kay sa a ki poko gen laj 5 an",
"under_5":"Mwens pase 5",
"6_12": "6-12",
"13_18": "13-18"
"13_18": "13-18",
"under_5_textQuestion": "Konbyen timoun ki poko gen 5 an?",
"6_12_textQuestion": "Konbyen timoun ki gen laj ant 6 - 12?",
"13_18_textQuestion": "Konbyen timoun ki gen laj 13 - 18?"
}
},
"evaluationMedical": {
Expand Down
9 changes: 6 additions & 3 deletions modules/i18n/spanish/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"Trash": "La Basura",
"Street": "La Calle",
"AccessToBathrooms": "El Acceso a Baños",
"HouseArrangement": "El Arreglo de casas"
"HouseRepairs": "Reparaciones de la casa"
},
"waterAccess": {
"label": "Acceso al agua",
Expand Down Expand Up @@ -184,7 +184,7 @@
"None": "Ninguno"
},
"medicalProblemsGo": "¿A dónde vas por problemas médicos?",
"dentalAccess": "¿A dónde vas por problemas dentales?",
"dentalAccess": "¿Tienes acceso a un dentista?",
"timesPerWeekTrash": {
"label": "Veces por semana que se recolecta la basura",
"Never": "Nunca",
Expand Down Expand Up @@ -246,7 +246,10 @@
"label": "Número de niños menores de 5 años que viven en esta casa",
"under_5":"Bajo 5",
"6_12": "6-12",
"13_18": "13-18"
"13_18": "13-18",
"under_5_textQuestion": "¿Cuántos niños menores de 5 años?",
"6_12_textQuestion": "¿Cuántos niños entre las edades de 6 a 12 años?",
"13_18_textQuestion": "¿Cuántos niños entre las edades de 13 a 18 años?"
}
},
"evaluationMedical": {
Expand Down

0 comments on commit 1284884

Please sign in to comment.