diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.html index e8f03c8..1f57c76 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.html @@ -140,6 +140,7 @@ + Select {{item.name.split('of')[0]}} Designation required @@ -150,6 +151,7 @@ + Select {{item.name}} Relation required @@ -157,6 +159,7 @@ Relation to + Select {{applicant.value.applicant_name}} Relation to required @@ -256,7 +259,8 @@
+ (change)="dynamicOnChangeValidations($event.checked,[getQuestionControl().at(1).get('alternative_addresses')['controls'][0]['controls'].alternative_address,getQuestionControl().at(1).get('alternative_addresses')['controls'][0]['controls'].reason_for_alternative_address],false)" > +
@@ -536,6 +540,7 @@ Do You Want to Add Other Documents? + Select Yes No @@ -696,6 +701,7 @@ Stock Photograph + Select Yes No @@ -952,6 +958,7 @@ Final Status of visit + Select Positive Negative Could not verify diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.ts index 63f0323..edef034 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.ts @@ -31,10 +31,6 @@ export class CommonQuesComponent implements OnInit { stepper_index:2 }, { - form_name:'Employer information', - form_id:"BUSINESS_GROUP", - stepper_index:2 - },{ form_name:'Credit Manager Queries', form_id:24, stepper_index:3, @@ -172,7 +168,7 @@ export class CommonQuesComponent implements OnInit { // this.FormId=this.router.getCurrentNavigation().extras.state.FormId this.applicants = this.pdDetails.applicants_details; this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2 && appt.pd_co_applicant_id != 0); - this.applicants.push({'pd_co_applicant_id': 0,'applicant_name': "Others"}) + // this.applicants.push({'pd_co_applicant_id': 0,'applicant_name': "Others"}) this.customer_seg_abbr = this.pdDetails.customer_segment_abbr console.log("constr",this.pdDetails,this.docs_tobe_collect) if(this.pdDetails.lender_short_name == 'CLIX' || this.pdDetails.lender_short_name == 'MWISE' || this.pdDetails.prod_catagory == 'LAEP') @@ -360,6 +356,7 @@ getMasters() { modifyApplicantList=this.applicants.map(element=>{ return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; }) + modifyApplicantList.push({id:0,name:"Others",group_id:2}) this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) } @@ -1174,11 +1171,11 @@ public findInvalidControls() { if(group.invalid) { console.log(group,group.value.form_name); // debugger; - msg= "Questions are not filled up in "+group.value.form_name + msg= group.value.form_name+" are not complete" let index = this.stepperInfo.findIndex(vv=>vv.form_id == group.value.form_id); console.log("Index",index); if(index != -1) { - msg = "Questions are not filled up in "+this.stepperInfo[index].form_name + msg = this.stepperInfo[index].form_name+" are not complete" this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index } for (const name in group['controls']) { @@ -1187,7 +1184,7 @@ public findInvalidControls() { let invalidFields = [].slice.call(document.getElementsByClassName('ng-invalid')); let firstInvalidField; for(let val in invalidFields){ - if( invalidFields[val].nodeName == 'MAT-FORM-FIELD' || invalidFields[val].nodeName == 'MAT-SELECT' || invalidFields[val].nodeName == 'TEXTAREA' ){ //INPUT FOR INPUT FIELD + 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; } @@ -1516,6 +1513,20 @@ getAddressTypeNameById(id) { } return 'Workplace' } +dynamicOnChangeValidations(choosed_value,controls_arr,value_compare) { + console.log("D",choosed_value,value_compare,value_compare == choosed_value) + if(controls_arr.length && controls_arr.length >0) { + controls_arr.forEach(vv=>{ + if(choosed_value == value_compare) { + vv.setValidators(Validators.required); + } + else{ + vv.clearValidators(); + } + vv.updateValueAndValidity() +}) + } +} ngOnDestroy() { console.log("Common ques component destroyed"); if(this.firstFormGroup.dirty){ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.html index 9a5d734..13e5b18 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.html @@ -82,6 +82,7 @@ Is the Employer/ Manager available during FI visit? + Select Yes No @@ -93,6 +94,7 @@ Anyone met during FI visit at initiated address? + Select Yes No @@ -142,7 +144,7 @@ - Employment Information + {{dynamicStepperHeadingForEmp}}
@@ -158,6 +160,7 @@ + Select {{item.name.split('of')[0]}} @@ -167,7 +170,7 @@
-
+
- Photograph of “Photo ID card of the Employer/Manager" + Photo ID card of the Employer/Manager + Select {{item}} @@ -226,6 +230,7 @@ Employer’s/Manager’s Company ID card / Visiting Card provided”? + Select Yes No @@ -256,7 +261,8 @@
Salary Amount Confirmed from Employer/Manager - + + Select Yes No @@ -265,11 +271,11 @@
- Gross Salary + Gross Salary (salary before deduction) - Net Salary + Net Salary (salary after deduction) @@ -332,11 +338,21 @@
- + Why salary amount was not confirmed by employer? - + + + + {{item}} + + Required + - + + Please Specify + +
@@ -366,7 +382,7 @@
-
Documents Sighted of applicant employment During FI
+
{{dynamicStepperHeadingForEmp}}



@@ -588,7 +604,7 @@ Image -->

-
Office Setup Photographs
+
{{dynamicStepperHeadingForEmp}}



@@ -616,7 +632,7 @@ Image -->

-
Name board/Entrance photograph
+
{{dynamicStepperHeadingForEmp}}



@@ -737,12 +753,13 @@ Image -->
+ (change)="dynamicOnChangeValidations($event.checked,[getQuestionControl().at(1).get('alternative_addresses')['controls'][0]['controls'].alternative_address,getQuestionControl().at(1).get('alternative_addresses')['controls'][0]['controls'].reason_for_alternative_address],false)">
-

+
+
@@ -808,7 +825,7 @@ Image -->
-
+
@@ -991,6 +1008,7 @@ Image --> Final Status of visit + Select Positive Negative Could not verify diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.ts index fbc92ee..cc628c8 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.ts @@ -65,6 +65,7 @@ export class EmployerInfoComponent implements OnInit { docNotAvailList:any=[ "Documents were not shared by Employer", "Documents are not issued by Employer", "Documents were not available", "Employer was not available", "Others (please specify)" ] + salAmountNotConfirmList=["Employer doesn’t know", "Employer was not co-operative", "Others Please Specify"] public dateonly: any = [{date:1,isdisabled:false},{date:2,isdisabled:false},{date:3,isdisabled:false},{date:4,isdisabled:false},{date:5,isdisabled:false},{date:6,isdisabled:false},{date:7,isdisabled:false},{date:8,isdisabled:false},{date:9,isdisabled:false},{date:10,isdisabled:false},{date:11,isdisabled:false},{date:12,isdisabled:false},{date:13,isdisabled:false},{date:14,isdisabled:false},{date:15,isdisabled:false},{date:16,isdisabled:false},{date:17,isdisabled:false},{date:18,isdisabled:false},{date:19,isdisabled:false},{date:20,isdisabled:false},{date:21,isdisabled:false},{date:22,isdisabled:false},{date:23,isdisabled:false},{date:24,isdisabled:false},{date:25,isdisabled:false},{date:26,isdisabled:false},{date:27,isdisabled:false},{date:28,isdisabled:false},{date:29,isdisabled:false},{date:30,isdisabled:false},{date:31,isdisabled:false}]; public todate: any[] = this.dateonly; neighbour_status_list:any=[{id:'',name:'Select'},{id:'Positive',name:'Positive'},{id:'Negative',name:'Negative'},{id:'Could not verify',name:'Could not verify'}] @@ -102,6 +103,7 @@ export class EmployerInfoComponent implements OnInit { customer_seg_abbr: any; generalExistBusinessYear: number; generalExistBusinessMonth: number; + dynamicStepperHeadingForEmp:String; notifier: NotifierService; get questions() { return this.employerForm.get('questions');} get getEmployer_details() {return this.questions.get([2]).get('employer_details')} @@ -720,6 +722,7 @@ export class EmployerInfoComponent implements OnInit { gross_monthly_salary:[''], net_monthly_salary:[''], sal_amount_was_not_confirmed:[''], + sal_amount_was_not_confirmed_others:[''], // Mode of net salary mode_of_getting_salary:[''], amount_paid_through_bank:[''], @@ -1227,11 +1230,11 @@ export class EmployerInfoComponent implements OnInit { if(group.invalid) { console.log(group,group.value.form_name); // debugger; - msg= "Questions are not filled up in "+group.value.form_name + msg= group.value.form_name+" are not complete" let index = this.stepperInfo.findIndex(vv=>vv.form_id == group.value.form_id); console.log("Index",index); if(index != -1) { - msg = "Questions are not filled up in "+this.stepperInfo[index].form_name + msg = this.stepperInfo[index].form_name+" are not complete" this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index } for (const name in group['controls']) { @@ -1549,6 +1552,7 @@ export class EmployerInfoComponent implements OnInit { // general_controls.person_met_entered_pic.setValidators(Validators.required); // FOR ADDING OFFICE PHOTO employement_controls.addControl('office_photographs',this._formBuilder.array([])) + this.dynamicStepperHeadingForEmp = "Office Setup Photographs" // FOR REMOVING NAME BOARD PHOTO employement_controls.removeControl('nameboard_photographs') return true @@ -1556,6 +1560,7 @@ export class EmployerInfoComponent implements OnInit { else if(general_controls.is_met_during_visit.value == 'no'){ // FOR ADDING NAME BOARD PHOTO employement_controls.addControl('nameboard_photographs',this._formBuilder.array([])) + this.dynamicStepperHeadingForEmp = "Name board/Entrance photograph" // FOR REMOVING OFFICE PHOTO employement_controls.removeControl('office_photographs') return false @@ -1594,6 +1599,7 @@ export class EmployerInfoComponent implements OnInit { case 4: if (general_controls.is_employer_available.value == 'yes') { employement_controls.addControl('employer_details',this.getEmployerDetailsControls()) + this.dynamicStepperHeadingForEmp = "Employment Information" return true; } else{ @@ -1607,6 +1613,7 @@ export class EmployerInfoComponent implements OnInit { if(applicant_arr && applicant_arr.length > 0) { if(general_controls.is_employer_available.value == 'no' && applicant_arr.filter(vv=>vv.is_person_met == true).length != 0 ){ employement_controls.addControl('docs_sighted',this.getDocsSightedDetailsControls()) + this.dynamicStepperHeadingForEmp = "Documents Sighted of applicant employment During FI" return true; } else{ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 92ceb09..67ac373 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -152,7 +152,7 @@ - +
@@ -193,7 +193,7 @@
- +
@@ -260,7 +260,7 @@
- +
@@ -398,7 +398,7 @@ --> - PD History + FI History
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index 8757caa..afdd3db 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -370,6 +370,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { .subscribe(dataresult => { if (dataresult.update_status == true) { // this.router.navigate(['../../startpd',pdDetails.assigned_pd], { relativeTo: this.route }); + this.viewPdDetails(this.viewID) this.openQuesComp(pdDetails) } }); @@ -502,13 +503,14 @@ export class ViewPdComponent implements OnInit, OnDestroy { console.log('qccompleted',master); let param={ pd_id: master.pd_id, - vendor_status: master.vendor_status, + vendor_status: 'QC_COMPLETED', fk_updatedby: master.fk_updatedby, } this._pd.updateStatus(param).subscribe(res=>{ if(res['status'] == '200'){ console.log(res['dataStatus'].status == 200) this.notifier.notify("info","Updated Successfully") + this.viewPdDetails(this.viewID); } else if(res['status'] == '304'){ Swal(