clear code + comment

This commit is contained in:
STW_TTTY\stwtt 2024-04-30 14:31:55 +07:00
parent a9609d2d7f
commit ac70090e22
19 changed files with 231 additions and 166 deletions

View file

@ -6,7 +6,6 @@ import type {
FormFilter,
NewPagination,
} from "@/modules/15_development/interface/index/Main";
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar, type QTableProps } from "quasar";
@ -22,13 +21,11 @@ const year = ref<string>("");
const $q = useQuasar();
const mixin = useCounterMixin();
const {
dialogConfirm,
messageError,
dialogMessageNotify,
showLoader,
hideLoader,
} = mixin;
const store = useDevelopmentDataStore();
const modal = defineModel<boolean>("modal", { required: true });
@ -139,6 +136,8 @@ function closeDialog() {
function getClass() {
return "inputgreen";
}
/** ค้นข้อมูลตาม ฟิลเตอร์ */
function searchFilter() {
let queryParams: any = {
page: formFilter.page,
@ -171,16 +170,19 @@ function searchFilter() {
});
}
/** update ค่า เเถวข้อมูล */
function updatePage(val: number) {
formFilter.page = val;
searchFilter();
}
/** update ค่า เเถวข้อมูล */
function updatePageSize(newPagination: NewPagination) {
formFilter.page = 1;
formFilter.pageSize = newPagination.rowsPerPage;
}
/** เช็คเเถวข้อมูลว่ามีการเปลี่ยนแปลงไหม */
watch(
() => formFilter.pageSize,
() => {