Feat/walt/user groups update frontend#1102
Conversation
…date functionality
…n with checkboxes
…ups-update-frontend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying finansu with
|
| Latest commit: |
1e8d7c2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://38c8f6cb.finansu.pages.dev |
| Branch Preview URL: | https://feat-walt-user-groups-update.finansu.pages.dev |
There was a problem hiding this comment.
Code Review
This pull request enhances the user edit modal (UserEditModal) by adding division/group selection functionality. It fetches years, divisions, and existing user divisions, allowing users to select or deselect divisions grouped by bureau and updating these groups upon submission. The review feedback suggests three key improvements: restricting the useGetDivisions query to the latest year with SWR enablement guards, adding a loading guard in the useEffect hook to prevent selectedGroupIds from being prematurely reset to an empty array, and implementing try-catch error handling during submission to handle API failures gracefully.
There was a problem hiding this comment.
Pull request overview
ユーザー編集モーダルで「部門(division)」の所属を編集できるようにし、送信時にユーザー所属部門を更新する機能を追加するPRです(併せて OpenAPI 定義の末尾メタ情報のインデントも調整)。
Changes:
- 年度(years)と部門一覧(divisions)・ユーザー所属部門(divisions/users)を取得し、モーダル内で部門チェックボックスを表示
- 局(financialRecord)単位での「全て選択 / 全て解除」トグルを追加
- ユーザー更新(put)後に所属部門更新(useUpdateUserGroups)を実行
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| view/next-project/src/components/users/EditModal.tsx | 部門選択UIと所属部門更新API呼び出しを追加 |
| openapi/openapi.yaml | x-original-swagger-version のインデント調整 |
…improve group toggling logic
対応Issue
resolve #0
概要
ユーザー編集モーダルに部門の編集機能を追加した
画面スクリーンショット等
URLスクリーンショット
テスト項目
クが入っていること
れること
されること
備考