From 95b33502de8039c23090adf6ee1ba964b80801f9 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 30 Oct 2024 13:20:53 +0700 Subject: [PATCH 1/3] fixing placement --- .../components/PersonalList/CardPosition.vue | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/modules/05_placement/components/PersonalList/CardPosition.vue b/src/modules/05_placement/components/PersonalList/CardPosition.vue index b8b976c5b..47fadd010 100644 --- a/src/modules/05_placement/components/PersonalList/CardPosition.vue +++ b/src/modules/05_placement/components/PersonalList/CardPosition.vue @@ -260,28 +260,8 @@ onMounted(async () => {
เลือกตำแหน่งเลขที่
-
-
- - แสดงเฉพาะตำแหน่งว่าง - - - แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก - -
-
+ + +
+
+ + แสดงเฉพาะตำแหน่งว่าง + + + แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก + +
From 5706e8616cd8a7445700413a501583965a9357c0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 30 Oct 2024 14:00:23 +0700 Subject: [PATCH 2/3] =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20Promission?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../18_command/components/Main/TableMain.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modules/18_command/components/Main/TableMain.vue b/src/modules/18_command/components/Main/TableMain.vue index a0b61a8fc..e05e976f2 100644 --- a/src/modules/18_command/components/Main/TableMain.vue +++ b/src/modules/18_command/components/Main/TableMain.vue @@ -236,15 +236,18 @@ onMounted(() => { color="secondary" icon="mdi-dots-horizontal-circle-outline" v-if=" - store.tabsMain === 'DRAFT' || - store.tabsMain === 'PENDING' || - store.tabsMain === 'CANCEL' + store.tabsMain === 'DRAFT' || store.tabsMain === 'PENDING' ? checkPermission($route)?.attrIsGet || checkPermission($route)?.attrIsCreate || - checkPermission($route)?.attrIsDelete + checkPermission($route)?.attrIsDelete || + checkPermission($route)?.attrIsUpdate : store.tabsMain === 'WAITING' || store.tabsMain === 'REPORTED' ? checkPermission($route)?.attrIsGet || checkPermission($route)?.attrIsCreate + : store.tabsMain === 'CANCEL' + ? checkPermission($route)?.attrIsGet || + checkPermission($route)?.attrIsCreate || + checkPermission($route)?.attrIsDelete : '' " > @@ -257,7 +260,7 @@ onMounted(() => { store.tabsMain !== 'CANCEL' && store.tabsMain !== 'REPORTED' && checkPermission($route)?.attrIsGet && - checkPermission($route)?.attrIsCreate + checkPermission($route)?.attrIsUpdate " clickable v-close-popup From 8c9441e4ee495f474b76ac487a5d12d1aec542ad Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 30 Oct 2024 14:51:00 +0700 Subject: [PATCH 3/3] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/resign/ResignByid.vue | 36 ++-- .../components/resign/ResignReject.vue | 184 +++--------------- .../06_retirement/components/resign/Table.vue | 94 ++++----- src/modules/06_retirement/store/resignMain.ts | 27 ++- 4 files changed, 104 insertions(+), 237 deletions(-) diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index e23c5efb3..1323059c0 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -7,17 +7,13 @@ import { useQuasar, QForm } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; import genReport from "@/plugins/genreport"; -import { tokenParsed } from "@/plugins/auth"; import { useCounterMixin } from "@/stores/mixin"; - -import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue"; import DialogHeader from "@/components/DialogHeader.vue"; import type { TypeFile, rowFile, FileList, - CheckBoxType, } from "@/modules/06_retirement/interface/response/Main"; import type { QTableProps } from "quasar"; import type { DataProfile } from "@/modules/05_placement/interface/index/Main"; @@ -527,22 +523,6 @@ onMounted(async () => { await Promise.all([fetchData(id.value), fetchFile()]).finally(() => { hideLoader(); }); - - // const user = await tokenParsed(); - // if (user) { - // const commander = await user.role.includes("commander"); - // const oligarch = await user.role.includes("oligarch"); - // const officer = await user.role.includes("officer"); - // if (commander) { - // roleUser.value = "commander"; - // } else if (oligarch) { - // roleUser.value = "oligarch"; - // } else if (officer) { - // roleUser.value = "officer"; - // } else { - // roleUser.value = "admin"; - // } - // } }); @@ -976,7 +956,13 @@ onMounted(async () => { ผลการพิจารณาของผู้บังคับบัญชา
-
+
{ ผลการพิจารณาของผู้มีอำนาจ
-
+
(false); -const personId = ref(""); const roleUser = ref(""); const dataProfile = ref(); const id = ref(route.params.id.toString()); const myForm = ref(null); const edit = ref(false); -const conditions = ref(false); const dataDetail = ref({ datetext: "", activeDate: new Date(), @@ -133,7 +130,7 @@ function diffDate() { async function fetchData(id: string) { showLoader(); await http - .get(config.API.resingByid(id)) + .get(config.API.listResign() + `/cancel/${id}`) .then(async (res) => { const data = await res.data.result; dataProfile.value = data as DataProfile; @@ -173,68 +170,26 @@ function popUp(action: "pass" | "passNot", type: string) { //เงื่อนไขpop up function onSubmit() { - if (actionPass.value) { - confirmpopUp(); - } else { - rejectpopUp(); - } -} - -//pop up ยืนยันการอนุญาต -async function confirmpopUp() { - dialogConfirm( - $q, - async () => { - showLoader(); - const body = { - reason: reasonReign.value, - }; - await http - .put(config.API.resignConfirm(roleUser.value, id.value), body) - .then(async () => { - await fetchData(id.value); - closeModal(); - success($q, "การอนุญาตสำเร็จ"); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); - }, - "ยืนยันการอนุญาต", - "ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?" - ); -} - -//pop up การยับยั้งสำเร็จ -async function rejectpopUp() { - dialogConfirm( - $q, - async () => { - showLoader(); - const body = { - reason: reasonReign.value, - date: dateBreak.value, - }; - await http - .put(config.API.resignReject(roleUser.value, id.value), body) - .then(async () => { - await fetchData(id.value); - closeModal(); - success($q, "การยับยั้งสำเร็จ"); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); - }, - "ยืนยันการยับยั้ง", - "ต้องการยืนยันการยับยั้งนี้หรือไม่ ?" - ); + dialogConfirm($q, async () => { + showLoader(); + const body = { + reason: reasonReign.value, + reject: !actionPass.value, + }; + await http + .put(config.API.resignReject(`${roleUser.value}-cancel`, id.value), body) + .then(async () => { + await fetchData(id.value); + closeModal(); + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); + }); } /** @@ -245,37 +200,6 @@ async function clickCancel() { edit.value = false; myForm.value?.resetValidation(); } -/** - * กดยกเลิก - */ -async function clickCancelConditions() { - await fetchData(id.value); - conditions.value = false; -} - -/** Function บันทึก รายการตรวจสอบเงื่อนไขต่าง ๆ*/ -function onSubmitConditions() { - dialogConfirm($q, () => { - showLoader(); - http - .put(config.API.resignConditions(id.value), { - isNoDebt: isNoDebt.value, - isNoBurden: isNoBurden.value, - isDiscipline: isDiscipline.value, - }) - .then(async () => { - await fetchData(id.value); - success($q, "บันทึกเงื่อนไขต่าง ๆ สำเร็จ"); - conditions.value = false; - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); - }); -} /** Function บันทึก ,แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/ function onSubmitAttached() { @@ -296,7 +220,7 @@ function onSubmitAttached() { formData.append("remarkHorizontal", remarkHorizontal.value); showLoader(); http - .put(config.API.resingByid(id.value), formData) + .put(config.API.listResign() + `/update-cancel/${id.value}`, formData) .then(async () => { await fetchData(id.value); success($q, "บันทึกข้อมูลสำเร็จ"); @@ -332,10 +256,6 @@ function statusOrder(val: boolean) { } } -function updatemodalPersonal(modal: boolean) { - modalPersonal.value = modal; -} - /** Hook */ onMounted(async () => { await fetchData(id.value); @@ -513,7 +433,7 @@ onMounted(async () => {
{{ dataDetail.commanderReject - ? dataDetail.commanderRejectReason + ? dataDetail.commanderApproveReason : dataDetail.commanderApproveReason }}
@@ -529,6 +449,7 @@ onMounted(async () => { ผลการพิจารณาของผู้มีอำนาจ
+
{{ dataDetail.oligarchReject - ? dataDetail.oligarchRejectReason + ? dataDetail.oligarchApproveReason : dataDetail.oligarchApproveReason }}
@@ -606,7 +527,6 @@ onMounted(async () => { แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
-
{ ref="workflowRef" v-model:is-check-data="isCheckData" :id="id" - sys-name="SYS_RETIREMENT" + sys-name="RETIREMENT_CANCEL" />
@@ -844,7 +764,9 @@ onMounted(async () => { @@ -862,48 +784,6 @@ onMounted(async () => { class="inputgreen" />
-
- - - - - -
@@ -915,12 +795,6 @@ onMounted(async () => { - -