rsanchez
2017-03-10 6078e6018ca05bcc0203241dc44071a59cf5e78c
securis/src/main/webapp/src/app/forms/pack.form.component.ts
....@@ -30,22 +30,26 @@
3030 this.http.get('organization')
3131 .map(response => response.json().map((org : any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`}))
3232 .subscribe(
33
- data => this.organizations = data,
33
+ data => this.organizations = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label)),
3434 err => console.error('Error loading orgs')
3535 );
3636 this.http.get('licensetype')
3737 .map(response => response.json().map((lt : any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`}))
3838 .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')
4141 );
4242 }
4343
44
-
44
+ log(obj: any) {
45
+ console.log(obj)
46
+ }
47
+
4548 ngOnInit(): void {
4649 this.loadCombos();
4750 this.data = {};
4851 this.form_title = this.$L.get('Pack data');
52
+ this.form_subtitle = this.$L.get('Create a new licenses pack');
4953 }
5054
5155