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(), + }) ); }} />