rsanchez
2017-04-18 dc7dceb37a917f394e1e1020882dcc5a4e0e9d7c
#3582 fix - Fixed license form initial data and submit
2 files modified
changed files
securis/src/main/webapp/src/app/forms/license.form.component.ts patch | view | blame | history
securis/src/main/webapp/src/app/forms/license.form.html patch | view | blame | history
securis/src/main/webapp/src/app/forms/license.form.component.ts
....@@ -130,6 +130,15 @@
130130 },
131131 err => console.error(err)
132132 );
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
+
133142 });
134143 }
135144 }
securis/src/main/webapp/src/app/forms/license.form.html
....@@ -101,10 +101,10 @@
101101 <div layout="row" layout-align="start center" class="margin">
102102 <button *ngIf="canBeDeleted()" md-raised-button color="warn" (click)="delete(data.id)">Delete</button>
103103 <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">
105105 <md-icon>more_vert</md-icon>
106106 </button>
107
- <md-menu #licMenu="mdMenu">
107
+ <md-menu #licMenu="mdMenu" >
108108 <button md-menu-item *ngFor="let action of license_menu_options" (click)="licenseAction(action.command)" [disabled]="!licenses.isActionAvailable(action.command, data)">
109109 <md-icon *ngIf="!!action.icon">{{ action.icon }}</md-icon> {{ action.name }}
110110 </button>