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 17a49f6..e8f03c8 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 @@ -27,22 +27,24 @@ Applicants
- Is Person Met + Applicant Met
-
+
{{applicant.value.applicant_name}}
+
Not Met + Met

@@ -590,16 +592,16 @@

- Office Photographs + {{getQuestionControl().at(1).value.address_type ? getAddressTypeNameById(getQuestionControl().at(1).value.address_type) :'Workplace'}} Photographs
-
+
- Office Photograph {{i+1}} + Workplace Photograph {{i+1}}
@@ -959,6 +961,7 @@ Comments + Required
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.scss index 022e7fe..eb6df2f 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/common-ques/common-ques.component.scss @@ -53,4 +53,43 @@ margin-right: 5%; } } + @-webkit-keyframes highlight-fade { + 0% { + background: orange; + } + 100% { + background: white; + } + } + @-moz-keyframes highlight-fade { + 0% { + background: orange; + } + 100% { + background: white; + } + } + @-ms-keyframes highlight-fade { + 0% { + background: orange; + } + 100% { + background: white; + } + } + @keyframes highlight-fade { + 0% { + background: orange; + } + 100% { + background: white; + } + } + .field_highlight { + -webkit-animation: highlight-fade 4s ease-out; + -moz-animation: highlight-fade 4s ease-out; + -o-animation: highlight-fade 4s ease-out; + animation: highlight-fade 4s ease-out; + // background: blue; + } 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 e4107c2..63f0323 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 @@ -171,6 +171,8 @@ export class CommonQuesComponent implements OnInit { // this.questionDetails=this.router.getCurrentNavigation().extras.state.questionDetails // 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.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') @@ -223,7 +225,7 @@ ngOnInit() { questions:this._formBuilder.array([this.addGeneralControls(),this.addAddressControls(), this.addBusinessGroupControls(),this.addNeighbourhoodControls(),this.addFinalRemarksControls(), this._formBuilder.group({ - final_comments:[''], + final_comments:['',Validators.required], final_visit_status:['',Validators.compose([Validators.required])], form_id:["COMMENTS"], form_name:["Comments"] @@ -518,6 +520,7 @@ generateGroupControls(datas) { this.toggleVisibility(neighbour_obj.did_not_know_the_owner,i,2) // }) this.addNeighbourhoodGroup() + this.getOtherOrganisationOwner(neighbour_obj.organisation_owner,i) } } this.firstFormGroup.get('questions').patchValue(datas); @@ -1190,7 +1193,15 @@ public findInvalidControls() { } } if(firstInvalidField != undefined){ - firstInvalidField.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"}) + // firstInvalidField.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"}) + setTimeout(()=>{ + firstInvalidField.scrollIntoView({block: "start", inline: "nearest"}) + // firstInvalidField.style.background = 'red' + firstInvalidField.classList.remove('field_highlight') + setTimeout(()=>{ + firstInvalidField.classList.add('field_highlight') + },300) + },500) // this.myStepper.selectedIndex = 0; } @@ -1258,6 +1269,7 @@ onSubmit(flag?) { records.pdid = this.pdDetails.pd_id; records.formid = "25"; records.fk_createdby = this.users; + records.is_form_validated = flag == 'go_back' ? '0' : '1' this.quesService.savePDFormDetailsWithID(records).subscribe(result=>{ if(result['dataStatus']) { if(flag != 'go_back') { @@ -1498,6 +1510,12 @@ if(field && field.filter(vv=>vv == 'Others (Please specify)').length > 0) { } return false } +getAddressTypeNameById(id) { + if(this.addressTypes.length > 0) { + return this.addressTypes.filter(vv=>vv.address_type_id == id)[0].address_type + } + return 'Workplace' +} 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 03d4f7d..9a5d734 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 @@ -24,22 +24,26 @@ Applicants
- Is Person Met + Applicant Met
-
+
{{applicant.value.applicant_name}}
+
+ Not Met + Met +

@@ -996,6 +1000,7 @@ Image --> Comments + Required
Neighbourhood check diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.scss index 3203770..9ead99c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-questions/employer-info/employer-info.component.scss @@ -57,4 +57,43 @@ hr{ width: 100%; border-bottom: 2px solid lightcoral; + } + @-webkit-keyframes highlight-fade { + 0% { + background: orange; + } + 100% { + background: white; + } + } + @-moz-keyframes highlight-fade { + 0% { + background: orange; + } + 100% { + background: white; + } + } + @-ms-keyframes highlight-fade { + 0% { + background: orange; + } + 100% { + background: white; + } + } + @keyframes highlight-fade { + 0% { + background: orange; + } + 100% { + background: white; + } + } + .field_highlight { + -webkit-animation: highlight-fade 4s ease-out; + -moz-animation: highlight-fade 4s ease-out; + -o-animation: highlight-fade 4s ease-out; + animation: highlight-fade 4s ease-out; + // background: blue; } \ No newline at end of file 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 8509481..fbc92ee 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 @@ -37,20 +37,15 @@ export class EmployerInfoComponent implements OnInit { form_id:5, stepper_index:3, is_dynamic:true - },{ - form_name:'Neighbourhood Details', - form_id:19, - stepper_index:4, - is_dynamic:true },{ form_name:'Final Remarks', form_id:20, - stepper_index:5, + stepper_index:4, is_dynamic:true },{ form_name:'Submit', form_id:'COMMENTS', - stepper_index:5, + stepper_index:4, is_dynamic:true },] // public person_met_entered:FormControl= new FormControl('') @@ -157,7 +152,7 @@ export class EmployerInfoComponent implements OnInit { questions:this._formBuilder.array([this.addGeneralControls(),this.addAddressControls(), this.addEmployerInfoForm(),this.addNeighbourhoodControls(),this.addFinalRemarksControls(), this._formBuilder.group({ - final_comments:[''], + final_comments:['',Validators.required], final_visit_status:['',Validators.compose([Validators.required])], company_existence_neighbour_confirmed:['',Validators.required], company_existence_years:[''], @@ -1251,7 +1246,15 @@ export class EmployerInfoComponent implements OnInit { } } if(firstInvalidField != undefined){ - firstInvalidField.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"}) + // firstInvalidField.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"}) + setTimeout(()=>{ + firstInvalidField.scrollIntoView({block: "start", inline: "nearest"}) + // firstInvalidField.style.background = 'red' + firstInvalidField.classList.remove('field_highlight') + setTimeout(()=>{ + firstInvalidField.classList.add('field_highlight') + },300) + },500) // this.myStepper.selectedIndex = 0; } @@ -1343,6 +1346,7 @@ export class EmployerInfoComponent implements OnInit { records.pdid = this.pdDetails.pd_id; records.formid = "25"; records.fk_createdby = this.users; + records.is_form_validated = flag == 'go_back' ? '0' : '1' this.quesService.savePDFormDetailsWithID(records).subscribe(result=>{ if(result['dataStatus']) { if(flag != 'go_back') { 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 7fe17ff..92ceb09 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 @@ -395,7 +395,7 @@

No Document

- + --> PD History @@ -420,7 +420,7 @@

No History

-
--> +