| .. | .. |
|---|
| 50 | 50 | reader.readAsText(file); |
|---|
| 51 | 51 | this.requestFileUploader.clear(); |
|---|
| 52 | 52 | } |
|---|
| 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 | + |
|---|
| 53 | 65 | |
|---|
| 66 | + canBeDeleted() : boolean { |
|---|
| 67 | + return !this.isNew && this.licenses.isActionAvailable('delete', this.data); |
|---|
| 68 | + } |
|---|
| 54 | 69 | |
|---|
| 55 | 70 | requestFileUploaded(file: File) : void { |
|---|
| 56 | 71 | console.log(file); |
|---|