Skip to content

Feat/walt/user groups update frontend#1102

Open
nakatashingo wants to merge 12 commits into
developfrom
feat/walt/user-groups-update-frontend
Open

Feat/walt/user groups update frontend#1102
nakatashingo wants to merge 12 commits into
developfrom
feat/walt/user-groups-update-frontend

Conversation

@nakatashingo
Copy link
Copy Markdown
Collaborator

対応Issue

resolve #0

概要

ユーザー編集モーダルに部門の編集機能を追加した

  • 編集モーダルに部門選択を追加
  • モーダルを開いた時点で所属中の部門にチェックがつく
  • 全て選択を押すと全ての部門にチェックがつく

画面スクリーンショット等

  • URL
    スクリーンショット
image

テスト項目

  • ユーザー編集モーダルを開いた時に、現在所属している部門にチェッ
    クが入っていること
  • 部門のチェックを変更して「編集する」を押すと、所属部門が更新さ
    れること
  • 全チェックを外した状態で送信すると、その年度の所属部門が全削除
    されること
  • 「全て選択 / 全て解除」ボタンが局単位で正しく動作すること

備考

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 26, 2026

Deploying finansu with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copy link
Copy Markdown
Contributor

@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 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.

Comment thread view/next-project/src/components/users/EditModal.tsx
Comment thread view/next-project/src/components/users/EditModal.tsx
Comment thread view/next-project/src/components/users/EditModal.tsx
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 のインデント調整

Comment thread view/next-project/src/components/users/EditModal.tsx Outdated
Comment thread view/next-project/src/components/users/EditModal.tsx
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread view/next-project/src/components/users/EditModal.tsx Outdated
Comment thread view/next-project/src/components/users/EditModal.tsx
Comment thread view/next-project/src/components/users/EditModal.tsx
@nakatashingo nakatashingo marked this pull request as ready for review May 26, 2026 15:42
@nakatashingo nakatashingo requested review from TkymHrt and Wakai111 May 26, 2026 15:42
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