From 23862ad3acaed57ee003c8f4c5c95c1b188ace54 Mon Sep 17 00:00:00 2001 From: "makabe.t" Date: Wed, 17 Apr 2024 01:49:34 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20874:=20=E4=B8=8D=E5=85=B7?= =?UTF-8?q?=E5=90=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task4137: 不具合修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/4137) - ファイル名変更時にダイアログを追加 ## レビューポイント - 共有 ## UIの変更 - ダイアログを追加 ## クエリの変更 - なし ## 動作確認状況 - ローカルで確認 - 行った修正がデグレを発生させていないことを確認できるか - 具体的にどのような確認をしたか - ローカル確認 --- .../src/pages/DictationPage/filePropertyPopup.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dictation_client/src/pages/DictationPage/filePropertyPopup.tsx b/dictation_client/src/pages/DictationPage/filePropertyPopup.tsx index ab234b2..4f3e9bb 100644 --- a/dictation_client/src/pages/DictationPage/filePropertyPopup.tsx +++ b/dictation_client/src/pages/DictationPage/filePropertyPopup.tsx @@ -47,6 +47,15 @@ export const FilePropertyPopup: React.FC = (props) => { if (fileName.length === 0) { return; } + + // ダイアログ確認 + if ( + /* eslint-disable-next-line no-alert */ + !window.confirm(t(getTranslationID("common.message.dialogConfirm"))) + ) { + return; + } + const { meta } = await dispatch( renameFileAsync({ audioFileId: selectedFileTask?.audioFileId ?? 0, @@ -59,7 +68,7 @@ export const FilePropertyPopup: React.FC = (props) => { if (meta.requestStatus === "fulfilled") { onClose(true); } - }, [dispatch, onClose, fileName, selectedFileTask]); + }, [t, dispatch, onClose, fileName, selectedFileTask]); return (