Skip to content

[FEAT] 운동 수정 시 정책 적용 #461

@qowldud

Description

@qowldud

어떤 기능인가요?

운동 수정(CreateExercise 수정 모드) 시 특정 정책을 추가해야 합니다. 현재 운동 생성과 동일한 UI/로직으로 수정이 이루어지지만, 수정 시에만 적용되어야 하는 제약 조건이나 정책이 필요합니다.

어떻게 구현하면 좋을까요?

  • exerciseId 유무로 생성/수정 모드를 구분하는 현재 구조를 활용
  • 수정 모드에서만 적용할 정책(예: 과거 날짜 수정 불가, 이미 참여자가 있을 때 인원 감소 제한 등) 추가

작업 TODO

  • 수정 시 적용할 정책 항목 정의
  • 정책에 따른 유효성 검사 로직 추가
  • 정책 위반 시 에러 메시지 표시

다른 방법이 있을까요?

  • 정책을 서버에서 응답으로 내려주는 방식도 고려 가능

추가 정보

  • 관련 파일: src/pages/group/CreateExercise.tsx, src/api/exercise/updateExerciseApi.ts
  • 현재 수정 모드에서는 allowGuestInvite, allowExternalGuest 항목이 숨겨지는 것 외에 별도 정책 없음

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions