clix validation : ps
This commit is contained in:
parent
96a1bbc177
commit
7b83255da7
@ -60,7 +60,7 @@ btnaccess:boolean = false;
|
||||
stateVal: any=[];
|
||||
cityListVal: any=[];
|
||||
pincodeListVal: any=[];
|
||||
lenderID:any;
|
||||
lenderName: any ;
|
||||
productabbr:any;
|
||||
isSubproductShown: boolean = true;
|
||||
|
||||
@ -68,11 +68,11 @@ btnaccess:boolean = false;
|
||||
|
||||
this.shared.refresh();
|
||||
this.pddrops();
|
||||
|
||||
console.log(this.productabbr,this.lenderName);
|
||||
this.pdforms = this.fb.group({
|
||||
pd_branch_id:['',Validators.compose([Validators.required])],
|
||||
lenAppID:['',Validators.compose([Validators.required])],
|
||||
proName:[this.lenderID != 12 ? '' : Validators.compose([Validators.required])],
|
||||
proName:[this.productabbr != 'BL' && this.productabbr != 'LAEP' ? '' : '',Validators.compose([Validators.required])],
|
||||
subProName:[''],
|
||||
customeSeg:[''],
|
||||
pdType:[''],
|
||||
@ -87,7 +87,7 @@ btnaccess:boolean = false;
|
||||
//Applicant Info
|
||||
applicant_title_name:[''],
|
||||
mainappname:[''],
|
||||
mainappcompany:[''],
|
||||
mainappcompany:[this.lenderName == 'CLIX' ? '' : '',Validators.compose([Validators.required])],
|
||||
mainappphone:[''],
|
||||
mainapplandline:[''],
|
||||
applicant_stdcode:[''],
|
||||
@ -116,7 +116,7 @@ btnaccess:boolean = false;
|
||||
}
|
||||
initAddress(){
|
||||
return this.fb.group({
|
||||
add1:[this.lenderID != 12 ? '' : Validators.compose([Validators.required])],
|
||||
add1:[this.lenderName != 'CLIX' ? '' : '',Validators.compose([Validators.required])],
|
||||
state:[''],
|
||||
city:[''],
|
||||
pincode:[''],
|
||||
@ -144,9 +144,9 @@ btnaccess:boolean = false;
|
||||
}
|
||||
initPersonCoApplicant(){
|
||||
return this.fb.group({
|
||||
applicant_title_name:[''],
|
||||
mainappname:[this.lenderID != 12 ? '' : Validators.compose([Validators.required])],
|
||||
mainappcompany:[this.lenderID != 12 ? '' : Validators.compose([Validators.required])],
|
||||
applicant_title_name:[''],
|
||||
mainappname:[''],
|
||||
mainappcompany:[''],
|
||||
mainappphone:[''],
|
||||
mainapplandline:[''],
|
||||
applicant_stdcode:[''],
|
||||
@ -192,7 +192,8 @@ inWords(event){
|
||||
{
|
||||
this.users = this.users.records[0];
|
||||
}
|
||||
this.lenderID = this.users.fk_entity_id;
|
||||
this.lenderName = this.users.full_name.split(" ")[0].toUpperCase();
|
||||
|
||||
//console.log("Entity branch",this.users.fk_entity_id[])
|
||||
this.qustCat.getLenderDetailsById(this.users.fk_entity_id).subscribe(res=>{
|
||||
|
||||
@ -219,7 +220,7 @@ inWords(event){
|
||||
this.proname = res;
|
||||
if(this.proname.dataStatus == true)
|
||||
{
|
||||
if(this.lenderID == 12){
|
||||
if(this.lenderName == 'CLIX'){
|
||||
let getProductAbbr = this.proname.records.map(dval => dval.product_abbr);
|
||||
let ClixProductAbbr = ['BL','LAEP'];
|
||||
let FilteredAbbr: any = [];
|
||||
@ -242,7 +243,7 @@ inWords(event){
|
||||
this.customeSeg = res;
|
||||
if(this.customeSeg.dataStatus == true)
|
||||
{
|
||||
if(this.lenderID == 12){
|
||||
if(this.lenderName == 'CLIX'){
|
||||
// let filtered = this.customeSeg.filter(s => (s.customer_segment).includes('Self'));
|
||||
// this.customeSeg = filtered;
|
||||
this.customeSeg = this.customeSeg.records;
|
||||
@ -327,7 +328,7 @@ inWords(event){
|
||||
break;
|
||||
}
|
||||
|
||||
if(this.lenderID == 12 && this.productabbr != ''){
|
||||
if(this.lenderName == 'CLIX' && this.productabbr != ''){
|
||||
this.pdforms.controls['pdType'].setValue('1');
|
||||
this.pdforms.controls['customeSeg'].setValue('5');
|
||||
this.pdforms.controls['loanAmt'].setValue(0);
|
||||
@ -417,9 +418,7 @@ inWords(event){
|
||||
{
|
||||
console.log(pddata);
|
||||
this.btnaccess = true;
|
||||
if(this.pdforms.invalid) {
|
||||
this.toast.lenderappmessage("Please Fill all the Fields marked with '*' ")
|
||||
}
|
||||
|
||||
this.pddocdata.forEach((items,index) => {
|
||||
if(items.Name !='' && items.Name != null && items.Name !== undefined){}
|
||||
else{
|
||||
@ -538,7 +537,7 @@ inWords(event){
|
||||
}
|
||||
let values={
|
||||
'applicant_title_name':datas.applicant_title_name,
|
||||
'company_name': datas.mainappcompany,
|
||||
'company_name': datas.mainappcompany,
|
||||
'applicant_name':datas.mainappname,
|
||||
'mobile_no':datas.mainappphone,
|
||||
'landline':coapplicant_landline_no,
|
||||
@ -585,6 +584,8 @@ inWords(event){
|
||||
this.toast.lenderappmessage('something went wrong Try Again');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
searchFun(control,index,option){
|
||||
console.log(control,option);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user