Skip to content

報告除外の admin view を追加する - #19

Merged
max747 merged 3 commits into
mainfrom
feature/admin/exlcude-views
Jul 12, 2026
Merged

max747 merged 3 commits into
mainfrom
feature/admin/exlcude-views

Conversation

@max747

@max747 max747 commented Jul 12, 2026

Copy link
Copy Markdown
Member

報告除外の API 自体は存在していたが、設定するための admin view がなかったので追加する

@max747
max747 requested a review from Copilot July 12, 2026 09:36
@max747 max747 self-assigned this Jul 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

管理画面で「報告除外(exclusions)」を編集できる UI を追加し、既存の報告除外 API を運用できるようにする PR です。イベント編集画面(EventFormPage)から、クエストごとの報告一覧を開いて除外・理由を保存できます。

Changes:

  • 管理画面にクエスト報告一覧+除外編集用の UI(QuestReportManager)を追加
  • 公開データ(中間 JSON)を取得するための fetchQuestReports() と関連型(Report/QuestData)を追加
  • 管理画面の環境変数例に VITE_DATA_URL を追加

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
admin/src/types/index.ts 中間 JSON 用の Report / QuestData 型を追加
admin/src/pages/EventFormPage.tsx イベント編集画面の各クエストカードに報告管理 UI を埋め込み
admin/src/components/QuestReportManager.tsx 報告一覧表示・除外トグル・理由入力・保存を行う新コンポーネントを追加
admin/src/api/client.ts 公開データ URL からクエスト JSON を取得する API 関数を追加
admin/.env.example VITE_DATA_URL のサンプルを追加

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread admin/src/api/client.ts Outdated
Comment on lines +109 to +112
const res = await fetch(`${DATA_URL}/${eventId}/${questId}.json`);
if (res.status === 403 || res.status === 404) return null;
if (!res.ok) throw new Error(`Failed to fetch quest data: ${res.status}`);
return res.json() as Promise<QuestData>;
Comment on lines +126 to +128
)}

{loaded && !loading && reports.length > 0 && (
max747 and others added 2 commits July 12, 2026 18:42
VITE_DATA_URL 未設定のまま実行すると "undefined/..." へ fetch して
原因が分かりづらくなるため、未設定時は明示的にエラーを投げる。
あわせて eventId/questId を URL パスに埋め込む前に encodeURIComponent する。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
orphan 除外(現在の報告一覧に存在しない既存除外)は「X件除外中」に
含まれるが画面で確認できず混乱を招くため、パネル内に件数と
「保存時に保持される」旨を明示する注記を追加する。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@max747
max747 merged commit a71db1d into main Jul 12, 2026
1 check passed
@max747
max747 deleted the feature/admin/exlcude-views branch July 12, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants