Refactor Code ระบบลา

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-12-15 09:58:02 +07:00
parent 75dfc3b004
commit 9498748c94
16 changed files with 202 additions and 349 deletions

View file

@ -3,7 +3,6 @@ import { ref, reactive, watch, onMounted } from "vue";
import { date, useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useRoute } from "vue-router";
/** importType */
import type {
@ -15,6 +14,7 @@ import type {
/** importStore */
import { useCounterMixin } from "@/stores/mixin";
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
/** useStore */
const dataStore = useChangeRoundDataStore();
const mixin = useCounterMixin();
@ -27,9 +27,7 @@ const {
success,
} = mixin;
const route = useRoute();
const $q = useQuasar();
const roundOp = ref<any>([]);
/**Hook */
onMounted(async () => {
@ -78,7 +76,7 @@ const dataToday = ref<Date>(new Date());
function onSubmit() {
dialogConfirm(
$q,
async () => {
() => {
changeRound();
props.closeDialog?.();
},
@ -107,6 +105,7 @@ async function changeRound() {
});
}
const roundOp = ref<any>([]);
/**
*ประวการเปลยนรอบการปฏงาน"
*
@ -138,9 +137,8 @@ async function fetchDataOption() {
}
// paging
const page = ref<number>(1);
const pageSize = ref<number>(10);
const filter = ref<string>(""); //search data table
/**
* งก api เปลยนหน
* @param pageVal page
@ -169,7 +167,6 @@ watch(
}
);
const emit = defineEmits(["update:change-page"]);
// Pagination - update rowsPerPage
async function updatePagination(newPagination: any) {
initialPagination.value = newPagination;
currentPage.value = 1; // set current page 1 per row
@ -192,7 +189,7 @@ function close() {
}
watch(
() => props.modal,
async (newDetailData, oldDetailData) => {
async () => {
if (props.editCheck === "edit") {
formData.round = "";
formData.reson = "";