feat: ターム制と参加回数カウント(30分ルール・会場全体集計)#33
Merged
Merged
Conversation
…ue-wide aggregation Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… counting rule Pure, Workers-safe (Intl only) logic shared by API and frontends. Terms: morning 9-12 / afternoon 13-16 / evening 16-19 (JST). countsTowardParticipation applies the 'arrived <30min before term end is not counted' rule. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n summary Adds stats.participationCount plus per-session term/counted to the profile response, and participationSummaryQuery/Response for the venue-wide aggregation endpoint. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…profile API fetchParticipantProfile joins events for the JST date, classifies each session's term, applies the 30-min rule, and counts distinct (date, term) pairs. visitCount is kept for backward compatibility. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Aggregates participation counts by term and date over an optional date range. Counting (the 30-min rule) cannot be expressed in SQL, so candidate sessions are fetched and deduped per (date, term, participant) in JS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n UI Profile shows 参加回数 (participationCount) and tags each session with its term and a カウント対象外 badge when the 30-min rule excludes it; today's history derives term client-side. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New 集計 page renders KPI cards and a per-date/per-term table from /api/stats/participation. Participant detail shows 参加回数; dashboard gains a term column; nav gets a 集計 link. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
概要
tec-nova Nagasaki の運営方針(ターム制・参加回数)をシステムに落とし込む。会場の時間帯(朝 9–12 / 昼 13–16 / 夕方 16–19)を「ターム」として扱い、参加日数ではなく参加回数(朝+昼に来れば2回)で数える。ターム終了まで残り30分未満の来場は参加回数に数えない(チェックイン/アウト自体は実施)。
設計判断(事前確認済み)
checked_in_atから共有ロジックでターム・カウント可否を算出。checked_in_atは必ず存在するため過去分も欠損なく分類できる。設計の根拠は
docs/requirements.md§5.4 /docs/mvp.md§4.4 を参照。変更(コミット単位)
docs:ターム制・参加回数・30分ルール・全体集計の仕様を追記(requirements §5.4・用語集、mvp §4.4・API契約・既知の制約)feat:共有venue-scheduleモジュール(classifyTerm/countsTowardParticipation/TERM_LABELS、Workers制約でIntlのみ・UTC+9固定)feat:共有スキーマ拡張(participationCount・per-sessionterm/counted・participation summary)feat:参加者プロフィールAPIで参加回数を都度計算((開催日,ターム)で重複排除)。visitCountは後方互換で維持feat:GET /api/stats/participation会場全体集計(ターム別・日別、期間フィルタ)feat:checkin 受付UI(来場回数→参加回数、ターム/「カウント対象外」バッジ)feat:admin 集計ページ+ダッシュボードのタームバッジ+ナビ追加検証
pnpm type-check(全6パッケージ)pnpm biome check .wrangler deploy --dry-run(Workerバンドル)認証付きの実ランタイムE2E(ログイン済みセッション+シードデータを通したHTTP応答・ブラウザ描画)は未実施。OAuthセッションが必要でヘッドレス自動化不可。手元での確認手順:
補足
🤖 Generated with Claude Code