César Calvo
2017-03-15 abb9cc75e166c32cfa97244c497e6a69d14ea114
securis/src/main/webapp/src/app/forms/pack.form.component.ts
....@@ -1,7 +1,7 @@
11 import { Http } from '@angular/http';
22 import { ToastsManager } from 'ng2-toastr/ng2-toastr';
33
4
-import { PacksService } from '../resources/packs';
4
+import { PacksService, PACK_STATUS } from '../resources/packs';
55 import { LicenseTypesService } from '../resources/license_types';
66 import { LocaleService } from '../common/i18n';
77 import { TdDataTableService, TdDataTableSortingOrder, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '@covalent/core';
....@@ -100,7 +100,9 @@
100100
101101 ngOnInit(): void {
102102 this.loadCombos();
103
- // this.data = {};
103
+ if (this.isNew) {
104
+ this.data.status = PACK_STATUS.CREATED;
105
+ }
104106 this.form_title = this.$L.get('Pack data');
105107 this.form_subtitle = this.$L.get(this.isNew ? 'Create a new licenses pack': 'Modify the licenses pack data') ;
106108 }