mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Merge branch 'development' into dev-eromano-bundle
This commit is contained in:
@@ -47,6 +47,9 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges {
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
onEdit = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
onFormValueChanged = new EventEmitter();
|
||||
|
||||
@@ -63,6 +66,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges {
|
||||
private dropDownSub;
|
||||
private reportParamsSub;
|
||||
private paramOpts;
|
||||
private isEditable: boolean = false;
|
||||
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
private analyticsService: AnalyticsService,
|
||||
@@ -210,4 +214,25 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges {
|
||||
this.reportParamsSub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
public editEnable() {
|
||||
this.isEditable = true;
|
||||
}
|
||||
|
||||
public editDisable() {
|
||||
this.isEditable = false;
|
||||
}
|
||||
|
||||
public editTitle() {
|
||||
this.reportParamsSub = this.analyticsService.updateReport(this.reportParameters.id, this.reportParameters.name).subscribe(
|
||||
(res: ReportParametersModel) => {
|
||||
this.editDisable();
|
||||
this.onEdit.emit(this.reportParameters.name);
|
||||
},
|
||||
(err: any) => {
|
||||
console.log(err);
|
||||
this.onError.emit(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user