| .. | .. |
|---|
| 5 | 5 | import { LicenseTypesService } from '../resources/license_types'; |
|---|
| 6 | 6 | import { LocaleService } from '../common/i18n'; |
|---|
| 7 | 7 | import { TdDataTableService, TdDataTableSortingOrder, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '@covalent/core'; |
|---|
| 8 | | -import { IPageChangeEvent } from '@covalent/core'; |
|---|
| 8 | +import { TdDialogService } from '@covalent/core'; |
|---|
| 9 | 9 | import { Component, AfterViewInit } from '@angular/core'; |
|---|
| 10 | 10 | import { TdMediaService } from '@covalent/core'; |
|---|
| 11 | 11 | import { IComboOption, FormBase } from './base'; |
|---|
| .. | .. |
|---|
| 21 | 21 | |
|---|
| 22 | 22 | organizations : IComboOption[]; |
|---|
| 23 | 23 | licensetypes : IComboOption[]; |
|---|
| 24 | | - data: any = {}; |
|---|
| 25 | | - isNew : boolean = true; |
|---|
| 26 | | - fields: any = { |
|---|
| 27 | | - 'code': '', |
|---|
| 28 | | - 'num_licenses': '', |
|---|
| 29 | | - 'init_valid_date': '', |
|---|
| 30 | | - 'end_valid_date': '', |
|---|
| 31 | | - 'license_preactivation': '', |
|---|
| 32 | | - 'license_type_id': '', |
|---|
| 33 | | - 'organization_id': '', |
|---|
| 34 | | - 'licensetype_code': '', |
|---|
| 35 | | - 'organization_name': '', |
|---|
| 36 | | - 'preactivation_valid_period': '', |
|---|
| 37 | | - 'renew_valid_period': '', |
|---|
| 38 | | - 'application_name': '', |
|---|
| 39 | | - 'status': '', |
|---|
| 40 | | - 'metadata': '', |
|---|
| 41 | | - 'comments': '', |
|---|
| 42 | | - 'key': '', |
|---|
| 43 | | - 'value': '', |
|---|
| 44 | | - } |
|---|
| 24 | + |
|---|
| 45 | 25 | constructor(private http: Http, |
|---|
| 46 | | - toaster: ToastsManager, |
|---|
| 47 | 26 | private licenseTypes: LicenseTypesService, |
|---|
| 48 | | - route: ActivatedRoute, |
|---|
| 49 | 27 | private router: Router, |
|---|
| 50 | 28 | private packs: PacksService, |
|---|
| 51 | | - $L: LocaleService) { |
|---|
| 52 | | - super($L, route, toaster, packs, $L.get('pack')); |
|---|
| 53 | | - } |
|---|
| 54 | | - |
|---|
| 55 | | - public getFieldName(fieldId: string) : string { |
|---|
| 56 | | - return this.fields[fieldId]; |
|---|
| 29 | + toaster: ToastsManager, |
|---|
| 30 | + route: ActivatedRoute, |
|---|
| 31 | + $L: LocaleService, |
|---|
| 32 | + dialogs: TdDialogService) { |
|---|
| 33 | + super($L, route, toaster, packs, $L.get('pack'), dialogs); |
|---|
| 57 | 34 | } |
|---|
| 58 | 35 | |
|---|
| 59 | 36 | loadCombos(): void { |
|---|
| .. | .. |
|---|
| 93 | 70 | console.log(this.data.organization_id); |
|---|
| 94 | 71 | } |
|---|
| 95 | 72 | |
|---|
| 96 | | - ngOnInit(): void { |
|---|
| 97 | | - |
|---|
| 98 | | - } |
|---|
| 99 | | - |
|---|
| 100 | 73 | |
|---|
| 101 | 74 | ngAfterViewInit(): void { |
|---|
| 102 | 75 | this.loadCombos(); |
|---|
| 103 | | - super.prepareData('packId', { |
|---|
| 76 | + super.prepareInitialData('packId', { |
|---|
| 104 | 77 | status: PACK_STATUS.CREATED |
|---|
| 105 | 78 | }); |
|---|
| 106 | 79 | } |
|---|