diff --git a/src/modules/02_organization/components/DialogHistoryPos.vue b/src/modules/02_organization/components/DialogHistoryPos.vue index 2acfd5cd7..4b9651bcf 100644 --- a/src/modules/02_organization/components/DialogHistoryPos.vue +++ b/src/modules/02_organization/components/DialogHistoryPos.vue @@ -154,7 +154,7 @@ const baseColumns = ref([ field: "lastUpdatedAt", sortable: false, format(val) { - return date2Thai(val); + return date2Thai(val, true, true); }, headerStyle: "font-size: 14px", style: "font-size: 14px", @@ -265,15 +265,17 @@ watch(
{{ - store.typeOrganizational === "current" || - (store.typeOrganizational === "draft" && - historyType === "OWNER_HISTORY") + historyType === "OWNER_HISTORY" ? props.rowIndex + 1 - : props.rowIndex + 1 == 1 + : props.rowIndex + 1 == 1 && + (store.typeOrganizational === "draft" || + store.typeOrganizational === "old") ? "1 (แบบร่าง)" - : props.rowIndex + 1 == 2 + : props.rowIndex + 1 == 2 && + (store.typeOrganizational === "draft" || + store.typeOrganizational === "old") ? "2 (ปัจจุบัน)" - : props.rowIndex + 1 + : props.rowIndex + 1 }}
diff --git a/src/modules/06_retirement/components/02_resign/ResignByid.vue b/src/modules/06_retirement/components/02_resign/ResignByid.vue index df0a14c49..f29f64217 100644 --- a/src/modules/06_retirement/components/02_resign/ResignByid.vue +++ b/src/modules/06_retirement/components/02_resign/ResignByid.vue @@ -10,6 +10,7 @@ import genReport from "@/plugins/genreport"; import { useCounterMixin } from "@/stores/mixin"; import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow"; import { useRetirementDataStore } from "@/modules/06_retirement/store/Main"; +import { checkPermission } from "@/utils/permissions"; import DialogHeader from "@/components/DialogHeader.vue"; @@ -766,7 +767,13 @@ onMounted(async () => {
ข้อมูลการลาออก
-
+
{
ข้อมูลการลาออก
-
+
{ ผลการพิจารณาของผู้บังคับบัญชา
{ dataDetail.statusMain === 'CANCELING' && props.row.approveStatus == 'PENDING' && props.row.comment == '' && - approveStep === 'st2' + approveStep === 'st2' && + checkPermission($route)?.attrIsUpdate " > {
{ rowsApprover.approvers && rowsApprover.approvers[0]?.profileId == keycloakId && rowsApprover.approvers[0]?.approveStatus == 'PENDING' && - approveStep === 'st3' + approveStep === 'st3' && + checkPermission($route)?.attrIsUpdate " > { { !checkRoutePermisson && (dataDetail.status === 'APPROVE' || dataDetail.status === 'REJECT') && - isStaff + isStaff && + checkPermission($route)?.attrIsUpdate " >
diff --git a/src/modules/09_leave/components/05_Leave/DetailLeaveReject.vue b/src/modules/09_leave/components/05_Leave/DetailLeaveReject.vue index 433a39f6d..6b0e4e44b 100644 --- a/src/modules/09_leave/components/05_Leave/DetailLeaveReject.vue +++ b/src/modules/09_leave/components/05_Leave/DetailLeaveReject.vue @@ -504,9 +504,10 @@ onMounted(async () => { @click=" onClickDownloadFile( formData.id, - 'ยกเลิก' + formData.leaveSubTypeName - ? formData.leaveSubTypeName - : formData.leaveTypeName, + 'ยกเลิก' + + (formData.leaveSubTypeName + ? formData.leaveSubTypeName + : formData.leaveTypeName), typeDocx ) " @@ -522,9 +523,10 @@ onMounted(async () => { @click=" onClickDownloadFile( formData.id, - 'ยกเลิก' + formData.leaveSubTypeName - ? formData.leaveSubTypeName - : formData.leaveTypeName, + 'ยกเลิก' + + (formData.leaveSubTypeName + ? formData.leaveSubTypeName + : formData.leaveTypeName), typePdf ) " diff --git a/src/modules/09_leave/views/06_ReportMain.vue b/src/modules/09_leave/views/06_ReportMain.vue index 2034622be..2f1fca1c3 100644 --- a/src/modules/09_leave/views/06_ReportMain.vue +++ b/src/modules/09_leave/views/06_ReportMain.vue @@ -112,6 +112,7 @@ const nodeId = ref(""); const nodeLevel = ref(0); const node = ref([]); const expanded = ref([]); +const orgTreeDnaId = ref(""); /** ฟังก์ชันเรียกข้อมูลโครงสร้างหน่วยงาน*/ async function fetchDataTree() { @@ -135,6 +136,7 @@ function onSelectedNode(data: any) { nodeId.value = data.orgTreeId; nodeLevel.value = data.orgLevel; expandedModal.value = false; + orgTreeDnaId.value = data.orgTreeDnaId; updateLeaveday(); } @@ -219,6 +221,7 @@ async function fetchLeaveday( startDate: Date, endDate: Date ) { + const nodeIdVal = typeReport.value === 3 ? orgTreeDnaId.value : nodeId.value; const body = { type: year === "FULL" @@ -232,7 +235,7 @@ async function fetchLeaveday( : "WEEKLY", startDate: dateToISO(startDate), endDate: dateToISO(endDate), - nodeId: nodeId.value, + nodeId: nodeIdVal, node: nodeLevel.value, }; @@ -334,6 +337,7 @@ function filterOption(val: string, update: any, typeOp: string) { function clearData() { nodeId.value = ""; nodeLevel.value = 0; + orgTreeDnaId.value = ""; org.value = ""; typeReport.value = null; yearType.value = "FULL"; @@ -410,7 +414,7 @@ function getReport() { : "WEEKLY", startDate: dateToISO(dateStart.value), endDate: dateToISO(dateEnd.value), - nodeId: nodeId.value, + nodeId: orgTreeDnaId.value, node: nodeLevel.value, }; http