From 546003492dee99ef3dba23cc7b4e6eff8b74158b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 26 Dec 2024 16:02:23 +0700 Subject: [PATCH] fix bug --- .../components/PersonalList/PersonalListPage.vue | 2 +- .../components/PersonalList/Table.vue | 15 ++++++++++----- .../components/PersonalList/TableView.vue | 5 ++++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/modules/05_placement/components/PersonalList/PersonalListPage.vue b/src/modules/05_placement/components/PersonalList/PersonalListPage.vue index 2606b1863..3b6bad130 100644 --- a/src/modules/05_placement/components/PersonalList/PersonalListPage.vue +++ b/src/modules/05_placement/components/PersonalList/PersonalListPage.vue @@ -53,7 +53,7 @@ async function getStat() { disclaim: statCard.disclaim, report: statCard.report, }; - DataStore.checkLoad(1); + // DataStore.checkLoad(1); }) .catch((e) => { messageError($q, e); diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 77986cc21..bf40e39be 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -378,8 +378,10 @@ async function getTable() { // รายชื่อทั้งหมด await filterpositionCandidate(rowData); - rows.value = rowData; + // rows.value = rowData; rowsAwait.value = rowData; + await onUpdateNewRows(typeEmployee.value,positionCandidate.value) + // รายชื่อไปยังหน่วยงาน rowsFilter.value = await rows.value.filter( @@ -394,7 +396,7 @@ async function getTable() { e.nodeName !== null && e.reportingDate !== null ); - await DataStore.checkLoad(1); + // await DataStore.checkLoad(1); // insertAvatar(rows.value); }) .catch((e) => { @@ -419,8 +421,6 @@ async function filterpositionCandidate(data: any) { arr.findIndex((e: any) => e.id === item.id) === index ); positionCandidateData.value.push(...uniqueData); - - console.log(positionCandidateData.value); } /** ยืนยันการผ่อนผัน*/ @@ -756,7 +756,12 @@ function openModalOrder(val: boolean) { modalOrder.value = val; } -function onUpdateNewRows(type: string, pos: string) { +const typeEmployee = ref(""); +const positionCandidate = ref(""); + +async function onUpdateNewRows(type: string, pos: string) { + typeEmployee.value = type; + positionCandidate.value = pos; const data = onSearchDataTable( filter.value, rowsAwait.value, diff --git a/src/modules/05_placement/components/PersonalList/TableView.vue b/src/modules/05_placement/components/PersonalList/TableView.vue index af2c13b4b..568e9c2f4 100644 --- a/src/modules/05_placement/components/PersonalList/TableView.vue +++ b/src/modules/05_placement/components/PersonalList/TableView.vue @@ -20,7 +20,6 @@ const bmaOfficerOption = ref([ ]); const positionCandidate = ref(""); -const positionCandidateOptions = ref([]); const props = defineProps({ inputfilter: String, @@ -120,6 +119,10 @@ const props = defineProps({ roleAdmin: Boolean, }); +const positionCandidateOptions = ref( + props?.positionCandidateData || [] +); + const pagination = ref({ sortBy: "examNumber", descending: false,