Skip to content

Conversation

@seungw0o
Copy link
Member

@seungw0o seungw0o commented Dec 6, 2025

개요

봉사 추가 및 수정 시 학년 선택 기능을 변경 했습니다.
기존 코드에 잘못 작성된 부분을 제거 및 수정 했습니다.

이슈 번호

변경사항

봉사 추가 및 수정 코드

- volunteer 타입에서 point, optional_point 속성명을 score,
  optional_score로 변경
- 프론트엔드에 변경된 속성명 적용
- 백엔드 API 스펙 변경에 따른 프론트엔드 코드 수정
- "모든 학년"을 "전체"로 변경
- "FRIST" 오타를 "FIRST"로 수정
- 번역의 일관성을 유지하고 오타를 수정했습니다
기존 드롭다운 방식에서 버튼 클릭 방식으로 학년 선택 방식 변경
- 전체 학년 선택 기능 추가
- 디자인 시스템 Text 컴포넌트 추가
- useVolunteerApi 훅을 사용하여 봉사 추가 API 연동
- 성공 시 모달 닫기 기능 추가
- 학년 선택 방식: Dropdown -> Button으로 변경
- '전체' 선택 시 다른 학년 선택 불가능하도록 구현
- API 연동하여 봉사 수정 기능 구현
- UI 개선 및 UX 향상
InfoCard 컴포넌트에서 직접 API를 호출하여 봉사활동을 삭제하는 대신,
onDelete 콜백 함수를 통해 상위 컴포넌트에서 삭제 로직을 처리하도록 변경했습니다
- InfoCard 컴포넌트의 책임 범위를 축소하고 재사용성을 높입니다
- 상위 컴포넌트에서 삭제 로직을 중앙 집중적으로 관리하여 일관성을 유지합니다
- 삭제 아이콘 클릭 시 onDelete 콜백 함수를 호출하여 id를 전달합니다
@seungw0o seungw0o requested a review from Copilot December 6, 2025 12:02
@seungw0o seungw0o self-assigned this Dec 6, 2025
@seungw0o seungw0o added the feat 새로운 기능을 추가 할 경우 label Dec 6, 2025
@seungw0o seungw0o added the 👾bug 버그가 발생한 경우 label Dec 6, 2025
@seungw0o seungw0o linked an issue Dec 6, 2025 that may be closed by this pull request
2 tasks
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the volunteer add and edit functionality by replacing dropdown-based grade selection with a button-based UI. It also fixes several bugs including a typo in the gradeKoreanCalculator function ('FRIST' → 'FIRST'), updates field names to match the API response structure (point → score, optional_point → optional_score), and consolidates toast notification handling into custom hooks.

Key Changes:

  • Replaced dropdown grade selection with multi-select button interface supporting up to 2 grades or '전체' (all)
  • Fixed typo 'FRIST' → 'FIRST' and standardized '모든 학년' → '전체' in translation utilities
  • Refactored to use custom hooks (useAddVolunteerWork, useEditVolunteerWork) for API calls with built-in toast notifications

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
services/admin/src/utils/translate.ts Fixed typo 'FRIST' → 'FIRST' and changed '모든 학년' → '전체' for consistency
services/admin/src/pages/volunteer/index.tsx Updated property names to match API response: point → score, optional_point → optional_score
services/admin/src/components/volunteer/InfoCard.tsx Removed local delete handler and unused imports, simplified to use parent's onDelete callback
services/admin/src/components/modals/editVolunteer.tsx Replaced dropdown grade selection with button-based UI, integrated custom hook for API calls
services/admin/src/components/modals/AddVolunteer.tsx Replaced dropdown grade selection with button-based UI, integrated custom hook for API calls
services/admin/src/apis/volunteers/response.ts Updated interface field names: point → score, optional_point → optional_score

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- 숫자 입력 시 불필요한 공백 제거
- 봉사 수정 모달에서 전체 학년 선택 조건 변경 ("ALL" 문자열 포함)
@seungw0o seungw0o merged commit 73971ec into dev Dec 7, 2025
1 check passed
@seungw0o seungw0o deleted the fix/144-volunteer-add-fix branch December 7, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👾bug 버그가 발생한 경우 feat 새로운 기능을 추가 할 경우

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

봉사 신청 ui 및 로직 변경

2 participants