From 21555393657dfdfb44ad57549105bb34a222e065 Mon Sep 17 00:00:00 2001 From: "saito.k" Date: Thu, 22 Jun 2023 08:07:31 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20175:=20=E3=82=BF=E3=82=B9?= =?UTF-8?q?=E3=82=AF=E4=B8=80=E8=A6=A7=E7=94=BB=E9=9D=A2=E3=81=A7=E3=82=BF?= =?UTF-8?q?=E3=82=B9=E3=82=AF=E3=82=B9=E3=83=86=E3=83=BC=E3=82=BF=E3=82=B9?= =?UTF-8?q?=E3=81=AE=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=82=92?= =?UTF-8?q?=E3=81=99=E3=81=B9=E3=81=A6=E5=A4=96=E3=81=99=E3=81=A8=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=81=A8=E3=81=AA=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2037: 対応](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2037) - フィルターの選択をすべて未選択にするとエラーになる挙動を修正 - フィルターがすべて未選択時に画面側から空文字が渡されていた。 - APIはstetusに値が入っていると判断して、バリデーションを行っていたためエラーになっていた。 - フィルターがすべて未選択の場合は画面側からundefinedを渡すように修正した。 ## レビューポイント - 修正箇所は画面側でよいか - 修正内容に問題はあるか ## UIの変更 - 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/Bug2037?csf=1&web=1&e=pJJk6P ## 動作確認状況 - ローカルで確認 ## 補足 - 相談、参考資料などがあれば --- dictation_client/src/features/dictation/operations.ts | 2 +- dictation_client/src/pages/DictationPage/index.tsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dictation_client/src/features/dictation/operations.ts b/dictation_client/src/features/dictation/operations.ts index a1ec6aa..c4bddbf 100644 --- a/dictation_client/src/features/dictation/operations.ts +++ b/dictation_client/src/features/dictation/operations.ts @@ -18,7 +18,7 @@ export const listTasksAsync = createAsyncThunk< // パラメータ limit: number; offset: number; - filter: string; + filter?: string; direction: DirectionType; paramName: SortableColumnType; }, diff --git a/dictation_client/src/pages/DictationPage/index.tsx b/dictation_client/src/pages/DictationPage/index.tsx index f87ffa7..04b4f0d 100644 --- a/dictation_client/src/pages/DictationPage/index.tsx +++ b/dictation_client/src/pages/DictationPage/index.tsx @@ -222,7 +222,7 @@ const DictationPage: React.FC = (): JSX.Element => { hasPending: boolean, hasFinished: boolean, hasBackup: boolean - ) => { + ): string | undefined => { const filterStatus = []; if (hasUploaded) { filterStatus.push(STATUS.UPLOADED); @@ -240,6 +240,9 @@ const DictationPage: React.FC = (): JSX.Element => { filterStatus.push(STATUS.BACKUP); } + if (filterStatus.length === 0) { + return undefined; + } return filterStatus.join(","); };