From a6018507c9db58f29529da1e07cb34eafa5bf001 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 1 Apr 2026 11:33:33 +0700 Subject: [PATCH 01/94] fix(checkin-report): resolve preview display issue for typeReport 4 --- src/modules/09_leave/views/06_ReportMain.vue | 33 ++++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/modules/09_leave/views/06_ReportMain.vue b/src/modules/09_leave/views/06_ReportMain.vue index b367b6490..797abf014 100644 --- a/src/modules/09_leave/views/06_ReportMain.vue +++ b/src/modules/09_leave/views/06_ReportMain.vue @@ -269,6 +269,7 @@ async function fetchLeaveday( * @param data ข้อมูลบัญชีวันลา */ async function fetchDocumentTemplate(data: any) { + if (typeReport.value === 4) return; await axios .post(`${config.API.reportTemplate}/xlsx`, data, { headers: { @@ -352,7 +353,7 @@ function clearData() { }; } -function onSearch() { +async function onSearch() { isReport.value = false; isLoadPDF.value = true; pdfSrc.value = undefined; @@ -467,6 +468,19 @@ const reportName = () => { return reportNameVal + employeeClassName; }; +async function handleDownload() { + updateLeaveday(); + await fetchLeaveday( + employeeClass.value, + typeReport.value == 3 || typeReport.value == 4 + ? leaveType.value + : yearType.value, + dateStart.value, + dateEnd.value + ); + await genReportXLSX(detailReport.value, `${reportName()}`); +} + onMounted(() => { fetchDataTree(); }); @@ -512,7 +526,11 @@ onMounted(() => { round color="primary" icon="download" - v-if="checkPermission($route)?.attrIsGet && typeReport !== 3" + v-if=" + checkPermission($route)?.attrIsGet && + typeReport !== 3 && + typeReport !== 4 + " > @@ -547,8 +565,11 @@ onMounted(() => { round color="primary" icon="download" - v-if="checkPermission($route)?.attrIsGet && typeReport == 3" - @click="getReport()" + v-if=" + checkPermission($route)?.attrIsGet && + (typeReport == 3 || typeReport == 4) + " + @click="typeReport == 3 ? getReport() : handleDownload()" > @@ -957,7 +978,7 @@ onMounted(() => { {
Date: Wed, 1 Apr 2026 13:40:50 +0700 Subject: [PATCH 02/94] feat(): add handleDelete director meeting --- .../Detail/viewTab2/CardDirector.vue | 43 +++++++++++++++++-- .../components/Detail/viewTab2/CardMeet.vue | 30 +++++++++++++ 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/src/modules/12_evaluatePersonal/components/Detail/viewTab2/CardDirector.vue b/src/modules/12_evaluatePersonal/components/Detail/viewTab2/CardDirector.vue index 5cc54f572..6a0c10c5b 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/viewTab2/CardDirector.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/viewTab2/CardDirector.vue @@ -9,7 +9,7 @@ import config from "@/app.config"; /** importType*/ import type { QTableProps } from "quasar"; -import type { Director } from "@/modules/11_discipline/interface/request/Disciplinary"; +import type { Director } from "@/modules/11_discipline/interface/request/disciplinary"; import type { Directors } from "@/modules/12_evaluatePersonal/interface/response/Main"; /** importComponents*/ @@ -20,7 +20,14 @@ import DialogDuty from "@/modules/12_evaluatePersonal/components/Detail/viewTab2 const $q = useQuasar(); const route = useRoute(); const mixin = useCounterMixin(); -const { showLoader, hideLoader, messageError, dialogConfirm, success } = mixin; +const { + showLoader, + hideLoader, + messageError, + dialogConfirm, + success, + dialogRemove, +} = mixin; const props = defineProps({ data: { @@ -201,6 +208,21 @@ function onEditDuty(data: Director) { modalDuty.value = true; } +function handleDelete(id: string) { + dialogRemove($q, async () => { + showLoader(); + try { + await http.delete(config.API.evaluateDirectorMain() + `/admin/${id}`); + await props.fetchData(); + await success($q, "ลบสำเร็จ"); + } catch (error) { + messageError($q, error); + } finally { + hideLoader(); + } + }); +} + /** * ทำงานเมื่อ props.data มีการเปลี่ยนแปลง */ @@ -268,17 +290,30 @@ watch(