Skip to content

Conversation

@yeonddori
Copy link
Collaborator

관련 이슈

작업 요약

  • 팀장은 모든 학습자료 수정 및 삭제 가능하도록 변경

미리 보기

image

@yeonddori yeonddori requested a review from Copilot October 23, 2025 13:28
@yeonddori yeonddori self-assigned this Oct 23, 2025
@yeonddori yeonddori added the ✨ 기능 개발 새로운 기능을 구현하는 데 필요한 작업 또는 변경 사항 label Oct 23, 2025
Copy link
Contributor

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 enables team leaders to edit and delete all study materials, not just their own. Previously, only the original uploader could modify their materials. Now team leaders have full permissions across all materials in their team.

  • Added teamRole field to Member interface to identify team leaders
  • Updated document modal to check for team leader status
  • Modified footer visibility logic to show edit/delete buttons for team leaders

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/types.ts Added teamRole property to Member interface to support role-based permissions
src/containers/study/DocumentModal/index.tsx Implemented team leader check and updated permission logic for document editing/deletion

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 75 to 77
setIsTeamLeader(
teamMembers?.some((member: Member) => member.id === user.memberId && member.teamRole === 'ROLE_팀장'),
);
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

The hardcoded string 'ROLE_팀장' should be extracted to a constant or enum. This makes the code more maintainable and prevents typos when checking team roles elsewhere in the codebase.

Copilot uses AI. Check for mistakes.
@yeonddori yeonddori merged commit c3bbd53 into develop Oct 23, 2025
1 check passed
@yeonddori yeonddori deleted the Feature/#470-팀장은_모든_학습자료_수정_및_삭제_가능하도록_변경 branch October 23, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ 기능 개발 새로운 기능을 구현하는 데 필요한 작업 또는 변경 사항

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 팀장은 모든 학습자료 수정 및 삭제 가능하도록 변경

2 participants