rsanchez
2017-04-17 f11e78dacb3bbf45988a5002bed3bf8e7f97d043
securis/src/main/webapp/src/app/resources/licenses.ts
....@@ -3,9 +3,7 @@
33 import { Injectable } from '@angular/core';
44 import { Http, RequestOptions, ResponseContentType, Response } from '@angular/http';
55 import { SeCurisResourceServices } from './base';
6
-import "file-saver";
7
-
8
-declare var saveAs: FileSaver;
6
+import { saveAs } from "file-saver";
97
108 export const LIC_STATUS = {
119 CREATED: 'CR',
....@@ -71,6 +69,10 @@
7169 command: 'cancel',
7270 icon: 'cancel',
7371 name: 'Cancel'
72
+ },{
73
+ command: 'delete',
74
+ icon: 'delete',
75
+ name: 'Delete'
7476 }]
7577
7678
....@@ -102,8 +104,12 @@
102104 return super.action(id, "send");
103105 }
104106
105
- public cancel(id: number) {
106
- return super.action(id, "cancel");
107
+ public cancel(id: number, reason: string) {
108
+ return super.action(id, "cancel", 'POST', {reason: reason});
109
+ }
110
+
111
+ public delete(id: number) {
112
+ return super.remove(id);
107113 }
108114
109115 public download(id: number) {