From 3c15bb3b0b159587ec35a03112fe93c366c6ad88 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 26 Mar 2026 09:59:29 +0700 Subject: [PATCH 1/2] fix(salary): add null check for id before processing --- src/modules/13_salary/components/04_salaryLists/TabMain.vue | 2 ++ .../13_salary/components/05_salaryListsEmployee/TabMain.vue | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/modules/13_salary/components/04_salaryLists/TabMain.vue b/src/modules/13_salary/components/04_salaryLists/TabMain.vue index 5da8f0b3d..ddf8804e5 100644 --- a/src/modules/13_salary/components/04_salaryLists/TabMain.vue +++ b/src/modules/13_salary/components/04_salaryLists/TabMain.vue @@ -222,6 +222,7 @@ const itemsCard = ref([ * @param id กลุ่ม */ async function fetchDataQuota(id: string) { + if (!id) return; await http .get(config.API.salaryListPeriodQuota(id)) .then((res) => { @@ -254,6 +255,7 @@ async function fetchDataQuota(id: string) { * @param id กลุ่ม */ async function fetchDataPeriod(id: string, force: boolean = false) { + if (!id) return; force && showLoader(); let formData = { ...params.value, diff --git a/src/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue b/src/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue index e4f00a7cc..cc50f45cb 100644 --- a/src/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue +++ b/src/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue @@ -215,6 +215,7 @@ const itemsCard = ref([ * @param id กลุ่ม */ async function fetchDataQuota(id: string) { + if (!id) return; await http .get(config.API.salaryListPeriodQuotaEmp(id)) .then((res) => { @@ -246,6 +247,7 @@ async function fetchDataQuota(id: string) { * @param id กลุ่ม */ async function fetchDataPeriod(id: string, force: boolean = false) { + if (!id) return; force && showLoader(); let formData = { ...params.value, From dd5b2e0676fe08323db7c9a2e5f8b8b4b8059201 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 26 Mar 2026 10:16:46 +0700 Subject: [PATCH 2/2] fix(discipline): clear selected employees on class change --- src/components/Dialogs/AddPersonal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 6003ace6f..42bd3965b 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -305,7 +305,7 @@ watch( outlined option-label="name" option-value="id" - @update:model-value="rows = []" + @update:model-value="(rows = []), (selected = [])" />