From bc110712b00e734f3d6201a707bd21c6c5c7993e Mon Sep 17 00:00:00 2001 From: "makabe.t" Date: Tue, 7 Nov 2023 05:01:06 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20558:=20=E4=BB=A3=E8=A1=8C?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E3=81=AE=E9=96=8B=E5=A7=8B/=E7=B5=82?= =?UTF-8?q?=E4=BA=86=E6=99=82=E3=81=AB=E3=83=80=E3=82=A4=E3=82=A2=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E3=82=92=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task3032: 代行操作の開始/終了時にダイアログを表示](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3032) - 代行操作の開始/終了時に確認ダイアログを表示するように修正しました。 ## レビューポイント - 共有 ## UIの変更 - [Task3032](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/Task3032?csf=1&web=1&e=jHFOdq) ## 動作確認状況 - ローカルで確認 --- dictation_client/src/components/delegate/index.tsx | 8 +++++++- dictation_client/src/pages/PartnerPage/index.tsx | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dictation_client/src/components/delegate/index.tsx b/dictation_client/src/components/delegate/index.tsx index c5d18e7..1bfce9e 100644 --- a/dictation_client/src/components/delegate/index.tsx +++ b/dictation_client/src/components/delegate/index.tsx @@ -21,10 +21,16 @@ export const DelegationBar: React.FC = (): JSX.Element => { const navigate = useNavigate(); const onClickExit = useCallback(() => { + if ( + /* eslint-disable-next-line no-alert */ + !window.confirm(t(getTranslationID("common.message.dialogConfirm"))) + ) { + return; + } dispatch(clearDelegationToken()); dispatch(cleanupDelegateAccount()); navigate("/partners"); - }, [dispatch, navigate]); + }, [dispatch, navigate, t]); return (
diff --git a/dictation_client/src/pages/PartnerPage/index.tsx b/dictation_client/src/pages/PartnerPage/index.tsx index 17b95b7..7f73f66 100644 --- a/dictation_client/src/pages/PartnerPage/index.tsx +++ b/dictation_client/src/pages/PartnerPage/index.tsx @@ -92,6 +92,12 @@ const PartnerPage: React.FC = (): JSX.Element => { // 代理操作開始処理 const startDealerManagement = useCallback( async (delegatedAccountId: number, delegatedCompanyName: string) => { + if ( + /* eslint-disable-next-line no-alert */ + !window.confirm(t(getTranslationID("common.message.dialogConfirm"))) + ) { + return; + } dispatch( changeDelegateAccount({ delegatedAccountId, delegatedCompanyName }) ); @@ -100,7 +106,7 @@ const PartnerPage: React.FC = (): JSX.Element => { navigate("/user"); } }, - [dispatch, navigate] + [dispatch, navigate, t] ); // HTML