#1184 - Added option to reports : Save, Delete and Export to CSV (#1600)

* #1184 - adding save export and delete to report

* #1184 - added save button for report

* #1184 - improved export file

* 1184 - fix condition for save and export button

* #1184 - added custom validator for dropdown to avoid wrong selection

* #1184 -start fixing form model

* #1184 - added dynamic build for formBuilder

* #1184 - rebased to development

* #1184 - little test refactoring

* #1184 - added test and some fix

* #1184 - added new events

* #1184 - removed old changes to api service
This commit is contained in:
Vito
2017-02-07 07:21:03 -08:00
committed by Mario Romano
parent 8cd2dfa9c1
commit 8bb00fdd00
13 changed files with 535 additions and 117 deletions

View File

@@ -119,7 +119,9 @@
<activiti-analytics *ngIf="report"
[appId]="appId"
[reportId]="report.id"
(editReport)="onEditReport($event)">
(editReport)="onEditReport($event)"
(reportSaved)="onReportSaved()"
(reportDeleted)="onReportDeleted()">
</activiti-analytics>
</div>
</div>

View File

@@ -104,8 +104,8 @@ export class ActivitiDemoComponent implements AfterViewInit {
this.dataTasks = new ObjectDataTableAdapter(
[],
[
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
{type: 'text', key: 'created', title: 'Created', cssClass: 'hidden', sortable: true}
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true },
{ type: 'text', key: 'created', title: 'Created', cssClass: 'hidden', sortable: true }
]
);
this.dataTasks.setSorting(new DataSorting('created', 'desc'));
@@ -113,8 +113,8 @@ export class ActivitiDemoComponent implements AfterViewInit {
this.dataProcesses = new ObjectDataTableAdapter(
[],
[
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
{type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true}
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true },
{ type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true }
]
);
this.dataProcesses.setSorting(new DataSorting('started', 'desc'));
@@ -154,7 +154,7 @@ export class ActivitiDemoComponent implements AfterViewInit {
}
onTaskFilterClick(event: FilterRepresentationModel) {
if(event){
if (event) {
this.taskFilter = event;
}
}
@@ -202,6 +202,21 @@ export class ActivitiDemoComponent implements AfterViewInit {
this.analyticsreportlist.reload();
}
onReportSaved() {
this.analyticsreportlist.reload();
}
onReportDeleted() {
this.analyticsreportlist.reload();
this.selectFirstElementInReportList();
}
selectFirstElementInReportList(){
if (! this.analyticsreportlist.isReportsEmpty()) {
this.analyticsreportlist.selectReport(this.analyticsreportlist.reports[0]);
}
}
navigateStartProcess() {
this.resetProcessFilters();
this.reloadProcessFilters();