Skip to content

[FE] 20260303 #241 기능추가출석 출석하기 페이지 수정#274

Merged
discipline24 merged 9 commits intomainfrom
20260303_#241-기능추가출석-출석하기-페이지-수정
Mar 3, 2026

Hidden character warning

The head ref may contain hidden characters: "20260303_#241-\uae30\ub2a5\ucd94\uac00\ucd9c\uc11d-\ucd9c\uc11d\ud558\uae30-\ud398\uc774\uc9c0-\uc218\uc815"
Merged

[FE] 20260303 #241 기능추가출석 출석하기 페이지 수정#274
discipline24 merged 9 commits intomainfrom
20260303_#241-기능추가출석-출석하기-페이지-수정

Conversation

@sangkyu39
Copy link
Contributor

@sangkyu39 sangkyu39 commented Mar 3, 2026

출석조회 api 연결
출석조회 목록 항목 수정

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 출석 세션을 동적으로 로드하고 관리합니다.
    • 출석 상태를 테이블에서 확인할 수 있습니다.
  • 버그 수정

    • 에러 처리 로직을 개선했습니다.
  • 스타일

    • UI 레이블을 "출석하기"에서 "출석조회"로 변경했습니다.
    • 테이블 디자인과 간격을 최적화했습니다.

@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

Walkthrough

출석 페이지의 아키텍처를 리팩토링하여 클라이언트 측 데이터 페칭을 도입하고, SessionSelectBox 및 SessionManage 컴포넌트를 Props 기반 설계로 전환했습니다. 함께 UI 텍스트와 스타일링을 업데이트했습니다.

Changes

Cohort / File(s) Summary
출석 페이지 주요 컴포넌트
frontend/src/pages/Attendance.jsx, frontend/src/components/Sidebar.jsx
클라이언트 측 데이터 페칭 로직 추가 및 상태 관리(attendanceSessions, selectedSession, loading, error); 자식 컴포넌트에 Props 전달. "출석하기" → "출석조회"로 텍스트 변경.
SessionSelectBox 리팩토링
frontend/src/components/attendance/SessionSelectBox.jsx
하드코딩된 정적 리스트를 제거하고 Props(sessions, selectedSession, onChange, disabled)로 제어되는 함수형 컴포넌트로 변경. 세션 제목 목록을 동적으로 파생.
SessionManage 리팩토링
frontend/src/components/attendance/SessionManage.jsx
useEffect/useState 기반 내부 상태에서 Props 기반 아키텍처로 전환. useMemo를 이용한 라운드 인덱스 맵 및 필터링 로직 추가. 테이블 컬럼명 변경 및 파생값 계산 로직 추가.
스타일링 업데이트
frontend/src/pages/Attendance.module.css, frontend/src/components/attendance/SessionSelectBox.module.css, frontend/src/components/attendance/SessionManage.module.css
테두리 색상, 간격, 폰트 크기, 패딩 등 전반적인 UI 미세 조정. 탭릿 이상 뷰포트의 레이아웃 조정.
데이터 유틸리티
frontend/src/utils/attendanceList.js
에러 처리 로직 간소화. safeMessage 추출 및 조건부 개발 로깅 제거.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

FE

Suggested reviewers

  • DongEun02
  • gxuoo

Poem

🐰 출석 페이지를 우아하게 재설계했네,
Props로 흐르는 데이터의 춤을 춘다네.
세션 선택, 관리, 순서대로 맞춰지고,
스타일도 다듬어져 더욱 매끈해지니,
코드는 깔끔하고 마음은 기쁘구나! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용과 부분적으로 관련되어 있습니다. '출석하기 페이지 수정'은 실제 변경의 일부를 반영하지만, 출석조회 API 연결, 데이터 기반 컴포넌트 구조 변경, 스타일 업데이트 등 광범위한 변경의 전체 범위를 포괄하지는 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 20260303_#241-기능추가출석-출석하기-페이지-수정

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
frontend/src/components/attendance/SessionManage.jsx (2)

13-17: formatDate에 locale 설정을 추가하는 것을 고려해주세요.

formatTime'ko-KR' locale을 명시적으로 사용하지만, formatDate는 locale 없이 toLocaleDateString()을 호출합니다. 브라우저 기본 locale에 따라 날짜 형식이 달라질 수 있습니다.

💡 locale 일관성 적용
 const formatDate = (dateValue) => {
   if (!dateValue) return '-';
   const date = new Date(dateValue);
-  return Number.isNaN(date.getTime()) ? '-' : date.toLocaleDateString();
+  return Number.isNaN(date.getTime()) ? '-' : date.toLocaleDateString('ko-KR');
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/components/attendance/SessionManage.jsx` around lines 13 - 17,
The formatDate function omits an explicit locale, causing inconsistent date
output across browsers; update formatDate (the function named formatDate) to
call toLocaleDateString with the same 'ko-KR' locale used by formatTime so dates
render consistently, while keeping the existing guards (return '-' when
dateValue is falsy or invalid) and preserving the Date construction and NaN
check.

85-85: 에러 표시에 스타일링 추가를 고려해주세요.

현재 에러 메시지가 스타일 없이 plain <div>로 렌더링됩니다. 사용자에게 더 명확한 피드백을 위해 에러 스타일을 적용하면 좋겠습니다.

💡 에러 스타일링 예시
-  if (error) return <div>{error}</div>;
+  if (error) return <div className={styles.card} style={{ color: '#dc2626', textAlign: 'center', padding: '40px' }}>{error}</div>;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/components/attendance/SessionManage.jsx` at line 85,
SessionManage.jsx currently returns a plain <div> for errors ("if (error) return
<div>{error}</div>;")—replace this with a styled error element: wrap the message
in a semantic element (e.g., <div role="alert"> or <p>) and apply a CSS class
like "session-error" (or a styled-component) to add visible styling (red
text/background, padding, border-radius) and ensure accessibility (role="alert"
and aria-live if needed); update SessionManage.jsx to use that class/component
and add corresponding CSS rules in the component stylesheet or module.
frontend/src/pages/Attendance.jsx (1)

47-52: 로딩 중 사용자에게 시각적 피드백 제공을 고려해주세요.

현재 loading 상태일 때 SessionManage에서 빈 테이블만 표시됩니다. 스피너나 스켈레톤 UI를 추가하면 사용자 경험이 개선될 수 있습니다.

💡 로딩 인디케이터 추가 예시
       <SessionManage
         sessions={attendanceSessions}
         selectedSession={selectedSession}
         loading={loading}
         error={error}
       />
+      {loading && <div style={{ textAlign: 'center', padding: '20px' }}>로딩 중...</div>}

또는 SessionManage 내부에서 로딩 상태를 처리하는 방식도 좋습니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/pages/Attendance.jsx` around lines 47 - 52, The UI shows an
empty table while data is loading; use the existing loading prop to render a
visible loading indicator instead. Update the SessionManage component (or
conditionally in Attendance.jsx before rendering SessionManage) to check the
loading prop and render a spinner or skeleton UI when loading===true, otherwise
render the regular table with sessions={attendanceSessions} and selectedSession
behavior; ensure the loading branch uses the same props signature (loading) so
callers like Attendance.jsx need no other changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@frontend/src/components/attendance/SessionManage.jsx`:
- Around line 13-17: The formatDate function omits an explicit locale, causing
inconsistent date output across browsers; update formatDate (the function named
formatDate) to call toLocaleDateString with the same 'ko-KR' locale used by
formatTime so dates render consistently, while keeping the existing guards
(return '-' when dateValue is falsy or invalid) and preserving the Date
construction and NaN check.
- Line 85: SessionManage.jsx currently returns a plain <div> for errors ("if
(error) return <div>{error}</div>;")—replace this with a styled error element:
wrap the message in a semantic element (e.g., <div role="alert"> or <p>) and
apply a CSS class like "session-error" (or a styled-component) to add visible
styling (red text/background, padding, border-radius) and ensure accessibility
(role="alert" and aria-live if needed); update SessionManage.jsx to use that
class/component and add corresponding CSS rules in the component stylesheet or
module.

In `@frontend/src/pages/Attendance.jsx`:
- Around line 47-52: The UI shows an empty table while data is loading; use the
existing loading prop to render a visible loading indicator instead. Update the
SessionManage component (or conditionally in Attendance.jsx before rendering
SessionManage) to check the loading prop and render a spinner or skeleton UI
when loading===true, otherwise render the regular table with
sessions={attendanceSessions} and selectedSession behavior; ensure the loading
branch uses the same props signature (loading) so callers like Attendance.jsx
need no other changes.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5740c5 and 82635fb.

📒 Files selected for processing (8)
  • frontend/src/components/Sidebar.jsx
  • frontend/src/components/attendance/SessionManage.jsx
  • frontend/src/components/attendance/SessionManage.module.css
  • frontend/src/components/attendance/SessionSelectBox.jsx
  • frontend/src/components/attendance/SessionSelectBox.module.css
  • frontend/src/pages/Attendance.jsx
  • frontend/src/pages/Attendance.module.css
  • frontend/src/utils/attendanceList.js

Copy link
Contributor

@discipline24 discipline24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~

@discipline24 discipline24 merged commit 218ce6a into main Mar 3, 2026
1 check passed
@sangkyu39 sangkyu39 linked an issue Mar 3, 2026 that may be closed by this pull request
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.

⚙️ [기능추가][출석] 출석하기 페이지 수정

2 participants