form หน้ารายละเอียดการลา

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-09 17:20:10 +07:00
parent 853f925d92
commit bfe73c0efc
14 changed files with 1524 additions and 202 deletions

View file

@ -1,53 +1,36 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
/**importType*/
import type { DataRows } from "@/modules/09_leave/interface/response/leave";
// importStroe
/**importStroe*/
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
// importComponets
import { useLeavelistDataStoreTest } from "@/modules/09_leave/stores/ListLeave";
/**importComponets*/
import TableList from "@/modules/09_leave/components/2_Leave/TableList.vue";
import ToolBar from "@/modules/09_leave/components/2_Leave/ToolBar.vue";
const leaveStore = useLeavelistDataStore();
const APIDATA = useLeavelistDataStoreTest();
const { fetchList, clearFilter } = leaveStore;
onMounted(() => {
fecthLeaveList();
});
// API
/**
* เรยกขอมลจาก API
*/
function fecthLeaveList() {
const data = [
{
id: "00000000-0000-0000-0000-000000000001",
leaveType: "leave1",
name: "นายกัณฐิมา กาฬสินธ์ุ",
Date: "2023-11-03",
status: "NEW",
},
{
id: "00000000-0000-0000-0000-000000000002",
leaveType: "leave1",
name: "นายนครชัย วันดี",
Date: "2023-11-01",
status: "APPROVE",
},
{
id: "00000000-0000-0000-0000-000000000003",
leaveType: "leave1",
name: "นายกัณฐิมา กาฬสินธ์ุ",
Date: "2023-11-02",
status: "PENDING",
},
{
id: "00000000-0000-0000-0000-000000000004",
leaveType: "leave2",
name: "นายปิยรมย์ ศิริธาราฟ",
Date: "2023-11-01",
status: "PENDING",
},
];
fetchList(data); // stores
console.log(APIDATA.data);
const data = APIDATA.data;
fetchList(data); /** ส่งข้อมูลไป stores*/
}
// Tab
/** เปลี่ยน TAB*/
function changTab() {
clearFilter();
fecthLeaveList();