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

[Refactor] LectureEvaluationTab string 하드 코딩 제거 #125

Closed
jinukeu opened this issue Jan 30, 2024 · 2 comments · Fixed by #128
Closed

[Refactor] LectureEvaluationTab string 하드 코딩 제거 #125

jinukeu opened this issue Jan 30, 2024 · 2 comments · Fixed by #128
Assignees
Labels

Comments

@jinukeu
Copy link
Member

jinukeu commented Jan 30, 2024

⚒️ Refactor

리팩토링할 내용에 대해 설명해주세요.

LectureEvaluationTab string 하드 코딩 제거 필요

enum class LectureEvaluationTab(
  val position: Int,
  val title: String,
) {
  LECTURE_EVALUATION(
    position = 0,
    title = "강의평가",
  ),
  EXAM_INFO(
    position = 1,
    title = "시험정보",
  ),
}

비고

@BEEEAM-J
Copy link
Member

const val WORD_LECTURE_EVALUATION = "강의평가"

title = WORD_LECTURE_EVALUATION,

위와 같은 형식으로 수정해도 괜찮을까요???

추가로 EvaluationLevel 내의 String 값들은 수정할 필요가 없나요??

@jinukeu
Copy link
Member Author

jinukeu commented Jan 31, 2024

core:ui 모듈의 extension/Enums.kt 파일 참고해서 고쳐주시면 될거같아요.

// TODO api v2 리팩토링 필요
@Stable
enum class ExamLevel(val value: String) {
  EASY("쉬움"),
  NORMAL("보통"),
  DIFFICULT("어려움"),
}

// TODO api v2 리팩토링 필요
@Stable
enum class ExamInfo(val value: String) {
  FAMILY_TREE("족보"),
  TEXTBOOK("교재"),
  PPT("PPT"),
  WRITING("필기"),
  APPLY("응용"),
  PRACTICE("실습"),
  HOMEWORK("과제"),
}

@Stable
enum class ExamType(val value: String) {
  MID_EXAM("중간고사"),
  FINAL_EXAM("기말고사"),
  NOTE_EXAM("쪽지"),
  ETC_EXAM("기타"),
}

이 값들은 서버에 직접 보내는 값이라서 고치면 안돼요~! (api v2로 이사가야해요 ...)

BEEEAM-J added a commit that referenced this issue Jan 31, 2024
jinukeu added a commit that referenced this issue Feb 1, 2024
…e-hardcoding

refactor/#125 : LectureEvaluationTab 하드코딩 제거
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants