Commit 9402de38 by Nattana Chaiyamat

แก้ไข รายงาน Excel portal

parent 11d5447a
......@@ -15,10 +15,10 @@ export class ExcelReportService {
constructor(private http: HttpClient,
) { }
getExcelList(): Observable<TemplateModel[]> {
return this.http.get<TemplateModel[]>(environment.portal + "/template/lists?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47")
return this.http.get<TemplateModel[]>(environment.portal + "/template/lists?companyid=MYSKIL-X")
}
getModuleList(): Observable<ModuleModel[]> {
return this.http.get<ModuleModel[]>(environment.portal + "/template/lists/module?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47")
return this.http.get<ModuleModel[]>(environment.portal + "/template/lists/module?companyid=MYSKIL-X")
}
getExcelPortalList(): Observable<ExcelPortalModel[]> {
return this.http.get<ExcelPortalModel[]>(environment.portal + "/excel-center/content/lists")
......@@ -38,7 +38,7 @@ export class ExcelReportService {
edesc: string,
module: string
}) {
return this.http.post(environment.portal + "/template?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", body)
return this.http.post(environment.portal + "/template?companyid=MYSKIL-X", body)
}
deleteTemplate(body: TemplateModel): Observable<AlertModel> {
let option = {
......@@ -47,10 +47,10 @@ export class ExcelReportService {
}),
body: body
}
return this.http.delete<AlertModel>(environment.portal + "/template?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", option)
return this.http.delete<AlertModel>(environment.portal + "/template?companyid=MYSKIL-X", option)
}
postTemplateFile(body: TemplateFileModel): Observable<AlertModel> {
return this.http.post<AlertModel>(environment.portal + "/template-file?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", body)
return this.http.post<AlertModel>(environment.portal + "/template-file?companyid=MYSKIL-X", body)
}
deleteTemplateFile(body: TemplateFileModel): Observable<AlertModel> {
let option = {
......@@ -59,22 +59,22 @@ export class ExcelReportService {
}),
body: body
}
return this.http.delete<AlertModel>(environment.portal + "/template-file?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", option)
return this.http.delete<AlertModel>(environment.portal + "/template-file?companyid=MYSKIL-X", option)
}
downloadTemplateFile(fileName: string) {
return this.http.get(environment.portal + "/template-file/download/excel/" + fileName + "?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", { responseType: 'blob' })
return this.http.get(environment.portal + "/template-file/download/excel/" + fileName + "?companyid=MYSKIL-X", { responseType: 'blob' })
}
printExcelReport(body: {
fileName: string,
paramObj: string
}) {
return this.http.post(environment.portal + "/template-file/export-to-excel?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", body, { responseType: 'blob' })
return this.http.post(environment.portal + "/template-file/export-to-excel?companyid=MYSKIL-X", body, { responseType: 'blob' })
}
getTemplateFile(templateid: string, filename: string): Observable<AlertModel> {
return this.http.get<AlertModel>(environment.portal + "/template-file/" + templateid + "/" + filename + "?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47",)
return this.http.get<AlertModel>(environment.portal + "/template-file/" + templateid + "/" + filename + "?companyid=MYSKIL-X",)
}
getTemplateFileLists(): Observable<TemplateFileMiniModel[]> {
return this.http.get<TemplateFileMiniModel[]>(environment.portal + "/template-file/menuitem/mini/lists?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47",)
return this.http.get<TemplateFileMiniModel[]>(environment.portal + "/template-file/menuitem/mini/lists?companyid=MYSKIL-X",)
}
}
\ No newline at end of file
......@@ -24,9 +24,11 @@ export class HttpRequestInterceptor {
} else if (req.url.startsWith("./")) {
return next.handle(req);
} else {
const portalUrl = req.url.includes("portal.myhr")
const portalToken = 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoIiwidWlkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0Iiwicm9sZSI6InVzZXIiLCJpc3MiOiJDb21wdXRlciBTY2llbmNlIENvcnBvcmF0aW9uIExpbWl0ZWQiLCJmdWxsTmFtZSI6InRlZXJhZGFjaCBrdWhhdGFuYXNhdGllbiIsIm1lbWJlcklkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0In0.FO7u8g7KfzkmZFTuuniBCEQxduPjcvzMbH7iug3DT90'
let authReq = req;
const fullUrl = req.url.startsWith("http") ? req.url : environment.baseUrl + req.url;
const token = this.tokenService.getToken()
const token = portalUrl ? portalToken : this.tokenService.getToken()
if (token != null && !req.url.includes("/refresh-token")) {
authReq = this.addTokenHeader(req, "Bearer " + token, fullUrl);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment