| .. | .. |
|---|
| 30 | 30 | this.http.get('organization') |
|---|
| 31 | 31 | .map(response => response.json().map((org : any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`})) |
|---|
| 32 | 32 | .subscribe( |
|---|
| 33 | | - data => this.organizations = data, |
|---|
| 33 | + data => this.organizations = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label)), |
|---|
| 34 | 34 | err => console.error('Error loading orgs') |
|---|
| 35 | 35 | ); |
|---|
| 36 | 36 | this.http.get('licensetype') |
|---|
| 37 | 37 | .map(response => response.json().map((lt : any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`})) |
|---|
| 38 | 38 | .subscribe( |
|---|
| 39 | | - data => this.licensetypes = data, |
|---|
| 40 | | - err => console.error('Error loading orgs') |
|---|
| 39 | + data => this.licensetypes = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label)), |
|---|
| 40 | + err => console.error('Error loading license types') |
|---|
| 41 | 41 | ); |
|---|
| 42 | 42 | } |
|---|
| 43 | 43 | |
|---|
| 44 | | - |
|---|
| 44 | + log(obj: any) { |
|---|
| 45 | + console.log(obj) |
|---|
| 46 | + } |
|---|
| 47 | + |
|---|
| 45 | 48 | ngOnInit(): void { |
|---|
| 46 | 49 | this.loadCombos(); |
|---|
| 47 | 50 | this.data = {}; |
|---|
| 48 | 51 | this.form_title = this.$L.get('Pack data'); |
|---|
| 52 | + this.form_subtitle = this.$L.get('Create a new licenses pack'); |
|---|
| 49 | 53 | } |
|---|
| 50 | 54 | |
|---|
| 51 | 55 | |
|---|