ปรับ code การลา

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-11 15:50:34 +07:00
parent 10bbc9794a
commit 3ee1a64a78
12 changed files with 49 additions and 852 deletions

View file

@ -1,17 +1,21 @@
<script setup lang="ts">
import { ref, reactive, onMounted } from "vue";
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import type { DateFilter } from "@/modules/09_leave/interface/request/leave";
import type {
DataOption,
DataOption2,
} from "@/modules/09_leave/interface/index/Main";
import type { DataOption } from "@/modules/09_leave/interface/index/Main";
/** importStores*/
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
import { useCounterMixin } from "@/stores/mixin";
const leaveStore = useLeavelistDataStore();
const mixin = useCounterMixin();
const $q = useQuasar();
const { messageError } = mixin;
const props = defineProps({
rowsPerPage: {
@ -98,6 +102,7 @@ const optionStatusMain = ref<DataOption[]>(
leaveStore.tabMenu == "1" ? optionStatus.value : optionStatus2.value
);
/** function เรียกข้อมูลสถานะ*/
async function fetchOption() {
await http
.get(config.API.leaveType())
@ -115,7 +120,7 @@ async function fetchOption() {
optionType.value = optionTypeMain.value;
})
.catch((err) => {
console.log(err);
messageError($q, err);
});
}