From de95ae61c0b11024bd4402bc77a86ac508db151b Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 1 May 2026 16:00:08 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9F?= =?UTF-8?q?=E0=B8=AD=E0=B8=A3=E0=B9=8C=E0=B8=A1=E0=B8=AA=E0=B8=B4=E0=B8=97?= =?UTF-8?q?=E0=B8=98=E0=B8=B4=E0=B9=8C=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5?= =?UTF-8?q?=E0=B8=B2=20staff=20=E0=B9=81=E0=B8=A5=E0=B8=B0=20OWNER?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/07_LeaveHistory/DialogForm.vue | 86 +++++++++++-------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue index 93be3fbb0..d235c8c65 100644 --- a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue +++ b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue @@ -10,6 +10,7 @@ import { useCounterMixin } from "@/stores/mixin"; import { useLeaveHistoryDataStore } from "@/modules/09_leave/stores/LeaveHistoryStore"; import { calculateFiscalYear } from "@/utils/function"; import { usePagination } from "@/composables/usePagination"; +import { checkPermission } from "@/utils/permissions"; import type { QTableColumn } from "quasar"; import type { DataOption } from "@/modules/09_leave/interface/index/Main"; @@ -104,20 +105,24 @@ async function onSubmit() { leaveTypeId: formData.leaveTypeId, leaveYear: formData.leaveYear, leaveDays: formData.leaveDays ? Number(formData.leaveDays) : 0, - leaveDaysUsed: formData.leaveDaysUsed - ? Number(formData.leaveDaysUsed) + leaveDaysUsed: + checkPermission(route)?.attrOwnership === "OWNER" + ? formData.leaveDaysUsed + ? Number(formData.leaveDaysUsed) + : 0 + : undefined, + leaveCount: + checkPermission(route)?.attrOwnership === "OWNER" + ? formData.leaveCount + ? Number(formData.leaveCount) + : 0 + : undefined, + beginningLeaveDays: formData.beginningLeaveDays + ? Number(formData.beginningLeaveDays) + : 0, + beginningLeaveCount: formData.beginningLeaveCount + ? Number(formData.beginningLeaveCount) : 0, - leaveCount: formData.leaveCount ? Number(formData.leaveCount) : 0, - beginningLeaveDays: !isStatusEdit.value - ? formData.leaveDaysUsed - ? Number(formData.leaveDaysUsed) - : 0 - : undefined, - beginningLeaveCount: !isStatusEdit.value - ? formData.leaveCount - ? Number(formData.leaveCount) - : 0 - : undefined, }) .then(async () => { @@ -470,30 +475,8 @@ watch(modal, async (val) => { :rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']" /> -
- -
-
- -
- + + +
+ +
+
+ +
From 05afc1fe5bf4a8e753b1febe1fbcc74e94b220ac Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 1 May 2026 16:21:44 +0700 Subject: [PATCH 2/2] refactor(exam): API candidate-exam --- src/api/recruiting/api.period-exam.ts | 4 ++++ src/modules/03_recruiting/components/TableCandidate.vue | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/recruiting/api.period-exam.ts b/src/api/recruiting/api.period-exam.ts index 0df5e58ed..bf777e193 100644 --- a/src/api/recruiting/api.period-exam.ts +++ b/src/api/recruiting/api.period-exam.ts @@ -96,4 +96,8 @@ export default { applicationFormPDF: (candidateId: string) => `${env.API_URI}/placement/candidate/pdf/${candidateId}`, + + downloadCandidateExam: (id: string) => + `${periodExam}download/candidate-exam/${id}`, + downloadPassExam: (id: string) => `${periodExam}download/pass-exam/${id}`, }; diff --git a/src/modules/03_recruiting/components/TableCandidate.vue b/src/modules/03_recruiting/components/TableCandidate.vue index 883d9257c..7a832784f 100644 --- a/src/modules/03_recruiting/components/TableCandidate.vue +++ b/src/modules/03_recruiting/components/TableCandidate.vue @@ -365,7 +365,7 @@ async function downloadFileDashboard() { async function clickPassExam() { showLoader(); await http - .get(config.API.exportExamPassExamList(examId.value)) + .get(config.API.downloadPassExam(examId.value)) .then(async (res) => { const data = res.data.result; data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`; @@ -382,7 +382,7 @@ async function clickPassExam() { async function clickCandidateList() { showLoader(); await http - .get(config.API.exportExamCandidateList(examId.value)) + .get(config.API.downloadCandidateExam(examId.value)) .then(async (res) => { const data = res.data.result; data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;