From f11e78dacb3bbf45988a5002bed3bf8e7f97d043 Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Mon, 17 Apr 2017 15:36:47 +0000
Subject: [PATCH] #3529 fix - Fixed cancel an delete commands on licenses

---
 securis/src/main/webapp/src/app/resources/licenses.ts |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/securis/src/main/webapp/src/app/resources/licenses.ts b/securis/src/main/webapp/src/app/resources/licenses.ts
index c15580d..bb51ddd 100644
--- a/securis/src/main/webapp/src/app/resources/licenses.ts
+++ b/securis/src/main/webapp/src/app/resources/licenses.ts
@@ -3,9 +3,7 @@
 import { Injectable } from '@angular/core';
 import { Http, RequestOptions, ResponseContentType, Response } from '@angular/http';
 import { SeCurisResourceServices } from './base';
-import "file-saver";
-
-declare var saveAs: FileSaver;
+import { saveAs } from "file-saver";
 
 export const LIC_STATUS = {
 	CREATED: 'CR',
@@ -71,6 +69,10 @@
     command: 'cancel',
     icon: 'cancel',
     name: 'Cancel'
+  },{
+    command: 'delete',
+    icon: 'delete',
+    name: 'Delete'
   }]
 
 
@@ -102,8 +104,12 @@
 		return super.action(id, "send");
 	}
 
-	public cancel(id: number) {
-		return super.action(id, "cancel");
+	public cancel(id: number, reason: string) {
+		return super.action(id, "cancel", 'POST', {reason: reason});
+	}
+
+	public delete(id: number) {
+		return super.remove(id);
 	}
 
 	public download(id: number) {

--
Gitblit v1.3.2