Refactoring code module 11_discipline

This commit is contained in:
STW_TTTY\stwtt 2024-09-19 16:37:16 +07:00
parent 202fbf27b6
commit 9653ae78cb
58 changed files with 1021 additions and 1305 deletions

View file

@ -32,12 +32,14 @@ const rowsPerPage = ref<number>(10);
const toptitle = ref<number>(0);
const statusFilter = ref<string>("NEW");
const option = ref<any[]>(complainstStore.statusOptions);
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
rowsPerPage.value = rowPerpage;
page.value = pageCurrent;
await getList();
}
/** ดึงข้อมูล เรื่องร้องเรียน */
async function getList() {
showLoader();
await http
@ -69,10 +71,7 @@ function redirectToPageadd() {
router.push(`/discipline/complaints/add`);
}
function filterFn() {
getList();
}
/** ล้างค่าใน input */
function resetFilter() {
filterKeyword.value = "";
if (filterRef.value) {
@ -165,7 +164,7 @@ onMounted(async () => {
ref="filterRef"
outlined
placeholder="ค้นหา"
@keydown.enter.prevent="filterFn"
@keydown.enter.prevent="getList()"
>
<template v-slot:append>
<q-icon v-if="filterKeyword == ''" name="search" />