From 57949f28bf584a2a95d6e9e21759d64bd6287a1b Mon Sep 17 00:00:00 2001 From: seeunrosy Date: Sun, 6 Dec 2026 16:16:37 +0900 Subject: [PATCH] =?UTF-8?q?docs(club):=20=ED=81=B4=EB=9F=BD=20=EC=B6=9C?= =?UTF-8?q?=EC=84=9D=EB=B6=80=20=E2=80=94=20=EC=98=A4=EB=8A=98=20=EB=92=A4?= =?UTF-8?q?=20=EB=82=A0=EC=A7=9C=EC=97=90=20=ED=9C=B4=EA=B0=80=EB=A5=BC=20?= =?UTF-8?q?=EB=AF=B8=EB=A6=AC=20=EB=84=A3=EC=9D=84=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - POL-0012 · captain-club-monthly-attendance PRD · club-cohort 스펙: 오늘 뒤 칸은 휴가(EXCUSED)만 받고, 다른 값이면 400. 참여 중단 뒤 칸은 그대로 막는다 - playground 클럽 출석 판: 오늘 뒤 칸은 누르면 휴가 ↔ 기록 없음만 돈다. 도움말에 안내 추가 Co-Authored-By: Claude Opus 5.5 --- .../_registry/policies/POL-0012-club-cohort.md | 2 +- .../stories/captain-club-monthly-attendance/PRD.md | 7 ++++--- frontend/apps/playground/src/proto/club/ClubBoard.tsx | 11 +++++++---- .../proto/console/components/ClubAttendanceBoard.tsx | 2 +- .../apps/playground/src/proto/specs/club-cohort.ts | 6 +++++- specs/club-cohort/spec.md | 2 +- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/01-planning/_registry/policies/POL-0012-club-cohort.md b/01-planning/_registry/policies/POL-0012-club-cohort.md index 6619f427f..d4cdeb39f 100644 --- a/01-planning/_registry/policies/POL-0012-club-cohort.md +++ b/01-planning/_registry/policies/POL-0012-club-cohort.md @@ -57,7 +57,7 @@ - 값은 **스터디와 같은 네 가지** — 출석 · 지각 · 결석 · 휴가. 지각은 0.5일. 휴가 제한 없음 - **출석은 캡틴이 입력한다** — 디스코드 인증을 보고. 크루가 직접 남기는 길은 없다. 휴가가 필요하면 캡틴에게 말한다 - 칸을 눌러 고치고 「저장」으로 한 번에 반영한다(스터디 출석부와 같다). 고른 사람의 한 날짜를 한 번에 바꿀 수 있다 -- 오늘 뒤의 날짜 · 참여 중단한 날 뒤의 날짜는 입력할 수 없다. 끝난 기수도 고칠 수 있다 +- 오늘 뒤의 날짜에는 **휴가만** 미리 넣을 수 있다 — 출석 · 지각 · 결석은 그날이 와야 넣는다 (2026-12-06). 참여 중단한 날 뒤의 날짜는 아무것도 입력할 수 없다. 끝난 기수도 고칠 수 있다 - **멤버는 같은 판을 본다** — 사용자 사이트 출석 탭, 보기만. 지금 시트를 멤버에게 열어 두는 것을 옮긴다. 그 기수 멤버에게만 보인다 - 출석률 = (출석 + 지각 × 0.5) ÷ 센 날. 센 날은 기록이 있는 날에서 휴가를 뺀 날이다 — 스터디 산식과 같다 - 날짜는 시간대 없는 그 달의 날이다. 하루를 언제부터 세는지는 스터디 규칙 글에 적는다 diff --git a/01-planning/stories/captain-club-monthly-attendance/PRD.md b/01-planning/stories/captain-club-monthly-attendance/PRD.md index f5316a045..52f3399ff 100644 --- a/01-planning/stories/captain-club-monthly-attendance/PRD.md +++ b/01-planning/stories/captain-club-monthly-attendance/PRD.md @@ -31,7 +31,7 @@ flowchart LR 2. 칸 누르기로 값 전환 — 출석 → 지각 → 결석 → 휴가 → 기록 없음. 저장 전 칸 테두리 표시 3. 여러 사람 고르기 후 한 날짜 일괄 변경 4. 「저장」 일괄 반영 · 「변경 취소」 되돌리기 -5. 오늘 뒤 · 참여 중단 뒤 칸 입력 차단 +5. 오늘 뒤 칸은 휴가만 입력 · 참여 중단 뒤 칸 입력 차단 6. 고른 사람 오늘 날짜로 참여 중단 · 진행 중인 기수 안에서 취소 7. 스터디 상세 요약 칸(출석률 · 참석자)에 이 출석부 값 반영 8. 사용자 사이트 스터디 일정(클럽) 출석 탭에서도 캡틴 편집 — 운영 콘솔과 같은 값 @@ -115,7 +115,8 @@ flowchart LR - **내용**: 값의 첫 글자(출 · 지 · 결 · 휴). 저장 전에 고친 칸은 테두리 - **동작**: 누를 때마다 출석 → 지각 → 결석 → 휴가 → 기록 없음 순서로 돈다. 저장 전이다 - **정책** - - 오늘 뒤 · 참여 중단한 날 뒤는 입력할 수 없다 + - 오늘 뒤는 휴가만 미리 넣을 수 있다 — 누르면 휴가 → 기록 없음만 돈다 + - 참여 중단한 날 뒤는 입력할 수 없다 - 색만으로 가르지 않는다 — 칸에 글자를 적는다 #### 3-5 — 출석률 @@ -191,7 +192,7 @@ flowchart LR |---|---|---|---| | FE | back-office-front 스터디 상세 › 출석 탭 — 클럽 기수면 날짜 판 | 회차 출석부만 | 프로토대로 만든다 — 판은 core-front 출석 판(ST-044)과 같은 부품으로 | | FE | core-front 스터디 일정(클럽) › 출석 — 캡틴이면 같은 편집 판 | 없음 | 프로토대로 — 저장은 같은 `POST /api/admin/studies/{studyId}/attendances` | -| BE | `GET · POST /api/admin/studies/{studyId}/attendances` | 구현완료 | [club-cohort](../../../specs/club-cohort/spec.md) 「출석」의 클럽 차이 — 회차 `date` · `rosterAnswer` · 오늘 뒤 400 | +| BE | `GET · POST /api/admin/studies/{studyId}/attendances` | 구현완료 | [club-cohort](../../../specs/club-cohort/spec.md) 「출석」의 클럽 차이 — 회차 `date` · `rosterAnswer` · 오늘 뒤 휴가 밖 400 | | BE | 같은 API 의 `undoWithdrawals[]` (참여 중단 취소) | 스펙작성중 | 추가 | | BE | 클럽 회차를 회차 상태 판정(`MISSED`) · 회차 알림에서 빼기 | 스펙작성중 | 추가 | diff --git a/frontend/apps/playground/src/proto/club/ClubBoard.tsx b/frontend/apps/playground/src/proto/club/ClubBoard.tsx index f497f75d2..903632c11 100644 --- a/frontend/apps/playground/src/proto/club/ClubBoard.tsx +++ b/frontend/apps/playground/src/proto/club/ClubBoard.tsx @@ -75,9 +75,9 @@ export function monthDays(today: string): string[] { return Array.from({ length: daysIn(m) }, (_, i) => isoDay(m, i + 1)); } -/** 이 칸을 고칠 수 있는가 — 오늘 뒤 · 참여 중단한 날 뒤는 잠긴다 */ +/** 이 칸을 고칠 수 있는가 — 참여 중단한 날 뒤는 잠긴다. 오늘 뒤는 휴가만 넣는다({@link nextValue}) */ export function editableCell(sheet: ClubSheet, m: ClubMember, day: string): boolean { - return day <= sheet.today && !(m.leftOn && day > m.leftOn); + return !(m.leftOn && day > m.leftOn); } /** 한 칸 바꾸기 — 값이 없으면 기록을 지운다 */ @@ -88,7 +88,9 @@ export function setCell(book: ClubBook, id: string, day: string, v: AttendanceSt return { ...book, [id]: row }; } -function nextValue(cur: AttendanceStatus | undefined): AttendanceStatus | undefined { +/** 누를 때 다음 값. 오늘 뒤는 미리 내는 휴가만 — 휴가 ↔ 기록 없음 */ +function nextValue(cur: AttendanceStatus | undefined, future: boolean): AttendanceStatus | undefined { + if (future) return cur === 'excused' ? undefined : 'excused'; if (!cur) return ATTENDANCE_STATUSES[0]; const i = ATTENDANCE_STATUSES.indexOf(cur); return i === ATTENDANCE_STATUSES.length - 1 ? undefined : ATTENDANCE_STATUSES[i + 1]; @@ -244,7 +246,8 @@ export function ClubBoard({ type='button' data-anno={a} aria-label={changed ? `${label} · 저장되지 않음` : label} - onClick={() => onBook(setCell(book, m.id, d, nextValue(v)))} + title={d > today ? '오늘 뒤는 휴가만 미리 넣을 수 있어요' : undefined} + onClick={() => onBook(setCell(book, m.id, d, nextValue(v, d > today)))} className={cx(cls, !v && 'hover:bg-surface-2')} > {v ? SHORT[v] : ''} diff --git a/frontend/apps/playground/src/proto/console/components/ClubAttendanceBoard.tsx b/frontend/apps/playground/src/proto/console/components/ClubAttendanceBoard.tsx index 88d84feec..04a6211c6 100644 --- a/frontend/apps/playground/src/proto/console/components/ClubAttendanceBoard.tsx +++ b/frontend/apps/playground/src/proto/console/components/ClubAttendanceBoard.tsx @@ -88,7 +88,7 @@ export function ClubAttendanceBoard({ sheet={view} title='출석' titleExtra={titleExtra?.(dirty)} - note='칸을 누를 때마다 출석 → 지각 → 결석 → 휴가 → 기록 없음 순서로 바뀝니다. 「저장」을 눌러야 반영됩니다.' + note='칸을 누를 때마다 출석 → 지각 → 결석 → 휴가 → 기록 없음 순서로 바뀝니다. 오늘 뒤 날짜는 휴가만 미리 넣을 수 있습니다. 「저장」을 눌러야 반영됩니다.' actionBar={