mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix types
This commit is contained in:
@@ -67,13 +67,13 @@ export class AnalyticsGeneratorComponent implements OnChanges {
|
||||
|
||||
ngOnChanges() {
|
||||
if (this.reportId && this.reportParamQuery) {
|
||||
this.generateReport(this.reportId, this.reportParamQuery);
|
||||
this.generateReport(`${this.reportId}`, this.reportParamQuery);
|
||||
} else {
|
||||
this.reset();
|
||||
}
|
||||
}
|
||||
|
||||
public generateReport(reportId, reportParamQuery) {
|
||||
public generateReport(reportId: string, reportParamQuery: any) {
|
||||
if (reportParamQuery === undefined || reportParamQuery === null) {
|
||||
reportParamQuery = {};
|
||||
}
|
||||
|
@@ -315,7 +315,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
|
||||
public editTitle() {
|
||||
this.analyticsService
|
||||
.updateReport(this.reportParameters.id, this.reportParameters.name)
|
||||
.updateReport(`${this.reportParameters.id}`, this.reportParameters.name)
|
||||
.subscribe(
|
||||
() => {
|
||||
this.editDisable();
|
||||
|
@@ -54,8 +54,8 @@ export class AnalyticsComponent implements OnChanges {
|
||||
this.analyticsGenerator.reset();
|
||||
}
|
||||
|
||||
public showReport($event) {
|
||||
this.analyticsGenerator.generateReport(this.reportId, $event);
|
||||
public showReport($event: any) {
|
||||
this.analyticsGenerator.generateReport(`${this.reportId}`, $event);
|
||||
}
|
||||
|
||||
public reset() {
|
||||
|
@@ -182,7 +182,7 @@ export class AnalyticsService {
|
||||
);
|
||||
}
|
||||
|
||||
getReportsByParams(reportId: number, paramsQuery: any): Observable<any> {
|
||||
getReportsByParams(reportId: string, paramsQuery: any): Observable<any> {
|
||||
return from(this.apiService.getInstance().activiti.reportApi.getReportsByParams(reportId, paramsQuery))
|
||||
.pipe(
|
||||
map((res: any) => {
|
||||
@@ -217,7 +217,7 @@ export class AnalyticsService {
|
||||
);
|
||||
}
|
||||
|
||||
updateReport(reportId: number, name: string): Observable<any> {
|
||||
updateReport(reportId: string, name: string): Observable<any> {
|
||||
return from(this.apiService.getInstance().activiti.reportApi.updateReport(reportId, name))
|
||||
.pipe(
|
||||
map(() => this.logService.info('upload')),
|
||||
|
Reference in New Issue
Block a user