[Refactor] 관리자 UI 수정 및 설문 수정 내용 반영 - #3
Merged
Merged
Conversation
seoulection-server가 SurveyQuestionKey enum(AVOIDANCE/CONCERN 2개)에서 문자열 자연 키로 이미 옮겨가 있어, 어드민이 새 문항(WATER_DIRECT 등)을 읽으면 JPA enum 역직렬화가 예외로 죽는 상태였다. 어드민 쪽 도메인·JPA 엔티티·저장소·컨트롤러를 전부 String으로 맞추고, 서버가 이미 갖고 있는 선택지 점수(value, 0~100) 컬럼도 어드민에서 보고 고칠 수 있게 매핑을 추가했다. 선택지 추가 폼의 문항 선택도 하드코딩된 2개 라디오 대신 실제 문항 목록을 순회하도록 바꿨다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
지금까지 어드민은 문항 제목 수정만 됐고 새 문항 추가는 안 됐다. questionKey가 더 이상 enum으로 고정돼 있지 않으니(직전 커밋) 문항도 선택지처럼 데이터로 자유롭게 늘릴 수 있어야 한다. 문항 키 포맷 검증(옵션 code와 같은 규칙)과 자연 PK 중복 방지를 추가하고, 관리 화면에 "문항 추가" 카드를 새로 만들었다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
SurveyOption에는 이미 있던 soft delete가 SurveyQuestion에는 없어서, CONCERN처럼 더 이상 안 쓰는 문항을 정리할 방법이 없었다. SurveyOption과 같은 방식으로 active=false 전환(하드 삭제 아님)을 지원하고, 관리 화면에 문항별 노출/숨김 배지와 숨기기/되살리기 버튼을 추가했다. api-server 쪽에 이미 반영된 SurveyQuestion.active 컬럼과 짝을 맞춘다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
페이지 5개가 <style> 블록을 각자 복붙하고 있어 색상·간격이 조금씩 어긋나 있었다. 토큰(색상·간격·그림자·radius)과 사이드바/카드/테이블/ 폼/배지 컴포넌트를 static/css/admin.css 한 곳에 정리하고, 상단 가로 탭을 대체할 좌측 사이드바를 fragments/sidebar.html로 뽑아냈다. 아직 어느 페이지도 이걸 쓰진 않는다 — 다음 커밋들에서 페이지별로 갈아탄다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
상단 가로 탭 대신 좌측 사이드바(fragments/sidebar)를 쓰고, 인라인 <style>를 admin.css로 대체했다. 메뉴 카드 4개의 문구·링크는 그대로다 — HomeControllerTest가 문구로 검증하므로 텍스트를 건드리지 않았다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
작업 내용