-
+
+
+ Remarks
+
+
+
+
+
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
index 697d6b860..43ef3ef61 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
@@ -1,9 +1,9 @@
import { Component, OnInit, Input, Output, Inject } from '@angular/core';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
-import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , MatTableDataSource} from '@angular/material';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, MatTableDataSource } from '@angular/material';
import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from './../../../../../pd-service/pd-triger.service';
-import {OtherApplicantDetailsComponent} from './../dialogue/other-applicant-details/other-applicant-details.component';
+import { OtherApplicantDetailsComponent } from './../dialogue/other-applicant-details/other-applicant-details.component';
import { element } from '@angular/core/src/render3/instructions';
import { ELEMENT_PROBE_PROVIDERS } from '@angular/platform-browser/src/dom/debug/ng_probe';
import { DatePipe } from '@angular/common';
@@ -17,125 +17,151 @@ import { Options } from 'selenium-webdriver/edge';
providers: [SearchRelationPipe],
})
export class GeneralInfoComponent implements OnInit {
+
+ /* Declaration for Header Variables */
+ pageTitle: string = "General Information";
+
subproduct_abbr: any;
customer_segment_abbr: any;
lender_applicant_id: any;
main_applicant: any;
+
+ /* Declaration for Common Variables */
pipe = new DatePipe('en-US');
- pageTitle: string ="General Information";
- pdid : string;
- form_id:number;
- is_new : boolean;
- count : number = 1;
- private notifier: NotifierService;
- public _generalForm: FormGroup;
- displayedColumns = ['applicant_name','is_person_met','is_applicant','age','qualification','course_name','actions'];
- public individualsSource= new MatTableDataSource();
- public relationSource= new MatTableDataSource();
- public CompanySource = new MatTableDataSource();
- secondDisplayedColumns = ['applicant_name','relation','relation_to'];
- thridDisplayedColumns = ['applicant_name','company_relationship','relation_to_company'];
- public pd_applicants_details: any;
- relationShipList:any=[];
- companyRelationShipList:any=[];
- errorMessage:any;
- individualsList: any=[];
- individualsListBothCase: any=[];
- companyList: any=[];
- qualificationList: any=[];
- businessEntityTypeList: any=[];
+
+ pdid: string;
+ form_id: number;
+ count: number = 1;
+ errorMessage: any;
maxDate: any;
- constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any,private dialogRef: MatDialogRef
) {
+
+ public pd_applicants_details: any;
+ public _generalForm: FormGroup;
+ private notifier: NotifierService;
+
+
+ /* Declaration for DataTables */
+ displayedColumns = ['applicant_name', 'is_person_met', 'is_applicant', 'age', 'qualification', 'course_name', 'actions'];
+ secondDisplayedColumns = ['applicant_name', 'relation', 'relation_to'];
+ thridDisplayedColumns = ['applicant_name', 'company_relationship', 'relation_to_company'];
+
+ public individualsSource = new MatTableDataSource();
+ public relationSource = new MatTableDataSource();
+ public CompanySource = new MatTableDataSource();
+
+ /* Declaration for Dropdowns */
+ relationShipList: any = [];
+ companyRelationShipList: any = [];
+ individualsList: any = [];
+ individualsListBothCase: any = [];
+ companyList: any = [];
+ qualificationList: any = [];
+ businessEntityTypeList: any = [];
+
+ /********************** Declaration Section Ends Here *****************/
+
+ /** Constructor Section */
+ constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.notifier = notifier;
this.form_id = 18;
this.pd_applicants_details = this.pd_all_details.pdapplicants_detials;
- this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
- this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
- this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
- this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
-
- }
+ this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
+ this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
+ this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
+ this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
+ }
+ /********************** Constructor Section Ends Here ****************/
+ /** ng Oninit Section */
ngOnInit() {
let get_max_date = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/");
- this.maxDate = new Date(get_max_date);
+ this.maxDate = new Date(get_max_date);
this.initFormDetails();
- this.getMasterDetails('RELATIONSHIPS',1);
- this.getMasterDetails('COMPANYRELATIONSHIPS',2);
- this.getMasterDetails('EDUQUALIFICATION',3);
- this.getMasterDetails('BUSINESSENTITYTYPE',4);
- // update data source table when change the individuals details
- this._generalForm.controls['individuals'].valueChanges.subscribe(val=>{
+ this.getMasterDetails('RELATIONSHIPS', 1);
+ this.getMasterDetails('COMPANYRELATIONSHIPS', 2);
+ this.getMasterDetails('EDUQUALIFICATION', 3);
+ this.getMasterDetails('BUSINESSENTITYTYPE', 4);
+
+ // update data source table when change the individuals details
+ this._generalForm.controls['individuals'].valueChanges.subscribe(val => {
let control = this._generalForm.controls['individuals'];
- this.individualsSource.data =control.controls;
- this.individualsList = control.value.filter(element =>element.is_applicant===true);
- this.individualsListBothCase = control.value.filter(element =>element.is_applicant===true || element.is_person_met===true);
- });
- // update company details
- this._generalForm.controls['companies'].valueChanges.subscribe(val=>{
- let control = this._generalForm.controls['companies'];
- this.companyList = control.value.filter(element =>element.company_name && element.is_active);
- });
+ this.individualsSource.data = control.controls;
+ this.individualsList = control.value.filter(element => element.is_applicant === true);
+ this.individualsListBothCase = control.value.filter(element => element.is_applicant === true || element.is_person_met === true);
+ });
- this._generalForm.controls['persons_with_relationships'].valueChanges.subscribe(val=>{
- let control = this._generalForm.controls['persons_with_relationships'];
- this.relationSource.data =control.controls;
- //this.individualsList = control.value.filter(element =>element.is_applicant===true);
- });
+ // update company details
+ this._generalForm.controls['companies'].valueChanges.subscribe(val => {
+ let control = this._generalForm.controls['companies'];
+ this.companyList = control.value.filter(element => element.company_name && element.is_active);
+ });
- // change relation with businees update dat sorce table
- this._generalForm.controls['company_with_relationships'].valueChanges.subscribe(val=>{
- let ComapnyControl = this._generalForm.controls['company_with_relationships'];
- this.CompanySource .data =ComapnyControl.controls;
- });
+ this._generalForm.controls['persons_with_relationships'].valueChanges.subscribe(val => {
+ let control = this._generalForm.controls['persons_with_relationships'];
+ this.relationSource.data = control.controls;
+ //this.individualsList = control.value.filter(element =>element.is_applicant===true);
+ });
+
+ // change relation with businees update dat sorce table
+ this._generalForm.controls['company_with_relationships'].valueChanges.subscribe(val => {
+ let ComapnyControl = this._generalForm.controls['company_with_relationships'];
+ this.CompanySource.data = ComapnyControl.controls;
+ });
}
+ /***************************** ng Oninit Section Ends Here **********************************/
- // init form
+ /** init form */
initFormDetails() {
this._generalForm = this._fb.group({
- pdid:this.pdid,
- formid:this.form_id,
+ pdid: this.pdid,
+ formid: this.form_id,
//applicant_relation: this._fb.array([]),
individuals: this._fb.array([]),
companies: this._fb.array([]),
persons_with_relationships: this._fb.array([]),
company_with_relationships: this._fb.array([]),
- general_remark:''
- })
- this.loadFormData();
-}
-// get all master details
- getMasterDetails(table:string,type:number){
+ general_remark: ''
+ })
+ this.loadFormData();
+ }
+ /**************************** init form Ends Here **************/
+
+
+ /*** get all master details **/
+ getMasterDetails(table: string, type: number) {
this._pd.getAllMasterDatas(table).subscribe(
data => {
if (data.status == 200) {
- if(type==1){
- this.relationShipList=data.records.filter(item => item.isactive == 1);
-
+ if (type == 1) {
+ this.relationShipList = data.records.filter(item => item.isactive == 1);
//this.relationShipList.push({'relationship_id':"0",'name':'Not Applicable'});
}
- if(type==2){
- this.companyRelationShipList=data.records.filter(item => item.isactive == 1);
- this.companyRelationShipList=data.records.filter(item => item.name != 'Others');
+ if (type == 2) {
+ this.companyRelationShipList = data.records.filter(item => item.isactive == 1);
+ this.companyRelationShipList = data.records.filter(item => item.name != 'Others');
}
- if(type==3){
+ if (type == 3) {
this.qualificationList = data.records;
}
- if(type==4) {
+ if (type == 4) {
this.businessEntityTypeList = data.records;
}
-
- }
- }, error => this.errorMessage = error);
- }
- // load form data
+ }
+ }, error => this.errorMessage = error);
+ }
+ /********************** get all master details Ends Here **************************/
+
+ /** load form data
+ * IF part => Fetch The DB Datas;
+ * Else Part => initial stage;
+ */
loadFormData() {
let params: any = {};
- params.pd_id = this.pdid;
- params.pd_form_id = '18';
+ params.pd_id = this.pdid;
+ params.pd_form_id = '18';
let individualsControl = this._generalForm.controls['individuals'];
let companyControl = this._generalForm.get('companies') as FormArray;
//let relationControl = this._generalForm.controls['applicant_relation'];
@@ -145,204 +171,223 @@ export class GeneralInfoComponent implements OnInit {
//relationControl.controls = [];
companyControl.controls = [];
personsWithRelationshipsControl.controls = [];
- let exist_individuals:any;
- let exist_companies:any;
- let exist_relation:any;
- let exist_personsWithRelationships:any;
- let exist_companyWithRelationships:any;
+ let exist_individuals: any;
+ let exist_companies: any;
+ let exist_relation: any;
+ let exist_personsWithRelationships: any;
+ let exist_companyWithRelationships: any;
+
this._pd.retriveForm(params).subscribe(data => {
- console.log('data',data);
- if(data.dataStatus) {
- this._generalForm.controls['general_remark'].setValue(data.records.general_remark ? data.records.general_remark : '');
-
- // create individuals
- exist_individuals=Object.keys(data.records.individuals).map(function(key) {
- return data.records.individuals[key];
- });
- console.log('exist_individuals',exist_individuals);
- if(exist_individuals.length>0){
+
+ if (data.dataStatus) {
+
+ this._generalForm.controls['general_remark'].setValue(data.records.general_remark ? data.records.general_remark : '');
+
+ // create individuals
+ exist_individuals = Object.keys(data.records.individuals).map(function (key) {
+ return data.records.individuals[key];
+ });
+
+ if (exist_individuals.length > 0) {
exist_individuals.forEach(element => {
individualsControl.push(this.createIndividulas(element))
});
}
// create persons with relationships
- exist_personsWithRelationships=Object.keys(data.records.persons_with_relationships).map(function(key) {
+ exist_personsWithRelationships = Object.keys(data.records.persons_with_relationships).map(function (key) {
return data.records.persons_with_relationships[key];
});
- if(exist_personsWithRelationships.length>0){
+ if (exist_personsWithRelationships.length > 0) {
exist_personsWithRelationships.forEach(element => {
//individualsControl.push(this.createIndividulas(element))
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
});
}
- exist_companyWithRelationships=Object.keys(data.records.company_with_relationships).map(function(key) {
+ exist_companyWithRelationships = Object.keys(data.records.company_with_relationships).map(function (key) {
return data.records.company_with_relationships[key];
});
- if(exist_companyWithRelationships.length>0){
+
+ if (exist_companyWithRelationships.length > 0) {
exist_companyWithRelationships.forEach(element => {
//individualsControl.push(this.createIndividulas(element))
companyWithRelationshipsControl.push(this.createCompaniesRelationshipWithData(element));
});
}
+ else if(exist_companyWithRelationships.length == 0) {
+ companyWithRelationshipsControl.push(this.createCompaniesRelationship());
+ }
// create companies
- exist_companies = Object.keys(data.records.companies).map(function(key) {
+ exist_companies = Object.keys(data.records.companies).map(function (key) {
return data.records.companies[key];
+ });
+ if (exist_companies.length > 0) {
+ exist_companies.forEach((element, cindex) => {
+ companyControl.push(this.createCompanies(element));
+ let otherControl: any = this._generalForm.get('companies') as FormArray;
+ otherControl = otherControl.controls[cindex];
+ element.business_entity_type == '1' ? otherControl.addControl('business_entity_type_other', new FormControl(element.business_entity_type_other, Validators.required)) : otherControl.removeControl('business_entity_type_other');
+ if (element.is_active == false) {
+ let control: any = this._generalForm.get('companies') as FormArray;
+ control.controls[cindex].controls.company_name.clearValidators();
+ control.controls[cindex].controls.company_name.updateValueAndValidity();
+ control.controls[cindex].controls.business_years.clearValidators();
+ control.controls[cindex].controls.business_years.updateValueAndValidity();
+ control.controls[cindex].controls.business_entity_type.clearValidators();
+ control.controls[cindex].controls.business_entity_type.updateValueAndValidity();
+ element.business_entity_type == '1' ? control.controls[cindex].controls.business_entity_type_other.clearValidators() : '';
+ element.business_entity_type == '1' ? control.controls[cindex].controls.business_entity_type_other.updateValueAndValidity() : '';
+ }
+
});
- if(exist_companies.length>0){
- exist_companies.forEach((element,cindex) => {
- companyControl.push(this.createCompanies(element));
- let otherControl: any = this._generalForm.get('companies') as FormArray;
- otherControl = otherControl.controls[cindex];
- element.business_entity_type=='1' ? otherControl.addControl('business_entity_type_other', new FormControl(element.business_entity_type_other, Validators.required)) : otherControl.removeControl('business_entity_type_other');
- if(element.is_active==false){
- let control: any = this._generalForm.get('companies') as FormArray;
- control.controls[cindex].controls.company_name.clearValidators();
- control.controls[cindex].controls.company_name.updateValueAndValidity();
- control.controls[cindex].controls.business_years.clearValidators();
- control.controls[cindex].controls.business_years.updateValueAndValidity();
- control.controls[cindex].controls.business_entity_type.clearValidators();
- control.controls[cindex].controls.business_entity_type.updateValueAndValidity();
- element.business_entity_type=='1' ? control.controls[cindex].controls.business_entity_type_other.clearValidators() : '';
- element.business_entity_type=='1' ? control.controls[cindex].controls.business_entity_type_other.updateValueAndValidity() : '';
- }
-
- });
- }
+ }
- // create relations
- // exist_relation = Object.keys(data.records.applicant_relation).map(function(key) {
- // return data.records.applicant_relation[key];
- // });
- // if(exist_relation.length>0){
- // exist_relation.forEach((element,index) => {
- // relationControl.push(this.createApplicantRelation(element));
- // let innerrelControl:any = relationControl.controls[index].get('multiple_relation') as FormArray;
- // element.multiple_relation.forEach((innereElement) => {
- // innerrelControl.push(this.createMultipleRelation(innereElement));
- // });
- // let innercomrelControl:any = relationControl.controls[index].get('multiple_company_relation') as FormArray;
- // element.multiple_company_relation.forEach((innerecomElement) => {
- // innercomrelControl.push(this.createMultipleCompanyRelation(innerecomElement));
- // });
- // });
- // }
+ // create relations
+ // exist_relation = Object.keys(data.records.applicant_relation).map(function(key) {
+ // return data.records.applicant_relation[key];
+ // });
+ // if(exist_relation.length>0){
+ // exist_relation.forEach((element,index) => {
+ // relationControl.push(this.createApplicantRelation(element));
+ // let innerrelControl:any = relationControl.controls[index].get('multiple_relation') as FormArray;
+ // element.multiple_relation.forEach((innereElement) => {
+ // innerrelControl.push(this.createMultipleRelation(innereElement));
+ // });
+ // let innercomrelControl:any = relationControl.controls[index].get('multiple_company_relation') as FormArray;
+ // element.multiple_company_relation.forEach((innerecomElement) => {
+ // innercomrelControl.push(this.createMultipleCompanyRelation(innerecomElement));
+ // });
+ // });
+ // }
- }
- else {
- this.pd_applicants_details.forEach((element,key) => {
- console.log('element element',element);
- element.is_applicant=true;
- element.is_person_met=false;
- element.is_new=false;
- element.individuals_order_id = key+1;
- element.age = '',
- element.qualification = '',
- element.course_name = '',
- individualsControl.push(this.createIndividulas(element));
- personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
- //let relationControl = this._generalForm.controls['applicant_relation'];
- // let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name, 'individula_order_id':relationControl.controls.length+1};
- // relationControl.push(this.createApplicantRelation(applicant_details));
- // let mulRelationControl = relationControl.controls[relationControl.controls.length-1].get('multiple_relation');
- // mulRelationControl.push(this.createMultipleRelation(applicant_details))
- // let mulCmyRelationControl = relationControl.controls[relationControl.controls.length-1].get('multiple_company_relation');
- // mulCmyRelationControl.push(this.createMultipleCompanyRelation(applicant_details))
-
- // create companies
- if(element.company_name!='' && element.company_name!=null){
- let setCompanyValues: any = {company_order_id :companyControl.controls.length+1,company_name:element.company_name,is_company_applicant:element.is_company_applicant,business_entity_type:element.business_entity_type,business_entity_type_other:element.business_entity_type_other,business_years:element.business_years,business_month:element.business_month,business_date_object:element.business_date_object,is_new:element.is_new,is_active:true}
- companyControl.push(this.createCompanies(setCompanyValues))
- }
- });
- // check company if null update one row
- if(companyControl.controls.length ==0){
- let setCompanyValues: any = {company_order_id :companyControl.controls.length+1,company_name:'',is_company_applicant:false,business_entity_type:'',business_entity_type_other:'',business_years:'',business_month:'',business_date_object:'',is_active:true,is_new:false}
- companyControl.push(this.createCompanies(setCompanyValues))
-
- }
- }
- }, error => this.errorMessage = error);
-
}
- // create individuals
- createIndividulas(elementValue:any) {
- return this._fb.group({
- pd_co_applicant_id: [elementValue.pd_co_applicant_id],
- applicant_title_name: [elementValue.applicant_title_name],
- applicant_name: [elementValue.applicant_name],
- is_applicant:[elementValue.is_applicant],
- is_person_met:[elementValue.is_person_met],
- is_new:[elementValue.is_new],
- individuals_order_id: [elementValue.individuals_order_id],
- age: [elementValue.age],
- qualification: [elementValue.qualification],
- course_name:[elementValue.course_name]
- });
- }
- createPersonsWithRelationships(elementValue:any){
- return this._fb.group({
- pd_co_applicant_id: [elementValue.pd_co_applicant_id],
- applicant_name: [elementValue.applicant_name],
- relationship:[elementValue.relationship],
- relation_to:[elementValue.relation_to],
- individuals_order_id: [elementValue.individuals_order_id],
- });
- }
- // create companies
- createCompanies(elementValue:any) {
- return this._fb.group({
- company_order_id: [elementValue.company_order_id],
- company_name: [elementValue.company_name,],
- company_messrs_name: ['M/s'],
- is_company_applicant:[elementValue.is_company_applicant],
- business_entity_type :[elementValue.business_entity_type,Validators.required],
- business_years: [elementValue.business_years, Validators.required],
- business_month: [elementValue.business_month],
- business_date_object: [elementValue.business_date_object],
- is_active: [elementValue.is_active],
- is_new:[elementValue.is_new],
+ else {
+ this.pd_applicants_details.forEach((element, key) => {
+
+ element.is_applicant = true;
+ element.is_person_met = false;
+ element.is_new = false;
+ element.is_main_applicant = element.applicant_type == '1' ? true : false;
+ element.is_active = true;
+ element.individuals_order_id = key + 1;
+ element.age = '',
+ element.qualification = '',
+ element.course_name = '',
+ individualsControl.push(this.createIndividulas(element));
+ personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
+
+ //let relationControl = this._generalForm.controls['applicant_relation'];
+ // let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name, 'individula_order_id':relationControl.controls.length+1};
+ // relationControl.push(this.createApplicantRelation(applicant_details));
+ // let mulRelationControl = relationControl.controls[relationControl.controls.length-1].get('multiple_relation');
+ // mulRelationControl.push(this.createMultipleRelation(applicant_details))
+ // let mulCmyRelationControl = relationControl.controls[relationControl.controls.length-1].get('multiple_company_relation');
+ // mulCmyRelationControl.push(this.createMultipleCompanyRelation(applicant_details))
+
+ // create companies
+ if (element.company_name != '' && element.company_name != null) {
+ let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: element.company_name, is_company_applicant: element.is_company_applicant, business_entity_type: element.business_entity_type, business_entity_type_other: element.business_entity_type_other, business_years: element.business_years, business_month: element.business_month, business_date_object: element.business_date_object, is_new: element.is_new, is_active: true }
+ companyControl.push(this.createCompanies(setCompanyValues))
+ }
+ });
+ companyWithRelationshipsControl.push(this.createCompaniesRelationship());
+ // check company if null update one row
+ if (companyControl.controls.length == 0) {
+ let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: '', is_company_applicant: false, business_entity_type: '', business_entity_type_other: '', business_years: '', business_month: '', business_date_object: '', is_active: true, is_new: false }
+ companyControl.push(this.createCompanies(setCompanyValues))
+
+ }
+ }
+ }, error => this.errorMessage = error);
+
+ }
+ /******************************* load form data Ends Here *************************/
+
+ // create individuals
+ createIndividulas(elementValue: any) {
+
+ return this._fb.group({
+ pd_co_applicant_id: [elementValue.pd_co_applicant_id],
+ applicant_title_name: [elementValue.applicant_title_name],
+ applicant_name: [elementValue.applicant_name],
+ is_applicant: [elementValue.is_applicant],
+ is_person_met: [elementValue.is_person_met],
+ is_new: [elementValue.is_new],
+ is_main_applicant: [elementValue.is_main_applicant],
+ is_active: [elementValue.is_active],
+ individuals_order_id: [elementValue.individuals_order_id],
+ age: [elementValue.age],
+ qualification: [elementValue.qualification],
+ course_name: [elementValue.course_name]
});
- }
+ }
- // createCompaniesRelationship(elementValue:any) {
- // return this._fb.group({
- // applicant_name:[elementValue.applicant_name],
- // company_relationship:[elementValue.company_relationship],
- // relation_to_company:[elementValue.relation_to_company]
- // });
- // }
-
- createCompaniesRelationship() {
- return this._fb.group({
- applicant_name:[''],
- company_relationship:[''],
- relation_to_company:['']
+ createPersonsWithRelationships(elementValue: any) {
+ return this._fb.group({
+ pd_co_applicant_id: [elementValue.pd_co_applicant_id],
+ applicant_name: [elementValue.applicant_name],
+ relationship: [elementValue.relationship],
+ relation_to: [elementValue.relation_to],
+ individuals_order_id: [elementValue.individuals_order_id],
+ is_active:[elementValue.is_active]
});
- }
+ }
+
+ // create companies
+ createCompanies(elementValue: any) {
+ return this._fb.group({
+ company_order_id: [elementValue.company_order_id],
+ company_name: [elementValue.company_name,],
+ company_messrs_name: ['M/s'],
+ is_company_applicant: [elementValue.is_company_applicant],
+ business_entity_type: [elementValue.business_entity_type, Validators.required],
+ business_years: [elementValue.business_years, Validators.required],
+ business_month: [elementValue.business_month],
+ business_date_object: [elementValue.business_date_object],
+ is_active: [elementValue.is_active],
+ is_new: [elementValue.is_new],
- createCompaniesRelationshipWithData(elementValue:any) {
- return this._fb.group({
- applicant_name:[elementValue.applicant_name],
- company_relationship:[elementValue.company_relationship],
- relation_to_company:[elementValue.relation_to_company]
});
- }
+ }
- // open other family family member details
- addCompanyRelationshipDialogue() {
- let control: any = this._generalForm.get('company_with_relationships') as FormArray;
- //let setValues: any = { applicant_name:'', company_relationship:'',relation_to_company:''};
- control.push(this.createCompaniesRelationship())
- }
+ // createCompaniesRelationship(elementValue:any) {
+ // return this._fb.group({
+ // applicant_name:[elementValue.applicant_name],
+ // company_relationship:[elementValue.company_relationship],
+ // relation_to_company:[elementValue.relation_to_company]
+ // });
+ // }
+
+ createCompaniesRelationship() {
+ return this._fb.group({
+ applicant_name: [''],
+ company_relationship: [''],
+ relation_to_company: ['']
+ });
+ }
+
+ createCompaniesRelationshipWithData(elementValue: any) {
+ return this._fb.group({
+ applicant_name: [elementValue.applicant_name],
+ company_relationship: [elementValue.company_relationship],
+ relation_to_company: [elementValue.relation_to_company]
+ });
+ }
+
+ // open other family family member details
+ addCompanyRelationshipDialogue() {
+ let control: any = this._generalForm.get('company_with_relationships') as FormArray;
+ //let setValues: any = { applicant_name:'', company_relationship:'',relation_to_company:''};
+ control.push(this.createCompaniesRelationship())
+ }
// remove other famil membre
- removeCompanyRelationship(indexValues){
+ removeCompanyRelationship(indexValues) {
let control: any = this._generalForm.get('company_with_relationships') as FormArray;
control.removeAt(indexValues);
// control.controls[indexValues].controls.company_name.clearValidators();
@@ -350,208 +395,276 @@ export class GeneralInfoComponent implements OnInit {
//control.removeAt(indexValues);
}
- // add more companies
- addMoreCompanies() {
- let control: any = this._generalForm.get('companies') as FormArray;
- let setValues: any = {company_order_id :control.controls.length+1,company_name:'',is_company_applicant:false,business_entity_type:'',business_entity_type_other:'',business_years:'',business_month:'',business_date_object:'',is_active:true,is_new: true}
- control.push(this.createCompanies(setValues))
- }
+ // add more companies
+ addMoreCompanies() {
+ let control: any = this._generalForm.get('companies') as FormArray;
+ let setValues: any = { company_order_id: control.controls.length + 1, company_name: '', is_company_applicant: false, business_entity_type: '', business_entity_type_other: '', business_years: '', business_month: '', business_date_object: '', is_active: true, is_new: true }
+ control.push(this.createCompanies(setValues))
+ }
- // remove companies
- removeCompanies(indexValues) {
- this.count = this.count-1;
- let control: any = this._generalForm.get('companies') as FormArray;
- control.controls[indexValues].controls.is_active.setValue(false);
- control.controls[indexValues].controls.company_name.clearValidators();
- control.controls[indexValues].controls.company_name.updateValueAndValidity();
- control.controls[indexValues].controls.business_years.clearValidators();
- control.controls[indexValues].controls.business_years.updateValueAndValidity();
- control.controls[indexValues].controls.business_entity_type.clearValidators();
- control.controls[indexValues].controls.business_entity_type.updateValueAndValidity();
- //control.removeAt(indexValues);
- }
+ // remove companies
+ removeCompanies(indexValues) {
+ this.count = this.count - 1;
+ let control: any = this._generalForm.get('companies') as FormArray;
+ control.controls[indexValues].controls.is_active.setValue(false);
+ control.controls[indexValues].controls.company_name.clearValidators();
+ control.controls[indexValues].controls.company_name.updateValueAndValidity();
+ control.controls[indexValues].controls.business_years.clearValidators();
+ control.controls[indexValues].controls.business_years.updateValueAndValidity();
+ control.controls[indexValues].controls.business_entity_type.clearValidators();
+ control.controls[indexValues].controls.business_entity_type.updateValueAndValidity();
+ //control.removeAt(indexValues);
+ }
- // create applicant form array
- createApplicant(elementValue:any){
- return this._fb.group({
- pd_co_applicant_id: [elementValue.pd_co_applicant_id],
- applicant_name: [elementValue.applicant_name],
- company_name: [elementValue.company_name,],
- exist_status:[elementValue.exist_status==1 && elementValue.pd_co_applicant_id > 0 ? true : false]
- });
- }
+ // create applicant form array
+ createApplicant(elementValue: any) {
+ return this._fb.group({
+ pd_co_applicant_id: [elementValue.pd_co_applicant_id],
+ applicant_name: [elementValue.applicant_name],
+ company_name: [elementValue.company_name,],
+ exist_status: [elementValue.exist_status == 1 && elementValue.pd_co_applicant_id > 0 ? true : false]
+ });
+ }
- // create applicant relation form array
- createApplicantRelation(elementValue: any) {
- return this._fb.group({
- pd_co_applicant_id: [elementValue.pd_co_applicant_id],
- applicant_name: [elementValue.applicant_name],
- multiple_relation: this._fb.array([]),
- multiple_company_relation : this._fb.array([]),
- individuals_order_id:[elementValue.individuals_order_id]
- });
- }
- // create multiple relation details
- createMultipleRelation(elementValue: any) {
- return this._fb.group({
- applicant_relation_to: [elementValue.applicant_relation_to],
- relationship: [elementValue.relationship],
- other_relationship:[elementValue.other_relationship]
- });
- }
+ // create applicant relation form array
+ createApplicantRelation(elementValue: any) {
+ return this._fb.group({
+ pd_co_applicant_id: [elementValue.pd_co_applicant_id],
+ applicant_name: [elementValue.applicant_name],
+ multiple_relation: this._fb.array([]),
+ multiple_company_relation: this._fb.array([]),
+ individuals_order_id: [elementValue.individuals_order_id]
+ });
+ }
+ // create multiple relation details
+ createMultipleRelation(elementValue: any) {
+ return this._fb.group({
+ applicant_relation_to: [elementValue.applicant_relation_to],
+ relationship: [elementValue.relationship],
+ other_relationship: [elementValue.other_relationship]
+ });
+ }
- // add more relation
- addMoreRelation(rindex,mindex) {
- let control: any = this._generalForm.get('applicant_relation') as FormArray;
- control = control.controls[rindex].get('multiple_relation') as FormArray;
- let setValues: any = {applicant_relation_to :'',relationship:'',other_relationship:''}
- control.push(this.createMultipleRelation(setValues))
- }
+ // add more relation
+ addMoreRelation(rindex, mindex) {
+ let control: any = this._generalForm.get('applicant_relation') as FormArray;
+ control = control.controls[rindex].get('multiple_relation') as FormArray;
+ let setValues: any = { applicant_relation_to: '', relationship: '', other_relationship: '' }
+ control.push(this.createMultipleRelation(setValues))
+ }
- // remove relation
- removeRelation(rindex,mindex) {
- let control: any = this._generalForm.get('applicant_relation') as FormArray;
- control = control.controls[rindex].get('multiple_relation') as FormArray;
- control.removeAt(mindex);
- }
+ // remove relation
+ removeRelation(rindex, mindex) {
+ let control: any = this._generalForm.get('applicant_relation') as FormArray;
+ control = control.controls[rindex].get('multiple_relation') as FormArray;
+ control.removeAt(mindex);
+ }
- // create multiple company relation
- createMultipleCompanyRelation(elementValue: any) {
- return this._fb.group({
- company_name: [elementValue.company_name],
- company_relationship: [elementValue.company_relationship],
- company_other_relationship:[elementValue.company_other_relationship]
- });
- }
- // add more company relation
- addMoreCompanyRelation(rindex,cindex) {
- let control: any = this._generalForm.get('applicant_relation') as FormArray;
- control = control.controls[rindex].get('multiple_company_relation') as FormArray;
- let setValues: any = {company_name :'',company_relationship:'',company_other_relationship:''}
- control.push(this.createMultipleCompanyRelation(setValues))
- }
+ // create multiple company relation
+ createMultipleCompanyRelation(elementValue: any) {
+ return this._fb.group({
+ company_name: [elementValue.company_name],
+ company_relationship: [elementValue.company_relationship],
+ company_other_relationship: [elementValue.company_other_relationship]
+ });
+ }
+ // add more company relation
+ addMoreCompanyRelation(rindex, cindex) {
+ let control: any = this._generalForm.get('applicant_relation') as FormArray;
+ control = control.controls[rindex].get('multiple_company_relation') as FormArray;
+ let setValues: any = { company_name: '', company_relationship: '', company_other_relationship: '' }
+ control.push(this.createMultipleCompanyRelation(setValues))
+ }
- // remove company relation
- removeCompanyRelation(rindex,cindex) {
- let control: any = this._generalForm.get('applicant_relation') as FormArray;
- control = control.controls[rindex].get('multiple_company_relation') as FormArray;
- control.removeAt(cindex);
- }
+ // remove company relation
+ removeCompanyRelation(rindex, cindex) {
+ let control: any = this._generalForm.get('applicant_relation') as FormArray;
+ control = control.controls[rindex].get('multiple_company_relation') as FormArray;
+ control.removeAt(cindex);
+ }
+
+ // add more individuals details
+ addMoreIndividuals() {
+ const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
+ data: '',
+ width: '40%',
+ disableClose: true
+ });
+ dialogRef.afterClosed()
+ .subscribe(dataresult => {
+ if (dataresult.data.length > 0) {
+ dataresult.data.forEach((element, index) => {
+
+ let individualsControl = this._generalForm.controls['individuals'];
+ element.pd_co_applicant_id = this.count;
+ this.count = this.count + 1;
+ element.individuals_order_id = individualsControl.controls.length + 1;
+ element.is_new = true;
+ element.is_active = true;
+ element.is_main_applicant = false;
+ individualsControl.push(this.createIndividulas(element));
+ let relationControl = this._generalForm.controls['persons_with_relationships'];
+ let applicant_details: any = { 'pd_co_applicant_id': element.pd_co_applicant_id, 'applicant_name': element.applicant_name, 'relationship': '', 'relation_to': '', 'individuals_order_id': element.individuals_order_id,'is_active': element.is_active };
+ relationControl.push(this.createPersonsWithRelationships(applicant_details));
- // add more individuals details
- addMoreIndividuals() {
- const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
- data: '',
- width:'40%',
- disableClose: true
});
- dialogRef.afterClosed()
- .subscribe(dataresult => {
- if(dataresult.data.length>0){
- dataresult.data.forEach((element,index) => {
- console.log('element',element);
- let individualsControl = this._generalForm.controls['individuals'];
- element.pd_co_applicant_id = this.count;
- this.count = this.count+1;
- element.individuals_order_id = individualsControl.controls.length+1;
- element.is_new=true;
- individualsControl.push(this.createIndividulas(element));
- let relationControl = this._generalForm.controls['persons_with_relationships'];
- let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'relationship':'','relation_to':'','individuals_order_id':element.individuals_order_id};
- relationControl.push(this.createPersonsWithRelationships(applicant_details));
- });
-
- }
- });
-
- }
+ }
+ });
- // remove individuals
- // removeIndividuals(findex){
- // let control = this._generalForm.controls['individuals'];
- // control.removeAt(findex);
- // }
+ }
+
+ ApplicantName(event,coApplicantId){
+
+
+ let relationControl = this._generalForm.controls['persons_with_relationships'];
+ let index1 = relationControl.value.map(data => data.pd_co_applicant_id).indexOf(coApplicantId);
+
+ // details.value.applicant_name
+ let control = relationControl.controls[index1] as FormArray;
+
+ control.controls['applicant_name'].setValue(event.target.value);
+
+ // event.target.value
+ // controls.controls[index1].disable();
+ // let personsWithRelationshipsControl : any = control.controls[index1];
+ // personsWithRelationshipsControl.controls.is_applicant.setValue(false);
+ // control.markAsDirty({onlySelf:true});
+
+ // controls.removeAt(index1);
+ // let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
+ }
+
+ // remove individuals
+ // removeIndividuals(findex){
+ // let control = this._generalForm.controls['individuals'];
+ // control.removeAt(findex);
+ // }
- // remove individuals
- removeIndividuals(findex,details){
+ // remove individuals
+ removeIndividuals(findex, details) {
- let control = this._generalForm.controls['individuals'];
- let individualsControl : any = control.controls[findex];
- // individualsControl.controls.is_applicant.setValue(false);
-
- // console.log(control.controls[findex].value.is_active);
- // .controls.is_active.setValue(false);
- // console.log('control',control.dirty);
- // console.log('control',control.dirty);
- // control.markAsDirty({onlySelf:true});
- // console.log(control);
- control.removeAt(findex);
+ let control = this._generalForm.controls['individuals'];
+ let individualsControl: any = control.controls[findex];
+ individualsControl.controls.is_active.setValue(false);
+ // individualsControl.disable();
+ // individualsControl.controls.is_applicant.setValue(false);
+
+ // .controls.is_active.setValue(false);
+
+ // control.markAsDirty({onlySelf:true});
+
+ control.removeAt(findex);
- let controls = this._generalForm.controls['persons_with_relationships'];
-
- // console.log('control',control);
- let name = details.value.applicant_name;
- let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
- // let personsWithRelationshipsControl : any = control.controls[index1];
- // personsWithRelationshipsControl.controls.is_applicant.setValue(false);
- // control.markAsDirty({onlySelf:true});
- // console.log('control',);
- controls.removeAt(index1);
+ let controls = this._generalForm.controls['persons_with_relationships'];
- }
+
+ let name = details.value.applicant_name;
+ let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
+ // controls.controls[index1].disable();
+ // let personsWithRelationshipsControl : any = control.controls[index1];
+ // personsWithRelationshipsControl.controls.is_applicant.setValue(false);
+ // control.markAsDirty({onlySelf:true});
+
+ controls.removeAt(index1);
+
+ }
// update personal relation
updatePersonalRelation(indexVal) {
let control: any = this._generalForm.controls['persons_with_relationships'];
- control.controls[indexVal].value.relationship==0 ? control.controls[indexVal].controls['relation_to'].setValue('') : control.controls[indexVal].controls['relation_to'].setValue(control.controls[indexVal].value.relation_to);
+ control.controls[indexVal].value.relationship == 0 ? control.controls[indexVal].controls['relation_to'].setValue('') : control.controls[indexVal].controls['relation_to'].setValue(control.controls[indexVal].value.relation_to);
}
// update company relation
updateCompanyRelation(indexVal) {
- let control:any = this._generalForm.controls['company_with_relationships'];
- control.controls[indexVal].value.company_relationship==0 ? control.controls[indexVal].controls['relation_to_company'].setValue('') : control.controls[indexVal].controls['relation_to_company'].setValue(control.controls[indexVal].value.relation_to_company);
+ let control: any = this._generalForm.controls['company_with_relationships'];
+ control.controls[indexVal].value.company_relationship == 0 ? control.controls[indexVal].controls['relation_to_company'].setValue('') : control.controls[indexVal].controls['relation_to_company'].setValue(control.controls[indexVal].value.relation_to_company);
}
- /** On Key Press Event For Amount */
- keyPress(event: any) {
- const pattern = /[0-9]/;
-
- let inputChar = String.fromCharCode(event.charCode);
- if (event.keyCode != 8 && !pattern.test(inputChar)) {
- event.preventDefault();
- }
- }
-
- // convert mkonth to year business has been running
- ConvertMonthintoYearforBusiness(e,controlIndex){
- let control: any = this._generalForm.get('companies') as FormArray;
- control = control.controls[controlIndex];
- let business_year = control.controls.business_years.value;
-
- let converted_month : number = e%12;
- let converted_year : number = e/12;
-
- control.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
- control.controls.business_month.setValue(Math.floor(converted_month));
+ // submit form details
+ submitGeneralForm(formData: any) {
+ if (this._generalForm.invalid) {
+ this.validateAllFormFields(this._generalForm);
+ this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
+ return;
+ }
+ // else if(formData.applicant_relation.length==0){
+
+ // this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
+ // }
+ else {
+ let saveRecords: any = {}
+ saveRecords.pdid = formData.pdid;
+ saveRecords.formid = formData.formid;
+ saveRecords.individuals = formData.individuals;
+ saveRecords.companies = formData.companies;
+ saveRecords.persons_with_relationships = formData.persons_with_relationships;
+ saveRecords.company_with_relationships = formData.company_with_relationships;
+ //saveRecords.applicant_relation=formData.applicant_relation;
+ saveRecords.general_remark = formData.general_remark;
+
+ this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
+ dataresult => {
+ if (dataresult.status == 200) {
+ this.notifier.notify('success', 'Saved Successfully.');
+ setTimeout(() => {
+ this.dialogRef.close();
+ }, 3000);
+
+ }
+ else {
+ this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
+ // this.errorMessage = "Some Thing Wents Wrong Try Again !";
+ }
+ }, error => {
+ this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
+ // this.errorMessage = "Something Wents Wrong Try Again !";
+ });
+ }
+ }
+ /**************************** submit form details Ends Here ***********************/
+
+ /** On Key Press Event For Amount and Number Fields */
+ keyPress(event: any) {
+ const pattern = /[0-9]/;
+
+ let inputChar = String.fromCharCode(event.charCode);
+ if (event.keyCode != 8 && !pattern.test(inputChar)) {
+ event.preventDefault();
+ }
+ }
+
+ // convert month to year business has been running
+ ConvertMonthintoYearforBusiness(e, controlIndex) {
+ let control: any = this._generalForm.get('companies') as FormArray;
+ control = control.controls[controlIndex];
+ let business_year = control.controls.business_years.value;
+
+ let converted_month: number = e % 12;
+ let converted_year: number = e / 12;
+
+ control.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
+ control.controls.business_month.setValue(Math.floor(converted_month));
+
}
getDateObjects(values: any, controlIndex) {
let control: any = this._generalForm.get('companies') as FormArray;
control = control.controls[controlIndex];
- let pd_initiation_date:string = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/");
- let selected_date = this.pipe.transform(values, 'yyyy/MM/dd'); ;
+ let pd_initiation_date: string = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/");
+ let selected_date = this.pipe.transform(values, 'yyyy/MM/dd');;
let diffInMs: number = Date.parse(pd_initiation_date) - Date.parse(selected_date);
let diff: number = Math.floor(diffInMs / 1000);
diff /= (60 * 60 * 24 * 30);
- diff=Math.abs(Math.round(diff));
+ diff = Math.abs(Math.round(diff));
control.controls['business_years'].setValue(0);
control.controls['business_month'].setValue(0);
-
- if(diff){
+
+ if (diff) {
control.controls['business_years'].setValue(Math.floor(diff / 12));
control.controls['business_month'].setValue(Math.floor(diff % 12));
}
@@ -559,84 +672,28 @@ export class GeneralInfoComponent implements OnInit {
}
// check entity type and create other form control
- checkEntityType(value,controlIndex) {
+ checkEntityType(value, controlIndex) {
let control: any = this._generalForm.get('companies') as FormArray;
control = control.controls[controlIndex];
- value=='1' ? control.addControl('business_entity_type_other', new FormControl('', Validators.required)) : control.removeControl('business_entity_type_other');
+ value == '1' ? control.addControl('business_entity_type_other', new FormControl('', Validators.required)) : control.removeControl('business_entity_type_other');
}
- // submit form details
- submitGeneralForm(formData:any) {
- if (this._generalForm.invalid) {
- // console.log('if',this._generalForm.value);
- this.validateAllFormFields(this._generalForm);
- this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
- return;
- }
- // else if(formData.applicant_relation.length==0){
- // console.log('else if',this._generalForm.value);
- // this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
- // }
- else{
- let saveRecords:any = {}
- saveRecords.pdid=formData.pdid;
- saveRecords.formid=formData.formid;
- saveRecords.individuals=formData.individuals;
- saveRecords.companies=formData.companies;
- saveRecords.persons_with_relationships=formData.persons_with_relationships;
- saveRecords.company_with_relationships=formData.company_with_relationships;
- //saveRecords.applicant_relation=formData.applicant_relation;
- saveRecords.general_remark=formData.general_remark;
- // console.log(saveRecords);
- this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
- dataresult => {
- if (dataresult.status == 200) {
- this.notifier.notify('success', 'Saved Successfully.');
- setTimeout(() =>{
- this.dialogRef.close();
- },3000);
-
- }
- else {
- this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- // this.errorMessage = "Some Thing Wents Wrong Try Again !";
- }
- }, error => {
- this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- // this.errorMessage = "Something Wents Wrong Try Again !";
- });
- }
- }
-
- // selectedfrequency(e,i){
- // switch(+e){
- // case 1: this.placeholderName[i] = 'Weekly Instalment Amount'; break;
- // case 2: this.placeholderName[i] = 'Daily Instalment Amount'; break;
- // case 3: this.placeholderName[i] = 'Annual Instalment Amount'; break;
- // case 4: this.placeholderName[i] = 'Hourly Instalment Amount'; break;
- // case 5: this.placeholderName[i] = 'EMI Amount'; break;
- // case 6: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
- // case 7: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
- // default : this.placeholderName[i] = ''; break;
- // }
- // }
-
- // validate all form group and form array fields
-validateAllFormFields(formGroup: any) {
- Object.keys(formGroup.controls).forEach(field => {
+
+ // validate all form group and form array fields
+ validateAllFormFields(formGroup: any) {
+ Object.keys(formGroup.controls).forEach(field => {
const control = formGroup.get(field);
if (control instanceof FormControl) {
- control.markAsTouched({ onlySelf: true });
- } else if (control instanceof FormGroup) {
- this.validateAllFormFields(control);
- } else if (control instanceof FormArray) {
- this.validateAllFormFields(control);
+ control.markAsTouched({ onlySelf: true });
+ } else if (control instanceof FormGroup) {
+ this.validateAllFormFields(control);
+ } else if (control instanceof FormArray) {
+ this.validateAllFormFields(control);
}
- });
-}
-}
-
-
+ });
+ }
+ /******************* validate all form group and form array fields ENd Here ********/
+}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.ts
index 903eb06ca..f2dc7f4de 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.ts
@@ -47,7 +47,7 @@ export class LenderRepresentativeComponent implements OnInit {
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
- // console.log(this.main_applicant+','+this.lender_applicant_id+','+this.subproduct_abbr+','+this.customer_segment_abbr);
+
this.form_id = 15;
this.notifier = notifier;
}
@@ -78,8 +78,6 @@ export class LenderRepresentativeComponent implements OnInit {
};
// open() {
-// // console.log('hai');
-
// const config = new MatSnackBarConfig();
// config.duration = this.autoHide;
// config.panelClass = this.addExtraClass ? ['party'] : null;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
index 99c3c1eb7..e848a68bd 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
@@ -1,303 +1,390 @@