Repository navigation
[Feat/#160] 행사 신청 자격을 서버 isFeeEligible로 판단 - #161
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
leegain1
marked this pull request as ready for review
November 3, 2026 18:11
github-actions
Bot
requested review from
jjunh33,
sangrae2325,
tnals0924 and
xeoxxn
November 3, 2026 18:11
leegain1
force-pushed
the
feat/#158-events-api-integration
branch
from
November 4, 2026 14:13
770a7a4 to
7f489a5
Compare
leegain1
force-pushed
the
feat/#160-events-fee-eligibility
branch
2 times, most recently
from
November 4, 2026 14:46
25f7e07 to
7cdc148
Compare
leegain1
force-pushed
the
feat/#160-events-fee-eligibility
branch
from
November 4, 2026 15:04
7cdc148 to
af7adf0
Compare
This was referenced Nov 5, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
행사 상세는 납부자 전용 행사의 신청 자격을
/fee/me의feeStatus === "PAID"로 판단하고 있다(#159 기준, #151에서 실 API). 문제는 두 가지다./fee/me는 앱 납부 요청 기록(student_transfer_statuses)만 본다. 그래서 납부자 명부(payers)에 있는 레거시 납부자를 미납으로 보고 신청 버튼을 막는다. 서버는 명부 기준이라 통과시킬 사람이다.목록·검색·홈의 "신청하기"는 신청서로 바로 가는데, 목록 응답에는 신청 자격이 없다. 그래서 미납자가 신청서를 다 쓰고 제출해야 거절된다.
❓ 왜 해결해야 하나요?
서버 billilge/stream-server#190(PR #241)이 상세 응답에 신청 조건(
feePaidOnly·recruitType·capacity)과isFeeEligible(납부자 명부 기준)을 넣었다. 미납자의 신청도MEMBER_IS_NOT_PAYER(400)로 막는다. 화면이 서버와 같은 기준을 써야 신청 가능한 학생을 막지 않는다.⭐ 어떻게 해결했나요?
1. 행사 상세 (
44b03df)eventDetailSchema)의 신청 조건을 서버 계약대로 필수 필드로 바꾸고isFeeEligible을 더했다. #159에서는 서버 반영 전이라 선택 필드였다. 타입(EventDetail)은 스키마에서 만든다.isFeeEligible로 막는다. 막힐 때 문구는 기존 "학생회비 납부자만 신청할 수 있어요"를 그대로 쓴다.feeQueries)를 뺐다. 학생회비 조회가 실패해도 행사 상세는 그대로 뜬다.2. 신청서 진입·제출 (
7cdc148)useSuspenseQueries). 상세에서 들어왔으면 상세는 캐시에 있다.replace한다. 그러면 막힌 버튼 화면이 바로 나오고, 뒤로가기는 목록으로 간다. 새 화면은 만들지 않았다.MEMBER_IS_NOT_PAYER로 거절되면 "학생회비 납부자만 신청할 수 있어요." 토스트를 띄운다. 행사 상세도 무효화한다. 들어온 뒤에 명부에서 빠진 경우인데, 다시 받은 상세가 자격 없음이면 신청서가 상세로 넘어간다.🧩 이 PR의 한계 & 트레이드오프
GET /v1/app/events)에 신청 자격이 없다. 누르면 신청서 스켈레톤이 잠깐 보였다가 상세로 넘어간다. 카드에서 바로 막으려면 서버 목록 응답에 값을 더해야 한다(검색·홈도 같다).isFeeEligible=false다. 빌릴게·사물함과 같은 한계다.coding-style.md데이터 로딩 절의select예시("내 납부 상태 → 학생회비 화면·행사 상세")는 이제 행사 상세에 맞지 않는다. [Refactor/#153] API·도메인 조회 코드를 shared 폴더 구조로 정리 #154 문구라 여기서는 고치지 않았다.⛓️ 기존 기능에 미치는 영향
feeQueries)는 그대로다.EventsDetailContent.tsx에서 학생회비를feeQueries.me()로 조회하는데, 이 PR 쪽(학생회비 조회 없음)을 남겼다.FeeResponseimport도 지웠다.🔀 Edge Case & 실패 시나리오
서버 #241 계약대로 응답하는 목 서버로 375×812 브라우저에서 확인했다. JS 콘솔 에러는 없다(콘솔의 400은 일부러 돌려준 거절 응답 기록이다).
isFeeEligible: false) 상세 → 버튼 disabled "학생회비 납부자만 신청할 수 있어요", 대상 "소프트웨어융합대학 과학생회비 납부자 / 선착순 150명"/events/1상세(막힌 버튼). 뒤로가기 → 목록MEMBER_IS_NOT_PAYER→ "학생회비 납부자만 신청할 수 있어요." 토스트, 행사 상세 다시 받음isFeeEligible: true라서, 자격이 없어 막히는 경로는 실서버로 보지 못했다(위 목 서버 확인만 있음).tsc -b --noEmit·biome check(기존main.tsx경고 1건)·vite build통과 — rebase 뒤에도 다시 돌려 통과📋 검토한 대안과 선택 이유
isFeeEligible이 없을 때 신청 가능으로 보기(!== false) — 서버 #241 배포 전에 머지돼도 버튼이 막히지 않는다. 하지만 서버 계약이 확정됐으니 타입을 필수로 두고, 머지 순서로 맞추기로 했다.💬 리뷰 포인트
[c]신청서 진입 때 상세로 보내는 흐름 — 목록에서 누르면 스켈레톤이 잠깐 보였다가 상세로 넘어가는 게 괜찮은지[c]머지 순서(서버 #241 배포 뒤) — 지키지 않으면 상세 응답이 zod 검사에 걸려 모든 행사 상세가 에러 화면이 된다