Skip to content

admin multiselect#38

Merged
f0reachARR merged 1 commit intomainfrom
feature/multi-select
Apr 24, 2026
Merged

admin multiselect#38
f0reachARR merged 1 commit intomainfrom
feature/multi-select

Conversation

@f0reachARR
Copy link
Copy Markdown
Member

No description provided.

@f0reachARR f0reachARR merged commit e499e80 into main Apr 24, 2026
2 checks passed
@f0reachARR f0reachARR deleted the feature/multi-select branch April 24, 2026 08:10
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a multi-select feature for university participation registration, allowing administrators to draft and register multiple entries at once. The changes include a new UniversityMultiSelect component and updated hooks to manage draft rows and bulk creation. Feedback focuses on removing deprecated state and mutations, addressing potential data truncation issues due to hardcoded page sizes, and preventing registration actions while initial data is still loading to ensure accurate duplicate checks.

Comment on lines 35 to 36
const [selectedUniversityId, setSelectedUniversityId] = useState('');
const [teamName, setTeamName] = useState('');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

UniversityMultiSelect への移行に伴い、selectedUniversityId および teamName ステートは使用されなくなっています。また、これらを使用していた createMutation も不要になっているため、コードのクリーンアップとしてこれらを削除することをお勧めします。

queryFn: async () => {
const result = await apiClient.GET('/api/admin/editions/{id}/participations', {
params: { path: { id: editionId } },
params: { path: { id: editionId }, query: { pageSize: 100 } },
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

pageSize: 100 が指定されていますが、出場登録数が100件を超える場合、リストに表示されないデータが発生します。また、createManyMutation 内の重複チェック(existingKeys)も取得済みの100件のみを対象とするため、それ以降のデータとの重複を検知できません。将来的に無限スクロールやページネーションの導入を検討してください。

</div>
<Button
onClick={() => createManyMutation.mutate()}
disabled={draftRows.length === 0 || createManyMutation.isPending}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

isLoadingtrue の間(既存の出場登録データを取得中)は、createManyMutation で使用される既存データの重複チェックが正しく機能しません。データの読み込みが完了するまで「登録」ボタンを無効化することをお勧めします。

Suggested change
disabled={draftRows.length === 0 || createManyMutation.isPending}
disabled={draftRows.length === 0 || createManyMutation.isPending || isLoading}

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.

1 participant