mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#1174 Refresh the report list after edit report title
This commit is contained in:
@@ -57,13 +57,21 @@ export class AnalyticsReportListComponent implements OnInit {
|
||||
this.reports.push(report);
|
||||
});
|
||||
|
||||
this.getReportListByAppId();
|
||||
this.getReportList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the report list by app id
|
||||
* Reload the component
|
||||
*/
|
||||
getReportListByAppId() {
|
||||
reload() {
|
||||
this.reset();
|
||||
this.getReportList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the report list
|
||||
*/
|
||||
getReportList() {
|
||||
this.analyticsService.getReportList().subscribe(
|
||||
(res: ReportParametersModel[]) => {
|
||||
if (res && res.length === 0) {
|
||||
@@ -108,6 +116,15 @@ export class AnalyticsReportListComponent implements OnInit {
|
||||
return this.reports === undefined || (this.reports && this.reports.length === 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the list
|
||||
*/
|
||||
private reset() {
|
||||
if (!this.isReportsEmpty()) {
|
||||
this.reports = [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Select the current report
|
||||
* @param report
|
||||
|
Reference in New Issue
Block a user