Remove unnecessary await on toast.success() and modalStore.closeModal()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -331,8 +331,8 @@ const onConfirmBtnClick = async () => {
|
|||||||
is_admin: isSetAsAdminChecked.value,
|
is_admin: isSetAsAdminChecked.value,
|
||||||
is_active: isSetActivedChecked.value,
|
is_active: isSetActivedChecked.value,
|
||||||
});
|
});
|
||||||
await toast.success(i18next.t("AcctMgmt.MsgAccountAdded"));
|
toast.success(i18next.t("AcctMgmt.MsgAccountAdded"));
|
||||||
await modalStore.closeModal();
|
modalStore.closeModal();
|
||||||
acctMgmtStore.setShouldUpdateList(true);
|
acctMgmtStore.setShouldUpdateList(true);
|
||||||
await router.push("/account-admin");
|
await router.push("/account-admin");
|
||||||
break;
|
break;
|
||||||
@@ -357,7 +357,7 @@ const onConfirmBtnClick = async () => {
|
|||||||
is_active: true,
|
is_active: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
await toast.success(i18next.t("AcctMgmt.MsgAccountEdited"));
|
toast.success(i18next.t("AcctMgmt.MsgAccountEdited"));
|
||||||
isEditable.value = false;
|
isEditable.value = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ const validatePwdLength = () => {
|
|||||||
const onSaveNameClick = async () => {
|
const onSaveNameClick = async () => {
|
||||||
if (inputName.value.length > 0) {
|
if (inputName.value.length > 0) {
|
||||||
await acctMgmtStore.editAccountName(username.value, inputName.value);
|
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);
|
await acctMgmtStore.getUserDetail(username.value);
|
||||||
isNameEditable.value = false;
|
isNameEditable.value = false;
|
||||||
inputName.value = name.value;
|
inputName.value = name.value;
|
||||||
@@ -245,7 +245,7 @@ const onSavePwdClick = async () => {
|
|||||||
if (isPwdLengthValid.value) {
|
if (isPwdLengthValid.value) {
|
||||||
isPwdEditable.value = false;
|
isPwdEditable.value = false;
|
||||||
await acctMgmtStore.editAccountPwd(username.value, inputPwd.value);
|
await acctMgmtStore.editAccountPwd(username.value, inputPwd.value);
|
||||||
await toast.success(i18next.t("AcctMgmt.MsgAccountEdited"));
|
toast.success(i18next.t("AcctMgmt.MsgAccountEdited"));
|
||||||
inputPwd.value = "";
|
inputPwd.value = "";
|
||||||
await acctMgmtStore.getUserDetail(loginStore.userData.username);
|
await acctMgmtStore.getUserDetail(loginStore.userData.username);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user