Fairoj : SE_DI Feedback 1 changes
This commit is contained in:
parent
efd2ff533a
commit
f67e81816e
@ -27,22 +27,24 @@
|
|||||||
<strong> Applicants</strong>
|
<strong> Applicants</strong>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="column" align="end">
|
<div fxLayout="column" align="end">
|
||||||
<strong> Is Person Met</strong>
|
<strong>Applicant Met</strong>
|
||||||
</div>
|
</div>
|
||||||
</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 *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="row">
|
||||||
<div fxLayout="column" fxFlex="80%">
|
<div fxLayout="column" fxFlex="79%">
|
||||||
{{applicant.value.applicant_name}}
|
{{applicant.value.applicant_name}}
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="column" align="end">
|
<div fxLayout="column" align="end">
|
||||||
<!-- <mat-label>Is Person Met</mat-label> -->
|
<!-- <mat-label>Is Person Met</mat-label> -->
|
||||||
|
<div> <span style="font-size: 13px;margin-right: 2px">Not Met</span>
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
class="example-margin"
|
class="example-margin"
|
||||||
formControlName="is_person_met">
|
formControlName="is_person_met">
|
||||||
|
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
|
<span style="font-size: 13px;margin-left: 2px">Met</span> </div>
|
||||||
</div>
|
</div>
|
||||||
</div><br/>
|
</div><br/>
|
||||||
<div *ngIf="applicant.value.is_person_met == true">
|
<div *ngIf="applicant.value.is_person_met == true">
|
||||||
@ -590,16 +592,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<br/>
|
<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="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">
|
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getBusinessInfoOfficePhotControls();let i=index" [formGroupName]="i">
|
||||||
<!-- {{val.value | json}} -->
|
<!-- {{val.value | json}} -->
|
||||||
<div fxLayout="row" fxLayoutAlign="center center">
|
<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>
|
</div>
|
||||||
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="center center">
|
<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>
|
</div>
|
||||||
<div *ngIf="getBusinessInfoOfficePhotControls().length == 0" style="text-align: center;margin-top: 15px;">
|
<div *ngIf="getBusinessInfoOfficePhotControls().length == 0" style="text-align: center;margin-top: 15px;">
|
||||||
@ -959,6 +961,7 @@
|
|||||||
<mat-form-field appearance="fill">
|
<mat-form-field appearance="fill">
|
||||||
<mat-label>Comments</mat-label>
|
<mat-label>Comments</mat-label>
|
||||||
<textarea matInput type="text" placeholder="Any other comments" formControlName="final_comments"></textarea>
|
<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>
|
</mat-form-field>
|
||||||
<div class="mat-button-div">
|
<div class="mat-button-div">
|
||||||
<button mat-stroked-button matStepperPrevious>Back</button>
|
<button mat-stroked-button matStepperPrevious>Back</button>
|
||||||
|
|||||||
@ -53,4 +53,43 @@
|
|||||||
margin-right: 5%;
|
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.questionDetails=this.router.getCurrentNavigation().extras.state.questionDetails
|
||||||
// this.FormId=this.router.getCurrentNavigation().extras.state.FormId
|
// this.FormId=this.router.getCurrentNavigation().extras.state.FormId
|
||||||
this.applicants = this.pdDetails.applicants_details;
|
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
|
this.customer_seg_abbr = this.pdDetails.customer_segment_abbr
|
||||||
console.log("constr",this.pdDetails,this.docs_tobe_collect)
|
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')
|
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(),
|
questions:this._formBuilder.array([this.addGeneralControls(),this.addAddressControls(),
|
||||||
this.addBusinessGroupControls(),this.addNeighbourhoodControls(),this.addFinalRemarksControls(),
|
this.addBusinessGroupControls(),this.addNeighbourhoodControls(),this.addFinalRemarksControls(),
|
||||||
this._formBuilder.group({
|
this._formBuilder.group({
|
||||||
final_comments:[''],
|
final_comments:['',Validators.required],
|
||||||
final_visit_status:['',Validators.compose([Validators.required])],
|
final_visit_status:['',Validators.compose([Validators.required])],
|
||||||
form_id:["COMMENTS"],
|
form_id:["COMMENTS"],
|
||||||
form_name:["Comments"]
|
form_name:["Comments"]
|
||||||
@ -518,6 +520,7 @@ generateGroupControls(datas) {
|
|||||||
this.toggleVisibility(neighbour_obj.did_not_know_the_owner,i,2)
|
this.toggleVisibility(neighbour_obj.did_not_know_the_owner,i,2)
|
||||||
// })
|
// })
|
||||||
this.addNeighbourhoodGroup()
|
this.addNeighbourhoodGroup()
|
||||||
|
this.getOtherOrganisationOwner(neighbour_obj.organisation_owner,i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.firstFormGroup.get('questions').patchValue(datas);
|
this.firstFormGroup.get('questions').patchValue(datas);
|
||||||
@ -1190,7 +1193,15 @@ public findInvalidControls() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(firstInvalidField != undefined){
|
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;
|
// this.myStepper.selectedIndex = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1258,6 +1269,7 @@ onSubmit(flag?) {
|
|||||||
records.pdid = this.pdDetails.pd_id;
|
records.pdid = this.pdDetails.pd_id;
|
||||||
records.formid = "25";
|
records.formid = "25";
|
||||||
records.fk_createdby = this.users;
|
records.fk_createdby = this.users;
|
||||||
|
records.is_form_validated = flag == 'go_back' ? '0' : '1'
|
||||||
this.quesService.savePDFormDetailsWithID(records).subscribe(result=>{
|
this.quesService.savePDFormDetailsWithID(records).subscribe(result=>{
|
||||||
if(result['dataStatus']) {
|
if(result['dataStatus']) {
|
||||||
if(flag != 'go_back') {
|
if(flag != 'go_back') {
|
||||||
@ -1498,6 +1510,12 @@ if(field && field.filter(vv=>vv == 'Others (Please specify)').length > 0) {
|
|||||||
}
|
}
|
||||||
return false
|
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() {
|
ngOnDestroy() {
|
||||||
console.log("Common ques component destroyed");
|
console.log("Common ques component destroyed");
|
||||||
if(this.firstFormGroup.dirty){
|
if(this.firstFormGroup.dirty){
|
||||||
|
|||||||
@ -24,22 +24,26 @@
|
|||||||
<strong> Applicants</strong>
|
<strong> Applicants</strong>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="column" align="end">
|
<div fxLayout="column" align="end">
|
||||||
<strong> Is Person Met</strong>
|
<strong>Applicant Met</strong>
|
||||||
</div>
|
</div>
|
||||||
</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 *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="row">
|
||||||
<div fxLayout="column" fxFlex="80%">
|
<div fxLayout="column" fxFlex="79%">
|
||||||
{{applicant.value.applicant_name}}
|
{{applicant.value.applicant_name}}
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="column" align="end">
|
<div fxLayout="column" align="end">
|
||||||
<!-- <mat-label>Is Person Met</mat-label> -->
|
<!-- <mat-label>Is Person Met</mat-label> -->
|
||||||
|
<div>
|
||||||
|
<span style="font-size: 13px;margin-right: 2px">Not Met</span>
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
class="example-margin"
|
class="example-margin"
|
||||||
formControlName="is_person_met">
|
formControlName="is_person_met">
|
||||||
|
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
|
<span style="font-size: 13px;margin-left: 2px">Met</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><br/>
|
</div><br/>
|
||||||
<div *ngIf="applicant.value.is_person_met == true">
|
<div *ngIf="applicant.value.is_person_met == true">
|
||||||
@ -996,6 +1000,7 @@ Image </mat-label> -->
|
|||||||
<mat-form-field appearance="fill">
|
<mat-form-field appearance="fill">
|
||||||
<mat-label>Comments</mat-label>
|
<mat-label>Comments</mat-label>
|
||||||
<textarea matInput type="text" placeholder="Any other comments" formControlName="final_comments"></textarea>
|
<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>
|
</mat-form-field>
|
||||||
<div>
|
<div>
|
||||||
<mat-label>Neighbourhood check</mat-label>
|
<mat-label>Neighbourhood check</mat-label>
|
||||||
|
|||||||
@ -58,3 +58,42 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
border-bottom: 2px solid lightcoral;
|
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,
|
form_id:5,
|
||||||
stepper_index:3,
|
stepper_index:3,
|
||||||
is_dynamic:true
|
is_dynamic:true
|
||||||
},{
|
|
||||||
form_name:'Neighbourhood Details',
|
|
||||||
form_id:19,
|
|
||||||
stepper_index:4,
|
|
||||||
is_dynamic:true
|
|
||||||
},{
|
},{
|
||||||
form_name:'Final Remarks',
|
form_name:'Final Remarks',
|
||||||
form_id:20,
|
form_id:20,
|
||||||
stepper_index:5,
|
stepper_index:4,
|
||||||
is_dynamic:true
|
is_dynamic:true
|
||||||
},{
|
},{
|
||||||
form_name:'Submit',
|
form_name:'Submit',
|
||||||
form_id:'COMMENTS',
|
form_id:'COMMENTS',
|
||||||
stepper_index:5,
|
stepper_index:4,
|
||||||
is_dynamic:true
|
is_dynamic:true
|
||||||
},]
|
},]
|
||||||
// public person_met_entered:FormControl= new FormControl('')
|
// public person_met_entered:FormControl= new FormControl('')
|
||||||
@ -157,7 +152,7 @@ export class EmployerInfoComponent implements OnInit {
|
|||||||
questions:this._formBuilder.array([this.addGeneralControls(),this.addAddressControls(),
|
questions:this._formBuilder.array([this.addGeneralControls(),this.addAddressControls(),
|
||||||
this.addEmployerInfoForm(),this.addNeighbourhoodControls(),this.addFinalRemarksControls(),
|
this.addEmployerInfoForm(),this.addNeighbourhoodControls(),this.addFinalRemarksControls(),
|
||||||
this._formBuilder.group({
|
this._formBuilder.group({
|
||||||
final_comments:[''],
|
final_comments:['',Validators.required],
|
||||||
final_visit_status:['',Validators.compose([Validators.required])],
|
final_visit_status:['',Validators.compose([Validators.required])],
|
||||||
company_existence_neighbour_confirmed:['',Validators.required],
|
company_existence_neighbour_confirmed:['',Validators.required],
|
||||||
company_existence_years:[''],
|
company_existence_years:[''],
|
||||||
@ -1251,7 +1246,15 @@ export class EmployerInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(firstInvalidField != undefined){
|
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;
|
// this.myStepper.selectedIndex = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1343,6 +1346,7 @@ export class EmployerInfoComponent implements OnInit {
|
|||||||
records.pdid = this.pdDetails.pd_id;
|
records.pdid = this.pdDetails.pd_id;
|
||||||
records.formid = "25";
|
records.formid = "25";
|
||||||
records.fk_createdby = this.users;
|
records.fk_createdby = this.users;
|
||||||
|
records.is_form_validated = flag == 'go_back' ? '0' : '1'
|
||||||
this.quesService.savePDFormDetailsWithID(records).subscribe(result=>{
|
this.quesService.savePDFormDetailsWithID(records).subscribe(result=>{
|
||||||
if(result['dataStatus']) {
|
if(result['dataStatus']) {
|
||||||
if(flag != 'go_back') {
|
if(flag != 'go_back') {
|
||||||
|
|||||||
@ -395,7 +395,7 @@
|
|||||||
<p>No Document</p>
|
<p>No Document</p>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>-->
|
||||||
|
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>PD History</ng-template>
|
<ng-template mat-tab-label>PD History</ng-template>
|
||||||
@ -420,7 +420,7 @@
|
|||||||
<p>No History</p>
|
<p>No History</p>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab> -->
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user