| .. | .. |
|---|
| 27 | 27 | private packs: PacksService, |
|---|
| 28 | 28 | router: Router, |
|---|
| 29 | 29 | toaster: ToastsManager, |
|---|
| 30 | | - route: ActivatedRoute, |
|---|
| 30 | + route: ActivatedRoute, |
|---|
| 31 | 31 | $L: LocaleService, |
|---|
| 32 | 32 | dialogs: TdDialogService) { |
|---|
| 33 | 33 | super($L, router, route, toaster, packs, $L.get('pack'), dialogs); |
|---|
| .. | .. |
|---|
| 37 | 37 | this.http.get('organization') |
|---|
| 38 | 38 | .map(response => response.json().map((org : any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`})) |
|---|
| 39 | 39 | .subscribe( |
|---|
| 40 | | - data => this.organizations = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label)), |
|---|
| 40 | + data => super.setViewData(() => this.organizations = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label))), |
|---|
| 41 | 41 | err => console.error('Error loading orgs') |
|---|
| 42 | 42 | ); |
|---|
| 43 | 43 | this.licenseTypes.get() |
|---|
| 44 | 44 | .map(list => list.map((lt : any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`})) |
|---|
| 45 | 45 | .subscribe( |
|---|
| 46 | | - data => this.licensetypes = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label)), |
|---|
| 46 | + data => super.setViewData(() => this.licensetypes = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label))), |
|---|
| 47 | 47 | err => console.error('Error loading license types') |
|---|
| 48 | 48 | ); |
|---|
| 49 | 49 | } |
|---|
| .. | .. |
|---|
| 57 | 57 | this.licenseTypes.get(this.data.license_type_id) |
|---|
| 58 | 58 | .map(lt_data => lt_data.metadata) |
|---|
| 59 | 59 | .subscribe( |
|---|
| 60 | | - metadata => this.data.metadata = metadata, |
|---|
| 60 | + metadata => super.setViewData(() => this.data.metadata = metadata), |
|---|
| 61 | 61 | err => { |
|---|
| 62 | 62 | console.error('Error loading license type metadata'); |
|---|
| 63 | 63 | console.error(err); |
|---|