diff --git a/ng6-seed/dist.zip b/ng6-seed/dist.zip
index ffb0b77..01d3af9 100644
Binary files a/ng6-seed/dist.zip and b/ng6-seed/dist.zip differ
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts
index 8b01470..bdf38fa 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts
@@ -26,10 +26,10 @@ export class PdStatusChangeDialogueComponent implements OnInit {
{
this.notifier = notifier;
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : this.data.pd_status=='ALLOCATED' ? 'Allocate to Self' : this.data.pd_status=='BOUNCED' ? 'PD Reject' : 'Change Discussion';
- this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : this.data.pd_status=='ALLOCATED' ? 'Are you allocate this PD to yourself ?' : this.data.pd_status=='BOUNCED' ? 'Are you going to Reject the PD' : 'Change Discussion';
+ this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : this.data.pd_status=='ALLOCATED' ? 'Do you want to allocate the PD to yourself ?' : this.data.pd_status=='BOUNCED' ? 'Do you want to reject this PD' : 'Change Discussion';
this.enableAddonPD = false;
this.CompletenessCheck = this.data.pd_status=='INPROGRESS' ? true : this.data.pd_status=='COMPLETED' ? false : true;
- this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false;
+ this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false;
this.dialogType = this.data.dialogType
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html
index 57d96ca..d6fb50f 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html
@@ -23,10 +23,11 @@
-
+
-
+
+
@@ -34,7 +35,7 @@
+ -->
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.ts
index 56340bb..a9ed905 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
-import { MatExpansionPanel } from '@angular/material';
+import { MatExpansionPanel,MatAccordion } from '@angular/material';
import { QuesFormService } from '../ques-form/ques-form.service';
@@ -17,9 +17,11 @@ export class DynamicFormComponent implements OnInit {
@Input() json_answers:any;
step: number=0;
@ViewChild('mapanel') matExpansionPanel:MatExpansionPanel
+ @ViewChild('accordion') Accordion: MatAccordion
constructor(private _fb:FormBuilder,private questionService:QuesFormService) { }
ngOnInit() {
+
// this.form_group_name=new FormGroup({questions:this._fb.array([])})
console.log(this.questions_JSON,this.json_answers,this.questionService);
this.form_group_name=this.questionService.assignFormControl_array(this.form_group_name,this.questions_JSON.questions)
@@ -28,7 +30,7 @@ export class DynamicFormComponent implements OnInit {
this.generateGroupControls();
}
generateGroupControls() {
- if(this.json_answers && this.json_answers != null ){
+ if(this.json_answers && this.json_answers != null ){
this.questions_JSON.questions.forEach(parent_ques=>{
console.log(parent_ques);
// debugger;
@@ -125,5 +127,11 @@ export class DynamicFormComponent implements OnInit {
this.matExpansionPanel.open()
}
}
+ openAllPanels(){
+ this.Accordion.openAll();
+ console.log(this.Accordion);
+ return;
+}
+
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.html
index cc626a9..4a89ac5 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.html
@@ -11,7 +11,7 @@
-
+
No Templates Found
0">
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts
index 6df34d5..e0f186c 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts
@@ -75,7 +75,7 @@ export class FormComponent implements OnInit {
let params = {"fk_entity_id":this.pd_all_details.pdmaster_details.fk_lender_id,"fk_product_id":this.pd_all_details.pdmaster_details.fk_product_id,"pd_form_id":this.pd_all_details.form_id,"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id}
this.pdTriggerService.loadCreditPDTemplate(params).subscribe(result=>{
if(!environment.production){
- // result.dataStatus = false
+ // result.dataStatus = false
}
if(result.dataStatus) {
let question_template: any = result.records
@@ -211,12 +211,15 @@ export class FormComponent implements OnInit {
for(let val in invalidFields){
if( invalidFields[val].nodeName == 'MAT-FORM-FIELD' || invalidFields[val].nodeName == 'MAT-SELECT' || invalidFields[val].nodeName == 'TEXTAREA' || invalidFields[val].nodeName == 'MAT-RADIO-GROUP' ){ //INPUT FOR INPUT FIELD
firstInvalidField=invalidFields[val]
+
break;
}
}
+
if(firstInvalidField != undefined){
// firstInvalidField.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"})
this.formComponent.openMatExpansionPanel()
+
setTimeout(()=>{
firstInvalidField.scrollIntoView({block: "start", inline: "nearest"})
setTimeout(()=>{
@@ -256,6 +259,8 @@ export class FormComponent implements OnInit {
return invalid;
}
saveForm() {
+
+
console.log("values",this.commonFormGroup.getRawValue(),this.questions_JSON)
if(this.commonFormGroup.invalid) {
this.commonFormGroup.markAsDirty();
@@ -264,6 +269,7 @@ export class FormComponent implements OnInit {
let invalidfield = this.findInvalidControls()
console.log("Invalid field",invalidfield)
this.notifier.notify("info","Please fill all the required fields");
+ this.formComponent.openAllPanels()
return
}
let checkProperty=this.onSubmitProperty()
diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json
index 9efcbe7..3d3fafe 100644
--- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json
+++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json
@@ -113,7 +113,7 @@
"question_key":"borrower_age",
"type":"1",
"field_type":"num",
- "field_width":"45",
+ "field_width":"50",
"api_properties":null,
"answers":null,
"onchange_properties":null,
@@ -139,10 +139,11 @@
],
"questions":[
{
- "question":"Met / Not Met",
+ "question":"Mett / Not Met",
"question_key":"borrower_met",
"type":"2",
- "field_width":"100",
+
+ "field_width":"20",
"api_properties":null,
"answers":[
{
@@ -162,6 +163,7 @@
{
"name":"required",
"isactive":"1",
+
"validator":"Validators.required",
"message":"Field Required",
"value":null
diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/1.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/1.json
index 6179faf..ec14e8c 100644
--- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/1.json
+++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/1.json
@@ -63,7 +63,8 @@
"question":"Met / Not Met",
"question_key":"borrower_met",
"type":"2",
- "field_width":"100",
+ "field_width":"20",
+
"api_properties":null,
"answers":[
{
@@ -173,7 +174,7 @@
"question_key":"borrower_age",
"type":"1",
"field_type":"num",
- "field_width":"45",
+ "field_width":"50",
"api_properties":null,
"answers":null,
"onchange_properties":null,