latest issues fixed
This commit is contained in:
parent
882ff75252
commit
eb8a232abf
Binary file not shown.
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -23,10 +23,11 @@
|
||||
<div *ngIf="parent_ques.is_repeatable == '1'">
|
||||
<!-- {{form_group_name.value[parent_ques.group_key] | json}} -->
|
||||
<div [formArrayName]="parent_ques.group_key" *ngIf="parent_ques.group_type != '6'" >
|
||||
<div *ngFor="let group_ques of form_group_name.get(parent_ques.group_key)['controls'];let g_i=index;let g_l=last"
|
||||
[formGroupName]="g_i">
|
||||
|
||||
<!-- {{g_i}} {{g_l}} -->
|
||||
<mat-accordion *ngIf="parent_ques.group_type != '6' && parent_ques.group_questions[g_i]" #accordion="matAccordion" >
|
||||
<mat-accordion *ngIf="parent_ques.group_type != '6'" #accordion="matAccordion" [multi]="true">
|
||||
<div *ngFor="let group_ques of form_group_name.get(parent_ques.group_key)['controls'];let g_i=index;let g_l=last"
|
||||
[formGroupName]="g_i">
|
||||
<mat-expansion-panel [expanded]="step === g_i" #mapanel="matExpansionPanel" >
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title *ngIf="parent_ques.group_title_shown != '0'">
|
||||
@ -34,7 +35,7 @@
|
||||
</mat-panel-title>
|
||||
<!-- <mat-panel-description>
|
||||
Type your name and age
|
||||
</mat-panel-description> -->
|
||||
</mat-panel-description> -->
|
||||
</mat-expansion-panel-header>
|
||||
<!-- {{json_answers[parent_ques.group_key][0] | json}} -->
|
||||
<div *ngFor="let singleQues of parent_ques.group_questions[g_i];let s_i=index" fxFlex.xs="100" fxFlex.sm="100" [fxFlex]="singleQues.hasOwnProperty('field_width') && singleQues.field_width ? singleQues.field_width : '100'"
|
||||
@ -70,8 +71,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
</mat-accordion>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- IS REPEATABLE -->
|
||||
</div>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
</h2>
|
||||
<!-- <form [formGroup]="docsCollectedForm"> -->
|
||||
<mat-dialog-content style="border-bottom: 2px solid #e2412f8f;">
|
||||
<mat-dialog-content style="border-bottom: 2px solid #e2412f8f;" >
|
||||
<h5 style="text-align: center;" *ngIf="questions_JSON.questions.length == 0">No Templates Found</h5>
|
||||
<mat-card *ngIf="questions_JSON.questions.length > 0">
|
||||
<!-- <mat-card-header>
|
||||
@ -20,7 +20,7 @@
|
||||
</mat-card-title>
|
||||
</mat-card-header> -->
|
||||
<mat-card-content>
|
||||
<app-dynamic-form [questions_JSON]="questions_JSON" [form_group_name] = "commonFormGroup" [json_answers]="form_answers"></app-dynamic-form>
|
||||
<app-dynamic-form [questions_JSON]="questions_JSON" [form_group_name] = "commonFormGroup" [json_answers]="form_answers"></app-dynamic-form>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user