From 6078e6018ca05bcc0203241dc44071a59cf5e78c Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Fri, 10 Mar 2017 16:33:31 +0000
Subject: [PATCH] #3527 fix - Customizing packs listing
---
securis/src/main/webapp/src/app/pack.list.component.ts | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/securis/src/main/webapp/src/app/pack.list.component.ts b/securis/src/main/webapp/src/app/pack.list.component.ts
index f63e72f..f931ef8 100644
--- a/securis/src/main/webapp/src/app/pack.list.component.ts
+++ b/securis/src/main/webapp/src/app/pack.list.component.ts
@@ -42,12 +42,13 @@
export class PackListComponent implements AfterViewInit {
data: any[] = [];
columns: ITdDataTableColumn[] = [
+ { name: 'lics', label: '' },
{ name: 'code', label: 'Code', tooltip: 'License pack code' },
{ name: 'application_name', label: 'App name' },
{ name: 'licensetype_code', label: 'License type' },
{ name: 'organization_name', label: 'Organization' },
- { name: 'num_licenses', label: 'Lic', numeric: true, tooltip: 'Initial pack licenses' },
- { name: 'num_available', label: 'Ava', numeric: true, tooltip: 'Available licenses' },
+ { name: 'used_licenses', label: 'Lics', tooltip: 'Initial/Available pack licenses' },
+ { name: 'menu', label: '' }
];
filteredData: any[] = this.data;
@@ -80,12 +81,31 @@
}
createPack() : void {
- this.dialog.open(PackFormComponent, {
+ var ref = this.dialog.open(PackFormComponent, {
height: '50%', // can be px or %
width: '40%', // can be px or %
});
+ ref.componentInstance.isNew = true;
+ ref.afterClosed().subscribe(result => {
+ console.log(result);
+ this.filter();
+ });
}
+ editPack(pack: any) : void {
+ var ref = this.dialog.open(PackFormComponent, {
+ height: '50%', // can be px or %
+ width: '40%', // can be px or %
+ });
+ ref.componentInstance.isNew = false;
+ ref.componentInstance.data = pack;
+ ref.afterClosed().subscribe(result => {
+ console.log(result);
+ this.filter();
+ });
+ }
+
+
sort(sortEvent: ITdDataTableSortChangeEvent): void {
this.sortBy = sortEvent.name;
this.sortOrder = sortEvent.order;
--
Gitblit v1.3.2