From 93cf36ad16525e76570950864c8d227d398871c3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 9 Apr 2024 15:11:20 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=AF=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B9=84=E0=B8=94?= =?UTF-8?q?=E0=B9=89=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=97=E0=B8=B8=E0=B8=99?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A8=E0=B8=B6=E0=B8=81=E0=B8=A9?= =?UTF-8?q?=E0=B8=B2/=E0=B8=9D=E0=B8=B6=E0=B8=81=E0=B8=AD=E0=B8=9A?= =?UTF-8?q?=E0=B8=A3=E0=B8=A1=20=3D>=20btn=20updateStatus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/scholarship/DetailView.vue | 459 ++++++++++-------- 1 file changed, 247 insertions(+), 212 deletions(-) diff --git a/src/modules/15_development/components/scholarship/DetailView.vue b/src/modules/15_development/components/scholarship/DetailView.vue index bc500b20c..fcf2317b1 100644 --- a/src/modules/15_development/components/scholarship/DetailView.vue +++ b/src/modules/15_development/components/scholarship/DetailView.vue @@ -34,6 +34,7 @@ const title = ref(route.params.id ? "แก้ไข" : "เพิ่ม const scholarshipId = ref( route.params.id ? route.params.id.toLocaleString() : null ); +const isStatus = ref(); const modalDialogGov = ref(false); const budgetSourceOp = ref([ @@ -226,8 +227,11 @@ function fetchDataDetail(id: string) { }); } +function fetchStatus(id: string) { + isStatus.value = "PENDING"; +} + function onSubmit() { - dialogConfirm($q, async () => { showLoader(); formBody.budgetApprove = @@ -305,14 +309,17 @@ function changeStartDate(type: string) { } } +function onClickUpdateStatus(type: string) { + dialogConfirm($q, () => { + isStatus.value = type; + }); +} + function updateTotalPeriod( startDate: any, endDate: any, toDo: boolean = false ) { - console.log(startDate); - console.log(endDate); - if (!toDo && startDate && endDate) { const start = new Date(startDate); const end = new Date(endDate); @@ -367,22 +374,50 @@ function upDate(data: DataPerson) { } onMounted(() => { - scholarshipId.value && fetchDataDetail(scholarshipId.value); + if (scholarshipId.value) { + fetchDataDetail(scholarshipId.value); + fetchStatus(scholarshipId.value); + } });