refactor code (ยังไม่หมด)

This commit is contained in:
setthawutttty 2024-01-15 17:52:25 +07:00
parent ab4189e6ed
commit 32d4de7075
21 changed files with 309 additions and 109 deletions

View file

@ -193,25 +193,21 @@ function redirectToPageadd() {
router.push(`/discipline-appealcomplain/add`);
}
/** เปิดหน้า แก้ไข */
function editPage(id: string) {
router.push(`/discipline-appealcomplain/${id}`);
}
/** ดึงข้อมูลเมื่อ กด enter */
function filterFn() {
console.log("enter", filterKeyword.value);
getData();
}
/** ปิด pop up */
function close() {
modalStatusEdit.value = false;
}
function editStatusReturn(data: any) {
dialogConfirm($q, () => {
console.log("saveStatus");
modalStatusEdit.value = false;
});
}
/** ดึงข้อมูลเริ่มต้น */
async function getData() {
showLoader();
@ -249,6 +245,7 @@ function yearAll() {
getData();
}
/** ฟังชั่น เคลียฟิลเตอร์ */
function resetFilter() {
filterKeyword.value = "";
getData();
@ -470,7 +467,6 @@ onMounted(async () => {
:modal="modalStatusEdit"
:data="dataRow"
:close="close"
@editStatusReturn="editStatusReturn"
/>
</template>