family and neigbour : ps
This commit is contained in:
parent
eb930a31b3
commit
6f4c029ca5
@ -582,13 +582,36 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
Ctrls.controls['earning_number_of_years_in_employment_or_business'].clearValidators();
|
||||
|
||||
|
||||
if(Ctrls.controls['non_earning_occupation'].value==1){
|
||||
Ctrls.controls['non_earning_if_others'].setValidators([Validators.required]);
|
||||
}
|
||||
if(Ctrls.controls['non_earning_occupation'].value==1)
|
||||
{
|
||||
Ctrls.controls['non_earning_if_others'].setValidators([Validators.required])
|
||||
|
||||
Ctrls.controls['non_earning_if_schoolorcollege'].setValue('');
|
||||
Ctrls.controls['non_earning_if_schoolorcollege'].clearValidators();
|
||||
|
||||
Ctrls.controls['non_earning_if_retired_from'].setValue('');
|
||||
Ctrls.controls['non_earning_if_retired_from'].clearValidators();
|
||||
}
|
||||
|
||||
|
||||
if(Ctrls.controls['non_earning_occupation'].value==2){
|
||||
|
||||
Ctrls.controls['non_earning_if_others'].setValue('');
|
||||
Ctrls.controls['non_earning_if_others'].clearValidators();
|
||||
|
||||
Ctrls.controls['non_earning_if_schoolorcollege'].setValidators([Validators.required]);
|
||||
|
||||
Ctrls.controls['non_earning_if_retired_from'].setValue('');
|
||||
Ctrls.controls['non_earning_if_retired_from'].clearValidators();
|
||||
}
|
||||
if(Ctrls.controls['non_earning_occupation'].value==3){
|
||||
|
||||
Ctrls.controls['non_earning_if_others'].setValue('');
|
||||
Ctrls.controls['non_earning_if_others'].clearValidators();
|
||||
|
||||
Ctrls.controls['non_earning_if_schoolorcollege'].setValue('');
|
||||
Ctrls.controls['non_earning_if_schoolorcollege'].clearValidators();
|
||||
|
||||
Ctrls.controls['non_earning_if_retired_from'].setValidators([Validators.required]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<input matInput autocomplete="off" [placeholder]="reference.controls.relationship_with.value ==4 ? 'Rent Amount' : 'Volume of Business'"
|
||||
formControlName="business_volume_amount" type="text" OnlyNumber type="text" (keyup)="inWords($event,r)">
|
||||
formControlName="business_volume_amount" type="text" OnlyNumber type="text" (keyup)="inWords($event.target.value,r)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="reference.controls.business_volume_amount.value != ''">{{"₹"}}
|
||||
{{amtInwords[r]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@ -147,19 +147,22 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
}
|
||||
if(exist_ref_details.length>0){ /**&& data.records.check_type==1 */
|
||||
exist_ref_details.forEach((element,index) => {
|
||||
this.amtInwords[index] = this._pd.convertNumberToWords(element.business_volume_amount);
|
||||
if(element.business_volume_amount != null){
|
||||
this.inWords(element.business_volume_amount,index);
|
||||
}
|
||||
// this.amtInwords[index] = this._pd.convertNumberToWords(element.business_volume_amount);
|
||||
referencecheckControl.push(this.createReerenceCheck(element));
|
||||
});
|
||||
}
|
||||
this._neighbourhoodForm.controls['neighbourhood_status'].setValue(data.records.check_type==0 ? data.records.neighbourhood_status : '');
|
||||
this._neighbourhoodForm.controls['neighbourhood_status'].setValue(data.records.neighbourhood_status!='' ? data.records.neighbourhood_status : '');
|
||||
this._neighbourhoodForm.controls['neighbour_reference_remark'].setValue(data.records.neighbour_reference_remark ? data.records.neighbour_reference_remark : '');
|
||||
|
||||
// this._neighbourhoodForm.controls['check_type'].setValue(data.records.check_type==1 ? 1 : data.records.check_type==0 ? 0 : '');
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
console.log('else',data.dataStatus);
|
||||
console.log('else',data);
|
||||
|
||||
neighbourhoodControl.push(this.createNeighbourhood(this.default_neighbourhood_details));
|
||||
referencecheckControl.push(this.createReerenceCheck(this.default_reference_details));
|
||||
}
|
||||
@ -257,7 +260,6 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
tempCount : number = 0;
|
||||
|
||||
saveNeighbourhood(formData:any){
|
||||
// console.log('formData',formData);
|
||||
|
||||
// let resultMessage:string='';
|
||||
// const referencecheckControl = <FormGroup>this._neighbourhoodForm.controls['referencecheck_list'];
|
||||
@ -276,16 +278,16 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
|
||||
nbhdChildCtrl.controls['do_know'].setValidators([Validators.required]);
|
||||
nbhdChildCtrl.controls['do_know'].updateValueAndValidity();
|
||||
// console.log('nbhdChildCtrl.controls.did_not_know_the_business_operation.value',nbhdChildCtrl.controls.did_not_know_the_business_operation.value)
|
||||
|
||||
if(nbhdChildCtrl.controls.did_not_know_the_business_operation.value == '' || nbhdChildCtrl.controls.did_not_know_the_business_operation.value == false){
|
||||
// console.log('IF nbhdChildCtrl.controls.did_not_know_the_business_operation.value',nbhdChildCtrl.controls.did_not_know_the_business_operation.value)
|
||||
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].setValidators([Validators.required]);
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity();
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_year'].setValidators([Validators.required]);
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_year'].updateValueAndValidity();
|
||||
}
|
||||
else if(nbhdChildCtrl.controls.did_not_know_the_business_operation.value == true){
|
||||
// console.log('ELSE nbhdChildCtrl.controls.did_not_know_the_business_operation.value',nbhdChildCtrl.controls.did_not_know_the_business_operation.value)
|
||||
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].setValue('');
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].clearValidators();
|
||||
nbhdChildCtrl.controls['how_long_do_know_in_month'].updateValueAndValidity();
|
||||
@ -476,7 +478,7 @@ checkOthers(values){
|
||||
|
||||
/** Amount InWords */
|
||||
inWords(e,i){
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
this.amtInwords[i] = this._pd.convertNumberToWords(e);
|
||||
}
|
||||
|
||||
compareObjects(o1: any, o2: any) {
|
||||
@ -486,14 +488,14 @@ compareObjects(o1: any, o2: any) {
|
||||
}
|
||||
|
||||
getOtherOrganisationOwner(value,i) {
|
||||
// console.log('value',value,'I',i);
|
||||
|
||||
let Ctrls = <FormArray>this._neighbourhoodForm.controls['neighbourhood_list'];
|
||||
// console.log('ParCtrls',Ctrls);
|
||||
|
||||
let ChdCtrls:any = <FormArray>Ctrls.controls[i];
|
||||
// console.log('ChdCtrls',ChdCtrls);
|
||||
|
||||
// return;
|
||||
let Avaliablity = 1;
|
||||
// console.log('val',value);
|
||||
|
||||
if(value.length>0){
|
||||
value.forEach(option => {
|
||||
if(option.id == 0 && option.group_id == 2){
|
||||
@ -502,17 +504,17 @@ getOtherOrganisationOwner(value,i) {
|
||||
});
|
||||
}
|
||||
if(Avaliablity == 0){
|
||||
// console.log('if Avaliablity',Avaliablity);
|
||||
|
||||
|
||||
ChdCtrls.controls.other_organisation_owner.setValidators([Validators.required]);
|
||||
this.isOrganisationOwner[i] = true;
|
||||
}else if(Avaliablity == 1){
|
||||
// console.log('else Avaliablity',Avaliablity);
|
||||
// console.log('esle this.isOrganisationOwner[ParInx]',this.isOrganisationOwner[i]);
|
||||
|
||||
|
||||
ChdCtrls.controls.other_organisation_owner.setValue('');
|
||||
ChdCtrls.controls.other_organisation_owner.clearValidators();
|
||||
this.isOrganisationOwner[i] = false;
|
||||
// console.log('else this.isOrganisationOwner[ParInx]',this.isOrganisationOwner[i]);
|
||||
|
||||
}
|
||||
|
||||
ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user