From 3af64fbf8e00ad046afcbb87466f38761107d267 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: Tue, 10 Oct 2023 06:40:15 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20464:=20=E3=83=87=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E5=8F=96=E5=BE=97=E5=A4=B1=E6=95=97=E6=99=82=E3=81=AB?= =?UTF-8?q?=E5=90=84=E4=B8=80=E8=A6=A7=E8=A1=A8=E7=A4=BA=E7=94=BB=E9=9D=A2?= =?UTF-8?q?=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=81=8C=E3=81=9D=E3=82=8D=E3=81=A3?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2720: データ取得失敗時に各一覧表示画面の表示がそろっていない](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2720) - 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず) - 何をどう変更したか、追加したライブラリなど - 各一覧表示画面で値0件およびデータ取得エラー時に表示する挙動を統一 ※Accountに関しては自アカウント情報の表示のため値0件はないとみて、特に本タスクの実装 は必要ないと判断しました。 →対応としてはデータ取得エラー時のスナックバー表示のみ ※Userも自アカウント情報が表示されるため上記と同じ実装にする予定でしたが、スナックバーと0件表示ができました。 ![image (4).png](https://dev.azure.com/ODMSCloud/6023ff7b-d41c-4fa7-9c6f-f576ba48c07c/_apis/git/repositories/302da463-a2d7-40f9-b2bb-6e8edf324fa9/pullRequests/464/attachments/image%20%284%29.png) ・〇はそれぞれの検証条件をクリアできているという意味です。 ・「データ取得エラーとする」は通常ではAccount、License、Userは値が0件となることはなく、データベースエラーの場合のみと考えたので、値が0件=データ取得エラーとしました。 ・「スナックバー表示のみ」はデータ取得エラーが発生した場合、スナックバー表示のみで対応するという意味です。 ・「表示できない」はデータベースを切った状態だと、子アカウントのorderhistoryが表示されないため、表示できないと記載しました。 - dictationSlice.tsでbuilder.addCase(getSortColumnAsync.rejected, (state) => { state.apps.isLoading = false; を実装したのは、修正前はデータベースを切った状態だとロードのぐるぐるが消えずにいました。原因はgetSortColumnAsyncにrejectの場合、isLordingをfalseにする実装がなかったためです。 以上のことから上記実装を追加しました。 - このPull Requestでの対象/対象外 - 影響範囲(他の機能にも影響があるか) ## レビューポイント - 特にレビューしてほしい箇所 - 軽微なものや自明なものは記載不要 - 修正範囲が大きい場合などに記載 - 全体的にや仕様を満たしているか等は本当に必要な時のみ記載 ## 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/Task2720?csf=1&web=1&e=MBNgO8 ## 動作確認状況 - ローカルで確認 ## 補足 - 相談、参考資料などがあれば --- .../src/features/dictation/dictationSlice.ts | 4 + .../src/features/user/operations.ts | 7 + .../pages/LicensePage/licenseOrderHistory.tsx | 10 + .../src/pages/LicensePage/partnerLicense.tsx | 10 + .../src/pages/PartnerPage/index.tsx | 10 + .../src/pages/TemplateFilePage/index.tsx | 21 +- .../src/pages/UserListPage/index.tsx | 10 + .../src/pages/WorkTypeIdSettingPage/index.tsx | 23 +- .../src/pages/WorkflowPage/index.tsx | 278 ++++++++---------- 9 files changed, 198 insertions(+), 175 deletions(-) diff --git a/dictation_client/src/features/dictation/dictationSlice.ts b/dictation_client/src/features/dictation/dictationSlice.ts index f90c5ed..fe97dff 100644 --- a/dictation_client/src/features/dictation/dictationSlice.ts +++ b/dictation_client/src/features/dictation/dictationSlice.ts @@ -117,6 +117,10 @@ export const dictationSlice = createSlice({ state.apps.direction = action.payload.direction; state.apps.paramName = action.payload.paramName; }); + // 画面起動時にgetSortColumnAsyncがrejectedするとisLoadingがtrueのままになるため + builder.addCase(getSortColumnAsync.rejected, (state) => { + state.apps.isLoading = false; + }); builder.addCase(listTypistsAsync.fulfilled, (state, action) => { state.domain.typists = action.payload.typists; }); diff --git a/dictation_client/src/features/user/operations.ts b/dictation_client/src/features/user/operations.ts index 225fbfe..bd3d750 100644 --- a/dictation_client/src/features/user/operations.ts +++ b/dictation_client/src/features/user/operations.ts @@ -41,6 +41,13 @@ export const listUsersAsync = createAsyncThunk< // e ⇒ errorObjectに変換 const error = createErrorObject(e); + thunkApi.dispatch( + openSnackbar({ + level: "error", + message: getTranslationID("common.message.internalServerError"), + }) + ); + return thunkApi.rejectWithValue({ error }); } }); diff --git a/dictation_client/src/pages/LicensePage/licenseOrderHistory.tsx b/dictation_client/src/pages/LicensePage/licenseOrderHistory.tsx index aee1606..e20c9f1 100644 --- a/dictation_client/src/pages/LicensePage/licenseOrderHistory.tsx +++ b/dictation_client/src/pages/LicensePage/licenseOrderHistory.tsx @@ -331,6 +331,16 @@ export const LicenseOrderHistory: React.FC = ( ))} + {!isLoading && licenseOrderHistory.length === 0 && ( +

+ {t(getTranslationID("common.message.listEmpty"))} +

+ )} {isLoading && ( { ))} + {!isLoading && childrenPartnerLicensesInfo.length === 0 && ( +

+ {t(getTranslationID("common.message.listEmpty"))} +

+ )} {/* pagenation */}
+ +