Skip to content

[FIX] #212 어드민 패널 Bootstrap/CSS 렌더링 수정 - #226

Closed
PBEM22 wants to merge 18 commits into
developfrom
feat/#212/admin-panel
Closed

[FIX] #212 어드민 패널 Bootstrap/CSS 렌더링 수정#226
PBEM22 wants to merge 18 commits into
developfrom
feat/#212/admin-panel

Conversation

@PBEM22

@PBEM22 PBEM22 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

관련 이슈

close #212

변경 사항

  • layout.htmlth:fragment<html> 태그로 이동하여 <head>가 fragment 범위에 포함되도록 수정 (Bootstrap, admin.css 미적용 근본 원인 해결)
  • admin.css 정적 파일 신규 추가 (/css/admin.css) — 기존 <section> 내 인라인 <style> 제거
  • SecurityConfig WHITE_LIST에 /css/** 추가
  • dashboard.html, users.html, posts.html 템플릿 리팩토링 — admin.css 클래스 기반으로 전면 교체
  • users.html 컬럼 순서 버그 수정 (status/createdAt 뒤바뀜, 중복 createdAt td 제거)

테스트 증명

  • 로그인 페이지 정상 렌더링
  • 대시보드 stat-card, Bootstrap 그리드 정상 적용
  • 유저 관리 테이블 컬럼 순서 및 뱃지 정상 표시
  • 분철글 관리 필터 탭 및 상태 뱃지 정상 표시
  • 정지/해제/탈퇴/삭제 confirm 다이얼로그 정상 동작

리뷰어 참고

Thymeleaf th:replace로 fragment를 참조할 때, fragment가 <body><th:block>에 정의되면 <head>가 렌더링 결과에서 제외됩니다.
th:fragment<html> 태그에 선언해야 전체 문서(head 포함)가 fragment 범위에 포함됩니다.

체크리스트

  • 코드 컨벤션 준수
  • 사이드 이펙트 확인 (SecurityConfig WHITE_LIST, 타 도메인 영향 없음)

Summary by CodeRabbit

  • 새로운 기능
    • 관리자 화면에 통계 카드, 빠른 이동 링크, 테이블, 상태 배지, 필터, 페이지네이션을 포함한 통합 디자인을 적용했습니다.
    • 관리자 사용자 및 게시글 목록의 상태별 액션과 삭제 확인 UI를 개선했습니다.
  • 개선
    • 관리자 레이아웃과 대시보드의 시각적 일관성, 가독성, 사용성을 향상했습니다.
    • CSS 리소스에 인증 없이 접근할 수 있도록 설정해 관리자 스타일이 정상적으로 표시됩니다.

PBEM22 added 18 commits July 20, 2026 23:41
- 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 함수로 분리하여 가독성 향상
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 87492495-d443-41a0-ad1b-712d5f80f658

📥 Commits

Reviewing files that changed from the base of the PR and between abf8088 and eabaf2d.

📒 Files selected for processing (6)
  • src/main/java/org/sopt/poti/global/security/SecurityConfig.java
  • src/main/resources/static/css/admin.css
  • src/main/resources/templates/admin/dashboard.html
  • src/main/resources/templates/admin/layout.html
  • src/main/resources/templates/admin/posts.html
  • src/main/resources/templates/admin/users.html

📝 Walkthrough

Walkthrough

관리자 SSR 화면에 공용 admin.css를 도입하고 레이아웃·대시보드·게시글·사용자 템플릿의 클래스와 마크업을 개편했습니다. CSS 정적 경로는 Spring Security 인증 예외에 추가되었습니다.

Changes

관리자 SSR UI 개편

Layer / File(s) Summary
공용 관리자 스타일 및 접근 허용
src/main/java/.../SecurityConfig.java, src/main/resources/static/css/admin.css
관리자 공용 레이아웃, 카드, 테이블, 배지, 액션 버튼, 필터, 빈 상태, 페이징 스타일을 추가하고 /css/** 접근을 허용합니다.
관리자 레이아웃과 대시보드 적용
src/main/resources/templates/admin/layout.html, src/main/resources/templates/admin/dashboard.html
레이아웃 fragment를 <html> 기반으로 변경하고 외부 CSS를 연결했으며, 통계 카드와 빠른 이동 링크를 새 클래스 체계로 교체했습니다.
게시글·사용자 관리 화면 전환
src/main/resources/templates/admin/posts.html, src/main/resources/templates/admin/users.html
목록 화면을 공용 테이블·배지·버튼·페이징 클래스에 맞춰 변경하고, 확인 스크립트의 제출 버튼 선택자를 .js-submit으로 갱신했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • team-poti/POTI-SERVER#213: 동일한 관리자 SSR 화면과 admin.css, Thymeleaf 템플릿 및 보안 구성을 다룹니다.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 어드민 패널의 Bootstrap/CSS 렌더링 수정이라는 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed 대시보드·유저·분철글 템플릿과 CSS/보안 설정이 #212의 어드민 패널 SSR 범위와 일치합니다.
Out of Scope Changes check ✅ Passed 추가된 CSS, 템플릿 리팩토링, 정적 자원 허용은 모두 어드민 패널 렌더링 수정 범위 안입니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#212/admin-panel

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PBEM22 PBEM22 self-assigned this Jul 28, 2026
@PBEM22 PBEM22 closed this Jul 28, 2026
@PBEM22
PBEM22 deleted the feat/#212/admin-panel branch July 28, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 어드민 패널 구현 (SSR)

1 participant