-
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
Fix/jaino/#81 #83
Fix/jaino/#81 #83
Conversation
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,7 +1,7 @@ | |||
package com.wap.wapp.core.data.repository.management | |||
|
|||
interface ManagementRepository { | |||
suspend fun getManager(userId: String): Result<Boolean> | |||
suspend fun isManager(userId: String): Result<Boolean> |
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 | ||
}, | ||
onFailure = { exception -> |
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.
๋ฐ์ํ์ต๋๋ค !
} | ||
|
||
fun isAfterDeadline(): Boolean { | ||
val currentDateTime = LocalDateTime.now() |
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.
LocalDateTime.now
๋ณด๋ค TimeZone์ด ๋ค์ด๊ฐ, DateUtil.generateNowDateTime()
์ธ๊ฐ ? ๊ทธ๊ฑฐ ์ฐ๋๊ฒ ์ด๋จ๊น์?!
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, UserRole.MANAGER -> { 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.
์์ฐ when ์ ์์ ์ด๋ ๊ฒ ,
๋ฅผ ์ฌ์ฉํด์ ์ฌ๋ฌ ๊ฐ๋ฅผ ๋ฃ์ ์๋ ์๊ตฐ์.
์ ๋ ์ฒ์ ์์์ต๋๋ค...
@@ -141,7 +181,7 @@ private fun SurveyFormItemCard( | |||
style = WappTheme.typography.titleBold, | |||
) | |||
Text( | |||
text = calculateDeadline(surveyForm.deadline), | |||
text = surveyForm.calculateDeadline(), | |||
color = WappTheme.colors.yellow34, |
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.
๐๐๐
sealed class UserRoleUiState { | ||
data object Init : UserRoleUiState() | ||
data class Success(val userRole: UserRole) : UserRoleUiState() | ||
} | ||
|
||
sealed class SurveyFormListUiState { | ||
data object Init : SurveyFormListUiState() | ||
data class Success(val surveyFormList: List<SurveyForm>) : SurveyFormListUiState() |
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.
์ด๊ฒ ์ ๊ฐ ๋ก์ง์งค ๋๋ง๋ค ํญ์ ๊ณ ๋ฏผ์ธ๋ฐ,
์ด๋ฌํ sealed class๋ค์ ViewModel ์์ ๋ฃ๋๊ฒ ๋ง์๊น์?
์๋๋ฉด ๋ฐ์ผ๋ก ๋นผ๋ ๊ฒ์ด ๋ง๋๊ฑธ๊น์ ...?
ํญ์ ๊ณ ๋ฏผ์ด์์..
๋ณด๋ฉด ์ ๊ฐ ์ง ๋ก์ง๋ค์ ๋๋ถ๋ถ ๋ค ๋นผ๋จ์๊ฑฐ์์.
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.
์ ์ ๋ ์ฒ์์๋ ๋ค ๋นผ๊ณ ์์ํ๋๋ฐ, ์ฌ๋ฌ ๊ด๋ฆฌ ์ธก๋ฉด ๋๋ฌธ์ ๋ค ์์ผ๋ก ๋ฃ๊ธฐ ์์ํ์ด์
- ๊ธฐ๋ณธ์ ์ผ๋ก ํ์ผ์ด ๋ง์์ง
- State ๋ค์ด๋ฐ์ด ๊ฒน์น๊ฑฐ๋ ๋น์ทํ ๊ฒฝ์ฐ ์ค์ํ ์ฌ์ง๊ฐ ์์.
- viewModel.state๋ก ์ ๊ทผํด์ ์ค์ ์ฌ์ง๋ฅผ ์ค์ฌ์ค
์ ๋ ์์ ๊ฒฝ์ฐ ๋๋ฌธ์ ์ฌ์ฉํ๊ธด ํ๋๋ฐ,
๋ฐ๋ก ViewModel์ ์ฝ๋ ๋์ด ๋ง์์ง๊ณ , UiState๋ฅผ ViewModel์์ ์ ๊ทผํด์ผ ํ๋ ๋ถํธํจ๊ณผ ๊ฐ์ ๋จ์ ๋ ์์ ๊ฒ ๊ฐ์์
์๋ก ์ฅ๋จ์ ์ด ์์ด์ ์ ๋ต์ ์์ง ์์๊น์ ํํ,,
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. ๐ ๊ด๋ จ๋ ์ด์ ๋ฐ ์๊ฐ
#81 ๋ง๊ฐ๊ธฐํ์ด ์ง๋๋ ์ค๋ฌธ ๋ณด์ด๋ ๋ฒ๊ทธ ์์
2. ๐ฅ๋ณ๊ฒฝ๋ ์
3. ๐ธ ์คํฌ๋ฆฐ์ท(์ ํ)
์ผ๋ฐ ๋นํ์์ธ ์ํฉ (๋ค๋ก๊ฐ๊ธฐ๋, ๋์๋ก๊ทธ ์์์ฌ์ด๋ ๋๋ฅด๋ฉด ๋์๋ก๊ทธ ๊บผ์ง๋๋ก ๊ตฌํ)
(ํ ์คํธ๊ฐ ๋ฐ๋ก ์์ด, ํ์์ผ ๋ ๋ก๊ทธ ์ฐ๊ณ / ์ด์์ง ์ธ์ฆ ๋ฐ๊ณ ๋ค์ ๋ก๊ทธ ์ฐ๊ธฐ)4. ๐ก์๊ฒ๋ ํน์ ๊ถ๊ธํ ์ฌํญ๋ค
๊ณ ๋ฏผ๋๋ ์ํฉ
๊ฒ์คํธ ์ธ ๊ฒฝ์ฐ ๋์๋ก๊ทธ๋ก ํํํ์ฌ ํ์๊ฐ์ ์ ๋
๋์๋ก๊ทธ๋ฅผ ๋ซ์ผ๋ฉด, ๋นํ๋ฉด์ผ๋ก ํํ
์ด๋ด๊บผ๋ฉด, ๊ทธ๋ฅ ์ค๋ฌธ์์ ๊ฒ์คํธ ํ๋ฉด์ ๋ง๋๋๊ฒ ๋์๊น ๊ณ ๋ฏผ์ด ๋๋ค์ ํํ