rsanchez
2017-03-22 60c65f2110f65221bc3a71b2887667e78c53c53e
securis/src/main/webapp/src/app/forms/license.form.component.ts
....@@ -50,7 +50,22 @@
5050 reader.readAsText(file);
5151 this.requestFileUploader.clear();
5252 }
53
+
54
+
55
+ licenseAction(action: string) {
56
+ return this.licenses[action](this.data.id).subscribe(
57
+ (actionResponse : any) => {
58
+ this.toaster.success(this.$L.get('Action "{}" executed successfully', action));
59
+ this.reload();
60
+ },
61
+ (err : any) => this.toaster.error(this.$L.get('Action "{}" failed', action))
62
+ );
63
+ }
64
+
5365
66
+ canBeDeleted() : boolean {
67
+ return !this.isNew && this.licenses.isActionAvailable('delete', this.data);
68
+ }
5469
5570 requestFileUploaded(file: File) : void {
5671 console.log(file);