-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/jaino/#85 #103
Feature/jaino/#85 #103
Conversation
โฆl / survey-detail -> survey-check ํ๋ฉด ์ ํ ๊ตฌํ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์งํธ์ ์ฝ๊ฐ์ ์์๋ฐ๋ฆฌ๋ค ์ฝ๋ฉํธ ๋จ๊ฒจ๋ดค์ต๋๋ค.!!
ํฌ๊ฒ ๊ณ ์ณ์ผํ ์ ์ ์๋ค์ ์์ฃผ ๋์ด์ฐ์ ๋๋ค!
) { | ||
val surveyUiState by viewModel.surveyUiState.collectAsStateWithLifecycle() | ||
val surveyListUiState = viewModel.surveyListUiState.collectAsStateWithLifecycle().value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์งํธ์ ์ฌ๊ธฐ by๋ฅผ ์๊ฑฐํ๊ณ ๋ค์ value๋ฅผ ๋ถ์ธ ์ด์ ๊ฐ ์์๊น์?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๊ฒ ํ์ผ ์ด๋ฆ์ ๋ณ๊ฒฝํ๊ณ , ์๋ก์ด ํ์ผ์ ์ด์ ํ์ผ ์ด๋ฆ์ผ๋ก ๋ณ๊ฒฝํ๋๋,
์๋ก ์ถ๊ฐ๋ ๋ด์ฉ์ธ๋ฐ, ๋ณ๊ฒฝ์ฌํญ์ผ๋ก ๋์ค๋๊ตฐ์ ์บฌ์บฌ ,,
๋ฐ๋ก ์๊ฑฐํ๊ฒ ์๋๋ผ, ์๋ก ๊ตฌํํ ์ฌํญ์ ๋๋ค ์บฌ์บฌ,,, ํํํํํํ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ํ ๊ทธ๋ฐ๊ฑฐ๋ผ๋ฉด value๋ฅผ ์๊ฑฐํ๊ณ by๋ง ๋ถ์ฌ์ค๋ ๋ ๊ฒ ๊ฐ์์!
} | ||
.onFailure { throwable -> | ||
_surveyCheckUiEvent.emit(SurveyUiEvent.Failure(throwable)) | ||
_errorFlow.emit(throwable) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ค์ฝํ ํ๋ ์ ๊ฑฐํ ์ ์์ ๊ฒ ๊ฐ์์.
getSurveyListUseCase().onSuccess { surveyList -> // <- ์์ชฝ
_surveyListUiState.value = SurveyListUiState.Success(surveyList)
}
ํ๋ฉด ๊ฐํํด์ผํ๋ ๋๋น์ธ๊ฐ์?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํน์ ์ด๋ค ์ค์ฝํ ๋ง์ํ์ ๊ฑด๊ฐ์ ,, ?
onSuccess ๊ฐํ ๋ง์ํ์ ๊ฑด๊ฐ์ ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์บฌ์บฌ ํด๋น ์ปจ๋ฒค์ ์ ์ฝ๋์๋ ์ด์ด์ ธ ์๊ธดํ๋ฐ,
์ฌ์ค ํฐ ์๋ฏธ๋ ๊ฐํ์ด ํ์ํ ๊ฒฝ์ฐ, ๋ฌด์กฐ๊ฑด ํ์ค์ ํ ์ฒด์ธ๋ง ์ค์ ํ๋๋ก ํ๋๊ฒ ์ฃผ ์๋ฏธ๋ผ๊ณ ์๊ฐํด์
๊ฐ์ธ์ ์ผ๋ก ๋ฐ๋ก onSuccess๋ฅผ ๋ถ์ด๋๊ฒ ๊ฐ๋
์ฑ๋ ์ข์ง์๊ณ ,
onFailure๋ ๋๋ฌด ๋จ์ด์ง ๋๋์ด ๋ค์ด์ ๊ฐ์ธ์ ์ผ๋ก ๋ฌด์กฐ๊ฑด ๋ค์์ค๋ถํฐ ๊ฐํํ๋๊ฑธ ์ข์ํด์ ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ํ ์ ๋ถ๋ถ์ ๋ํด์๋ ๊ตณ์ด ์ฒ ์ ํ ์งํค์ง ์์๋ ๋๋ ์ปจ๋ฒค์ ์ผ๊น์ ?.?
์ฌ์ค ์ง๊ธ๋ ์์ฌ์๊ธด ํด์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๋ ์ ์ปจ๋ฒค์ ์ ์๊ณ ์ฐ๊ณ ์๊ณ , ์ด๊ธด ์ฌ๋ก๋ ์ ๊ฐ ์๊ฐ๋๋ ๊ฒ์ค์๋ ์์ด์ !
ํด๋น ์ปจ๋ฒค์ ์ด ๋ง ๊ทธ๋๋ก ์ฒด์ด๋์ ํ ๋ ํ ์ค๋ก ์๋๋ฉด ๋ฌด์กฐ๊ฑด ๊ฐํํ๋ผ. ๊ฐ ์ฃผ ๋ชฉ์ ์ด๋ผ
useCase().onSuceess()
.onFailure().onRestore() -> ์ด๋ ๊ฒ ํ๋๊ฒ ์๋๋๋ถ๋ถ์ด๊ณ
useCase()
.onSuccess()
.onFailure() -> ์ด๊ฑด ๊ฐ๋ฅํด์
LaunchedEffect(true) { | ||
viewModel.getSurvey(surveyId) | ||
} | ||
|
||
LaunchedEffect(true) { | ||
viewModel.errorFlow.collectLatest { | ||
snackBarHostState.showSnackbar(it.toSupportingText()) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ ๋ค ํ ๋ฒ๋ง ํธ์ถ์ด ๋๋ ๊ฑฐ๋ผ๋ฉด ๋ถ๋ฆฌํ์ ์ด์ ๊ฐ ๊ถ๊ธํด์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋จ์ํ ๋ก์ง ๋ทฐ๋ชจ๋ธ ํธ์ถ ๋ก์ง ๋ถ๋ฆฌ ๋๋ฌธ์ ๋๋์ด์ !
ํค ๊ฐ์ด ์๋ก true๋ผ ์๋ก ๊ฐ์ ์ค์ฝํ์ ๋๋ฌ๋ ์ฐจ์ด๋ ์์ ๊ฒ ๊ฐ์์ !
Text( | ||
text = "์์ฑ๋ ์ค๋ฌธ ๋ณด๋ฌ๊ฐ๊ธฐ", | ||
style = WappTheme.typography.contentRegular, | ||
) | ||
|
||
Icon( | ||
painter = painterResource(id = R.drawable.ic_magnifier), | ||
contentDescription = "์์ฑ๋ ์ค๋ฌธ ๋ณด๋ฌ๊ฐ๊ธฐ ์์ด์ฝ", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด ๋ถ๋ถ ๊ท์ฐฎ๋๋ผ๋ Strings.xml๋ก ๋นผ์ฃผ์๋ฉด ์ข์ ๊ฒ ๊ฐ์์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํธ์ฐ ์๋์ง๋ ๋ชฐ๋๋ค์ ์บฌ์บฌ ๋ฐ๋ก ์๊ฑฐํ๊ฒ ์ต๋๋ค !
|
||
package com.wap.wapp.feature.survey | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ๊ฑฑ ์ฌ๊ธฐ ์ฒซ ํ์ ๊ฐํ์ด ๋ค์ด๊ฐ์์ด์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ค์ฐ์~~ ๋งค์๋ ํฐ์ง์์ด์ ์
UserRole.MEMBER -> { | ||
viewModel.getSurveyFormList() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ค์ฝํ ์ ๊ฑฐํ ์ ์์ ๊ฒ ๊ฐ์์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ข์ต๋๋ค์~~
1. ๐ ๊ด๋ จ๋ ์ด์ ๋ฐ ์๊ฐ
#85 ์ค๋ฌธํญ์์ ์์ฑ๋ ์ค๋ฌธ ์ด๋ ๊ธฐ๋ฅ ๊ตฌํ
2. ๐ฅ๋ณ๊ฒฝ๋ ์
๊ธฐ์กด ๊ด๋ฆฌํญ์์ ์ค๋ฌธ ํ์ธ -> ์ค๋ฌธํญ์์ ์ค๋ฌธ ํ์ธ๋๋๋ก ์์
์์ฑ๋ ์ค๋ฌธ ๋ฆฌ์คํธ ํ๋ฉด ๊ตฌํ,
์ค๋ฌธํญ -> ์์ฑ๋ ์ค๋ฌธ ๋ชฉ๋ก -> ์์ธํ ์ค๋ฌธ ๋ด์ฉ ํ์ธ ์ผ๋ก ๊ตฌ์ฑ
survey -> survey-check -> survey-detail
๊ธฐ์กด survey-check ๋ค์ด๋ฐ์ด -> survey-detail๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค
survey-check ๋ค์ด๋ฐ์ ์ค๋ฌธ ๋ชฉ๋ก ํ๋ฉด์ผ๋ก ๊ตฌ์ฑํ์์ต๋๋ค.
3. ๐ธ ์คํฌ๋ฆฐ์ท(์ ํ)
(ํ์์ธ ๊ฒฝ์ฐ ) (์ด์์ง) (์ค๋ฌธ ๋ชฉ๋กํ๋ฉด) (์ค๋ฌธ ํ์ธ ํ๋ฉด)4. ๐ก์๊ฒ๋ ํน์ ๊ถ๊ธํ ์ฌํญ๋ค
์ถํ ๊ตฌํ์ฌํญ