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)