From 89a816fdd3883a186e13d0e93c8e80962e8df6b1 Mon Sep 17 00:00:00 2001 From: Joseph McCombs Date: Thu, 12 Nov 2020 23:12:41 -0500 Subject: [PATCH] feat: inital UI for household manager --- .../HouseholdManager/index.js | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/components/FormikFields/PaperInputPicker/HouseholdManager/index.js b/components/FormikFields/PaperInputPicker/HouseholdManager/index.js index ead3f8b46..3703ac40d 100644 --- a/components/FormikFields/PaperInputPicker/HouseholdManager/index.js +++ b/components/FormikFields/PaperInputPicker/HouseholdManager/index.js @@ -3,7 +3,7 @@ import { View, Modal } from 'react-native'; import { - Button, RadioButton, Appbar + Button, RadioButton, Appbar, Text } from 'react-native-paper'; import ResidentIdSearchbar from '../../../ResidentIdSearchbar'; @@ -15,14 +15,14 @@ import { postObjectsToClass } from '../../../../services/parse/crud'; import styles from './index.style'; -// const relationships = [ -// 'Parent', 'Sibling', 'Grand-Parent', 'Cousin', 'Other' -// ]; const HouseholdManager = (props) => { const { formikProps, formikKey, surveyingOrganization } = props; const { setFieldValue } = formikProps; - + const [relationships] = useState([ + 'Parent', 'Sibling', 'Grand-Parent', 'Cousin', 'Other' + ]); + const [relationship, setRelationship] = useState('') const [selectPerson, setSelectPerson] = useState(); // const [, setHouseholdRelationship] = useState(); const [modalView, setModalView] = useState('zero'); @@ -71,9 +71,9 @@ const HouseholdManager = (props) => { animationType="slide" visible > - + setModalView('first')} /> - + @@ -83,18 +83,25 @@ const HouseholdManager = (props) => { surveyingOrganization={surveyingOrganization} /> - {/* {I18n.t('householdManager.relationshipHousehold')} - + {I18n.t('householdManager.relationshipHousehold')} + {relationships.map((result) => ( - + // + + {relationship === result ? ( + + ) : ( + + )} + ))} - */} -