From 0728c9b6b5cca3926f081c0b457bbf5bf0fb80c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 9 Mar 2026 18:41:30 +0800 Subject: [PATCH] Remove unnecessary await on toast.success() and modalStore.closeModal() Co-Authored-By: Claude Opus 4.6 --- src/views/AccountManagement/ModalAccountEditCreate.vue | 6 +++--- src/views/AccountManagement/MyAccount.vue | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/AccountManagement/ModalAccountEditCreate.vue b/src/views/AccountManagement/ModalAccountEditCreate.vue index a951e30..29ef122 100644 --- a/src/views/AccountManagement/ModalAccountEditCreate.vue +++ b/src/views/AccountManagement/ModalAccountEditCreate.vue @@ -331,8 +331,8 @@ const onConfirmBtnClick = async () => { is_admin: isSetAsAdminChecked.value, is_active: isSetActivedChecked.value, }); - await toast.success(i18next.t("AcctMgmt.MsgAccountAdded")); - await modalStore.closeModal(); + toast.success(i18next.t("AcctMgmt.MsgAccountAdded")); + modalStore.closeModal(); acctMgmtStore.setShouldUpdateList(true); await router.push("/account-admin"); break; @@ -357,7 +357,7 @@ const onConfirmBtnClick = async () => { is_active: true, }); } - await toast.success(i18next.t("AcctMgmt.MsgAccountEdited")); + toast.success(i18next.t("AcctMgmt.MsgAccountEdited")); isEditable.value = false; break; default: diff --git a/src/views/AccountManagement/MyAccount.vue b/src/views/AccountManagement/MyAccount.vue index 9cbb26b..8aebab1 100644 --- a/src/views/AccountManagement/MyAccount.vue +++ b/src/views/AccountManagement/MyAccount.vue @@ -232,7 +232,7 @@ const validatePwdLength = () => { const onSaveNameClick = async () => { if (inputName.value.length > 0) { await acctMgmtStore.editAccountName(username.value, inputName.value); - await toast.success(i18next.t("AcctMgmt.MsgAccountEdited")); + toast.success(i18next.t("AcctMgmt.MsgAccountEdited")); await acctMgmtStore.getUserDetail(username.value); isNameEditable.value = false; inputName.value = name.value; @@ -245,7 +245,7 @@ const onSavePwdClick = async () => { if (isPwdLengthValid.value) { isPwdEditable.value = false; await acctMgmtStore.editAccountPwd(username.value, inputPwd.value); - await toast.success(i18next.t("AcctMgmt.MsgAccountEdited")); + toast.success(i18next.t("AcctMgmt.MsgAccountEdited")); inputPwd.value = ""; await acctMgmtStore.getUserDetail(loginStore.userData.username); }