From 6fab70b99b755d8fd5d3e0c67c702e403a634906 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 14 Jul 2023 11:36:59 +0700 Subject: [PATCH 1/3] =?UTF-8?q?filter=20=E0=B8=95=E0=B8=B3=E0=B9=81?= =?UTF-8?q?=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87=E0=B8=A7=E0=B9=88=E0=B8=B2?= =?UTF-8?q?=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 1 + .../components/PersonalList/OrgTree.vue | 40 +++++++++++++++++-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index bf56f79fb..292285657 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -40,6 +40,7 @@ const config = ref({ API_URI_PROFILE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, API_CANDIDATE_URI: `${window.location.protocol}//${window.location.host}/api/v1`, API_REPORT_URI: `${window.location.protocol}//${window.location.host}/api/v1`, + API_PLACEMENT_URI: `${window.location.protocol}//${window.location.host}/api/v1`, API_URI_ORG_TREE: "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230707_115124.json", MEET_URI: "meet.frappet.com", diff --git a/src/modules/05_placement/components/PersonalList/OrgTree.vue b/src/modules/05_placement/components/PersonalList/OrgTree.vue index 994f207f7..62a7439cb 100644 --- a/src/modules/05_placement/components/PersonalList/OrgTree.vue +++ b/src/modules/05_placement/components/PersonalList/OrgTree.vue @@ -17,6 +17,7 @@ const noData = ref("ไม่พบข้อมูลผังโคร const checkValidate = ref(false); const myFormPosition = ref(); const selected = ref(""); +const selectedFile = ref(""); // Set form field let dataForm = reactive({ @@ -33,18 +34,37 @@ let dataForm = reactive({ positionSalaryAmount: null, }); -onMounted(() => { - loadTreeData(); - fetchplacementPosition(); +onMounted(async () => { + await fetchPublishFile(); + await loadTreeData(); + await fetchplacementPosition(); }); +const fetchPublishFile = async () => { + await http + .get(config.API.getPublishFileHistory) + .then((res) => { + let data = res.data.result; + selectedFile.value = data[0].fileName; + }) + .catch((e) => { + messageError($q, e); + }) + .finally(async () => { + hideLoader(); + }); +}; // โหลดข้อมูลโครงสร้างจาก json const treeData = ref>([]); const loadTreeData = async () => { await http - .get(config.API.orgTree) + .get(`${config.s3ClusterUrl}${selectedFile.value}`) .then((res: any) => { treeData.value = res.data; + + // Filter objects with "name" null + const filteredData = res.data.filter(filterByPersonIdNull); + treeData.value = filteredData; }) .catch((e: any) => { messageError($q, e); @@ -53,6 +73,18 @@ const loadTreeData = async () => { hideLoader(); }); }; + +function filterByPersonIdNull(obj: any) { + if (obj.name === null) { + return true; + } + if (obj.children && obj.children.length > 0) { + obj.children = obj.children.filter(filterByPersonIdNull); + return obj.children.length > 0; + } + return false; +} + // โหลด position const placementPosition = ref([]); const fetchplacementPosition = async () => { From 02579298161b7e6866af97b0ff8a365c6a44b71b Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 14 Jul 2023 13:13:01 +0700 Subject: [PATCH 2/3] =?UTF-8?q?Ui=20=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A8=E0=B9=80=E0=B8=81=E0=B8=A9=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=93=E0=B8=AD=E0=B8=B2=E0=B8=A2=E0=B8=B8=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/06_retirement/views/Main.vue | 421 ++++++++++++++++++++++- 1 file changed, 415 insertions(+), 6 deletions(-) diff --git a/src/modules/06_retirement/views/Main.vue b/src/modules/06_retirement/views/Main.vue index 7ae53f4ff..5b6cd79c2 100644 --- a/src/modules/06_retirement/views/Main.vue +++ b/src/modules/06_retirement/views/Main.vue @@ -1,10 +1,419 @@ - - - + + + From 6a4218f86e970be18de57e92c00e4bfddb113fab Mon Sep 17 00:00:00 2001 From: Tanyalak Date: Fri, 14 Jul 2023 13:22:49 +0700 Subject: [PATCH 3/3] edit css drawer --- src/views/MainLayout.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 270be3495..76c07c0ea 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -727,7 +727,7 @@ if (keycloak.tokenParsed != null) { font-size="20px" /> - {{ menuItem.label }} + {{ menuItem.label }} @@ -751,7 +751,7 @@ if (keycloak.tokenParsed != null) { :to="{ name: `${subMenu2.path}` }" > - {{ subMenu2.label }} + {{ subMenu2.label }} @@ -781,7 +781,7 @@ if (keycloak.tokenParsed != null) { :to="{ name: `${subMenu.path}` }" > - {{ subMenu.label }} + {{ subMenu.label }} @@ -930,6 +930,7 @@ if (keycloak.tokenParsed != null) { .menuSub .q-item { border-radius: 0 100px 100px 0; margin-right: 2%; + font-weight: 500 ; } .expan2 .q-item { padding-left: 10%; @@ -937,6 +938,9 @@ if (keycloak.tokenParsed != null) { /* .menuSubAct { background: #1e2529d9; } */ +.font-400{ + font-weight: 400 !important; +} .expan2 .menuSubHover { padding-left: 30%; border-radius: 20px;