From d17ba210ba67476dbea24cdf6c2180e6cbc12759 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 28 Jun 2024 12:06:00 +0700 Subject: [PATCH 1/4] =?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=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3/=E0=B8=AB=E0=B8=A5=E0=B8=B1=E0=B8=81?= =?UTF-8?q?=E0=B8=AA=E0=B8=B9=E0=B8=95=E0=B8=A3=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B8=9D=E0=B8=B6=E0=B8=81=E0=B8=AD=E0=B8=9A=E0=B8=A3=E0=B8=A1?= =?UTF-8?q?=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=A7?= =?UTF-8?q?=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B8=82=E0=B8=AD=E0=B8=87?= =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=B8=E0=B8=87=E0=B9=80=E0=B8=97=E0=B8=9E?= =?UTF-8?q?=E0=B8=A1=E0=B8=AB=E0=B8=B2=E0=B8=99=E0=B8=84=E0=B8=A3=E0=B9=80?= =?UTF-8?q?=E0=B8=9B=E0=B9=87=E0=B8=99=E0=B8=9C=E0=B8=B9=E0=B9=89=E0=B8=88?= =?UTF-8?q?=E0=B8=B1=E0=B8=94=20=3D>=20fix=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/15_development/views/MainPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/15_development/views/MainPage.vue b/src/modules/15_development/views/MainPage.vue index b286dc931..ef0f52f6c 100644 --- a/src/modules/15_development/views/MainPage.vue +++ b/src/modules/15_development/views/MainPage.vue @@ -219,6 +219,7 @@ function fetchTree(id: string) { .then((res) => { const data = res.data.result; node.value = data; + fetchListProject(); }) .catch((err) => { messageError($q, err); @@ -267,7 +268,6 @@ watch( /** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */ onMounted(() => { fetchActive(); - fetchListProject(); }); From f46ef6bd8e1ddae3c37b6a57135fee335923d2f4 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 28 Jun 2024 13:06:00 +0700 Subject: [PATCH 2/4] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20query=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/MainLayout.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 99d6962fd..88e7fd992 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -477,14 +477,17 @@ watch( const handleButtonClick = () => { const currentPath = route.name; - // const popupPath = - // config.manualConfig[currentPath as keyof typeof config.manualConfig]; - const popupPath = config.generatePopupPath(currentPath); - if (popupPath) { - // console.log(currentPath); - window.open(popupPath); + const queryParams = { role: "officer" }; // Replace with your query parameters + const queryString = new URLSearchParams(queryParams).toString(); + + // Assuming config.generatePopupPath() returns a base URL + const popupBasePath = config.generatePopupPath(currentPath); + + if (popupBasePath) { + const popupPath = `${popupBasePath}?${queryString}`; + window.open(popupPath, "_blank"); // Opens in a new tab/window } else { - console.log("no manual in this page ", currentPath); + console.log("No manual available for this page:", currentPath); } }; From 1a54a07742f3bcfba67ce150a0c90853680a73af Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 28 Jun 2024 13:29:50 +0700 Subject: [PATCH 3/4] =?UTF-8?q?=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=8A?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=82=E0=B9=89=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=AA=E0=B8=B2?= =?UTF-8?q?=E0=B8=A1=E0=B8=B1=E0=B8=8D=E0=B8=AF=20=E0=B8=97=E0=B8=B5?= =?UTF-8?q?=E0=B9=88=E0=B8=A1=E0=B8=B5=E0=B8=AA=E0=B8=B4=E0=B8=97=E0=B8=98?= =?UTF-8?q?=E0=B8=B4=E0=B9=8C=E0=B8=A2=E0=B8=B7=E0=B9=88=E0=B8=99=E0=B8=82?= =?UTF-8?q?=E0=B8=AD=E0=B8=9E=E0=B8=A3=E0=B8=B0=E0=B8=A3=E0=B8=B2=E0=B8=8A?= =?UTF-8?q?=E0=B8=97=E0=B8=B2=E0=B8=99=E0=B9=80=E0=B8=84=E0=B8=A3=E0=B8=B7?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=AD?= =?UTF-8?q?=E0=B8=B4=E0=B8=AA=E0=B8=A3=E0=B8=B4=E0=B8=A2=E0=B8=B2=E0=B8=A0?= =?UTF-8?q?=E0=B8=A3=E0=B8=93=E0=B9=8C=20=3D>=20=E0=B8=9B=E0=B8=A3?= =?UTF-8?q?=E0=B8=B1=E0=B8=9A=20load?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/2_Manage/listManage.vue | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/modules/07_insignia/components/2_Manage/listManage.vue b/src/modules/07_insignia/components/2_Manage/listManage.vue index 55d2eec35..13a9adb96 100644 --- a/src/modules/07_insignia/components/2_Manage/listManage.vue +++ b/src/modules/07_insignia/components/2_Manage/listManage.vue @@ -42,7 +42,7 @@ const modalPopupBackToEdit = ref(false); //model แก้ไข /** function เรียกรอบการเสนอขอพระราชทานเครื่อง*/ async function fecthlistRound() { - showLoader(); + // showLoader(); await http .get(config.API.listRoundInsignia()) .then(async (res: any) => { @@ -68,15 +68,12 @@ async function fecthlistRound() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); + // hideLoader(); }); } /** function เรียกดู Stat ของรอบการเสนอขอพระราชทานเครื่อง*/ const fecthStat = async (id: string) => { - showLoader(); await http .get(config.API.insigniaDashboard(id)) .then((res) => { @@ -84,9 +81,6 @@ const fecthStat = async (id: string) => { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); }; @@ -133,14 +127,10 @@ function fetchListOrg(id: string) { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { hideLoader(); }); } - - /**function เรียกประเภทเครื่องราช*/ async function fecthInsignia() { await http @@ -208,7 +198,7 @@ async function fecthInsigniaByOc( } }) .catch((err) => { - // messageError($q, err); + messageError($q, err); }) .finally(() => { hideLoader(); From f0c0efa8c490a2678219ebca7edf0654ad56a6a1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 28 Jun 2024 13:31:30 +0700 Subject: [PATCH 4/4] fix bug --- src/modules/07_insignia/components/2_Manage/listManage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/07_insignia/components/2_Manage/listManage.vue b/src/modules/07_insignia/components/2_Manage/listManage.vue index 13a9adb96..f20488a9f 100644 --- a/src/modules/07_insignia/components/2_Manage/listManage.vue +++ b/src/modules/07_insignia/components/2_Manage/listManage.vue @@ -198,7 +198,7 @@ async function fecthInsigniaByOc( } }) .catch((err) => { - messageError($q, err); + // messageError($q, err); }) .finally(() => { hideLoader(); @@ -225,8 +225,8 @@ async function sendToDirector() { messageError($q, err); }) .finally(async () => { - await hideLoader(); await fecthStat(round.value); + await hideLoader(); }); }); }