#3582 fix - Fixed license form initial data and submit
| .. | .. |
|---|
| 130 | 130 | }, |
|---|
| 131 | 131 | err => console.error(err) |
|---|
| 132 | 132 | ); |
|---|
| 133 | + if (this.isNew) { |
|---|
| 134 | + this.packs.nextLicCode(packId).subscribe( |
|---|
| 135 | + code => { |
|---|
| 136 | + this.data.code = code; |
|---|
| 137 | + }, |
|---|
| 138 | + err => console.error(err) |
|---|
| 139 | + ); |
|---|
| 140 | + } |
|---|
| 141 | + |
|---|
| 133 | 142 | }); |
|---|
| 134 | 143 | } |
|---|
| 135 | 144 | } |
|---|
| .. | .. |
|---|
| 101 | 101 | <div layout="row" layout-align="start center" class="margin"> |
|---|
| 102 | 102 | <button *ngIf="canBeDeleted()" md-raised-button color="warn" (click)="delete(data.id)">Delete</button> |
|---|
| 103 | 103 | <span flex></span> |
|---|
| 104 | | - <button md-icon-button [mdMenuTriggerFor]="licMenu" aria-label="License menu"> |
|---|
| 104 | + <button md-icon-button [mdMenuTriggerFor]="licMenu" aria-label="License menu" *ngIf="!isNew"> |
|---|
| 105 | 105 | <md-icon>more_vert</md-icon> |
|---|
| 106 | 106 | </button> |
|---|
| 107 | | - <md-menu #licMenu="mdMenu"> |
|---|
| 107 | + <md-menu #licMenu="mdMenu" > |
|---|
| 108 | 108 | <button md-menu-item *ngFor="let action of license_menu_options" (click)="licenseAction(action.command)" [disabled]="!licenses.isActionAvailable(action.command, data)"> |
|---|
| 109 | 109 | <md-icon *ngIf="!!action.icon">{{ action.icon }}</md-icon> {{ action.name }} |
|---|
| 110 | 110 | </button> |
|---|