From 5b8075048996214890cc5dc4201d918064720465 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 14 Nov 2024 17:39:46 +0700 Subject: [PATCH] =?UTF-8?q?report=20=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 --- src/api/org/api.org.ts | 8 +++++--- src/modules/10_registry/views/main.vue | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/api/org/api.org.ts b/src/api/org/api.org.ts index 0d025f4..5f8c0d9 100644 --- a/src/api/org/api.org.ts +++ b/src/api/org/api.org.ts @@ -3,7 +3,7 @@ import env from "../index"; const metadata = `${env.API_URI}/org/metadata/`; const org = `${env.API_URI}/org`; const profileOrg = `${env.API_URI}/org/profile`; -const report = `${env.API_URI}/org/profile/`; +const report = `${env.API_URI}/org`; const workflow = `${env.API_URI}/org/workflow`; export default { profilePosition: () => `${org}/profile/keycloak/position`, @@ -51,8 +51,10 @@ export default { dataUserOther: `${profileOrg}/other/user`, dataUserOtherByType: (type: string) => `${org}/profile${type}/other/user`, - profileReportId: (profileId: string) => `${report}kk1/${profileId}`, - profileKp7ShortId: (profileId: string) => `${report}kp7-short/${profileId}`, + profileReportId: (profileId: string, type: string) => + `${report}/${type}/kk1/${profileId}`, + profileKp7ShortId: (profileId: string, type: string) => + `${report}/${type}/kp7-short/${profileId}`, /** history */ dataUserInformatioHistory: (type: string) => diff --git a/src/modules/10_registry/views/main.vue b/src/modules/10_registry/views/main.vue index 1ebb704..f3e70c5 100644 --- a/src/modules/10_registry/views/main.vue +++ b/src/modules/10_registry/views/main.vue @@ -42,8 +42,8 @@ async function onClickDownloadKp7(type: string) { showLoader(); const url = type === "FULL" - ? config.API.profileReportId(store.profileId) - : config.API.profileKp7ShortId(store.profileId); + ? config.API.profileReportId(store.profileId, dataStore.officerType == "OFFICER" ? 'profile':'profile-employee') + : config.API.profileKp7ShortId(store.profileId, dataStore.officerType == "OFFICER" ? 'profile':'profile-employee'); const fileName = type === "FULL" ? "ก.พ.7/ก.ก.1" : "ประวัติแบบย่อ"; await http .get(url)