From 1a0491f2462d2c309bd8e310b22c11019a79ce1e Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Mon, 20 Mar 2017 16:02:14 +0000
Subject: [PATCH] #3527 fix - Added applications forms and metadata component
---
securis/src/main/webapp/src/app/forms/pack.form.component.ts | 43 ++++++++-----------------------------------
1 files changed, 8 insertions(+), 35 deletions(-)
diff --git a/securis/src/main/webapp/src/app/forms/pack.form.component.ts b/securis/src/main/webapp/src/app/forms/pack.form.component.ts
index e798be4..3652a15 100644
--- a/securis/src/main/webapp/src/app/forms/pack.form.component.ts
+++ b/securis/src/main/webapp/src/app/forms/pack.form.component.ts
@@ -5,7 +5,7 @@
import { LicenseTypesService } from '../resources/license_types';
import { LocaleService } from '../common/i18n';
import { TdDataTableService, TdDataTableSortingOrder, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '@covalent/core';
-import { IPageChangeEvent } from '@covalent/core';
+import { TdDialogService } from '@covalent/core';
import { Component, AfterViewInit } from '@angular/core';
import { TdMediaService } from '@covalent/core';
import { IComboOption, FormBase } from './base';
@@ -21,39 +21,16 @@
organizations : IComboOption[];
licensetypes : IComboOption[];
- data: any = {};
- isNew : boolean = true;
- fields: any = {
- 'code': '',
- 'num_licenses': '',
- 'init_valid_date': '',
- 'end_valid_date': '',
- 'license_preactivation': '',
- 'license_type_id': '',
- 'organization_id': '',
- 'licensetype_code': '',
- 'organization_name': '',
- 'preactivation_valid_period': '',
- 'renew_valid_period': '',
- 'application_name': '',
- 'status': '',
- 'metadata': '',
- 'comments': '',
- 'key': '',
- 'value': '',
- }
+
constructor(private http: Http,
- toaster: ToastsManager,
private licenseTypes: LicenseTypesService,
- route: ActivatedRoute,
private router: Router,
private packs: PacksService,
- $L: LocaleService) {
- super($L, route, toaster, packs, $L.get('pack'));
- }
-
- public getFieldName(fieldId: string) : string {
- return this.fields[fieldId];
+ toaster: ToastsManager,
+ route: ActivatedRoute,
+ $L: LocaleService,
+ dialogs: TdDialogService) {
+ super($L, route, toaster, packs, $L.get('pack'), dialogs);
}
loadCombos(): void {
@@ -93,14 +70,10 @@
console.log(this.data.organization_id);
}
- ngOnInit(): void {
-
- }
-
ngAfterViewInit(): void {
this.loadCombos();
- super.prepareData('packId', {
+ super.prepareInitialData('packId', {
status: PACK_STATUS.CREATED
});
}
--
Gitblit v1.3.2