From 884db0afd3b8e9f0fb154af7fb964940a8d93363 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 25 Dec 2023 15:45:05 +0700 Subject: [PATCH] =?UTF-8?q?popup=20"=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=AA=E0=B8=96=E0=B8=B2=E0=B8=99=E0=B8=B0=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B9=80=E0=B8=82=E0=B9=89=E0=B8=B2-?= =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09_leave/components/1_Work/DialogEdit.vue | 167 ++++++++++++++++++ .../09_leave/components/1_Work/TableList.vue | 28 ++- 2 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 src/modules/09_leave/components/1_Work/DialogEdit.vue diff --git a/src/modules/09_leave/components/1_Work/DialogEdit.vue b/src/modules/09_leave/components/1_Work/DialogEdit.vue new file mode 100644 index 000000000..308fb3f45 --- /dev/null +++ b/src/modules/09_leave/components/1_Work/DialogEdit.vue @@ -0,0 +1,167 @@ + + + + diff --git a/src/modules/09_leave/components/1_Work/TableList.vue b/src/modules/09_leave/components/1_Work/TableList.vue index 27b8930b1..9c52c2e43 100644 --- a/src/modules/09_leave/components/1_Work/TableList.vue +++ b/src/modules/09_leave/components/1_Work/TableList.vue @@ -6,6 +6,7 @@ import type { QTableProps } from "quasar"; /** importComponents */ import DialogDetail from "@/modules/09_leave/components/1_Work/DialogDetail.vue"; +import DialogEdit from "@/modules/09_leave/components/1_Work/DialogEdit.vue"; /** importStores */ import { useCounterMixin } from "@/stores/mixin"; @@ -45,6 +46,7 @@ const emit = defineEmits(["update:pagination"]); /** ข้อมูล popup */ const modal = ref(false); const dataDetail = ref([]); +const modalEdit = ref(false); /** pagination */ const currentPage = ref(1); @@ -65,6 +67,7 @@ function updateProp(newPagination: any, page: number) { } const typeTab = ref(""); + /** * Function openPopup และแสดงรายละเอียด * @param data ข้อมูลรายละเอียด @@ -75,6 +78,11 @@ function clickDetail(data: any) { dataDetail.value = data; } +function onClickEdit(data: any) { + modalEdit.value = !modalEdit.value; + dataDetail.value = modalEdit.value ? data : []; +} + /** Function ปิด popup */ function closeDetail() { modal.value = false; @@ -93,6 +101,10 @@ function updateRowsPerPagen(newPagination: any) { pagination.value.rowsPerPage = newPagination.rowsPerPage; currentPage.value = 1; } + +onMounted(() => { + typeTab.value = props.tab as string; +}); + +