Merged PR 874: 不具合修正

## 概要
[Task4137: 不具合修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/4137)

- ファイル名変更時にダイアログを追加

## レビューポイント
- 共有
## UIの変更
- ダイアログを追加

## クエリの変更
- なし
## 動作確認状況
- ローカルで確認
- 行った修正がデグレを発生させていないことを確認できるか
  - 具体的にどのような確認をしたか
    - ローカル確認
This commit is contained in:
makabe.t 2024-04-17 01:49:34 +00:00
parent 69241ed36c
commit 23862ad3ac

View File

@ -47,6 +47,15 @@ export const FilePropertyPopup: React.FC<FilePropertyPopupProps> = (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<FilePropertyPopupProps> = (props) => {
if (meta.requestStatus === "fulfilled") {
onClose(true);
}
}, [dispatch, onClose, fileName, selectedFileTask]);
}, [t, dispatch, onClose, fileName, selectedFileTask]);
return (
<div className={`${styles.modal} ${isOpen ? styles.isShow : ""}`}>