-
Notifications
You must be signed in to change notification settings - Fork 2
feat: ユーザー複数部門管理機能を実装(1/2) #1017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 部門管理ページの新規作成 - 部門の一覧、追加、編集、削除機能 - 管理者権限チェック - モックAPIで動作確認 - ユーザー管理の複数部門対応 - ユーザー一覧で複数部門をタグ表示 - ユーザー編集モーダルで部門の追加/削除が可能 - 直感的なUI/UXで部門管理 - ナビゲーション改善 - 管理セクションをサイドバーに追加 - 部門管理とユーザー管理へのアクセス 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
複数部門に所属できるユーザー管理機能を実装するPRです。部門管理ページの新規作成と既存ユーザー管理機能の拡張を行いました。
- 新しい部門管理ページの実装(CRUD操作対応)
- ユーザー管理での複数部門所属機能の追加
- ナビゲーションに管理セクションを追加
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pages/users/index.tsx | ユーザー一覧で複数部門をタグ表示、モックデータへの変更 |
| pages/divisions/index.tsx | 部門管理ページの新規作成(一覧・CRUD機能) |
| constants/linkItem.tsx | ナビゲーションに管理セクション追加 |
| components/users/OpenEditModalButton.tsx | 部門情報をpropsに追加 |
| components/users/EditModal.tsx | ユーザー編集で複数部門管理機能を実装 |
| components/divisions/OpenEditModalButton.tsx | 部門編集モーダルボタンコンポーネント |
| components/divisions/OpenDeleteModalButton.tsx | 部門削除モーダルボタンコンポーネント |
| components/divisions/OpenAddModalButton.tsx | 部門追加モーダルボタンコンポーネント |
| components/divisions/EditModal.tsx | 部門編集モーダルコンポーネント |
| components/divisions/DeleteModal.tsx | 部門削除モーダルコンポーネント |
| components/divisions/AddModal.tsx | 部門追加モーダルコンポーネント |
| components/common/SideNav.tsx | サイドナビゲーションに管理セクション追加 |
| interface Division { | ||
| id: number; | ||
| name: string; | ||
| } | ||
|
|
||
| interface UserWithDivisions extends Omit<User, 'bureauID'> { | ||
| bureauID?: number; | ||
| divisions?: Division[]; | ||
| } |
Copilot
AI
Aug 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
めちゃ同じDivisionインターフェース定義してるじゃん!!😱 複数ファイルで重複してるのやばたにえんよ〜💦 共通の型定義ファイルに移動してリスペクトしかない!✨
| console.log('Updating user with divisions:', { | ||
| id, | ||
| name: data.name, | ||
| bureauID: data.bureauID, | ||
| roleID: data.roleID, | ||
| divisions: data.divisions | ||
| }); | ||
|
|
||
| // 成功時の処理 | ||
| alert('ユーザーの部門を更新しました'); |
Copilot
AI
Aug 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.logとalertがあるのは開発中だからわかるけど、プロダクションコードには適切なエラーハンドリングとトースト通知を実装した方がいいぞい〜🚀 ユーザー体験がしぬほど良くなるよ!💕
対応Issue
新機能実装のためissueなし
概要
ユーザーが複数の部門に所属できる機能を実装しました。部門管理ページの新規作成とユーザー管理機能の拡張を行いました。
主な実装内容
1. 部門管理ページの新規作成
/pages/divisions/index.tsx- 部門一覧ページ2. ユーザー管理の複数部門対応
3. ナビゲーション改善
技術的詳細
画面スクリーンショット等
部門管理ページ
ユーザー管理ページ
テスト項目
備考
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com