From f84b391e1aa5a0b831dd09d5fb3f4f652f7617b6 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Tue, 3 Sep 2019 16:36:07 +0530 Subject: [PATCH] ENTITY SCORE OTP FILEDS ADDED --- .../entity-add/entity.add.component.html | 17 +++++++++++ .../entity/entity-add/entity.add.component.ts | 8 +++++- .../entity-edit/entity.edit.component.html | 28 +++++++++++++++++-- 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.html b/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.html index b7939606b..00c6172c9 100755 --- a/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.html +++ b/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.html @@ -28,6 +28,23 @@ You must Include Short Name. + +
+ + + {{ opt.score_option_name }} + + Field Required. + + + + + {{ opt.score_option_name }} + + Field Required. + + +
diff --git a/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.ts b/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.ts index 20102da96..2d8b0a304 100755 --- a/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.ts +++ b/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.ts @@ -43,6 +43,8 @@ export class EntityAddComponent implements OnInit { public _addQuesFrom: FormGroup; public submitted = false; public entityOptions: any = []; + public scoreCardOptions: any = [{'score_option_name':'Yes','score_option_value':'1'},{'score_option_name':'No','score_option_value':'0'}]; + errorMessage: string; error : any = []; @@ -69,6 +71,8 @@ export class EntityAddComponent implements OnInit { fk_entity_type_id: [null, Validators.compose([Validators.required])], full_name: [null, Validators.compose([Validators.required])], short_name: [null, Validators.compose([Validators.required])], + is_score_card_enabled: [null, Validators.compose([Validators.required])], + is_otp_enabled: [null, Validators.compose([Validators.required])], remarks: [null], isactive: [1] }); @@ -108,10 +112,12 @@ export class EntityAddComponent implements OnInit { return; } else { var entityFormValues = this._addQuesFrom.value; + + //To Remove The "Null" With Key also Object.keys(entityFormValues).forEach((key) => (entityFormValues[key] == null) && delete entityFormValues[key]); - + //Add BRANCH data with help Service File this.entityService.addEntityMasterDetails(entityFormValues).subscribe( dataresult => { diff --git a/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.html b/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.html index 690e32c5d..56af9ab52 100755 --- a/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.html +++ b/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.html @@ -198,18 +198,42 @@ You must Include Entity Full Name.
-
+
You must Include Entity Short Name.
-
+ +
+ + + {{ opt.score_option_name }} + + Field Required. + +
+
+ + + {{ opt.score_option_name }} + + Field Required. + +
+ + +
+
+
+
+
+
No Template Name Found.