From c4efaf1a1aaa274df7f28af2d60a65ace9dae802 Mon Sep 17 00:00:00 2001
From: "saito.k"
Date: Thu, 11 Jan 2024 06:58:01 +0000
Subject: [PATCH] =?UTF-8?q?Merged=20PR=20671:=20=E3=80=8CLicenseAlert?=
=?UTF-8?q?=E3=80=8D=E3=82=92=E6=B6=88=E3=81=99=E5=AF=BE=E5=BF=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## 概要
[Task3381: 対応](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3381)
- 以下の画面から「LicenseAlert」を削除
- ユーザー追加Popup
- ユーザー更新Popup
- ユーザー一覧画面
- 以下のAPIの引数から「LicenseAlert」の設定をするパラメータを削除
- ユーザー作成API(users/signup)
- ユーザー更新API(users/update)
- ユーザー一覧取得APIのレスポンスから「LicenseAlert」を削除
- usersEntityから「LicenseAlert」を削除
- クライアントのAPI呼び出し部分を自動生成するopenapi-generator-cliのバージョンを7.1.0で固定
- 最新バージョン(7.2.0)はaxiosのバージョン1.x用になるため
- https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.2.0
## レビューポイント
- openapi-generator-cliのバージョンを固定するのではなく、axiosのバージョンを上げたほうがよいか
- axiosのバージョン1.xが出たのがおととしになるのでそろそろ上げてもいい?
- このタイミングでメジャーバージョンを上げるのはどうか
- 基本的な仕様について大きくは変わってない模様
- 実際に上げてみて軽く動作確認してみたが問題なかった
## UIの変更
- Before/Afterのスクショなど
- https://ndstokyo.sharepoint.com/:f:/r/sites/Piranha/Shared%20Documents/General/OMDS/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88/Task3381?csf=1&web=1&e=TpXHES
## 補足
- 相談、参考資料などがあれば
---
dictation_client/codegen.sh | 2 +-
dictation_client/src/api/api.ts | 18 --------
.../src/features/user/operations.ts | 1 -
.../src/features/user/selectors.ts | 2 -
dictation_client/src/features/user/types.ts | 3 --
.../src/features/user/userSlice.ts | 21 ---------
.../src/pages/UserListPage/index.tsx | 4 --
.../src/pages/UserListPage/popup.tsx | 17 -------
.../src/pages/UserListPage/updatePopup.tsx | 19 --------
dictation_server/src/api/odms/openapi.json | 15 +------
dictation_server/src/common/test/utility.ts | 2 -
.../accounts/test/accounts.service.mock.ts | 3 --
.../src/features/accounts/types/types.ts | 8 +---
.../features/files/test/files.service.mock.ts | 1 -
.../licenses/test/liscense.service.mock.ts | 1 -
.../test/notification.service.mock.ts | 1 -
.../features/tasks/test/tasks.service.mock.ts | 2 -
.../features/users/test/users.service.mock.ts | 2 -
.../src/features/users/types/types.ts | 22 ++++------
.../src/features/users/users.controller.ts | 4 --
.../src/features/users/users.service.spec.ts | 44 -------------------
.../src/features/users/users.service.ts | 20 ++-------
.../accounts/accounts.repository.service.ts | 6 ++-
.../repositories/users/entity/user.entity.ts | 6 ---
.../users/users.repository.service.ts | 4 --
25 files changed, 21 insertions(+), 207 deletions(-)
diff --git a/dictation_client/codegen.sh b/dictation_client/codegen.sh
index 5d09ae3..d165c0c 100644
--- a/dictation_client/codegen.sh
+++ b/dictation_client/codegen.sh
@@ -1,2 +1,2 @@
-npx openapi-generator-cli version-manager set latest
+npx openapi-generator-cli version-manager set 7.1.0
npx openapi-generator-cli generate -g typescript-axios -i /app/dictation_server/src/api/odms/openapi.json -o /app/dictation_client/src/api/
diff --git a/dictation_client/src/api/api.ts b/dictation_client/src/api/api.ts
index 1c1ac87..645f058 100644
--- a/dictation_client/src/api/api.ts
+++ b/dictation_client/src/api/api.ts
@@ -1549,12 +1549,6 @@ export interface PostUpdateUserRequest {
* @memberof PostUpdateUserRequest
*/
'autoRenew': boolean;
- /**
- *
- * @type {boolean}
- * @memberof PostUpdateUserRequest
- */
- 'licenseAlart': boolean;
/**
*
* @type {boolean}
@@ -1660,12 +1654,6 @@ export interface SignupRequest {
* @memberof SignupRequest
*/
'autoRenew': boolean;
- /**
- *
- * @type {boolean}
- * @memberof SignupRequest
- */
- 'licenseAlert': boolean;
/**
*
* @type {boolean}
@@ -2212,12 +2200,6 @@ export interface User {
* @memberof User
*/
'autoRenew': boolean;
- /**
- *
- * @type {boolean}
- * @memberof User
- */
- 'licenseAlert': boolean;
/**
*
* @type {boolean}
diff --git a/dictation_client/src/features/user/operations.ts b/dictation_client/src/features/user/operations.ts
index f02e38c..b7ca2b0 100644
--- a/dictation_client/src/features/user/operations.ts
+++ b/dictation_client/src/features/user/operations.ts
@@ -164,7 +164,6 @@ export const updateUserAsync = createAsyncThunk<
encryptionPassword,
prompt,
autoRenew: updateUser.autoRenew,
- licenseAlart: updateUser.licenseAlert,
notification: updateUser.notification,
},
{
diff --git a/dictation_client/src/features/user/selectors.ts b/dictation_client/src/features/user/selectors.ts
index e1e3cf1..ee1f3fa 100644
--- a/dictation_client/src/features/user/selectors.ts
+++ b/dictation_client/src/features/user/selectors.ts
@@ -131,8 +131,6 @@ export const selectAuthorId = (state: RootState) =>
state.user.apps.addUser.authorId;
export const selectAutoRenew = (state: RootState) =>
state.user.apps.addUser.autoRenew;
-export const selectLicenseAlert = (state: RootState) =>
- state.user.apps.addUser.licenseAlert;
export const selectNotification = (state: RootState) =>
state.user.apps.addUser.notification;
// AddUserを返却する
diff --git a/dictation_client/src/features/user/types.ts b/dictation_client/src/features/user/types.ts
index 7f41187..649b63f 100644
--- a/dictation_client/src/features/user/types.ts
+++ b/dictation_client/src/features/user/types.ts
@@ -16,7 +16,6 @@ export interface UserView
encryption: boolean | string;
emailVerified: boolean;
autoRenew: boolean;
- licenseAlert: boolean;
notification: boolean;
name: string;
email: string;
@@ -28,7 +27,6 @@ export interface AddUser {
role: RoleType;
email: string;
autoRenew: boolean;
- licenseAlert: boolean;
notification: boolean;
authorId?: string;
encryption?: boolean;
@@ -46,7 +44,6 @@ export interface UpdateUser {
encryptionPassword?: string | undefined;
prompt?: boolean | undefined;
autoRenew: boolean;
- licenseAlert: boolean;
notification: boolean;
}
diff --git a/dictation_client/src/features/user/userSlice.ts b/dictation_client/src/features/user/userSlice.ts
index 52ffbc4..ef0589a 100644
--- a/dictation_client/src/features/user/userSlice.ts
+++ b/dictation_client/src/features/user/userSlice.ts
@@ -23,7 +23,6 @@ const initialState: UsersState = {
encryptionPassword: undefined,
prompt: undefined,
autoRenew: true,
- licenseAlert: true,
notification: true,
},
selectedUser: {
@@ -36,7 +35,6 @@ const initialState: UsersState = {
encryptionPassword: undefined,
prompt: undefined,
autoRenew: true,
- licenseAlert: true,
notification: true,
},
addUser: {
@@ -44,7 +42,6 @@ const initialState: UsersState = {
role: USER_ROLES.NONE,
email: "",
autoRenew: true,
- licenseAlert: true,
notification: true,
authorId: undefined,
encryption: false,
@@ -93,13 +90,6 @@ export const userSlice = createSlice({
const { autoRenew } = action.payload;
state.apps.addUser.autoRenew = autoRenew;
},
- changeLicenseAlert: (
- state,
- action: PayloadAction<{ licenseAlert: boolean }>
- ) => {
- const { licenseAlert } = action.payload;
- state.apps.addUser.licenseAlert = licenseAlert;
- },
changeEncryption: (
state,
action: PayloadAction<{ encryption: boolean }>
@@ -149,7 +139,6 @@ export const userSlice = createSlice({
state.apps.updateUser.encryptionPassword = undefined;
state.apps.updateUser.prompt = user.prompt;
state.apps.updateUser.autoRenew = user.autoRenew;
- state.apps.updateUser.licenseAlert = user.licenseAlert;
state.apps.updateUser.notification = user.notification;
state.apps.selectedUser.id = user.id;
@@ -161,7 +150,6 @@ export const userSlice = createSlice({
state.apps.selectedUser.encryptionPassword = undefined;
state.apps.selectedUser.prompt = user.prompt;
state.apps.selectedUser.autoRenew = user.autoRenew;
- state.apps.selectedUser.licenseAlert = user.licenseAlert;
state.apps.selectedUser.notification = user.notification;
state.apps.hasPasswordMask = user.encryption;
@@ -211,13 +199,6 @@ export const userSlice = createSlice({
const { autoRenew } = action.payload;
state.apps.updateUser.autoRenew = autoRenew;
},
- changeUpdateLicenseAlert: (
- state,
- action: PayloadAction<{ licenseAlert: boolean }>
- ) => {
- const { licenseAlert } = action.payload;
- state.apps.updateUser.licenseAlert = licenseAlert;
- },
changeUpdateNotification: (
state,
action: PayloadAction<{ notification: boolean }>
@@ -318,7 +299,6 @@ export const {
changeRole,
changeAuthorId,
changeAutoRenew,
- changeLicenseAlert,
changeNotification,
cleanupAddUser,
changeUpdateUser,
@@ -328,7 +308,6 @@ export const {
changeUpdateEncryptionPassword,
changeUpdatePrompt,
changeUpdateAutoRenew,
- changeUpdateLicenseAlert,
changeUpdateNotification,
cleanupUpdateUser,
changeEncryption,
diff --git a/dictation_client/src/pages/UserListPage/index.tsx b/dictation_client/src/pages/UserListPage/index.tsx
index 46f1223..a1de616 100644
--- a/dictation_client/src/pages/UserListPage/index.tsx
+++ b/dictation_client/src/pages/UserListPage/index.tsx
@@ -174,9 +174,6 @@ const UserListPage: React.FC = (): JSX.Element => {
|
{t(getTranslationID("userListPage.label.autoRenew"))}
|
-
- {t(getTranslationID("userListPage.label.licenseAlert"))}
- |
{t(getTranslationID("userListPage.label.notification"))}
|
@@ -292,7 +289,6 @@ const UserListPage: React.FC = (): JSX.Element => {
{boolToElement(user.autoRenew)} |
- {boolToElement(user.licenseAlert)} |
{boolToElement(user.notification)} |
{boolToElement(user.emailVerified)} |
diff --git a/dictation_client/src/pages/UserListPage/popup.tsx b/dictation_client/src/pages/UserListPage/popup.tsx
index 50ed98f..97b3301 100644
--- a/dictation_client/src/pages/UserListPage/popup.tsx
+++ b/dictation_client/src/pages/UserListPage/popup.tsx
@@ -10,7 +10,6 @@ import {
changeRole,
changeAuthorId,
changeAutoRenew,
- changeLicenseAlert,
changeNotification,
cleanupAddUser,
addUserAsync,
@@ -324,22 +323,6 @@ export const UserAddPopup: React.FC = (props) => {
{t(getTranslationID("userListPage.label.autoRenew"))}
-
-
-
-
-
-