fix ทดลองงาน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-01-31 11:43:24 +07:00
parent 09d00df7e9
commit 8513725dff

View file

@ -154,7 +154,6 @@ const probation_statusOP = ref<any>([
/** get ข้อมูล งานที่ได้รับมอบหมาย */
async function getAssignList() {
showLoader();
await http
.get(config.API.probationGetAssignList(personalId.value))
.then(async (res) => {
@ -173,15 +172,11 @@ async function getAssignList() {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
/** รายละเอียด ตาม id */
async function getpersonalList() {
showLoader();
await http
.get(config.API.personal(personalId.value))
.then(async (res) => {
@ -195,9 +190,6 @@ async function getpersonalList() {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
@ -301,12 +293,19 @@ function onSearch() {
/** get ค่า เมื่อโหลดหน้า */
onMounted(async () => {
await Promise.all([
getpersonalList(),
getAssignList(),
fetchProfilePhoto(),
fetchCheckCommittee(),
]);
try {
showLoader();
await Promise.all([
getpersonalList(),
getAssignList(),
fetchProfilePhoto(),
fetchCheckCommittee(),
]);
} catch (error) {
console.error("Error fetching data:", error);
} finally {
hideLoader();
}
});
</script>