Fairoj : SE_DI Feedback 1 changes
This commit is contained in:
parent
efd2ff533a
commit
f67e81816e
@ -27,22 +27,24 @@
|
||||
<strong> Applicants</strong>
|
||||
</div>
|
||||
<div fxLayout="column" align="end">
|
||||
<strong> Is Person Met</strong>
|
||||
<strong>Applicant Met</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let applicant of getQuestionControl().at(0).get('individuals')['controls'];let a_i=index" [formGroupName]="a_i" style="margin-top: 1%">
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="80%">
|
||||
<div fxLayout="column" fxFlex="79%">
|
||||
{{applicant.value.applicant_name}}
|
||||
</div>
|
||||
<div fxLayout="column" align="end">
|
||||
<!-- <mat-label>Is Person Met</mat-label> -->
|
||||
<div> <span style="font-size: 13px;margin-right: 2px">Not Met</span>
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
formControlName="is_person_met">
|
||||
|
||||
</mat-slide-toggle>
|
||||
<span style="font-size: 13px;margin-left: 2px">Met</span> </div>
|
||||
</div>
|
||||
</div><br/>
|
||||
<div *ngIf="applicant.value.is_person_met == true">
|
||||
@ -590,16 +592,16 @@
|
||||
</div>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<mat-label>Office Photographs</mat-label>
|
||||
<mat-label>{{getQuestionControl().at(1).value.address_type ? getAddressTypeNameById(getQuestionControl().at(1).value.address_type) :'Workplace'}} Photographs</mat-label>
|
||||
<div fxLayout="row" fxLayoutAlign="space-evenly" formArrayName="office_photographs">
|
||||
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getBusinessInfoOfficePhotControls();let i=index" [formGroupName]="i">
|
||||
<!-- {{val.value | json}} -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="Office Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><br/>
|
||||
<img ngxViewer text="PD Photos" title="Workplace Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><br/>
|
||||
</div>
|
||||
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<mat-label style="font-size: 12px;text-align:left">Office Photograph {{i+1}}</mat-label>
|
||||
<mat-label style="font-size: 12px;text-align:left">Workplace Photograph {{i+1}}</mat-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="getBusinessInfoOfficePhotControls().length == 0" style="text-align: center;margin-top: 15px;">
|
||||
@ -959,6 +961,7 @@
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Comments</mat-label>
|
||||
<textarea matInput type="text" placeholder="Any other comments" formControlName="final_comments"></textarea>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(5)['controls']['final_comments'].errors?.required || getQuestionControl().at(5)['controls']['final_comments'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div class="mat-button-div">
|
||||
<button mat-stroked-button matStepperPrevious>Back</button>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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){
|
||||
|
||||
@ -24,22 +24,26 @@
|
||||
<strong> Applicants</strong>
|
||||
</div>
|
||||
<div fxLayout="column" align="end">
|
||||
<strong> Is Person Met</strong>
|
||||
<strong>Applicant Met</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let applicant of getQuestionControl().at(0).get('individuals')['controls'];let a_i=index" [formGroupName]="a_i" style="margin-top: 1%">
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="80%">
|
||||
<div fxLayout="column" fxFlex="79%">
|
||||
{{applicant.value.applicant_name}}
|
||||
</div>
|
||||
<div fxLayout="column" align="end">
|
||||
<!-- <mat-label>Is Person Met</mat-label> -->
|
||||
<div>
|
||||
<span style="font-size: 13px;margin-right: 2px">Not Met</span>
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
formControlName="is_person_met">
|
||||
|
||||
</mat-slide-toggle>
|
||||
<span style="font-size: 13px;margin-left: 2px">Met</span>
|
||||
</div>
|
||||
</div>
|
||||
</div><br/>
|
||||
<div *ngIf="applicant.value.is_person_met == true">
|
||||
@ -996,6 +1000,7 @@ Image </mat-label> -->
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Comments</mat-label>
|
||||
<textarea matInput type="text" placeholder="Any other comments" formControlName="final_comments"></textarea>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(5)['controls']['final_comments'].errors?.required || getQuestionControl().at(5)['controls']['final_comments'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div>
|
||||
<mat-label>Neighbourhood check</mat-label>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -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') {
|
||||
|
||||
@ -395,7 +395,7 @@
|
||||
<p>No Document</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>-->
|
||||
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>PD History</ng-template>
|
||||
@ -420,7 +420,7 @@
|
||||
<p>No History</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</mat-tab> -->
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user