Skip to content

Commit

Permalink
fix: QA
Browse files Browse the repository at this point in the history
텍스트 색상, 텍스트 입력시 컴포넌트를 올리는 로직 구현
#70
  • Loading branch information
11t518s committed Mar 31, 2022
1 parent 0c68e56 commit a9c2691
Show file tree
Hide file tree
Showing 12 changed files with 217 additions and 178 deletions.
1 change: 1 addition & 0 deletions components/CheckListComponent/ButtonsOfTypeB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function ButtonsOfTypeB({ isEdit, checkList, setCheckLists, checkLists }: IProps
onChangeText={onChangeText}
onEndEditing={() => onEndEditing(answer)}
placeholder={answer.type ? answer.type : '직접 입력'}
placeholderTextColor={'#D6D4D4'}
style={[styles.typeDBtnWrapper]}
/>
<DefaultText style={[styles.checkListGrayText, { marginRight: 10 }]}>
Expand Down
1 change: 1 addition & 0 deletions components/CheckListComponent/ButtonsOfTypeD.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function ButtonsOfTypeD({ isEdit, checkList, setCheckLists, checkLists }: IProps
onChangeText={onChangeTextHandler}
onEndEditing={onEndEditing}
placeholder={'+ 직접 입력'}
placeholderTextColor={'#D6D4D4'}
value={newCheckListElement}
style={[styles.typeDBtnWrapper, styles.typeDInputBtnWrapper]}
/>
Expand Down
2 changes: 2 additions & 0 deletions components/CheckListComponent/myItem/MyItemOfBottomSheets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function MyItemOfBottomSheets({
<BottomSheetTextInput
style={styles.myItemCategoryName}
value={clickedMyItem?.categoryName}
placeholderTextColor={'#D6D4D4'}
placeholder={'새 그룹'}
editable={isEdit}
onChangeText={(newCategoryName) => onCategoryNameHandler(newCategoryName)}
Expand All @@ -98,6 +99,7 @@ function MyItemOfBottomSheets({
<BottomSheetTextInput
style={styles.addMyItemEachElementOfBottomSheets}
placeholder={'+ 항목 추가'}
placeholderTextColor={'#999999'}
value={newElement}
editable={isEdit}
onChangeText={(elementText) => onCreateQuestionElementTextHandler(elementText)}
Expand Down
25 changes: 15 additions & 10 deletions navigation/Main/StackNavigation/StackNavigationOfCheckList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,27 @@ function CheckListStackNav({ setIsLogin }: IProps) {
};

const onSubmitHandler = async () => {
console.log(checkListContext?.choseCheckListByServer);
try {
await axios.put(
await axios
.put(
`/api/check-list/${checkListContext?.checkListId}/common/question/status`,
checkListContext?.deletedCheckListByServer
);
await axios.put(
)
.then(() => checkListContext?.setDeletedCheckListByServer({ question: [] }));

await axios
.put(
`/api/check-list/${checkListContext?.checkListId}/common/question`,
checkListContext?.choseCheckListByServer
)
.then(() =>
checkListContext?.setChoseCheckListByServer({
typeA: [],
typeB: [],
typeD: [],
typeM: {},
})
);
} catch (error) {
console.error(error);
}

checkListContext?.setDeletedCheckListByServer({ question: [] });
checkListContext?.setChoseCheckListByServer({ typeA: [], typeB: [], typeD: [], typeM: {} });
setIsEdit(false);
};

Expand Down
46 changes: 25 additions & 21 deletions screens/BasicCheckList/Inside/Bathroom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import ButtonOfBringBackDeletedCheckList from '../../../components/CheckListComp
import BottomSheetsOfDeletedCheckList from '../../../components/CheckListComponent/BottomSheetsOfDeletedCheckList';
import { GetCheckListServerData } from '../../../api/GetCheckListServerData';
import { checkListCtx } from '../../../Context/CheckListByServer';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';

interface IProps {
isEdit: boolean;
Expand Down Expand Up @@ -76,29 +77,32 @@ function Bathroom({ isEdit, setIsBottomSheet }: IProps) {
<>
{onServerData ? (
<BottomSheetModalProvider>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
<KeyboardAwareScrollView extraHeight={200}>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
/>
)}
</ScrollView>
)}
</ScrollView>
</KeyboardAwareScrollView>

<BottomSheetsOfDeletedCheckList
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
Expand Down
46 changes: 25 additions & 21 deletions screens/BasicCheckList/Inside/Ceiling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import ButtonOfBringBackDeletedCheckList from '../../../components/CheckListComp
import BottomSheetsOfDeletedCheckList from '../../../components/CheckListComponent/BottomSheetsOfDeletedCheckList';
import { GetCheckListServerData } from '../../../api/GetCheckListServerData';
import { checkListCtx } from '../../../Context/CheckListByServer';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';

interface IProps {
isEdit: boolean;
Expand Down Expand Up @@ -76,29 +77,32 @@ function Ceiling({ isEdit, setIsBottomSheet }: IProps) {
<>
{onServerData ? (
<BottomSheetModalProvider>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
<KeyboardAwareScrollView extraHeight={200}>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
/>
)}
</ScrollView>
)}
</ScrollView>
</KeyboardAwareScrollView>

<BottomSheetsOfDeletedCheckList
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
Expand Down
46 changes: 25 additions & 21 deletions screens/BasicCheckList/Inside/Entrance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import ButtonOfBringBackDeletedCheckList from '../../../components/CheckListComp
import BottomSheetsOfDeletedCheckList from '../../../components/CheckListComponent/BottomSheetsOfDeletedCheckList';
import { GetCheckListServerData } from '../../../api/GetCheckListServerData';
import { checkListCtx } from '../../../Context/CheckListByServer';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';

interface IProps {
isEdit: boolean;
Expand Down Expand Up @@ -76,29 +77,32 @@ function Entrance({ isEdit, setIsBottomSheet }: IProps) {
<>
{onServerData ? (
<BottomSheetModalProvider>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
<KeyboardAwareScrollView extraHeight={200}>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
/>
)}
</ScrollView>
)}
</ScrollView>
</KeyboardAwareScrollView>

<BottomSheetsOfDeletedCheckList
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
Expand Down
46 changes: 25 additions & 21 deletions screens/BasicCheckList/Inside/Kitchen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import ButtonOfBringBackDeletedCheckList from '../../../components/CheckListComp
import BottomSheetsOfDeletedCheckList from '../../../components/CheckListComponent/BottomSheetsOfDeletedCheckList';
import { GetCheckListServerData } from '../../../api/GetCheckListServerData';
import { checkListCtx } from '../../../Context/CheckListByServer';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';

interface IProps {
isEdit: boolean;
Expand Down Expand Up @@ -76,29 +77,32 @@ function Kitchen({ isEdit, setIsBottomSheet }: IProps) {
<>
{onServerData ? (
<BottomSheetModalProvider>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
<KeyboardAwareScrollView extraHeight={200}>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
/>
)}
</ScrollView>
)}
</ScrollView>
</KeyboardAwareScrollView>

<BottomSheetsOfDeletedCheckList
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
Expand Down
46 changes: 25 additions & 21 deletions screens/BasicCheckList/Inside/Option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import ButtonOfBringBackDeletedCheckList from '../../../components/CheckListComp
import BottomSheetsOfDeletedCheckList from '../../../components/CheckListComponent/BottomSheetsOfDeletedCheckList';
import { GetCheckListServerData } from '../../../api/GetCheckListServerData';
import { checkListCtx } from '../../../Context/CheckListByServer';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';

interface IProps {
isEdit: boolean;
Expand Down Expand Up @@ -76,29 +77,32 @@ function Option({ isEdit, setIsBottomSheet }: IProps) {
<>
{onServerData ? (
<BottomSheetModalProvider>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
<KeyboardAwareScrollView extraHeight={200}>
<ScrollView>
{checkLists
.filter((item) => item.visibility)
.map((mainQuestionItem: checkListTypes) => (
<CheckListComponent
key={mainQuestionItem.questionId}
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
onBoarding={false}
checkLists={checkLists}
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
isEdit={isEdit}
checkList={mainQuestionItem}
setCheckLists={setCheckLists}
/>
))}

{deletedCheckLists.length !== 0 && (
<ButtonOfBringBackDeletedCheckList
handlePresentModalPress={handlePresentModalPress}
/>
)}
</ScrollView>
)}
</ScrollView>
</KeyboardAwareScrollView>

<BottomSheetsOfDeletedCheckList
deletedCheckLists={deletedCheckLists}
setDeletedCheckLists={setDeletedCheckLists}
Expand Down
Loading

0 comments on commit a9c2691

Please sign in to comment.