From 9323cd02e4be02eb97b181bb371010f306de1e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E6=9C=AC=20=E7=A5=90=E5=B8=8C?= Date: Thu, 19 Oct 2023 06:50:32 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20506:=20AUTHOR=5FID=E3=82=92?= =?UTF-8?q?=E5=A4=A7=E6=96=87=E5=AD=97=E3=81=AB=E8=87=AA=E5=8B=95=E5=A4=89?= =?UTF-8?q?=E6=8F=9B=E3=81=97=E3=81=A6=E3=81=82=E3=81=92=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2376: AUTHOR_IDを大文字に自動変換してあげる](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2376) - 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず) - 何をどう変更したか、追加したライブラリなど AUTHOR_IDを大文字に自動変換するよう実装 入力時に大文字に変換するようにしています。 - このPull Requestでの対象/対象外 - 影響範囲(他の機能にも影響があるか) ## レビューポイント - 特にレビューしてほしい箇所 - 軽微なものや自明なものは記載不要 - 修正範囲が大きい場合などに記載 - 全体的にや仕様を満たしているか等は本当に必要な時のみ記載 ## UIの変更 - Before/Afterのスクショなど - スクショ置き場 ## 動作確認状況 - ローカルで確認 ## 補足 - 相談、参考資料などがあれば --- dictation_client/src/features/user/userSlice.ts | 11 ++++++----- dictation_client/src/pages/UserListPage/popup.tsx | 6 +++++- .../src/pages/UserListPage/updatePopup.tsx | 4 +++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dictation_client/src/features/user/userSlice.ts b/dictation_client/src/features/user/userSlice.ts index 6d64137..52ffbc4 100644 --- a/dictation_client/src/features/user/userSlice.ts +++ b/dictation_client/src/features/user/userSlice.ts @@ -87,7 +87,7 @@ export const userSlice = createSlice({ action: PayloadAction<{ authorId: string | undefined }> ) => { const { authorId } = action.payload; - state.apps.addUser.authorId = authorId; + state.apps.addUser.authorId = authorId?.toUpperCase(); }, changeAutoRenew: (state, action: PayloadAction<{ autoRenew: boolean }>) => { const { autoRenew } = action.payload; @@ -144,7 +144,7 @@ export const userSlice = createSlice({ state.apps.updateUser.name = user.name; state.apps.updateUser.email = user.email; state.apps.updateUser.role = user.role as RoleType; - state.apps.updateUser.authorId = user.authorId; + state.apps.updateUser.authorId = user.authorId?.toUpperCase(); state.apps.updateUser.encryption = user.encryption; state.apps.updateUser.encryptionPassword = undefined; state.apps.updateUser.prompt = user.prompt; @@ -156,7 +156,7 @@ export const userSlice = createSlice({ state.apps.selectedUser.name = user.name; state.apps.selectedUser.email = user.email; state.apps.selectedUser.role = user.role as RoleType; - state.apps.selectedUser.authorId = user.authorId; + state.apps.selectedUser.authorId = user.authorId?.toUpperCase(); state.apps.selectedUser.encryption = user.encryption; state.apps.selectedUser.encryptionPassword = undefined; state.apps.selectedUser.prompt = user.prompt; @@ -175,7 +175,7 @@ export const userSlice = createSlice({ action: PayloadAction<{ authorId: string }> ) => { const { authorId } = action.payload; - state.apps.updateUser.authorId = authorId; + state.apps.updateUser.authorId = authorId.toUpperCase(); }, changeUpdateEncryption: ( state, @@ -243,7 +243,8 @@ export const userSlice = createSlice({ state.apps.licenseAllocateUser.id = selectedUser.id; state.apps.licenseAllocateUser.name = selectedUser.name; state.apps.licenseAllocateUser.email = selectedUser.email; - state.apps.licenseAllocateUser.authorId = selectedUser.authorId; + state.apps.licenseAllocateUser.authorId = + selectedUser.authorId.toUpperCase(); state.apps.licenseAllocateUser.licenseStatus = selectedUser.licenseStatus; state.apps.licenseAllocateUser.expiration = selectedUser.expiration; state.apps.licenseAllocateUser.remaining = selectedUser.remaining; diff --git a/dictation_client/src/pages/UserListPage/popup.tsx b/dictation_client/src/pages/UserListPage/popup.tsx index 35c8f0f..50ed98f 100644 --- a/dictation_client/src/pages/UserListPage/popup.tsx +++ b/dictation_client/src/pages/UserListPage/popup.tsx @@ -200,7 +200,11 @@ export const UserAddPopup: React.FC = (props) => { className={styles.formInput} value={addUser.authorId ?? undefined} onChange={(e) => { - dispatch(changeAuthorId({ authorId: e.target.value })); + dispatch( + changeAuthorId({ + authorId: e.target.value.toUpperCase(), + }) + ); }} /> {isPushCreateButton && hasErrorEmptyAuthorId && ( diff --git a/dictation_client/src/pages/UserListPage/updatePopup.tsx b/dictation_client/src/pages/UserListPage/updatePopup.tsx index 00ce988..fa5944e 100644 --- a/dictation_client/src/pages/UserListPage/updatePopup.tsx +++ b/dictation_client/src/pages/UserListPage/updatePopup.tsx @@ -184,7 +184,9 @@ export const UserUpdatePopup: React.FC = (props) => { className={styles.formInput} onChange={(e) => { dispatch( - changeUpdateAuthorId({ authorId: e.target.value }) + changeUpdateAuthorId({ + authorId: e.target.value.toUpperCase(), + }) ); }} />