Skip to content
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/#67 #68

Merged
merged 22 commits into from
Dec 23, 2023
Merged

Feature/jaino/#67 #68

merged 22 commits into from
Dec 23, 2023

Conversation

jeongjaino
Copy link
Member

1. ๐Ÿ“„ ๊ด€๋ จ๋œ ์ด์Šˆ ๋ฐ ์†Œ๊ฐœ

#66 ์„ค๋ฌธ ์ž‘์„ฑ Validation ๊ตฌํ˜„

2. ๐Ÿ”ฅ๋ณ€๊ฒฝ๋œ ์ 

  • ์ž‘์„ฑํ•œ ์„ค๋ฌธ์ผ ๊ฒฝ์šฐ ๋“ค์–ด๊ฐ€์ง€์ง€ ์•Š์Œ.
  • ์ฃผ๊ด€์‹ ๋‹ต๋ณ€์ผ ๊ฒฝ์šฐ 10์ž ์ด์ƒ์œผ๋กœ ์ž‘์„ฑํ•˜๋„๋ก ๊ตฌํ˜„

3. ๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท(์„ ํƒ)

image image image

4. ๐Ÿ’ก์•Œ๊ฒŒ๋œ ํ˜น์€ ๊ถ๊ธˆํ•œ ์‚ฌํ•ญ๋“ค

@jeongjaino jeongjaino added ๐Ÿš€์ง„ํ˜ธ๐Ÿš€ ESTP ์ •์ง„ํ˜ธ 23์„ธ ๐ŸŒฑ๊ธฐ๋Šฅ๐ŸŒฑ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ๋‘๋‘๋‘ฅ์žฅ! ๐Ÿงนํ—ˆ๋“œ๋ ›์ผ๐Ÿงน ์ข…์†์„ฑ ์ถ”๊ฐ€, ๊ธฐ๋Šฅ๊ณผ ๋ฌด๊ด€ํ•œ ์ฝ”๋“œ ์ž‘์„ฑ ๐Ÿ”ฅ๋ฆฌ๋ทฐ ๊ธฐ๋‹ค๋ฆฌ๋Š” ์ค‘๐Ÿ”ฅ PR์„ ์˜ฌ๋ฆฌ๊ณ  ์ฝ”๋“œ๋ฆฌ๋ทฐ๋ฅผ ๊ธฐ๋‹ค๋ฆฌ๊ณ  ์žˆ๋Š” ์ƒํƒœ์ž…๋‹ˆ๋‹ค. labels Dec 22, 2023
@jeongjaino jeongjaino self-assigned this Dec 22, 2023
@tgyuuAn
Copy link
Member

tgyuuAn commented Dec 23, 2023

์„ค๋ฌธ ์ž‘์„ฑ ์‹œ surveyId๋ž‘ userId ๋ฅผ ์ด์šฉํ•˜์—ฌ ์œ ํšจ์„ฑ ๊ฒ€์ฆ์„ ํ•œ๋‹ค ๋ผ๋Š” ๋ง์—์„œ ์•ฝ๊ฐ„ ์ด์ƒํ•˜๋‹ค๊ณ  ์ƒ๊ฐ์ด ๋“ค์–ด์„œ ๊ณฐ๊ณฐํžˆ ์ƒ๊ฐํ•ด๋ณด์•˜๋Š”๋ฐ์š”,

PR ์„ค๋ช…์„ ๋ณด๋‹ˆ๊นŒ ์„ค๋ฌธ ์ž‘์„ฑ์ด ์•„๋‹ˆ๋ผ ์„ค๋ฌธ ์‘๋‹ต์— ๋Œ€ํ•œ ์œ ํšจ์„ฑ ๊ฒ€์ฆ์ด์—ˆ๊ตฐ์š”!




์ถ”ํ›„์— ์‘๋‹ตํ•œ ์„ค๋ฌธ ๋‚ด์šฉ ์ˆ˜์ • ๊ธฐ๋Šฅ์„ ๋„์ž…ํ•œ๋‹ค๊ณ  ํ•˜๋ฉด, ์‘๋‹ตํ•œ surveyId๋ž‘ userId๋ฅผ ์ด์šฉํ•ด์„œ ๊ฐ’์„ ๋ถˆ๋Ÿฌ์™€์„œ ์ˆ˜์ •ํ•  ํ™”๋ฉด์— ๋„์›Œ์ค€ ๋’ค,

์ƒˆ๋กœ์šด ๊ฐ’์„ ์ž…๋ ฅ๋ฐ›๊ณ  ์™„๋ฃŒ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด db์— updateํ•˜๋Š” ํ˜•์‹์œผ๋กœ ํ•˜๋ฉด ์ˆ˜์ • ๊ธฐ๋Šฅ๋„ ๋„์ž…ํ•  ์ˆ˜ ์žˆ๊ฒ ๋„ค์š”!

Copy link
Member

@tgyuuAn tgyuuAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ง„ํ˜ธ์ƒ ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค!

์†Œ์†Œํ•œ ์ฝ”๋ฉ˜ํŠธ ๋‚จ๊ฒจ๋ดค์Šต๋‹ˆ๋‹ค. ์ œ ์ฝ”๋ฉ˜ํŠธ์— ๋Œ€ํ•œ ์ง„ํ˜ธ๋‹˜์˜ ์˜๊ฒฌ ๊ถ๊ธˆํ•ด์š”!

์ด๋ฒˆ PR๋„ ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค~ ๐Ÿ‘๐Ÿ‘๐Ÿ‘


suspend fun getSurveyForm(eventId: Int): Result<SurveyForm>
suspend fun isSubmittedSurvey(eventId: Int, userId: String): Result<Boolean>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋„ค์ด๋ฐ ์•„์ฃผ ์ข‹์•„์š” !

Comment on lines 33 to 35
surveyedAt = LocalDateTime.parse(
this.surveyedAt,
DateTimeFormatter.ISO_LOCAL_DATE_TIME,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String -> LocalDateTime์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๋ฉ”์†Œ๋“œ ๊ฐ™์€๋ฐ Util๋กœ ๋นผ๋ฉด ๊ณต์ง€์‚ฌํ•ญ ๋“ฑ๋ก ๋กœ์ง์—์„œ๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ์š” ??!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๊ฒŒ ์• ๋งคํ•˜๊ธด ํ•˜๋„ค์š”

ํ™•์‹คํžˆ ์œ ํ‹ธ๋กœ ๋นผ๋ฉด ์ž‘์„ฑ๋˜๋Š” ์ฝ”๋“œ๊ฐ€ ๋งŽ์ด ์ค„ ๊ฒƒ ๊ฐ™์•„์š”, ์‚ฌ์šฉํ•˜๋Š” ๊ตฌ๊ฐ„์ด ๋งŽ์•„์„œ์š”

๋Œ€์ฒด์ ์œผ๋กœ ์‚ดํŽด๋ณด๋‹ˆ๊นŒ LocalDateTime Parse, Format ํ•˜๋Š” ๋ถ€๋ถ„์ด ๋Œ€์ฒด์ ์œผ๋กœ

  • data (Repository์—์„œ DataSource๋กœ ์ „๋‹ฌํ•  ๋•Œ ํŒŒ์‹ฑ ๋ณ€ํ™˜ )
  • network (Repo์—์„œ UseCase๋กœ ์ „๋‹ฌํ•  ๋•Œ ํฌ๋ฉ”ํŒ… ๋ณ€ํ™˜, [ํ•˜์ง€๋งŒ network ๋ชจ๋ธ ํด๋ž˜์Šค ๋กœ์ปฌ ํ•จ์ˆ˜๋กœ ๋“ฑ๋ก๋˜์–ด ์žˆ์Œ]) ์ด๋ผ

data, network๋Š” ๋”ฐ๋กœ common ๋ชจ๋“ˆ์„ ์ฐธ์กฐํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์—
๊ฐ๊ฐ ๋ชจ๋“ˆ์— DateUtil์„ ๋งŒ๋“ค์–ด์•ผ ํ•ด์š” ใ… ใ… 

data, network ๊ฐ ๋ชจ๋“ˆ์—์„œ data๋Š” 2๋ฒˆ ํŒŒ์‹ฑ, network๋Š” 3๋ฒˆ ํฌ๋ฉ”ํŒ…์„ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ์–ด์š” ! (๋ฐฉ๊ธˆ ๋‹ค๋’ค์ ธ๋ด„ ํ›„๋‹ค๋‹ค)

๋ช‡๋ฒˆ ์ค‘์ฒฉ ์ฐธ์กฐ๋˜๋Š”์ง€ ๊ธฐ์ค€์„ ์ •ํ•˜๋ฉด ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š” !
์•ฝ๊ฐ„ 3๋ฒˆ ๋„˜์œผ๋ฉด ์œ ํ‹ธํด๋ž˜์Šค ๋งŒ๋“ค๊ธฐ ! ์ด๋Ÿฐ๋Š๋‚Œ์œผ๋กœ๋‹ค๊ฐ€ ํ•˜ํ•˜

ํƒœ๊ทœ์ƒ์€ ์–ด๋–ค๊ฑฐ ๊ฐ™์•„์š” ?

Copy link
Member

@tgyuuAn tgyuuAn Dec 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3๋ฒˆ ์ฐธ์กฐ๋˜๋ฉด ์œ ํ‹ธ ํด๋ž˜์Šค๋กœ ๋งŒ๋“œ๋Š” ๊ฒƒ ์ข‹์Šต๋‹ˆ๋‹ค.

๊ทผ๋ฐ ์ด ๋ถ€๋ถ„์€ ๋ช…ํ™•ํ•˜๊ฒŒ Event๋“ฑ๋ก์ด๋ž‘ ์ค‘๋ณต๋˜๋Š” ๋ถ€๋ถ„์ด๋‹ˆ๊นŒ

common๋ชจ๋“ˆ๊นŒ์ง€ ๊ฐ€์ง€ ์•Š๋”๋ผ๋„,

feature ๋ชจ๋“ˆ ๋‚ด์—์„œ๋ผ๋„ ๋นผ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์–ด์š”.

์˜๊ฒฌ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค์ž‡

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ธฐ๋Šฅ ๋ชจ๋“ˆ ์•ˆ์—์„œ๋„ 3๋ฒˆ ์ด์ƒ ์ฐธ์กฐ๋˜๋ฉด ์œ ํ‹ธ๋กœ ๋นผ๋Š” ๊ฑธ๋กœ ํ•˜์ฃ  !

Comment on lines 38 to 40
object SurveyCheckRoute {
const val route = "survey/check/{surveyId}"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ˜น์‹œ ๋”ฐ๋กœ SurveyCheckRoute ๊ฐ์ฒด์—๋‹ค๊ฐ€ ๋ณ€์ˆ˜๋ฅผ ํ• ๋‹นํ•ด์ค€ ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”?

์ด๋ ‡๊ฒŒ ๋  ๊ฒฝ์šฐ,

route = SurveyCheckRoute.route

SurveyCheckRoute๋ผ๋Š” ๊ฐ์ฒด ์ด๋ฆ„ ๋’ค์— route๋ผ๋Š” ํ”„๋กœํผํ‹ฐ ๋ช…์„ ํ•œ ๋ฒˆ ๋” ์ง€์ •ํ•ด์ฃผ์–ด์•ผ ํ•˜๋Š”๋ฐ์š”,

ํ™•์žฅ์„ฑ์˜ ์ด์œ ๋ผ๊ณ  ํ•˜๋ฉด ํ˜น์‹œ SurveyCheckRoute์— ๋˜ ์–ด๋–ค ํ”„๋กœํผํ‹ฐ๊ฐ€ ๋“ค์–ด๊ฐˆ ์ˆ˜ ์žˆ์„๊นŒ์š” ??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด์ „์— ์ž‘์„ฑํ•œ ์ฝ”๋“œ๋ฅผ ์ฐธ์กฐํ•˜๋ฉด์„œ ๊ตฌํ˜„ํ•ด๋ดค๋Š”๋ฐ,
๋”ฐ๋กœ ๊ธฐ๋Šฅ์ด ์ถ”๊ฐ€๋  ์ผ ์—†์œผ๋ฉด Object๋ฅผ ์„ ์–ธํ•  ์ด์œ ๋Š” ์—†๋Š” ๊ฒƒ ๊ฐ™๋„ค์š”.

์ง€๊ธˆ ๋‹ค๋ฅธ Navigation ๊ด€๋ จ ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•˜๋ฉด ๋‹ค ์ตœ์ƒ์œ„๋กœ ์„ ์–ธํ•ด์ฃผ์…”์„œ,
์ €๋„ ์Šคํƒ€์ผ ๋”ฐ๋ผ์„œ ๊ตฌํ˜„ํ•˜๋Š”๊ฒŒ ๋งž๋Š” ๊ฒƒ ๊ฐ™์•„์š” !

Comment on lines 88 to 95
fun setNextQuestion() {
val currentQuestionNumber = _questionNumber.value
val lastQuestionNumber = surveyAnswerList.value.size
val lastQuestionNumber = _surveyForm.value.surveyQuestionList.lastIndex

if(currentQuestionNumber == lastQuestionNumber) { // ๋งˆ์ง€๋ง‰ ์งˆ๋ฌธ์ผ ๊ฒฝ์šฐ ์ œ์ถœ
if (currentQuestionNumber == lastQuestionNumber) { // ๋งˆ์ง€๋ง‰ ์งˆ๋ฌธ์ผ ๊ฒฝ์šฐ ์ œ์ถœ
submitSurvey()
return
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setNextQuestion์—์„œ submitSurvey๋ฅผ ํ˜ธ์ถœํ•˜๊ณ  ์žˆ๋Š”๋ฐ,

1-1. ๋งˆ์ง€๋ง‰ ์งˆ๋ฌธ์ด ์•„๋‹ ๊ฒฝ์šฐ, ๋‹ค์Œ ์งˆ๋ฌธ์œผ๋กœ ๋„˜์–ด๊ฐ.
1-2. ๋งˆ์ง€๋ง‰ ์งˆ๋ฌธ์ผ ๊ฒฝ์šฐ ์‘๋‹ต์„ ์ œ์ถœํ•จ.

์˜ ๋กœ์ง์„ ๊ฒฐ์ •ํ•˜๋Š” ๊ฑด View๋”ด์—์„œ ๊ฒฐ์ •ํ•˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด ์–ด๋–จ๊นŒ์š”?

setNextQuestion ํ•จ์ˆ˜์—์„œ ์„ค๋ฌธ ์‘๋‹ต๊นŒ์ง€ ํ•ธ๋“ค๋งํ•˜๊ณ  ์žˆ๋Š” ๊ฒƒ ๊ฐ™์•„์š”.

๊ตณ์ด ํ•„์š”์„ฑ์„ ๋ชป๋Š๋‚€๋‹ค๋ฉด ํ•จ์ˆ˜ ๋ช…์„ ๋ฐ”๊ฟ”๋ณด๋Š” ์ชฝ๋„ ๊ณ ๋ คํ•ด๋ณผ ๋ฒ• ํ•˜๋„ค์š”.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#64 (comment)
(์ด์ „ ํ”ผ์•Œ์—์„œ ์ด์–ด์ง€๋Š” ๋‚ด์šฉ์ด์—์š” ! )

๋งž์ฃ ,, ํ•จ์ˆ˜๋Š” ํ•˜๋‚˜์˜ ๊ธฐ๋Šฅ๋งŒ ํ•ด์•ผ ํ•˜๊ณ , ๋„ค์ด๋ฐ๋งŒ ๋ณด๊ณ ๋„ ๋‚ด์šฉ์ด ์œ ์ถ”๊ฐ€ ๋˜์–ด์•ผ ํ•˜๋Š”๋ฐ,
ํ•ด๋‹น ํ•จ์ˆ˜๋Š” ๋„ค์ด๋ฐ ๋ฉด์—์„œ ๋ถ€์กฑํ•œ ๊ฒƒ ๊ฐ™์•„์š”

๊ทผ๋ฐ ์ €๋„ ์–ด๋ ต๋„ค์š” ์–ด๋–ค๊ฒŒ ์ •๋‹ต์ผ๊นŒ์š”
(View๋”ด์—์„œ ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœ(์ด์ „ ํ”ผ์•Œ ์ฐธ์กฐ), ํ˜„์žฌ ํ•จ์ˆ˜๋ช… ์ˆ˜์ • -> setNextQuestionIfLastQuestionSubmit)

๏ฟฝ์ง€๊ธˆ ์ œ๊ฐ€ ๋ณด๊ธฐ์—๋Š” View์—์„œ ํ˜ธ์ถœํ•˜๋Š” ๊ฑธ๋กœ ๋‹ค์‹œ ์ˆ˜์ •ํ•˜๋Š”๊ฒŒ ๋‚˜์„ ๊ฒƒ ๊ฐ™์•„์š”.
๋กœ์ง์˜ ๊ฐ€๋…์„ฑ์ด ๋” ์ข‹๊ณ , ์ง€๊ธˆ์€ ๋กœ์ง์ด ์ˆจ๊ฒจ์ ธ ์žˆ์–ด์„œ ํŒŒ์•…ํ•˜๊ธฐ ์–ด๋ ค์šธ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“œ๋„ค์š”

@jeongjaino
Copy link
Member Author

์ œ๋Œ€๋กœ์ž…๋‹ˆ๋‹ค ํƒœ๊ทœ์ƒ !!

@tgyuuAn tgyuuAn added ๐ŸŒŸ๋จธ์ง€ ํ•ด์ฃผ์„ธ์š”๐ŸŒŸ ์ฝ”๋“œ ๋ฆฌ๋ทฐ๊ฐ€ ์™„๋ฃŒ๋œ ๋’ค PR์„ ์˜ฌ๋ฆฐ์‚ฌ๋žŒ์ด Merge๋ฅผ ํ•˜๋ฉด ๋˜๋Š” ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค. and removed ๐Ÿ”ฅ๋ฆฌ๋ทฐ ๊ธฐ๋‹ค๋ฆฌ๋Š” ์ค‘๐Ÿ”ฅ PR์„ ์˜ฌ๋ฆฌ๊ณ  ์ฝ”๋“œ๋ฆฌ๋ทฐ๋ฅผ ๊ธฐ๋‹ค๋ฆฌ๊ณ  ์žˆ๋Š” ์ƒํƒœ์ž…๋‹ˆ๋‹ค. labels Dec 23, 2023
@jeongjaino jeongjaino merged commit bf957c8 into develop Dec 23, 2023
@tgyuuAn tgyuuAn deleted the feature/jaino/#67 branch February 6, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐ŸŒŸ๋จธ์ง€ ํ•ด์ฃผ์„ธ์š”๐ŸŒŸ ์ฝ”๋“œ ๋ฆฌ๋ทฐ๊ฐ€ ์™„๋ฃŒ๋œ ๋’ค PR์„ ์˜ฌ๋ฆฐ์‚ฌ๋žŒ์ด Merge๋ฅผ ํ•˜๋ฉด ๋˜๋Š” ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค. ๐ŸŒฑ๊ธฐ๋Šฅ๐ŸŒฑ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ๋‘๋‘๋‘ฅ์žฅ! ๐Ÿš€์ง„ํ˜ธ๐Ÿš€ ESTP ์ •์ง„ํ˜ธ 23์„ธ ๐Ÿงนํ—ˆ๋“œ๋ ›์ผ๐Ÿงน ์ข…์†์„ฑ ์ถ”๊ฐ€, ๊ธฐ๋Šฅ๊ณผ ๋ฌด๊ด€ํ•œ ์ฝ”๋“œ ์ž‘์„ฑ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: ์„ค๋ฌธ ์ž‘์„ฑ Validation ๋กœ์ง ๊ตฌํ˜„
2 participants