Skip to content

feat: 도메인 기반 라우팅 분리 구현 (user/admin)#38

Merged
yerroong merged 1 commit into
developfrom
feature/api-integration
Mar 12, 2026
Merged

feat: 도메인 기반 라우팅 분리 구현 (user/admin)#38
yerroong merged 1 commit into
developfrom
feature/api-integration

Conversation

@yerroong
Copy link
Copy Markdown
Contributor

@yerroong yerroong commented Mar 12, 2026

✔️ 체크리스트

  • : Merge할 브랜치를 확인해 주세요.

🔍 작업 내용

  • 사용자 앱(www.pooliapp.com)과 관리자 앱(office.pooliapp.com) 도메인 분리
  • 동일 빌드로 도메인에 따라 다른 라우팅 제공
  • localhost에서는 /admin 경로로 구분
  • 도메인 유틸리티 함수 추가
  • 헤더 텍스트 변경: 구성원 정책제어
  • ApplicationTab 드롭다운 UI 개선

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 관리자/사용자 도메인 기반 라우팅 시스템 추가
    • 앱 항목 확장 시 자동 스크롤 기능 추가
    • 정렬 및 필터링 드롭다운 오버레이 개선
  • 개선 사항

    • 정책 상세 페이지 레이아웃 및 여백 최적화
    • 앱 항목의 반응형 디자인 및 접근성 강화
    • 앱 활성화/확장 상호작용 개선
    • 검색 입력창 상태 관리 및 스타일링 개선

@yerroong yerroong merged commit ac4f5e4 into develop Mar 12, 2026
1 of 2 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 12, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 82ee6437-ea75-446c-9a27-cd8bcca2afa9

📥 Commits

Reviewing files that changed from the base of the PR and between c729343 and b7ee4ab.

📒 Files selected for processing (5)
  • src/components/Header.tsx
  • src/page/PolicyDetail/PolicyDetail.tsx
  • src/page/PolicyDetail/components/ApplicationTab.tsx
  • src/routes/Router.tsx
  • src/utils/domain.ts

📝 Walkthrough

Walkthrough

이 변경사항은 관리자 및 사용자 도메인 기반의 동적 라우팅 시스템을 도입하고, PolicyDetail 페이지의 ApplicationTab 컴포넌트를 개선하며, 헤더 타이틀을 수정합니다.

Changes

Cohort / File(s) Summary
도메인 감지 및 라우팅 구조
src/utils/domain.ts, src/routes/Router.tsx
관리자/사용자 도메인 감지 함수를 추가하고, Router에서 getAppType()을 사용하여 동적 라우팅을 구현. 관리자 경로는 AdminLayout으로 분기, 사용자 경로는 기존 레이아웃 유지.
PolicyDetail 컴포넌트 개선
src/page/PolicyDetail/PolicyDetail.tsx, src/page/PolicyDetail/components/ApplicationTab.tsx
탭 콘텐츠 마진 클래스 제거 및 ApplicationTab 주요 재작성: 항목 확장 시 스크롤 동작, 오버레이 기반 정렬/필터 드롭다운, 접근성 개선(id 속성, 배지 크기 조정), 앱 토글 로직 강화, 검색 입력 비활성화 상태 추가.
헤더 타이틀 업데이트
src/components/Header.tsx
"/policy-detail" 경로의 페이지 타이틀을 "구성원 별 정책제어"에서 "구성원 정책제어"로 변경.

Sequence Diagram(s)

sequenceDiagram
    participant Browser
    participant Router
    participant DomainUtils
    participant AdminLayout
    participant UserLayout

    Browser->>Router: 앱 초기화
    Router->>DomainUtils: getAppType() 호출
    DomainUtils->>DomainUtils: window.location 확인
    alt 관리자 도메인
        DomainUtils->>Router: 'admin' 반환
        Router->>AdminLayout: 관리자 경로 렌더링
        AdminLayout->>Browser: /admin, /admin/users, /admin/inquiries 등
    else 사용자 도메인
        DomainUtils->>Router: 'user' 반환
        Router->>UserLayout: 사용자 경로 렌더링
        UserLayout->>Browser: /policy-detail, 기존 사용자 경로
    end
Loading
sequenceDiagram
    participant User
    participant ApplicationTab
    participant ScrollHandler
    participant DOM

    User->>ApplicationTab: 앱 항목 클릭
    ApplicationTab->>ApplicationTab: 앱 활성화 상태 확인
    alt 비활성화 상태
        ApplicationTab->>ApplicationTab: 먼저 활성화
        ApplicationTab->>ApplicationTab: 확장 설정
    else 활성화 상태
        ApplicationTab->>ApplicationTab: 확장 토글
    end
    
    ApplicationTab->>ScrollHandler: 확장 감지 (지연)
    ScrollHandler->>DOM: app-{id} 요소 위치 확인
    alt 요소가 숨겨짐
        ScrollHandler->>DOM: scrollIntoView() 호출
        DOM->>Browser: 해당 항목으로 스크롤
    end
    Browser->>User: 확장된 앱 표시
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/api-integration

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 and usage tips.

This was referenced Mar 15, 2026
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.

1 participant