remove setTimeout

This commit is contained in:
setthawutttty 2025-07-08 13:53:17 +07:00
parent 8a87f084c9
commit 8e28b14935
2 changed files with 5 additions and 15 deletions

View file

@ -20,9 +20,7 @@ async function onSubmit(data: any) {
.post(config.API.complaintAdd(), data)
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
setTimeout(() => {
router.push(`/discipline/complaints/${res.data.result}`);
}, 1200);
router.push(`/discipline/complaints/${res.data.result}`);
})
.catch((e) => {
messageError($q, e);

View file

@ -335,18 +335,9 @@ onMounted(async () => {
showLoader();
await Promise.all([
fetchDataSigner(),
formTemplates.value.forEach((e) => {
downloadFileList(e.fileName);
}),
// downloadFileList(
// " ( )"
// ),
// downloadFileList("- ( 15)"),
// downloadFileList(" ( 16)"),
// downloadFileList(" ( 17)"),
// downloadFileList(" ( 18)"),
// downloadFileList(" ( )"),
Promise.all(
formTemplates.value.map((e) => downloadFileList(e.fileName))
),
checkDocEdit(),
]);
} catch (error) {
@ -355,6 +346,7 @@ onMounted(async () => {
hideLoader();
}
});
</script>
<template>