[FIX] #212 어드민 패널 Bootstrap/CSS 렌더링 수정 - #226
Closed
PBEM22 wants to merge 18 commits into
Closed
Conversation
- Thymeleaf + Bootstrap 5 기반 SSR 어드민 패널 추가 - InMemoryUserDetailsManager로 환경변수 기반 어드민 계정 관리 - Spring Security 별도 FilterChain(@order(1))으로 API와 세션 분리 - 대시보드(통계), 유저 관리(정지/해제/강제탈퇴), 분철글 관리(상태필터/삭제) 구현 - UserStatus에 SUSPENDED 추가, User에 suspend/unsuspend/withdraw(reason) 메서드 추가 - ErrorStatus에 PROMPT_ERROR(50005) 추가
- Keep Thymeleaf dependencies (admin SSR) - Keep admin credentials config (ADMIN_USERNAME, ADMIN_PASSWORD) - Merge withdraw() with reason param and validateNoActiveTransaction from develop - Keep suspend()/unsuspend() methods in User added for admin panel
- deletePost() 실행 전 주문 존재 여부 체크 추가 - 주문이 있으면 POST_HAS_ORDERS(40020) 예외 반환 - OrderRepository에 existsByGroupBuyPost_Id() 추가
- CLOSED/PAYMENT_DONE/SHIPPING 상태 글은 주문 유무 무관하게 삭제 차단 (POST_IN_PROGRESS 40021) - 상태 기반 체크를 주문 존재 체크보다 먼저 수행 - 프론트 confirm: RECRUITING은 일반 경고, 그 외 상태는 '진행 중' 강조 메시지로 구분
- User.suspend/unsuspend: WITHDRAWN 계정 상태 변경 시도 시 예외 발생 - AdminService.forceWithdrawUser: 이미 탈퇴한 유저 중복 탈퇴 차단 - AdminController: BusinessException 발생 시 JSON 대신 flash 메시지로 redirect - layout.html: 에러 메시지 alert 영역 추가
탈퇴한 유저에 대해 suspend/unsuspend 호출 시 IllegalStateException 대신 BusinessException을 던져 AdminController에서 flash 에러로 정상 처리되도록 수정
- 사이드바: 다크 테마, 활성 메뉴 accent 색상, 계층 구조 개선 - 대시보드: 컬러 스탯 카드 + 아이콘 + 빠른 이동 섹션 - 유저/분철글 테이블: 상태별 색상 배지, 액션 버튼 시각화 - 분철글 상태 필터를 pill 탭으로 교체 - confirm 다이얼로그를 JS 함수로 분리하여 가독성 향상
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthrough관리자 SSR 화면에 공용 Changes관리자 SSR UI 개편
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
관련 이슈
close #212
변경 사항
layout.html의th:fragment를<html>태그로 이동하여<head>가 fragment 범위에 포함되도록 수정 (Bootstrap, admin.css 미적용 근본 원인 해결)admin.css정적 파일 신규 추가 (/css/admin.css) — 기존<section>내 인라인<style>제거SecurityConfigWHITE_LIST에/css/**추가dashboard.html,users.html,posts.html템플릿 리팩토링 — admin.css 클래스 기반으로 전면 교체users.html컬럼 순서 버그 수정 (status/createdAt 뒤바뀜, 중복 createdAt td 제거)테스트 증명
리뷰어 참고
Thymeleaf
th:replace로 fragment를 참조할 때, fragment가<body>내<th:block>에 정의되면<head>가 렌더링 결과에서 제외됩니다.th:fragment를<html>태그에 선언해야 전체 문서(head 포함)가 fragment 범위에 포함됩니다.체크리스트
Summary by CodeRabbit