Commit 570eee15 by Nattana Chaiyamat

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

parent 9402de38
...@@ -100,8 +100,6 @@ ...@@ -100,8 +100,6 @@
</button> </button>
</div> </div>
</ng-container> </ng-container>
{{variableSheet.length}}
{{loadingExcel}}
<ng-container *ngIf="variableSheet.length&&loadingExcel"> <ng-container *ngIf="variableSheet.length&&loadingExcel">
<div class="flex justify-center"> <div class="flex justify-center">
<div *ngFor="let item of [1,2,3]" class="ti-spinner w-8 h-8 text-secondary mx-1" role="status" <div *ngFor="let item of [1,2,3]" class="ti-spinner w-8 h-8 text-secondary mx-1" role="status"
......
...@@ -15,10 +15,10 @@ export class ExcelReportService { ...@@ -15,10 +15,10 @@ export class ExcelReportService {
constructor(private http: HttpClient, constructor(private http: HttpClient,
) { } ) { }
getExcelList(): Observable<TemplateModel[]> { getExcelList(): Observable<TemplateModel[]> {
return this.http.get<TemplateModel[]>(environment.portal + "/template/lists?companyid=MYSKIL-X") return this.http.get<TemplateModel[]>(environment.portal + "/template/lists?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47")
} }
getModuleList(): Observable<ModuleModel[]> { getModuleList(): Observable<ModuleModel[]> {
return this.http.get<ModuleModel[]>(environment.portal + "/template/lists/module?companyid=MYSKIL-X") return this.http.get<ModuleModel[]>(environment.portal + "/template/lists/module?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47")
} }
getExcelPortalList(): Observable<ExcelPortalModel[]> { getExcelPortalList(): Observable<ExcelPortalModel[]> {
return this.http.get<ExcelPortalModel[]>(environment.portal + "/excel-center/content/lists") return this.http.get<ExcelPortalModel[]>(environment.portal + "/excel-center/content/lists")
...@@ -38,7 +38,7 @@ export class ExcelReportService { ...@@ -38,7 +38,7 @@ export class ExcelReportService {
edesc: string, edesc: string,
module: string module: string
}) { }) {
return this.http.post(environment.portal + "/template?companyid=MYSKIL-X", body) return this.http.post(environment.portal + "/template?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", body)
} }
deleteTemplate(body: TemplateModel): Observable<AlertModel> { deleteTemplate(body: TemplateModel): Observable<AlertModel> {
let option = { let option = {
...@@ -47,10 +47,10 @@ export class ExcelReportService { ...@@ -47,10 +47,10 @@ export class ExcelReportService {
}), }),
body: body body: body
} }
return this.http.delete<AlertModel>(environment.portal + "/template?companyid=MYSKIL-X", option) return this.http.delete<AlertModel>(environment.portal + "/template?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", option)
} }
postTemplateFile(body: TemplateFileModel): Observable<AlertModel> { postTemplateFile(body: TemplateFileModel): Observable<AlertModel> {
return this.http.post<AlertModel>(environment.portal + "/template-file?companyid=MYSKIL-X", body) return this.http.post<AlertModel>(environment.portal + "/template-file?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", body)
} }
deleteTemplateFile(body: TemplateFileModel): Observable<AlertModel> { deleteTemplateFile(body: TemplateFileModel): Observable<AlertModel> {
let option = { let option = {
...@@ -59,22 +59,22 @@ export class ExcelReportService { ...@@ -59,22 +59,22 @@ export class ExcelReportService {
}), }),
body: body body: body
} }
return this.http.delete<AlertModel>(environment.portal + "/template-file?companyid=MYSKIL-X", option) return this.http.delete<AlertModel>(environment.portal + "/template-file?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", option)
} }
downloadTemplateFile(fileName: string) { downloadTemplateFile(fileName: string) {
return this.http.get(environment.portal + "/template-file/download/excel/" + fileName + "?companyid=MYSKIL-X", { responseType: 'blob' }) return this.http.get(environment.portal + "/template-file/download/excel/" + fileName + "?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", { responseType: 'blob' })
} }
printExcelReport(body: { printExcelReport(body: {
fileName: string, fileName: string,
paramObj: string paramObj: string
}) { }) {
return this.http.post(environment.portal + "/template-file/export-to-excel?companyid=MYSKIL-X", body, { responseType: 'blob' }) return this.http.post(environment.portal + "/template-file/export-to-excel?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", body, { responseType: 'blob' })
} }
getTemplateFile(templateid: string, filename: string): Observable<AlertModel> { getTemplateFile(templateid: string, filename: string): Observable<AlertModel> {
return this.http.get<AlertModel>(environment.portal + "/template-file/" + templateid + "/" + filename + "?companyid=MYSKIL-X",) return this.http.get<AlertModel>(environment.portal + "/template-file/" + templateid + "/" + filename + "?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47",)
} }
getTemplateFileLists(): Observable<TemplateFileMiniModel[]> { getTemplateFileLists(): Observable<TemplateFileMiniModel[]> {
return this.http.get<TemplateFileMiniModel[]>(environment.portal + "/template-file/menuitem/mini/lists?companyid=MYSKIL-X",) return this.http.get<TemplateFileMiniModel[]>(environment.portal + "/template-file/menuitem/mini/lists?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47",)
} }
} }
\ No newline at end of file
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