From 3fedf44f69f7abb708ae135875299230572f6ab2 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 15 Nov 2024 10:15:20 +0700 Subject: [PATCH 1/9] change sys key --- src/modules/06_retirement/router.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/06_retirement/router.ts b/src/modules/06_retirement/router.ts index a709c33ee..ba71afaf6 100644 --- a/src/modules/06_retirement/router.ts +++ b/src/modules/06_retirement/router.ts @@ -141,7 +141,7 @@ export default [ component: resign_EMP, meta: { Auth: true, - Key: "SYS_RETIREMENT_EMP", + Key: "SYS_RESIGN_EMP", Role: "STAFF", }, }, @@ -172,7 +172,7 @@ export default [ component: resignByidEMP, meta: { Auth: true, - Key: "SYS_RETIREMENT_EMP", + Key: "SYS_RESIGN_EMP", Role: "STAFF", }, }, @@ -182,7 +182,7 @@ export default [ component: resignByidEMP, meta: { Auth: true, - Key: "SYS_RETIREMENT_EMP", + Key: "SYS_RESIGN_EMP", Role: "STAFF", }, }, @@ -214,7 +214,7 @@ export default [ component: resignRejectEMP, meta: { Auth: true, - Key: "SYS_RETIREMENT_EMP", + Key: "SYS_RESIGN_EMP", Role: "STAFF", }, }, @@ -224,7 +224,7 @@ export default [ component: resignRejectEMP, meta: { Auth: true, - Key: "SYS_RETIREMENT_EMP", + Key: "SYS_RESIGN_EMP", Role: "STAFF", }, }, From 33b3b76786796f94e791ae7935a9793d5f63ab5a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 15 Nov 2024 10:21:57 +0700 Subject: [PATCH 2/9] =?UTF-8?q?=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=88?= =?UTF-8?q?=E0=B8=B3=20=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=AD=E0=B8=99?= =?UTF-8?q?=E0=B8=B8=E0=B8=A1=E0=B8=B1=E0=B8=95=E0=B8=B4=20/=20=E0=B9=81?= =?UTF-8?q?=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82=20=3D=3D>=20=E0=B8=A2?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=99=E0=B8=82=E0=B8=AD=E0=B9=81=E0=B8=81?= =?UTF-8?q?=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/requestEdit/Page01_Detail.vue | 60 +++++++++++++++---- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue index ca7a51a0e..9145b22d0 100644 --- a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue +++ b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue @@ -1,5 +1,5 @@ @@ -261,8 +276,14 @@ onMounted(async () => { { { {
บันทึก Date: Fri, 15 Nov 2024 10:24:53 +0700 Subject: [PATCH 3/9] fix key sys --- src/components/Workflow/Main.vue | 2 +- .../06_retirement/components/resign/ResignByid.vue | 2 +- .../06_retirement/components/resignEMP/ResignByid.vue | 2 +- src/modules/06_retirement/router.ts | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index 6dd412840..a9635abc5 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -53,7 +53,7 @@ const typeSelectPerson = ref(""); //รายการระบบที่ต้องการ disable step 3 หรือรองสุดท้าย const displayArray = [ "REGISTRY_PROFILE", - "SYS_RETIREMENT", + "SYS_RESIGN", "SYS_LEAVE_LIST", ]; diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 600de89b2..fb9e170f3 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -1335,7 +1335,7 @@ onMounted(async () => { ref="workflowRef" v-model:is-check-data="isCheckData" :id="id" - sys-name="SYS_RETIREMENT" + sys-name="SYS_RESIGN" />
diff --git a/src/modules/06_retirement/components/resignEMP/ResignByid.vue b/src/modules/06_retirement/components/resignEMP/ResignByid.vue index e1073f294..6df24ab1a 100644 --- a/src/modules/06_retirement/components/resignEMP/ResignByid.vue +++ b/src/modules/06_retirement/components/resignEMP/ResignByid.vue @@ -1331,7 +1331,7 @@ onMounted(async () => { ref="workflowRef" v-model:is-check-data="isCheckData" :id="id" - sys-name="SYS_RETIREMENT" + sys-name="SYS_RESIGN" /> --> diff --git a/src/modules/06_retirement/router.ts b/src/modules/06_retirement/router.ts index ba71afaf6..05a8c0926 100644 --- a/src/modules/06_retirement/router.ts +++ b/src/modules/06_retirement/router.ts @@ -50,7 +50,7 @@ export default [ component: Main, meta: { Auth: true, - Key: "SYS_RETIREMENT", + Key: "SYS_RESIGN", Role: "STAFF", }, }, @@ -60,7 +60,7 @@ export default [ component: Listretirement, meta: { Auth: true, - Key: "SYS_RETIREMENT", + Key: "SYS_RESIGN", Role: "STAFF", }, }, @@ -70,7 +70,7 @@ export default [ component: ListretirementDetail, meta: { Auth: true, - Key: "SYS_RETIREMENT", + Key: "SYS_RESIGN", Role: "STAFF", }, }, @@ -80,7 +80,7 @@ export default [ component: Listretirement, meta: { Auth: true, - Key: "SYS_RETIREMENT", + Key: "SYS_RESIGN", Role: "STAFF", }, }, From 0825033b90137af71e983b92213429a9b399925a Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 15 Nov 2024 10:44:05 +0700 Subject: [PATCH 4/9] add leave employee perm --- src/components/Workflow/Main.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index a9635abc5..9ec341255 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -55,6 +55,7 @@ const displayArray = [ "REGISTRY_PROFILE", "SYS_RESIGN", "SYS_LEAVE_LIST", + "SYS_LEAVE_EMP", ]; async function fetchCheckState() { From d9333c2504213fcb989421e57a4dc0ae98c040e8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 15 Nov 2024 11:38:24 +0700 Subject: [PATCH 5/9] =?UTF-8?q?=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=88?= =?UTF-8?q?=E0=B8=B3=20=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=AD=E0=B8=99?= =?UTF-8?q?=E0=B8=B8=E0=B8=A1=E0=B8=B1=E0=B8=95=E0=B8=B4=20/=20=E0=B9=81?= =?UTF-8?q?=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82=20=3D>=20=E0=B8=A5?= =?UTF-8?q?=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81=20=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B9=80=E0=B8=A5=E0=B8=B4=E0=B8=81=E0=B8=A5=E0=B8=B2=E0=B8=AD?= =?UTF-8?q?=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 | 41 +++++++++-- .../components/resignEMP/ResignByid.vue | 69 ++++++++++++++----- .../components/resignEMP/ResignReject.vue | 34 ++++++--- 3 files changed, 111 insertions(+), 33 deletions(-) diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index fb9e170f3..61bc272cc 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -70,6 +70,8 @@ const dataDetail = ref({ status: "", statustext: "", fullname: "", + statusMain: "", + cancelReason: "", }); const workflowRef = ref(null); @@ -628,6 +630,18 @@ onMounted(async () => { + +
+
+
เหตุผลการขอยกเลิก
+
+ {{ dataDetail.cancelReason }} +
+
+
@@ -744,7 +758,11 @@ onMounted(async () => {
{
{ { class="q-gutter-x-sm" v-if=" workflowRef?.permission.isUpdate && - dataDetail.commanderReject === null + dataDetail.commanderReject === null && + dataDetail.statusMain !== 'CANCEL' " > { class="q-gutter-x-sm" v-if=" workflowRef?.permission.isUpdate && - dataDetail.oligarchReject === null + dataDetail.oligarchReject === null && + dataDetail.statusMain !== 'CANCEL' " > {
-
+
({ status: "", statustext: "", fullname: "", + statusMain: "", + cancelReason: "", }); const workflowRef = ref(null); @@ -516,10 +518,29 @@ function removeFile(fileName: string) { }); } +const isDirector = ref(false); +const isStaff = ref(false); + +function fetchCheckIsofficer() { + http + .get(config.API.workflowKeycloakSystem("SYS_RESIGN_EMP")) + .then((res) => { + isStaff.value = res.data.result.isStaff; + isDirector.value = res.data.result.isDirector; + }) + .catch((err) => { + messageError($q, err); + }); +} + /** Hook */ onMounted(async () => { showLoader(); - await Promise.all([fetchData(id.value), fetchFile()]).finally(() => { + await Promise.all([ + fetchData(id.value), + fetchFile(), + fetchCheckIsofficer(), + ]).finally(() => { hideLoader(); }); }); @@ -628,6 +649,18 @@ onMounted(async () => {
+ +
+
+
เหตุผลการขอยกเลิก
+
+ {{ dataDetail.cancelReason }} +
+
+
@@ -742,8 +775,14 @@ onMounted(async () => { เงื่อนไขต่าง ๆ - -
+ +
{
- { {
{
{ แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
- -
+
{ await fetchData(id.value); closeModal(); @@ -255,9 +258,24 @@ function statusOrder(val: boolean) { } } +const isDirector = ref(false); +const isStaff = ref(false); + +function fetchCheckIsofficer() { + http + .get(config.API.workflowKeycloakSystem("RETIREMENT_CANCEL_EMP")) + .then((res) => { + isStaff.value = res.data.result.isStaff; + isDirector.value = res.data.result.isDirector; + }) + .catch((err) => { + messageError($q, err); + }); +} + /** Hook */ onMounted(async () => { - await fetchData(id.value); + await Promise.all([fetchData(id.value), fetchCheckIsofficer()]); }); @@ -378,10 +396,7 @@ onMounted(async () => {
{
{
-
+
Date: Fri, 15 Nov 2024 11:49:43 +0700 Subject: [PATCH 6/9] =?UTF-8?q?workflow=20=3D>=20=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=9A=E0=B8=9A=E0=B8=A5=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09_leave/components/2_Leave/DetailLeave.vue | 15 +++++++++++++-- .../components/2_Leave/DetailLeaveReject.vue | 14 ++++++++++++-- src/modules/09_leave/interface/request/leave.ts | 1 + 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/modules/09_leave/components/2_Leave/DetailLeave.vue b/src/modules/09_leave/components/2_Leave/DetailLeave.vue index 6d7d0cc28..3b1ddf7a9 100644 --- a/src/modules/09_leave/components/2_Leave/DetailLeave.vue +++ b/src/modules/09_leave/components/2_Leave/DetailLeave.vue @@ -121,13 +121,17 @@ const formData = reactive({ approveStep: "", dear: "", leaveRange: "", + profileType: "", }); +const isLoadData = ref(false); + /** * Function fetch รายละเอียดของข้อมูล * @param paramsId รับ ID จาก paramID */ async function fetchDetailLeave(paramsId: string) { + isLoadData.value = false; showLoader(); await http .get(config.API.leaveListById(paramsId)) @@ -264,6 +268,9 @@ async function fetchDetailLeave(paramsId: string) { : "-"; formData.approveStep = data.approveStep ? data.approveStep : "-"; formData.dear = data.dear ? data.dear : "-"; + formData.profileType = data.profileType; + + isLoadData.value = true; /** ส่งประเภทของการลาไป Function เช็คประเภทการลา*/ await fectOptionType(); @@ -802,12 +809,16 @@ onMounted(async () => {
-
+
diff --git a/src/modules/09_leave/components/2_Leave/DetailLeaveReject.vue b/src/modules/09_leave/components/2_Leave/DetailLeaveReject.vue index 68adf2d30..aad0434ea 100644 --- a/src/modules/09_leave/components/2_Leave/DetailLeaveReject.vue +++ b/src/modules/09_leave/components/2_Leave/DetailLeaveReject.vue @@ -147,8 +147,11 @@ const formData = reactive({ coupleDaySumTotalHistory: "", //ประวัติ ในกรณีลาติดต่อกับครั้งก่อน รวมทั้งนี้ด้วย เป็นเวลา กี่ปี กี่เดือน กี่วัน (ลาติดตามคู่สมรส) approveStep: "", dear: "", + profileType: "", }); +const isLoadData = ref(false); + onMounted(async () => { if (paramsId) { showLoader(); @@ -192,6 +195,7 @@ async function fetchDetailDeleteLeave(paramsId: string) { } async function fetchDetailLeave(paramsId: string) { + isLoadData.value = false; await http .get(config.API.leaveListById(paramsId)) .then(async (res) => { @@ -275,6 +279,8 @@ async function fetchDetailLeave(paramsId: string) { formData.coupleDaySumTotalHistory = data.coupleDaySumTotalHistory; formData.approveStep = data.approveStep; formData.dear = data.dear ? data.dear : "-"; + formData.profileType = data.profileType; + isLoadData.value = true; await fectOptionType(); }) .catch((err) => { @@ -708,11 +714,15 @@ async function onClickDownloadFile(id: string, fileName: string, type: string) {
-
+
diff --git a/src/modules/09_leave/interface/request/leave.ts b/src/modules/09_leave/interface/request/leave.ts index b59049338..78c464741 100644 --- a/src/modules/09_leave/interface/request/leave.ts +++ b/src/modules/09_leave/interface/request/leave.ts @@ -90,6 +90,7 @@ interface FremData { approveStep: string; dear: string; leaveRange?: string; + profileType: string; } export type { ListsData, FremData, QuerySting, DateFilter }; From 4d66ed89d6bfc11e4596ba9dffc961c207b83ab3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 15 Nov 2024 15:15:12 +0700 Subject: [PATCH 7/9] =?UTF-8?q?fix=20status=20=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=A5=E0=B8=B0=E0=B9=80=E0=B8=AD=E0=B8=B5=E0=B8=A2=E0=B8=94?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD?= =?UTF-8?q?=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/resign/ResignByid.vue | 13 +++++---- .../resignEMP/DialogSendToCommand.vue | 2 +- .../components/resignEMP/ResignByid.vue | 27 ++++++++++++++----- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 61bc272cc..835b9bc28 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -761,7 +761,7 @@ onMounted(async () => { v-if=" !checkRoutePermisson && workflowRef?.permission.isUpdate && - dataDetail.statusMain !== 'CANCEL' + dataDetail.statusMain === 'WAITTING' " >
@@ -839,7 +839,7 @@ onMounted(async () => { v-if=" !checkRoutePermisson && workflowRef?.permission.isUpdate && - dataDetail.statusMain !== 'CANCEL' + dataDetail.statusMain === 'WAITTING' " class="col-12" for="#evidenceFiles" @@ -895,9 +895,8 @@ onMounted(async () => {
{ v-if=" workflowRef?.permission.isUpdate && dataDetail.commanderReject === null && - dataDetail.statusMain !== 'CANCEL' + dataDetail.statusMain === 'WAITTING' " > { v-if=" workflowRef?.permission.isUpdate && dataDetail.oligarchReject === null && - dataDetail.statusMain !== 'CANCEL' + dataDetail.statusMain === 'WAITTING' " > { v-if=" !checkRoutePermisson && workflowRef?.permission.isUpdate && - dataDetail.statusMain !== 'CANCEL' + dataDetail.statusMain === 'WAITTING' " >
diff --git a/src/modules/06_retirement/components/resignEMP/DialogSendToCommand.vue b/src/modules/06_retirement/components/resignEMP/DialogSendToCommand.vue index a8d5658ec..b459eaec1 100644 --- a/src/modules/06_retirement/components/resignEMP/DialogSendToCommand.vue +++ b/src/modules/06_retirement/components/resignEMP/DialogSendToCommand.vue @@ -282,7 +282,7 @@ watchEffect(() => { diff --git a/src/modules/06_retirement/components/resignEMP/ResignByid.vue b/src/modules/06_retirement/components/resignEMP/ResignByid.vue index 2694f06a1..30bb41fa2 100644 --- a/src/modules/06_retirement/components/resignEMP/ResignByid.vue +++ b/src/modules/06_retirement/components/resignEMP/ResignByid.vue @@ -780,7 +780,7 @@ onMounted(async () => { v-if=" !checkRoutePermisson && isStaff && - dataDetail.statusMain !== 'CANCEL' + dataDetail.statusMain === 'WAITTING' " >
@@ -858,7 +858,7 @@ onMounted(async () => { v-if=" !checkRoutePermisson && isStaff && - dataDetail.statusMain !== 'CANCEL' + dataDetail.statusMain === 'WAITTING' " class="col-12" for="#evidenceFiles" @@ -914,10 +914,9 @@ onMounted(async () => {
{
{
{ แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
-
+
Date: Fri, 15 Nov 2024 15:53:25 +0700 Subject: [PATCH 8/9] fixing create structure --- src/modules/02_organization/views/main.vue | 8 +++++++- src/modules/05_placement/components/Other/OtherDetail.vue | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/02_organization/views/main.vue b/src/modules/02_organization/views/main.vue index c786c035b..d9b7d0dd8 100644 --- a/src/modules/02_organization/views/main.vue +++ b/src/modules/02_organization/views/main.vue @@ -56,7 +56,13 @@ async function fetchOrganizationActive() { const data = await res.data.result; if (data) { await store.fetchDataActive(data); - await fetchCheckIslock(data.draftId); + // ต้องมี id ของแบบร่างถึงจะเช็ค isLock + if (data.draftId) { + await fetchCheckIslock(data.draftId); + } else { + store.isLosck = false; + } + if (data.activeName === null && data.draftName === null) { isStatusData.value = false; } else { diff --git a/src/modules/05_placement/components/Other/OtherDetail.vue b/src/modules/05_placement/components/Other/OtherDetail.vue index af9a9ed34..eff3b1de1 100644 --- a/src/modules/05_placement/components/Other/OtherDetail.vue +++ b/src/modules/05_placement/components/Other/OtherDetail.vue @@ -351,9 +351,9 @@ onMounted(async () => { :readonly="!edit" :borderless="!edit" :model-value="date !== null ? date2Thai(date) : null" - :rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" + :rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วันที่'}`]" hide-bottom-space - :label="`${'ตั้งแต่วัน'}`" + :label="`${'ตั้งแต่วันที่'}`" >