| .. | .. |
|---|
| 3 | 3 | import { Injectable } from '@angular/core'; |
|---|
| 4 | 4 | import { Http, RequestOptions, ResponseContentType, Response } from '@angular/http'; |
|---|
| 5 | 5 | import { SeCurisResourceServices } from './base'; |
|---|
| 6 | | -import "file-saver"; |
|---|
| 7 | | - |
|---|
| 8 | | -declare var saveAs: FileSaver; |
|---|
| 6 | +import { saveAs } from "file-saver"; |
|---|
| 9 | 7 | |
|---|
| 10 | 8 | export const LIC_STATUS = { |
|---|
| 11 | 9 | CREATED: 'CR', |
|---|
| .. | .. |
|---|
| 71 | 69 | command: 'cancel', |
|---|
| 72 | 70 | icon: 'cancel', |
|---|
| 73 | 71 | name: 'Cancel' |
|---|
| 72 | + },{ |
|---|
| 73 | + command: 'delete', |
|---|
| 74 | + icon: 'delete', |
|---|
| 75 | + name: 'Delete' |
|---|
| 74 | 76 | }] |
|---|
| 75 | 77 | |
|---|
| 76 | 78 | |
|---|
| .. | .. |
|---|
| 102 | 104 | return super.action(id, "send"); |
|---|
| 103 | 105 | } |
|---|
| 104 | 106 | |
|---|
| 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); |
|---|
| 107 | 113 | } |
|---|
| 108 | 114 | |
|---|
| 109 | 115 | public download(id: number) { |
|---|