From 38b0782c887f046426c31766901906c614d73140 Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Tue, 14 Mar 2017 13:51:56 +0000
Subject: [PATCH] #3527 feature - Added pack form
---
securis/src/main/webapp/src/app/pack.list.component.ts | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 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 f931ef8..0af18bb 100644
--- a/securis/src/main/webapp/src/app/pack.list.component.ts
+++ b/securis/src/main/webapp/src/app/pack.list.component.ts
@@ -1,3 +1,4 @@
+import { Router } from '@angular/router';
import { MdDialog } from '@angular/material';
import { TdDataTableService, TdDataTableSortingOrder, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '@covalent/core';
import { IPageChangeEvent } from '@covalent/core';
@@ -42,7 +43,6 @@
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' },
@@ -61,9 +61,25 @@
sortBy: string = 'application_name';
sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Descending;
filteredItems = this.data.length;
+ pack_menu_options : any[] = [{
+ command: 'edit',
+ name: 'Edit'
+ },{
+ command: 'cancel',
+ name: 'Cancel'
+ }]
+
+ packAction(action: any) {
+ console.log(action.command);
+ }
+
+ isActionAvailable(pack : any) : boolean {
+ return true;
+ }
constructor(private _dataTableService: TdDataTableService,
private media: TdMediaService,
+ private router: Router,
private dialog: MdDialog,
private packForm: PackFormComponent,
private packs: PacksService) {
@@ -92,9 +108,13 @@
});
}
+ showLicenses(pack: any) : void {
+ this.router.navigateByUrl('/licenses');
+ }
+
editPack(pack: any) : void {
var ref = this.dialog.open(PackFormComponent, {
- height: '50%', // can be px or %
+ height: '70%', // can be px or %
width: '40%', // can be px or %
});
ref.componentInstance.isNew = false;
--
Gitblit v1.3.2