Refactoring code module 05_leave

This commit is contained in:
STW_TTTY\stwtt 2024-09-03 17:36:59 +07:00
parent 763ec2fd95
commit 4253226ac3
23 changed files with 383 additions and 532 deletions

View file

@ -1,11 +1,9 @@
<script setup lang="ts">
import { reactive, onMounted } from "vue";
import { onMounted } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import type { FormData } from "@/modules/05_leave/interface/request/AddAbsence";
import { useLeaveStore } from "@/modules/05_leave/store";
/**ตัวแปรที่ใช้ */
const mixin = useCounterMixin();
const dataStore = useLeaveStore();
const { date2Thai } = mixin;
@ -18,20 +16,6 @@ const props = defineProps({
},
});
/** ข้อมูล v-model ของฟอร์ม */
const formData = reactive<FormData>({
dateStart: new Date(),
subject: "เรื่อง",
who: "เรียนผู้ใด",
requestName: "ชื่อผู้ยื่น",
position: "ตำแหน่ง",
level: "ระดับ",
ocRequest: "สังกัด",
leaveabsentDaySummon: "2",
leaveUse: "1",
leaveRemaining: "1",
});
/**Hook */
onMounted(() => {
dataStore.typeLeave = "";