| .. | .. |
|---|
| 1 | 1 | import { Http } from '@angular/http'; |
|---|
| 2 | 2 | import { ToastsManager } from 'ng2-toastr/ng2-toastr'; |
|---|
| 3 | 3 | |
|---|
| 4 | | -import { PacksService } from '../resources/packs'; |
|---|
| 4 | +import { PacksService, PACK_STATUS } from '../resources/packs'; |
|---|
| 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'; |
|---|
| .. | .. |
|---|
| 100 | 100 | |
|---|
| 101 | 101 | ngOnInit(): void { |
|---|
| 102 | 102 | this.loadCombos(); |
|---|
| 103 | | - // this.data = {}; |
|---|
| 103 | + if (this.isNew) { |
|---|
| 104 | + this.data.status = PACK_STATUS.CREATED; |
|---|
| 105 | + } |
|---|
| 104 | 106 | this.form_title = this.$L.get('Pack data'); |
|---|
| 105 | 107 | this.form_subtitle = this.$L.get(this.isNew ? 'Create a new licenses pack': 'Modify the licenses pack data') ; |
|---|
| 106 | 108 | } |
|---|