diff --git a/src/modules/02_organization/components/TreeMain.vue b/src/modules/02_organization/components/TreeMain.vue index c20694cb2..5009b96c7 100644 --- a/src/modules/02_organization/components/TreeMain.vue +++ b/src/modules/02_organization/components/TreeMain.vue @@ -92,12 +92,12 @@ const listAdd = ref([ type: "DETAIL", color: "blue-9", }, - // { - // label: "เผยแพร่", - // icon: "mdi-publish", - // type: "PUBLISH", - // color: "indigo-9", - // }, + { + label: "เผยแพร่", + icon: "mdi-publish", + type: "PUBLISH", + color: "indigo-9", + }, ]); const getMenuItems = computed(() => { @@ -416,7 +416,6 @@ function onPublicOrganization(data: OrgTree) { showLoader(); try { await http.post(config.API.moveDraftToCurrent(orgDnaId)); - await props.fetchDataTree?.(); await success($q, "เผยแพร่โครงสร้างสำเร็จ"); } catch (err) { messageError($q, err); diff --git a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue index fbc6babc0..19d468cec 100644 --- a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue +++ b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue @@ -85,6 +85,8 @@ const formData = reactive({ leaveDays: "", //วันลาที่ยกมา leaveDaysUsed: "", //วันลาที่ใช้ไป leaveCount: "", //ครั้งที่ใช้ไป + beginningLeaveDays: "", //ยักมา (วัน) + beginningLeaveCount: "", // ยกมา (ครั่ง) }); const leaveTypeOptions = ref([]); const leaveTypeOptionsMain = ref([]); @@ -106,6 +108,12 @@ async function onSubmit() { ? Number(formData.leaveDaysUsed) : 0, leaveCount: formData.leaveCount ? Number(formData.leaveCount) : 0, + beginningLeaveDays: formData.beginningLeaveDays + ? Number(formData.beginningLeaveDays) + : 0, + beginningLeaveCount: formData.beginningLeaveCount + ? Number(formData.beginningLeaveCount) + : 0, }) .then(async () => { @@ -159,6 +167,12 @@ async function defineDataLeaveBeginning(data: DataLeaveBeginning) { ? data.leaveDaysUsed.toString() : "0"; formData.leaveCount = data.leaveCount ? data.leaveCount.toString() : "0"; + formData.beginningLeaveDays = data.beginningLeaveDays + ? data.beginningLeaveDays.toString() + : "0"; + formData.beginningLeaveCount = data.beginningLeaveCount + ? data.beginningLeaveCount.toString() + : "0"; } /** @@ -187,6 +201,9 @@ function onClose() { formData.leaveYear = calculateFiscalYear(new Date()); formData.leaveDays = ""; formData.leaveDaysUsed = ""; + formData.leaveCount = ""; + formData.beginningLeaveDays = ""; + formData.beginningLeaveCount = ""; rows.value = []; selected.value = []; pagination.value = { @@ -248,6 +265,7 @@ watch(modal, async (val) => { await Promise.all([ filterLeaveTypeData(), isStatusEdit.value && defineDataLeaveBeginning(rowData.value), + console.log(rowData.value), ]); } finally { hideLoader(); @@ -455,6 +473,8 @@ watch(modal, async (val) => { outlined label="ที่ใช้ไป (วัน)" hide-bottom-space + mask="#" + reverse-fill-mask />
@@ -465,6 +485,34 @@ watch(modal, async (val) => { outlined label="ที่ใช้ไป (ครั้ง)" hide-bottom-space + mask="#" + reverse-fill-mask + /> +
+ +
+ +
+ +
+
diff --git a/src/modules/09_leave/interface/response/leaveHistory.ts b/src/modules/09_leave/interface/response/leaveHistory.ts index 5ff103c2e..78a47dd1e 100644 --- a/src/modules/09_leave/interface/response/leaveHistory.ts +++ b/src/modules/09_leave/interface/response/leaveHistory.ts @@ -28,6 +28,8 @@ interface DataLeaveBeginning { prefix: string; profileId: string; leaveCount: number; + beginningLeaveDays: number; + beginningLeaveCount: number; } export type { DataLeaveType, DataLeaveBeginning }; diff --git a/src/modules/09_leave/views/07_LeaveHistoryMain.vue b/src/modules/09_leave/views/07_LeaveHistoryMain.vue index a20df7288..8fdfcc774 100644 --- a/src/modules/09_leave/views/07_LeaveHistoryMain.vue +++ b/src/modules/09_leave/views/07_LeaveHistoryMain.vue @@ -98,6 +98,24 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "beginningLeaveDays", + align: "left", + label: "ยกมา (วัน)", + sortable: true, + field: "beginningLeaveDays", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "beginningLeaveCount", + align: "left", + label: "ยกมา (ครั้ง)", + sortable: true, + field: "beginningLeaveCount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, ]); const visibleColumns = ref([ "fullName", @@ -106,6 +124,8 @@ const visibleColumns = ref([ "leaveDays", "leaveDaysUsed", "leaveCount", + "beginningLeaveDays", + "beginningLeaveCount", ]); const modalDialogForm = ref(false); //modal Dialog บันทึกข้อมูลการลาย้อนหลัง