merge : kms

This commit is contained in:
gandhimathi 2019-04-16 15:52:17 +05:30
commit 174831d6d7
18 changed files with 2319 additions and 1990 deletions

View File

@ -34,6 +34,7 @@
<input matInput placeholder="Address" formControlName="address"
oninput="this.value = this.value.toUpperCase()" required
autocomplete="off">
<mat-error *ngIf="item.controls['address'].hasError('required')">Address Required</mat-error>
</mat-form-field>
</div>
@ -63,8 +64,8 @@
<mat-form-field style="width: 24%" *ngIf="item.get('pincode').value == 1">
<input matInput autocomplete="off" placeholder="Specify Pincode *"
formControlName="pincode_others" OnlyNumber type="text">
<!-- <mat-error *ngIf="!addressForm.controls['pincode_others'].valid">Pincode
Required</mat-error> -->
<mat-error *ngIf="item.controls['pincode_others'].hasError('required')">Pincode Required</mat-error>
</mat-form-field>
</div>
@ -78,13 +79,14 @@
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
</mat-option>
</mat-select>
<mat-error *ngIf="item.controls['address_type'].hasError('required')">Address Type Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 46%;" *ngIf="item.get('address_type').value == 1">
<input matInput placeholder="Specify Address Type *"
formControlName="address_type_others" autocomplete="off"
(change)="selectedAddressType($event.target.value,i)">
<!-- <mat-error *ngIf="!addressForm.controls['address_type_others'].valid">Address Type Required</mat-error> -->
<mat-error *ngIf="item.controls['address_type_others'].hasError('required')">Address Type Required</mat-error>
</mat-form-field>
</div>
@ -97,19 +99,21 @@
<mat-option value="{{m_locality.locality_id}}" *ngFor="let m_locality of localityData">{{m_locality.locality_name}}
</mat-option>
</mat-select>
<mat-error *ngIf="item.controls['locality'].hasError('required')">Locality Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 46%;" *ngIf="item.get('locality').value == 1">
<input matInput placeholder="Specify Locality *"
formControlName="locality_others" autocomplete="off">
<!-- autofocus -->
<!-- <mat-error *ngIf="!addressForm.controls['locality_others'].valid">Locality Required</mat-error> -->
<!-- <mat-error *ngIf="!addressForm.controls['locality_others'].hasError('required')">Locality Required</mat-error> -->
<mat-error *ngIf="item.controls['locality_others'].hasError('required')">Locality Required</mat-error>
</mat-form-field>
<!-- <mat-form-field style="width: 46%;" *ngIf="item.get('locality').value == 5">
<input matInput placeholder="Specify the MixUse *"
formControlName="locality_mixuse" autocomplete="off">
!-- <mat-error *ngIf="!addressForm.controls['locality_mixuse'].valid">MixUse
!-- <mat-error *ngIf="!addressForm.controls['locality_mixuse'].hasError('required')">MixUse
Required</mat-error> --
</mat-form-field> -->
</div>
@ -124,6 +128,7 @@
<mat-option value="{{data.pd_location_approach_id}}" *ngFor="let data of locationdata">{{data.description}}
</mat-option>
</mat-select>
<mat-error *ngIf="item.controls['pd_location'].hasError('required')">Approach to PD Location Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 46%;">
@ -133,6 +138,7 @@
<mat-option value="{{data.comments_on_locality_id}}" *ngFor="let data of commentData">{{data.rating}}
</mat-option>
</mat-select>
<mat-error *ngIf="item.controls['comment_locality'].hasError('required')">Comment on Locality Required</mat-error>
</mat-form-field>
</div>
@ -153,7 +159,8 @@
<mat-form-field style="width: 24%;" *ngIf="item.get('uom').value == 1 ">
<input matInput placeholder="Specify UOM *" formControlName="uom_others"
autocomplete="off">
<!-- <mat-error *ngIf="!addressForm.controls['uom_others'].valid">UOM
<mat-error *ngIf="item.controls['uom_others'].hasError('required') || item.controls['uom_others'].value != '' ">UOM Required</mat-error>
<!-- <mat-error *ngIf="!addressForm.controls['uom_others'].hasError('required')">UOM
Required</mat-error> -->
</mat-form-field>
</div>

View File

@ -389,61 +389,54 @@ export class AddressComponent implements OnInit {
getOtherPincode(e, i) { this.otherPincodeFlag[i] = e == 1 ? true : false; }
/** TO Save Address Forms Details*/
onSubmit() {
// let addressesArrayValues = this.addressForm.controls.addresses.value;
// console.log(this.addressForm.controls.addresses);
// return;
// addressesArrayValues.forEach(data => {
// data.address_type.value == 1
// ? this.addressForm.controls['address_type_others'].setValidators([Validators.required])
// : this.addressForm.controls['address_type_others'].clearValidators();
// this.addressForm.controls['address_type_others'].updateValueAndValidity();
const control = <FormArray>this.addressForm.controls['addresses'];
let CtrlLength = control.controls.length;
if (CtrlLength > 0) {
let cnt = 0;
while(cnt < CtrlLength){
// data.controls.locality.value == 1
// ? this.addressForm.controls['locality_others'].setValidators([Validators.required])
// : this.addressForm.controls['locality_others'].clearValidators();
// this.addressForm.controls['locality_others'].updateValueAndValidity();
let ChildCtrl : any = control.controls[cnt]
if(ChildCtrl.controls.address_type.value == 1){
ChildCtrl.controls['address_type_others'].setValidators([Validators.required]);}
else{
ChildCtrl.controls['address_type_others'].clearValidators();
ChildCtrl.controls['address_type_others'].setValue('');
}
ChildCtrl.controls['address_type_others'].updateValueAndValidity();
// data.controls.pincode.value == 1
// ? this.addressForm.controls['pincode_others'].setValidators([Validators.required])
// : this.addressForm.controls['pincode_others'].clearValidators();
// this.addressForm.controls['pincode_others'].updateValueAndValidity();
if(ChildCtrl.controls.locality.value == 1){
ChildCtrl.controls['locality_others'].setValidators([Validators.required]);}
else{ ChildCtrl.controls['locality_others'].clearValidators();
ChildCtrl.controls['locality_others'].setValue('');
}
ChildCtrl.controls['locality_others'].updateValueAndValidity();
if(ChildCtrl.controls.pincode.value == 1){
ChildCtrl.controls['pincode_others'].setValidators([Validators.required]);}
else{ ChildCtrl.controls['pincode_others'].clearValidators();
ChildCtrl.controls['pincode_others'].setValue('');
}
ChildCtrl.controls['pincode_others'].updateValueAndValidity();
// data.controls.locality.value == 5
// ? this.addressForm.controls['locality_mixuse'].setValidators([Validators.required])
// : this.addressForm.controls['locality_mixuse'].clearValidators();
// this.addressForm.controls['locality_mixuse'].updateValueAndValidity();
// data.controls.uom.value == 1
// ? this.addressForm.controls['uom_others'].setValidators([Validators.required])
// : this.addressForm.controls['uom_others'].clearValidators();
// this.addressForm.controls['uom_others'].updateValueAndValidity();
// });
// this.addressForm.controls.address_type.value == 1
// ? this.addressForm.controls['address_type_others'].setValidators([Validators.required])
// : this.addressForm.controls['address_type_others'].clearValidators();
// this.addressForm.controls['address_type_others'].updateValueAndValidity();
// this.addressForm.controls.locality.value == 1
// ? this.addressForm.controls['locality_others'].setValidators([Validators.required])
// : this.addressForm.controls['locality_others'].clearValidators();
// this.addressForm.controls['locality_others'].updateValueAndValidity();
// this.addressForm.controls.pincode.value == 1
// ? this.addressForm.controls['pincode_others'].setValidators([Validators.required])
// : this.addressForm.controls['pincode_others'].clearValidators();
// this.addressForm.controls['pincode_others'].updateValueAndValidity();
// this.addressForm.controls.locality.value == 5
// ? this.addressForm.controls['locality_mixuse'].setValidators([Validators.required])
// : this.addressForm.controls['locality_mixuse'].clearValidators();
// this.addressForm.controls['locality_mixuse'].updateValueAndValidity();
// this.addressForm.controls.uom.value == 1
// ? this.addressForm.controls['uom_others'].setValidators([Validators.required])
// : this.addressForm.controls['uom_others'].clearValidators();
// this.addressForm.controls['uom_others'].updateValueAndValidity();
if(ChildCtrl.controls.uom.value == 1){
ChildCtrl.controls['uom_others'].setValidators([Validators.required]);}
else{
ChildCtrl.controls['uom_others'].clearValidators();
ChildCtrl.controls['uom_others'].setValue('');
}
ChildCtrl.controls['uom_others'].updateValueAndValidity();
cnt++;
}
}
if (!this.addressForm.valid) {
this.validateAllFormFields(this.addressForm);
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
this.disableAfterSubmit = false;
return;
@ -456,44 +449,16 @@ export class AddressComponent implements OnInit {
}
this.disableAfterSubmit = true;
let records: any = {};
records.addresses = this.addressForm.controls.addresses.value;
// records.address = this.address.value;
// records.state = this.state.value;
// records.city = this.city.value;
// records.address_type = this.addressType.value;
// records.address_type_others = this.addressType.value == 1 ?
// this.addressForm.controls.address_type_others.value : '';
// records.locality = this.locality.value;
// records.locality_others = this.locality.value == 1 ?
// this.addressForm.controls.locality_others.value : '';
// records.locality_mixuse = this.locality.value == 5 ?
// this.addressForm.controls.locality_mixuse.value : '';
// records.pincode = this.pincode.value;
// records.pincode_others = this.pincode.value == 1 ?
// this.addressForm.controls.pincode_others.value : '';
// records.pd_location = this.pdLocation.value;
// records.comment_locality = this.commentLocality.value;
records.address_form_remark = this.addressForm.controls.address_form_remark.value;
// records.estimated_area = this.estArea.value;
// records.uom = this.uom.value;
// records.uom_others = records.uom == 1 ?
// this.addressForm.controls.uom_others.value : '';
records.pdid = this.pdid;
records.parent_pdid= this.parent_pdid;
records.formid = '5';
// records.fk_createdby = '250';
// console.log(JSON.stringify(records));
this._pd.saveForm(records).subscribe(data => {
if (data.status == 200) {
this.notifier.notify('success', 'Saved Successfully.');
@ -521,16 +486,18 @@ export class AddressComponent implements OnInit {
/** To validate All Form Fields */
validateAllFormFields(formGroup: FormGroup) {
validateAllFormFields(formGroup: any) {
Object.keys(formGroup.controls).forEach(field => {
const control = formGroup.get(field);
if (control instanceof FormControl) {
control.markAsTouched({ onlySelf: true });
} else if (control instanceof FormGroup) {
} else if (control instanceof FormGroup) {
this.validateAllFormFields(control);
} else if (control instanceof FormArray) {
this.validateAllFormFields(control);
}
});
}
}
/** For DOCS Tab */
public viewerOptions: any = {

View File

@ -604,13 +604,10 @@ export class GeneralInfoComponent implements OnInit {
temp: number = 0;
submitGeneralForm(formData: any) {
// console.log('formData',formData);
if (formData.individuals.length > 0) {
formData.individuals.forEach((val, index) => {
if (val.is_person_met == false) {
this.temp++;
}
@ -618,11 +615,12 @@ export class GeneralInfoComponent implements OnInit {
if (this.temp == formData.individuals.length) {
this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
this.temp = 0;
return;
}
else if(this.temp <= formData.individuals.length){
this.temp = 0;
}
let individualCtrl: any = this._generalForm.get('individuals') as FormArray;
let individualCtrlLength: any = individualCtrl.controls.length;

View File

@ -40,11 +40,13 @@
<input matInput placeholder="What is the name of lender representative who accompanies the PD officer, If any?"
formControlName="lender_representative_who_accompanies"
required>
<mat-error *ngIf="details.controls['lender_representative_who_accompanies'].hasError('required')">Lender Name Required</mat-error>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Did the lender representative carry the loan file during PD?"
formControlName="lender_representative_carry_loan_files"
required>
<mat-error *ngIf="details.controls['lender_representative_carry_loan_files'].hasError('required')">Did the lender representative carry the loan file during PD? Required</mat-error>
</mat-form-field>
</div>
</div>

View File

@ -145,7 +145,7 @@ export class LenderRepresentativeComponent implements OnInit {
if (!this.representativeForm.valid) {
this.validateAllFormFields(this.representativeForm);
this.disableAfterSubmit = false;
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
this.notifier.notify('warning', 'Please Fill/Correct All Mandatory Fields.!');
return;
}
this.disableAfterSubmit = true;
@ -176,13 +176,15 @@ export class LenderRepresentativeComponent implements OnInit {
this.disableAfterSubmit = false;
})
}
validateAllFormFields(formGroup: FormGroup) {
validateAllFormFields(formGroup: any) {
Object.keys(formGroup.controls).forEach(field => {
const control = formGroup.get(field);
if (control instanceof FormControl) {
control.markAsTouched({ onlySelf: true });
} else if (control instanceof FormGroup) {
this.validateAllFormFields(control);
} else if (control instanceof FormArray) {
this.validateAllFormFields(control);
}
});
}

View File

@ -55,6 +55,7 @@
<mat-form-field *ngIf="isOtherPurpose" style="width: 28%">
<input matInput placeholder="Specify End Use *" formControlName="end_use_other"
autocomplete="off">
<mat-error *ngIf="loanDetailsForm.controls['end_use_other'].hasError('required')">End Use Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 64%">
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event)"
@ -87,6 +88,7 @@
<mat-form-field *ngIf="loanDetailsForm.controls['lender'].value == 1" style="width: 28%">
<input matInput placeholder="Specify Others Lender *" formControlName="other_bt_lender"
autocomplete="off">
<mat-error *ngIf="loanDetailsForm.controls['other_bt_lender'].hasError('required')">Lender Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 64%">
@ -109,6 +111,7 @@
style="width: 28%">
<input matInput placeholder="Specify End Use of Top Up *"
formControlName="other_end_use_topup" autocomplete="off">
<mat-error *ngIf="loanDetailsForm.controls['other_end_use_topup'].hasError('required')">End Use of Top Up Required</mat-error>
</mat-form-field>
</span>
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' && !isContribution">
@ -136,6 +139,7 @@
<mat-form-field *ngIf="isOtherSource" style="width: 28%">
<input matInput placeholder="Specify Other Sources *" formControlName="other_source"
autocomplete="off">
<mat-error *ngIf="loanDetailsForm.controls['other_source'].hasError('required')">Sources Required</mat-error>
</mat-form-field>
</span>
@ -166,6 +170,7 @@
<mat-form-field *ngIf="mortageAccess" style="width:46%;">
<input matInput placeholder="Specify Type of Property *" formControlName="property_type_others"
autocomplete="off">
<mat-error *ngIf="loanDetailsForm.controls['property_type_others'].hasError('required')">Type of Property Required</mat-error>
</mat-form-field>
<mat-form-field style="width:46%;">
@ -177,6 +182,7 @@
</mat-option>
</mat-optgroup>
</mat-select>
<mat-error *ngIf="loanDetailsForm.controls['owner_name'].hasError('required')">Owner Required</mat-error>
</mat-form-field>
<!-- <mat-select multiple placeholder="Name of Owner"

View File

@ -141,7 +141,8 @@ console.log('this.pd_all_details.pdapplicants_detials',this.pd_all_details.pdapp
this.generalFormApplicantList = data.records.individuals.filter(app => app.is_applicant == true && app.is_active == true);
if (data.dataStatus) {
let modifyApplicantList: any = [];
if (this.applicants.length > 0) {
// if (this.applicants.length > 0) {
if (this.generalFormApplicantList.length > 0) {
modifyApplicantList = this.generalFormApplicantList.map(element => {
return { id: element.pd_co_applicant_id, name: element.applicant_name, group_id: 2 };
});

View File

@ -0,0 +1,709 @@
<form [formGroup]="_rentalForm" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<!-- <div fxFlex="70" align="left"> -->
<div fxFlex="70" align="left" style="padding: 10px !important;">
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<!-- <span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} - <span *ngIf="subproduct_abbr">{{subproduct_abbr}}</span> </span><br> -->
{{pageTitle}}
</div>
</div>
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;">
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button> -->
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="closeDialogue()"><mat-icon>close</mat-icon></button>
</div>
</h2>
<mat-dialog-content>
<mat-card>
<mat-card-header>
<mat-card-title>Property Details</mat-card-title>
</mat-card-header>
<mat-card-content>
<div fxLayout="row wrap" style="margin-left: 1%;">
<!-- start address -->
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="30" fxFlex.xl="30">
<mat-form-field style="width:90%" appearance="outline">
<mat-label>Address of the Property</mat-label>
<textarea matInput rows="4" placeholder="" formControlName="address_property" required></textarea>
</mat-form-field>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="70" fxFlex.xl="70">
<!--start name of the who showing property to officer -->
<mat-form-field style="width:32%" appearance="outline">
<mat-label>State</mat-label>
<mat-select placeholder=""
formControlName="state" required>
<mat-option *ngFor="let stVal of stateList" [value]="stVal.state_id">
{{stVal.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:30%" appearance="outline">
<mat-label>City</mat-label>
<mat-select placeholder=""
formControlName="city" required>
<mat-option *ngFor="let ctVal of cityList" [value]="ctVal.city_id">
{{ctVal.city_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:20%" appearance="outline">
<mat-label>Pincode</mat-label>
<mat-select placeholder=""
formControlName="pincode" required>
<mat-option *ngFor="let pinVal of pincodeList" [value]="pinVal.pincode_id">
{{pinVal.pincode}}
</mat-option>
</mat-select>
</mat-form-field>
<div align="left" style="margin-left: 2%;">
<mat-checkbox color="primary" formControlName="validate_visited_address">Is This the Address Visited ? <strong>( {{_rentalForm.value.validate_visited_address===true ? 'Yes' : 'No'}} )</strong></mat-checkbox>
</div>
<mat-form-field style="width:90%;margin-top: 2%;" appearance="outline" *ngIf="_rentalForm.controls['other_visited_address']">
<mat-label>Actual Address Visited</mat-label>
<textarea matInput rows="2" placeholder="" formControlName="other_visited_address" required></textarea>
</mat-form-field>
</div>
<!-- end -->
</div>
<div fxLayout="row wrap">
<!--start name of the who showing property to officer -->
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Name of the Person Who is Showing the Property to Sineedge Officer</mat-label>
<mat-select placeholder="Name"
formControlName="person_met" [compareWith]="compareObjects" multiple required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:28%" appearance="outline" *ngIf="_rentalForm.controls['other_person_met']">
<mat-label>Specify Other Person</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_person_met" required>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="_rentalForm.controls['other_name_person_showing_property'] && _rentalForm.value.other_person_met!=''">
<mat-label>Who is {{_rentalForm.controls['other_person_met'].value}} ?</mat-label>
<mat-select placeholder=""
formControlName="other_name_person_showing_property" [compareWith]="compareSingleObjects" (selectionChange)="personShowingChanges(_rentalForm.controls['other_name_person_showing_property'].value)" multiple required>
<mat-option *ngFor="let pType of personType" [value]="pType">
{{pType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['other_name_person_type'] && _rentalForm.value.other_person_met!=''">
<mat-label>Who is {{_rentalForm.controls['other_person_met'].value}} ?</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_name_person_type" required>
</mat-form-field>
<!-- end -->
<!-- start owner of the property -->
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Name of the Owner/Owners of the Let out Property as per Loan Applicants</mat-label>
<mat-select placeholder="Name"
formControlName="property_owner" [compareWith]="compareObjects" multiple required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:28%" appearance="outline" *ngIf="_rentalForm.controls['property_owner_other']">
<mat-label>Specify Other Owner/Owners</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="property_owner_other" required>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="_rentalForm.controls['property_owner_other_relationship']">
<mat-label>Relation of Owner to Loan Applicant</mat-label>
<mat-select placeholder="" formControlName="property_owner_other_relationship" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rGroup of relationShipList" [label]="rGroup.groupName">
<!-- <mat-option>Select</mat-option> -->
<mat-option [value]="relation" *ngFor="let relation of rGroup.groupValues">{{relation.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['property_owner_other_relation_to']">
<mat-label>Relation To</mat-label>
<mat-select placeholder="" formControlName="property_owner_other_relation_to" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rtGroup of mergeCompanyApplicant" [label]="rtGroup.groupName">
<mat-option [value]="relationto" *ngFor="let relationto of rtGroup.groupValues">{{relationto.id=="0" ? 'Not Applicable' : relationto.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start proof documents -->
<mat-form-field style="width:28%" appearance="outline">
<mat-label>Ownership Proof Documents Sighted</mat-label>
<mat-select placeholder="" formControlName="property_ownership_proof_documents" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="_rentalForm.controls['sighted_documents']">
<mat-label>Type of Document Sighted</mat-label>
<mat-select placeholder="" formControlName="sighted_documents" [compareWith]="compareSingleObjects" (selectionChange)="getSightedDocs(_rentalForm.controls['sighted_documents'].value)" required>
<mat-option [value]="prDocs" *ngFor="let prDocs of documentList">{{prDocs.name | titlecase}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['other_sighted_documents']">
<mat-label>Other Type of Document</mat-label>
<input matInput placeholder="" formControlName="other_sighted_documents" required>
</mat-form-field>
<!-- end -->
<!-- start nature of ther property -->
<mat-form-field style="width:67%" appearance="outline">
<mat-label>Nature of Let Out Property as per Loan Applicant</mat-label>
<mat-select placeholder=""
formControlName="nature_property" [compareWith]="compareSingleObjects" required>
<mat-option *ngFor="let property of propertyNature" [value]="property">
{{property.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['other_nature_property']">
<mat-label>Other Property</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_nature_property" required>
</mat-form-field>
<!-- end -->
<!-- start type of units -->
<mat-form-field style="width:67%" appearance="outline">
<mat-label>Type of Units as per Loan Applicants</mat-label>
<mat-select placeholder=""
formControlName="unit_type" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let ugroup of unitTypeList" [label]="ugroup.groupName" [disabled]="_rentalForm.value.nature_property.id>1 && _rentalForm.value.nature_property.id!=ugroup.groupID">
<mat-option *ngFor="let unit of ugroup.groupValues" [value]="unit">
{{unit.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['other_unit_type']">
<mat-label>Specify Other Unit Type</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_unit_type" required>
</mat-form-field>
<mat-form-field style="width:67%;" appearance="outline" *ngIf="_rentalForm.controls['no_units']">
<mat-label>Tot No of Units</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="no_units" maxlength="3">
</mat-form-field>
<mat-form-field style="width:30%" appearance="outline" *ngIf="_rentalForm.controls['no_floor']">
<mat-label>No of Floors</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="no_floor" (keyup)="generateFloor($event)" maxlength="2">
</mat-form-field>
<mat-form-field style="width:30%;" appearance="outline" *ngIf="_rentalForm.controls['multistoried_total_area']">
<mat-label>Total Area Given on Rent</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="multistoried_total_area" required><!--maxlength="3"-->
</mat-form-field>
<!-- end area covered -->
<!-- start unit of measurement -->
<mat-form-field style="width:28%" appearance="outline" *ngIf="_rentalForm.controls['multistoried_uom']">
<mat-label>Unit of Measurement</mat-label>
<mat-select placeholder=""
formControlName="multistoried_uom" [compareWith]="compareSingleObjects" (selectionChange)="generateMultistoriedOtherUOM(_rentalForm.value)" required>
<mat-option *ngFor="let unitM of unitMeasurementList" [value]="unitM">
{{unitM.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['multistoried_other_uom']">
<mat-label>Other Unit of Measurement</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="multistoried_other_uom" required>
</mat-form-field>
<!-- end Uom -->
<!-- end -->
</div>
</mat-card-content>
</mat-card>
<!-- this is for multistoried floor details -->
<ng-container formArrayName="multistoried_building_details" *ngIf="_rentalForm.value.multistoried_building_details.length>0">
<mat-card *ngFor="let floor of _rentalForm.controls.multistoried_building_details['controls']; let f=index;let flast = last" [formGroupName]="f">
<mat-card-header>
<mat-form-field style="width:100%; margin-top: 2%;" appearance="outline">
<mat-label>Floor Level Name</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="floor_level" required>
</mat-form-field>
</mat-card-header>
<mat-card-content>
<mat-form-field style="width:46%" appearance="outline">
<mat-label>No of Units</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="no_units_in_floor" (keyup)="generateFloorUnit(floor.value,f)" required>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Is Rent Same for All Units</mat-label>
<mat-select placeholder="" formControlName="unit_rent_difference_options" (selectionChange)="generateFloorUnit(floor.value,f)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<!-- start floor unit array details -->
<!-- -->
<div [ngSwitch]="floor.value.unit_rent_difference_options">
<!-- this is for same rent for all unit -->
<ng-container *ngSwitchCase="1">
<div formArrayName="floor_unit_details" *ngIf="floor.value.floor_unit_details.length>0">
<div fxLayout="row wrap" class="align-margin" *ngFor="let fUnits of floor.controls.floor_unit_details['controls']; let fu=index;" [formGroupName]="fu">
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Rent per Unit</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="rent_per_unit" (keyup)="calculateFloorRentAmt(floor.value,f)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="fUnits.value.rent_per_unit != ''">{{"&#8377;"}} {{fUnits.value.rent_per_unit | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Total Rent Amount</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="amount" readonly>
<mat-hint align="start" style="font-size:90%" *ngIf="fUnits.value.amount != ''">{{"&#8377;"}} {{fUnits.value.amount | numberToWords}} Only</mat-hint>
</mat-form-field>
</div>
</div>
</ng-container>
<!-- this is for different rent for all unit -->
<ng-container *ngSwitchCase="0">
<div fxLayout="row wrap" class="align-margin" formArrayName="floor_unit_details" *ngIf="floor.value.floor_unit_details.length>0">
<div class="rent-unit" fxFlex.xs="100" fxFlex.sm="45" fxFlex.md="45" fxFlex.lg="45" fxFlex.xl="45" *ngFor="let fUnits of floor.controls.floor_unit_details['controls']; let fu=index;" [formGroupName]="fu">
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Rent Unit {{fu+1}} </mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="rent_per_unit" (keyup)="calculateFloorRentAmt(floor.value,f)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="fUnits.value.rent_per_unit != ''">{{"&#8377;"}} {{fUnits.value.rent_per_unit | numberToWords}} Only</mat-hint>
</mat-form-field>
</div>
</div>
</ng-container>
</div>
<!-- end floor unit array details-->
</mat-card-content>
<mat-card-actions *ngIf="floor.value.unit_rent_difference_options==0">
<div fxFlex="100" class="total-rent-amt">
<mat-form-field style="width:96%" appearance="outline">
<mat-label>Total Rent Amount</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="floor_rent_amount" readonly>
<mat-hint align="start" style="font-size:90%" *ngIf="floor.value.floor_rent_amount != ''">{{"&#8377;"}} {{floor.value.floor_rent_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
</div>
</mat-card-actions>
</mat-card>
</ng-container>
<!-- end floor details -->
<!-- this is for property unit details-->
<ng-container formArrayName="property_unit_details" *ngIf="_rentalForm.value.property_unit_details.length>0">
<mat-card *ngFor="let units of _rentalForm.controls.property_unit_details['controls']; let u=index;let ulast = last" [formGroupName]="u">
<mat-card-header>
<mat-card-title>
Unit {{u+1}}
</mat-card-title>
</mat-card-header>
<mat-card-content>
<div fxLayout="row wrap">
<!-- start tenant/lessees -->
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Is Name of the Tenant(s)/Lessees(s) of the Let out Property Provided ?</mat-label>
<mat-select placeholder="" formControlName="tenant_lessees_options" (selectionChange)="generateTenantOptions(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">Name(s) not provided</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['name_tenant_lessees']">
<mat-label>Name of Tenant(s)/Lessees(s)</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="name_tenant_lessees" required>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['name_tenant_lessees_reason']">
<mat-label>Why Tenant(s)/Lessees(s) Name not Provided</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="name_tenant_lessees_reason" required>
</mat-form-field>
<!-- end tenant/lessees-->
<!--start payment -->
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Monthly Rent Amount as per Loan Applicant</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="monthly_rent_amount" required>
<!-- (keyup)="inWords($event,1)" -->
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.monthly_rent_amount != ''">{{"&#8377;"}} {{units.value.monthly_rent_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Mode of Payment of Rent as per Loan Applicant</mat-label>
<mat-select placeholder=""
formControlName="payment_mode" [compareWith]="compareSingleObjects" (selectionChange)="generatePaymentOptions(units.value,u,1)" required>
<mat-option *ngFor="let payment of paymentOptions" [value]="payment">
{{payment.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:29%;" appearance="outline" *ngIf="units.controls['amount_received_bank']">
<mat-label>Amount Received in Bank</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="amount_received_bank" (keyup)="ValidatedRentAmount(units.value,u,1)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.amount_received_bank != ''">{{"&#8377;"}} {{units.value.amount_received_bank | numberToWords}} Only</mat-hint>
<mat-error *ngIf="units.controls['amount_received_bank'].hasError('max')">Given Value Is More Than Rent Amount</mat-error>
<mat-error *ngIf="units.controls['amount_received_bank'].hasError('min')">Given Value Is Less Than Rent Amount</mat-error>
</mat-form-field>
<mat-form-field style="width:29%;" appearance="outline" *ngIf="units.controls['amount_received_cash']">
<mat-label>Amount Received in Cash</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="amount_received_cash" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.amount_received_cash != ''">{{"&#8377;"}} {{units.value.amount_received_cash | numberToWords}} Only</mat-hint>
<mat-error *ngIf="units.controls['amount_received_cash'].hasError('max')">Given Value Is More Than Rent Amount</mat-error>
<mat-error *ngIf="units.controls['amount_received_cash'].hasError('min')">Given Value Is Less Than Rent Amount</mat-error>
</mat-form-field>
<mat-form-field style="width:30%;" appearance="outline" *ngIf="units.controls['payment_received_reason']">
<mat-label>Reason for Receiving Multiple Payment Mode</mat-label>
<textarea matInput placeholder="" formControlName="payment_received_reason" required></textarea>
</mat-form-field>
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Securtity Deposit amount as per Loan Applicant</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="securtity_deposit_amount" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.securtity_deposit_amount != ''">{{"&#8377;"}} {{units.value.securtity_deposit_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
<!-- end -->
<!-- start area covered by the property -->
<mat-form-field style="width:35%;" appearance="outline">
<mat-label>Area Covered by the Unit</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="property_cover_area" required><!--maxlength="3"-->
</mat-form-field>
<!-- end area covered -->
<!-- start unit of measurement -->
<mat-form-field style="width:28%" appearance="outline">
<mat-label>Unit of Measurement</mat-label>
<mat-select placeholder=""
formControlName="unit_measurement" [compareWith]="compareSingleObjects" (selectionChange)="generateOtherunitMeasurement(units.value,u)" required>
<mat-option *ngFor="let unitM of unitMeasurementList" [value]="unitM">
{{unitM.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="units.controls['other_unit_measurement']">
<mat-label>Other Unit of Measurement</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_unit_measurement" required>
</mat-form-field>
<!-- end -->
<!-- start Rent Agreement executed -->
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Is Rent Agreement executed for the Property let out</mat-label>
<mat-select placeholder="" formControlName="is_rent_agreement_executed" (selectionChange)="generateRentAgreementSeen(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start rent agreement -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['rent_agreement_seen']">
<mat-label>Rent Agreement Seen</mat-label>
<mat-select placeholder="" formControlName="rent_agreement_seen" (selectionChange)="generateRegisterOptions(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start Rent Agreement Registered -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['rent_agreement_registered']">
<mat-label>Is the Rent Agreement Registered at Sub-Registrar Office</mat-label>
<mat-select placeholder="" formControlName="rent_agreement_registered" (selectionChange)="generateRegisterDetails(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start rent agreement date details -->
<mat-form-field style="width:30%" appearance="outline" *ngIf="units.controls['agreement_date']">
<mat-label>Date of Agreement</mat-label>
<input matInput [max]="maxDate" [matDatepicker]="agreementpicker" formControlName="agreement_date"
placeholder="" (dateChange)="calculateExpiryDate($event,u)" readonly>
<mat-datepicker-toggle matSuffix [for]="agreementpicker" disabled="false"></mat-datepicker-toggle>
<mat-datepicker #agreementpicker></mat-datepicker>
</mat-form-field>
<mat-form-field style="width:62%" appearance="outline" *ngIf="units.controls['agreement_no_months']">
<mat-label>No of Months for Which Property has been let out as per Agreement</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" maxlength="4" formControlName="agreement_no_months" (keyup)="calculateExpiryDate($event,u)" required>
</mat-form-field>
<mat-form-field style="width:30%" appearance="outline" *ngIf="units.controls['agreement_expiring_date']">
<mat-label>Date on which Agreement is Expiring</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="agreement_expiring_date" readonly>
</mat-form-field>
<mat-form-field style="width:62%" appearance="outline" *ngIf="units.controls['rental_remaining_months']">
<mat-label>No of Rental Months Remaining as per Agreement</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="rental_remaining_months" readonly>
</mat-form-field>
<!-- end -->
<!-- start agreement rent amount -->
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['agreement_monthly_rent_amount']">
<mat-label>Monthly Rent Amount as per Agreement</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="agreement_monthly_rent_amount" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.agreement_monthly_rent_amount != ''">{{"&#8377;"}} {{units.value.agreement_monthly_rent_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
<!-- end -->
<!-- start Security Deposit amount as per agreement -->
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['agreement_security_deposit_amount']">
<mat-label>Security Deposit Amount as per Agreement</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="agreement_security_deposit_amount" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.agreement_security_deposit_amount != ''">{{"&#8377;"}} {{units.value.agreement_security_deposit_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
<!-- end -->
<!-- start validate agreement amount -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['monthly_rent_amount'] && units.controls['agreement_monthly_rent_amount'] && validateAgreementAmt(units.controls['monthly_rent_amount'] ? units.value.monthly_rent_amount :'',units.controls['agreement_monthly_rent_amount'] ? units.value.agreement_monthly_rent_amount:'') !=0">
<mat-label>There is a Difference of Rs.{{validateAgreementAmt(units.value.monthly_rent_amount,units.value.agreement_monthly_rent_amount)}} in the rent amount as per agreement and actual rent received. Why?</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="differences_loanapplicant_rentagreement">
</mat-form-field>
<!-- end -->
<!-- start name of owners as per agreement -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['agreement_property_owners_name']">
<mat-label>Name of Owner / Owners of Rented Property as per Rent Agreement</mat-label>
<mat-select placeholder="Name"
formControlName="agreement_property_owners_name" [compareWith]="compareObjects" multiple (selectionChange)="generateAgreementOtherOwners(units.value.agreement_property_owners_name,u)" required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:28%" appearance="outline" *ngIf="units.controls['agreement_property_owner_other']">
<mat-label>Specify Other Owner/Owners</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="agreement_property_owner_other" required>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="units.controls['agreement_property_owner_other_relationship']">
<mat-label>Relation of Owner to Loan Applicant</mat-label>
<mat-select placeholder="" formControlName="agreement_property_owner_other_relationship" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rGroup of relationShipList" [label]="rGroup.groupName">
<!-- <mat-option>Select</mat-option> -->
<mat-option [value]="relation" *ngFor="let relation of rGroup.groupValues">{{relation.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="units.controls['agreement_property_owner_other_relation_to']">
<mat-label>Relation To</mat-label>
<mat-select placeholder="" formControlName="agreement_property_owner_other_relation_to" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rtGroup of mergeCompanyApplicant" [label]="rtGroup.groupName">
<mat-option [value]="relationto" *ngFor="let relationto of rtGroup.groupValues">{{relationto.id=="0" ? 'Not Applicable' : relationto.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start tenant agreeent name -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['agreement_tenant_lessees_name']">
<mat-label>Name of Tenants / Lessees as per Rent Agreement</mat-label>
<textarea matInput rows="4" placeholder="" formControlName="agreement_tenant_lessees_name" required></textarea>
</mat-form-field>
<!-- end -->
<!-- end -->
<!-- start met tenant/lessees-->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['met_tenant_lessees_options']">
<mat-label>Tenant(s) / Lessee(s) Met During Visit of the Rented Property</mat-label>
<mat-select placeholder="" formControlName="met_tenant_lessees_options" (selectionChange)="generateTenantMetDetails(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['name_tenant_lessees_per_met']">
<mat-label>Name of the Tenant / Lessee Met</mat-label>
<!-- <mat-select placeholder="" formControlName="name_tenant_lessees_per_met" required>
<mat-option [value]="metTenant" *ngFor="let metTenant of units.value.name_tenant_lessees">{{metTenant.name}}</mat-option>
</mat-select> -->
<input matInput autocomplete="off" placeholder="" formControlName="name_tenant_lessees_per_met" required>
</mat-form-field>
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['name_tenant_lessees_reason_per_met']">
<mat-label>Why Tenant / Lessee not Met ?</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="name_tenant_lessees_reason_per_met" required>
</mat-form-field>
<!-- end -->
<!--start tenant met owners-->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['property_owner_per_met']">
<mat-label>Name of Owner as per Tenant / Lessee Met</mat-label>
<mat-select placeholder="Name"
formControlName="property_owner_per_met" [compareWith]="compareObjects" multiple (selectionChange)="generateMetOtherOwners(units.value,u)" required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:28%" appearance="outline" *ngIf="units.controls['property_owner_other_per_met']">
<mat-label>Specify Other Owner/Owners</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="property_owner_other_per_met" required>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="units.controls['property_owner_other_relationship_per_met']">
<mat-label>Relation of Owner to Loan Applicant</mat-label>
<mat-select placeholder="" formControlName="property_owner_other_relationship_per_met" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rGroup of relationShipList" [label]="rGroup.groupName">
<!-- <mat-option>Select</mat-option> -->
<mat-option [value]="relation" *ngFor="let relation of rGroup.groupValues">{{relation.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="units.controls['property_owner_other_relation_to_per_met']">
<mat-label>Relation To</mat-label>
<mat-select placeholder="" formControlName="property_owner_other_relation_to_per_met" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rtGroup of mergeCompanyApplicant" [label]="rtGroup.groupName">
<mat-option [value]="relationto" *ngFor="let relationto of rtGroup.groupValues">{{relationto.id=="0" ? 'Not Applicable' : relationto.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start met payment -->
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['paid_monthly_rent_per_met']">
<mat-label>Monthly Rent Amount Paid as per Tenant / Lessee Met</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="paid_monthly_rent_per_met" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.paid_monthly_rent_per_met != ''">{{"&#8377;"}} {{units.value.paid_monthly_rent_per_met | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['period_of_stay_per_met']">
<mat-label>Period (Months) of Stay as per Tenant / Lessee Met</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="period_of_stay_per_met" maxlength="5" required>
</mat-form-field>
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['payment_mode_per_met']">
<mat-label>Mode of Payment of Rent as Validated by PD Officer with Tenant / Lessee During Visit</mat-label>
<mat-select placeholder="" formControlName="payment_mode_per_met" [compareWith]="compareSingleObjects" (selectionChange)="generatePaymentOptions(units.value,u,2)" required>
<mat-option *ngFor="let payment of paymentPaidOptions" [value]="payment">
{{payment.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:29%;" appearance="outline" *ngIf="units.controls['amount_received_bank_per_met']">
<mat-label>Amount Paid in Bank</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="amount_received_bank_per_met" (keyup)="ValidatedRentAmount(units.value,u,2)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.amount_received_bank_per_met != ''">{{"&#8377;"}} {{units.value.amount_received_bank_per_met | numberToWords}} Only</mat-hint>
<mat-error *ngIf="units.controls['amount_received_bank_per_met'].hasError('max')">Given Value Is More Than Rent Amount</mat-error>
<mat-error *ngIf="units.controls['amount_received_bank_per_met'].hasError('min')">Given Value Is Less Than Rent Amount</mat-error>
</mat-form-field>
<mat-form-field style="width:29%;" appearance="outline" *ngIf="units.controls['amount_received_cash_per_met']">
<mat-label>Amount Paid in Cash</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="amount_received_cash_per_met" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.amount_received_cash_per_met != ''">{{"&#8377;"}} {{units.value.amount_received_cash_per_met | numberToWords}} Only</mat-hint>
<mat-error *ngIf="units.controls['amount_received_cash_per_met'].hasError('max')">Given Value Is More Than Rent Amount</mat-error>
<mat-error *ngIf="units.controls['amount_received_cash_per_met'].hasError('min')">Given Value Is Less Than Rent Amount</mat-error>
</mat-form-field>
<mat-form-field style="width:30%;" appearance="outline" *ngIf="units.controls['payment_received_reason_per_met']">
<mat-label>Reason for Paid Multiple Payment Mode</mat-label>
<textarea matInput placeholder="" formControlName="payment_received_reason_per_met" required></textarea>
</mat-form-field>
<!-- start validate appplicant/agreement payment options -->
<span *ngIf="units.controls['paid_monthly_rent_per_met'] && units.controls['payment_mode'] && units.controls['monthly_rent_amount'] && units.controls['payment_mode_per_met']">
<mat-form-field style="width: 28.2rem !important;" appearance="outline" *ngIf="(units.value.monthly_rent_amount>0 && units.value.paid_monthly_rent_per_met>0 && units.value.payment_mode!='' && units.value.payment_mode_per_met!='') && (units.value.monthly_rent_amount!=units.value.paid_monthly_rent_per_met) || units.value.payment_mode_per_met.id != 2 "><!-- || units.value.payment_mode.id!=units.value.payment_mode_per_met.id -->
<mat-label>What is the Reason for Difference in Rent Amount</mat-label><!-- or Mode of Payment -->
<input matInput autocomplete="off" placeholder="" formControlName="payment_difference_per_met">
</mat-form-field>
</span>
<!-- end -->
<!-- end met payment -->
</div>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeUnit(u)" *ngIf="_rentalForm.value.property_unit_details.length>1"
matTooltip="Remove Unit" matTooltipPosition="above">
<mat-icon>delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>
</ng-container>
<div fxLayout="row" style="margin-top: 2%;margin-bottom:2%; ">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addMoreUnitDetails()"
matTooltip="Add More Unit" matTooltipPosition="above" color="primary">
<strong>Add More Unit</strong>
</button>
</div>
</div>
<!-- unit end -->
<mat-card>
<mat-card-header>
<mat-card-title>
Third Party Check
</mat-card-title>
</mat-card-header>
<mat-card-content>
<div fxLayout="row wrap">
<!-- start third party check -->
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Third party check done on prevailing rent in the area</mat-label>
<mat-select placeholder="" formControlName="done_third_party_check" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%;" appearance="outline" *ngIf="_rentalForm.controls['whom_third_party_check_done']">
<mat-label>Name of person with whom Third Party Check on going rentals in the area done</mat-label>
<input matInput placeholder="" formControlName="whom_third_party_check_done" required>
</mat-form-field>
<mat-form-field style="width:100%;" appearance="outline" *ngIf="_rentalForm.controls['description_third_party_check_done']">
<mat-label>Description of the person with whom the Third Party Check is done</mat-label>
<textarea matInput placeholder="" formControlName="description_third_party_check_done" required></textarea>
</mat-form-field>
<mat-form-field style="width:100%;" appearance="outline" *ngIf="_rentalForm.controls['rental_rates_third_party_check_done']">
<mat-label>Rental rates in the area as per the person with whom Third Party Check is done</mat-label>
<textarea matInput placeholder="" formControlName="rental_rates_third_party_check_done" required></textarea>
</mat-form-field>
<mat-form-field style="width:100%;" appearance="outline" *ngIf="_rentalForm.controls['why_third_party_check_not_done']">
<mat-label>Why Third party check not done</mat-label>
<textarea matInput placeholder="" formControlName="why_third_party_check_not_done" required></textarea>
</mat-form-field>
<!-- end -->
</div>
</mat-card-content>
</mat-card>
</mat-dialog-content>
<mat-dialog-actions>
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="rental_remark"></textarea>
</mat-form-field>
</div>
<div fxFlex="40" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="saveRental(_rentalForm.value)"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-actions>
</form>
<notifier-container></notifier-container>

View File

@ -0,0 +1,21 @@
.paragraph_change {
color: #fff !important;
background-color: #e00201 !important;
}
mat-form-field {
margin: 0 2%;
}
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
.align-margin {
margin-left: 2%;
margin-right: 2%;
}
.rent-unit {
margin-left: 2%;
margin-top: 1%;
}
.total-rent-amt{
margin-left: 1%;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ManageRentalVerificationComponent } from './manage-rental-verification.component';
describe('ManageRentalVerificationComponent', () => {
let component: ManageRentalVerificationComponent;
let fixture: ComponentFixture<ManageRentalVerificationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ManageRentalVerificationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ManageRentalVerificationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,15 +1,12 @@
<form [formGroup]="_rentalForm" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<!-- <div fxFlex="70" align="left"> -->
<h2 mat-dialog-title class="dialog_title">
<div fxFlex="70" align="left" style="padding: 10px !important;">
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} - <span *ngIf="subproduct_abbr">{{subproduct_abbr}}</span> </span><br>
{{pageTitle}}
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} - <span *ngIf="subproduct_abbr">{{subproduct_abbr}}</span> </span><br>
{{pageTitle}}
</div>
</div>
</div>
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
@ -17,691 +14,35 @@
</h2>
<mat-dialog-content>
<mat-card>
<mat-card-header>
<mat-card-title>Property Details</mat-card-title>
</mat-card-header>
<mat-card-content>
<div fxLayout="row wrap" style="margin-left: 1%;">
<!-- start address -->
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="30" fxFlex.xl="30">
<mat-form-field style="width:90%" appearance="outline">
<mat-label>Address of the Property</mat-label>
<textarea matInput rows="4" placeholder="" formControlName="address_property" required></textarea>
</mat-form-field>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="70" fxFlex.xl="70">
<!--start name of the who showing property to officer -->
<mat-form-field style="width:32%" appearance="outline">
<mat-label>State</mat-label>
<mat-select placeholder=""
formControlName="state" required>
<mat-option *ngFor="let stVal of stateList" [value]="stVal.state_id">
{{stVal.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:30%" appearance="outline">
<mat-label>City</mat-label>
<mat-select placeholder=""
formControlName="city" required>
<mat-option *ngFor="let ctVal of cityList" [value]="ctVal.city_id">
{{ctVal.city_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:20%" appearance="outline">
<mat-label>Pincode</mat-label>
<mat-select placeholder=""
formControlName="pincode" required>
<mat-option *ngFor="let pinVal of pincodeList" [value]="pinVal.pincode_id">
{{pinVal.pincode}}
</mat-option>
</mat-select>
</mat-form-field>
<div align="left" style="margin-left: 2%;">
<mat-checkbox color="primary" formControlName="validate_visited_address">Is This the Address Visited ? <strong>( {{_rentalForm.value.validate_visited_address===true ? 'Yes' : 'No'}} )</strong></mat-checkbox>
</div>
<mat-form-field style="width:90%;margin-top: 2%;" appearance="outline" *ngIf="_rentalForm.controls['other_visited_address']">
<mat-label>Actual Address Visited</mat-label>
<textarea matInput rows="2" placeholder="" formControlName="other_visited_address" required></textarea>
</mat-form-field>
</div>
<!-- end -->
</div>
<div fxLayout="row wrap">
<!--start name of the who showing property to officer -->
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Name of the Person Who is Showing the Property to Sineedge Officer</mat-label>
<mat-select placeholder="Name"
formControlName="person_met" [compareWith]="compareObjects" multiple required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:28%" appearance="outline" *ngIf="_rentalForm.controls['other_person_met']">
<mat-label>Specify Other Person</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_person_met" required>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="_rentalForm.controls['other_name_person_showing_property'] && _rentalForm.value.other_person_met!=''">
<mat-label>Who is {{_rentalForm.controls['other_person_met'].value}} ?</mat-label>
<mat-select placeholder=""
formControlName="other_name_person_showing_property" [compareWith]="compareSingleObjects" (selectionChange)="personShowingChanges(_rentalForm.controls['other_name_person_showing_property'].value)" multiple required>
<mat-option *ngFor="let pType of personType" [value]="pType">
{{pType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['other_name_person_type'] && _rentalForm.value.other_person_met!=''">
<mat-label>Who is {{_rentalForm.controls['other_person_met'].value}} ?</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_name_person_type" required>
</mat-form-field>
<!-- end -->
<!-- start owner of the property -->
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Name of the Owner/Owners of the Let out Property as per Loan Applicants</mat-label>
<mat-select placeholder="Name"
formControlName="property_owner" [compareWith]="compareObjects" multiple required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:28%" appearance="outline" *ngIf="_rentalForm.controls['property_owner_other']">
<mat-label>Specify Other Owner/Owners</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="property_owner_other" required>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="_rentalForm.controls['property_owner_other_relationship']">
<mat-label>Relation of Owner to Loan Applicant</mat-label>
<mat-select placeholder="" formControlName="property_owner_other_relationship" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rGroup of relationShipList" [label]="rGroup.groupName">
<!-- <mat-option>Select</mat-option> -->
<mat-option [value]="relation" *ngFor="let relation of rGroup.groupValues">{{relation.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['property_owner_other_relation_to']">
<mat-label>Relation To</mat-label>
<mat-select placeholder="" formControlName="property_owner_other_relation_to" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rtGroup of mergeCompanyApplicant" [label]="rtGroup.groupName">
<mat-option [value]="relationto" *ngFor="let relationto of rtGroup.groupValues">{{relationto.id=="0" ? 'Not Applicable' : relationto.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start proof documents -->
<mat-form-field style="width:28%" appearance="outline">
<mat-label>Ownership Proof Documents Sighted</mat-label>
<mat-select placeholder="" formControlName="property_ownership_proof_documents" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="_rentalForm.controls['sighted_documents']">
<mat-label>Type of Document Sighted</mat-label>
<mat-select placeholder="" formControlName="sighted_documents" [compareWith]="compareSingleObjects" (selectionChange)="getSightedDocs(_rentalForm.controls['sighted_documents'].value)" required>
<mat-option [value]="prDocs" *ngFor="let prDocs of documentList">{{prDocs.name | titlecase}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['other_sighted_documents']">
<mat-label>Other Type of Document</mat-label>
<input matInput placeholder="" formControlName="other_sighted_documents" required>
</mat-form-field>
<!-- end -->
<!-- start nature of ther property -->
<mat-form-field style="width:67%" appearance="outline">
<mat-label>Nature of Let Out Property as per Loan Applicant</mat-label>
<mat-select placeholder=""
formControlName="nature_property" [compareWith]="compareSingleObjects" required>
<mat-option *ngFor="let property of propertyNature" [value]="property">
{{property.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['other_nature_property']">
<mat-label>Other Property</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_nature_property" required>
</mat-form-field>
<!-- end -->
<!-- start type of units -->
<mat-form-field style="width:67%" appearance="outline">
<mat-label>Type of Units as per Loan Applicants</mat-label>
<mat-select placeholder=""
formControlName="unit_type" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let ugroup of unitTypeList" [label]="ugroup.groupName" [disabled]="_rentalForm.value.nature_property.id>1 && _rentalForm.value.nature_property.id!=ugroup.groupID">
<mat-option *ngFor="let unit of ugroup.groupValues" [value]="unit">
{{unit.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['other_unit_type']">
<mat-label>Specify Other Unit Type</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_unit_type" required>
</mat-form-field>
<mat-form-field style="width:67%;" appearance="outline" *ngIf="_rentalForm.controls['no_units']">
<mat-label>Tot No of Units</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="no_units" maxlength="3">
</mat-form-field>
<mat-form-field style="width:30%" appearance="outline" *ngIf="_rentalForm.controls['no_floor']">
<mat-label>No of Floors</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="no_floor" (keyup)="generateFloor($event)" maxlength="2">
</mat-form-field>
<mat-form-field style="width:30%;" appearance="outline" *ngIf="_rentalForm.controls['multistoried_total_area']">
<mat-label>Total Area Given on Rent</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="multistoried_total_area" required><!--maxlength="3"-->
</mat-form-field>
<!-- end area covered -->
<!-- start unit of measurement -->
<mat-form-field style="width:28%" appearance="outline" *ngIf="_rentalForm.controls['multistoried_uom']">
<mat-label>Unit of Measurement</mat-label>
<mat-select placeholder=""
formControlName="multistoried_uom" [compareWith]="compareSingleObjects" (selectionChange)="generateMultistoriedOtherUOM(_rentalForm.value)" required>
<mat-option *ngFor="let unitM of unitMeasurementList" [value]="unitM">
{{unitM.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="_rentalForm.controls['multistoried_other_uom']">
<mat-label>Other Unit of Measurement</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="multistoried_other_uom" required>
</mat-form-field>
<!-- end Uom -->
<!-- end -->
</div>
</mat-card-content>
</mat-card>
<!-- this is for multistoried floor details -->
<ng-container formArrayName="multistoried_building_details" *ngIf="_rentalForm.value.multistoried_building_details.length>0">
<mat-card *ngFor="let floor of _rentalForm.controls.multistoried_building_details['controls']; let f=index;let flast = last" [formGroupName]="f">
<mat-card-header>
<mat-form-field style="width:100%; margin-top: 2%;" appearance="outline">
<mat-label>Floor Level Name</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="floor_level" required>
</mat-form-field>
</mat-card-header>
<mat-card-content>
<mat-form-field style="width:46%" appearance="outline">
<mat-label>No of Units</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="no_units_in_floor" (keyup)="generateFloorUnit(floor.value,f)" required>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Is Rent Same for All Units</mat-label>
<mat-select placeholder="" formControlName="unit_rent_difference_options" (selectionChange)="generateFloorUnit(floor.value,f)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<!-- start floor unit array details -->
<!-- -->
<div [ngSwitch]="floor.value.unit_rent_difference_options">
<!-- this is for same rent for all unit -->
<ng-container *ngSwitchCase="1">
<div formArrayName="floor_unit_details" *ngIf="floor.value.floor_unit_details.length>0">
<div fxLayout="row wrap" class="align-margin" *ngFor="let fUnits of floor.controls.floor_unit_details['controls']; let fu=index;" [formGroupName]="fu">
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Rent per Unit</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="rent_per_unit" (keyup)="calculateFloorRentAmt(floor.value,f)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="fUnits.value.rent_per_unit != ''">{{"&#8377;"}} {{fUnits.value.rent_per_unit | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Total Rent Amount</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="amount" readonly>
<mat-hint align="start" style="font-size:90%" *ngIf="fUnits.value.amount != ''">{{"&#8377;"}} {{fUnits.value.amount | numberToWords}} Only</mat-hint>
</mat-form-field>
</div>
</div>
</ng-container>
<!-- this is for different rent for all unit -->
<ng-container *ngSwitchCase="0">
<div fxLayout="row wrap" class="align-margin" formArrayName="floor_unit_details" *ngIf="floor.value.floor_unit_details.length>0">
<div class="rent-unit" fxFlex.xs="100" fxFlex.sm="45" fxFlex.md="45" fxFlex.lg="45" fxFlex.xl="45" *ngFor="let fUnits of floor.controls.floor_unit_details['controls']; let fu=index;" [formGroupName]="fu">
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Rent Unit {{fu+1}} </mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="rent_per_unit" (keyup)="calculateFloorRentAmt(floor.value,f)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="fUnits.value.rent_per_unit != ''">{{"&#8377;"}} {{fUnits.value.rent_per_unit | numberToWords}} Only</mat-hint>
</mat-form-field>
</div>
</div>
</ng-container>
</div>
<!-- end floor unit array details-->
</mat-card-content>
<mat-card-actions *ngIf="floor.value.unit_rent_difference_options==0">
<div fxFlex="100" class="total-rent-amt">
<mat-form-field style="width:96%" appearance="outline">
<mat-label>Total Rent Amount</mat-label>
<input OnlyNumber matInput autocomplete="off" placeholder="" formControlName="floor_rent_amount" readonly>
<mat-hint align="start" style="font-size:90%" *ngIf="floor.value.floor_rent_amount != ''">{{"&#8377;"}} {{floor.value.floor_rent_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
</div>
</mat-card-actions>
</mat-card>
</ng-container>
<!-- end floor details -->
<!-- this is for property unit details-->
<ng-container formArrayName="property_unit_details" *ngIf="_rentalForm.value.property_unit_details.length>0">
<mat-card *ngFor="let units of _rentalForm.controls.property_unit_details['controls']; let u=index;let ulast = last" [formGroupName]="u">
<mat-card-header>
<mat-card-title>
Unit {{u+1}}
</mat-card-title>
</mat-card-header>
<mat-card-content>
<div fxLayout="row wrap">
<!-- start tenant/lessees -->
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Is Name of the Tenant(s)/Lessees(s) of the Let out Property Provided ?</mat-label>
<mat-select placeholder="" formControlName="tenant_lessees_options" (selectionChange)="generateTenantOptions(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">Name(s) not provided</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['name_tenant_lessees']">
<mat-label>Name of Tenant(s)/Lessees(s)</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="name_tenant_lessees" required>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['name_tenant_lessees_reason']">
<mat-label>Why Tenant(s)/Lessees(s) Name not Provided</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="name_tenant_lessees_reason" required>
</mat-form-field>
<!-- end tenant/lessees-->
<!--start payment -->
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Monthly Rent Amount as per Loan Applicant</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="monthly_rent_amount" required>
<!-- (keyup)="inWords($event,1)" -->
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.monthly_rent_amount != ''">{{"&#8377;"}} {{units.value.monthly_rent_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline">
<mat-label>Mode of Payment of Rent as per Loan Applicant</mat-label>
<mat-select placeholder=""
formControlName="payment_mode" [compareWith]="compareSingleObjects" (selectionChange)="generatePaymentOptions(units.value,u,1)" required>
<mat-option *ngFor="let payment of paymentOptions" [value]="payment">
{{payment.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:29%;" appearance="outline" *ngIf="units.controls['amount_received_bank']">
<mat-label>Amount Received in Bank</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="amount_received_bank" (keyup)="ValidatedRentAmount(units.value,u,1)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.amount_received_bank != ''">{{"&#8377;"}} {{units.value.amount_received_bank | numberToWords}} Only</mat-hint>
<mat-error *ngIf="units.controls['amount_received_bank'].hasError('max')">Given Value Is More Than Rent Amount</mat-error>
<mat-error *ngIf="units.controls['amount_received_bank'].hasError('min')">Given Value Is Less Than Rent Amount</mat-error>
</mat-form-field>
<mat-form-field style="width:29%;" appearance="outline" *ngIf="units.controls['amount_received_cash']">
<mat-label>Amount Received in Cash</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="amount_received_cash" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.amount_received_cash != ''">{{"&#8377;"}} {{units.value.amount_received_cash | numberToWords}} Only</mat-hint>
<mat-error *ngIf="units.controls['amount_received_cash'].hasError('max')">Given Value Is More Than Rent Amount</mat-error>
<mat-error *ngIf="units.controls['amount_received_cash'].hasError('min')">Given Value Is Less Than Rent Amount</mat-error>
</mat-form-field>
<mat-form-field style="width:30%;" appearance="outline" *ngIf="units.controls['payment_received_reason']">
<mat-label>Reason for Receiving Multiple Payment Mode</mat-label>
<textarea matInput placeholder="" formControlName="payment_received_reason" required></textarea>
</mat-form-field>
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Securtity Deposit amount as per Loan Applicant</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="securtity_deposit_amount" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.securtity_deposit_amount != ''">{{"&#8377;"}} {{units.value.securtity_deposit_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
<!-- end -->
<!-- start area covered by the property -->
<mat-form-field style="width:35%;" appearance="outline">
<mat-label>Area Covered by the Unit</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="property_cover_area" required><!--maxlength="3"-->
</mat-form-field>
<!-- end area covered -->
<!-- start unit of measurement -->
<mat-form-field style="width:28%" appearance="outline">
<mat-label>Unit of Measurement</mat-label>
<mat-select placeholder=""
formControlName="unit_measurement" [compareWith]="compareSingleObjects" (selectionChange)="generateOtherunitMeasurement(units.value,u)" required>
<mat-option *ngFor="let unitM of unitMeasurementList" [value]="unitM">
{{unitM.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="units.controls['other_unit_measurement']">
<mat-label>Other Unit of Measurement</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="other_unit_measurement" required>
</mat-form-field>
<!-- end -->
<!-- start Rent Agreement executed -->
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Is Rent Agreement executed for the Property let out</mat-label>
<mat-select placeholder="" formControlName="is_rent_agreement_executed" (selectionChange)="generateRentAgreementSeen(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start rent agreement -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['rent_agreement_seen']">
<mat-label>Rent Agreement Seen</mat-label>
<mat-select placeholder="" formControlName="rent_agreement_seen" (selectionChange)="generateRegisterOptions(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start Rent Agreement Registered -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['rent_agreement_registered']">
<mat-label>Is the Rent Agreement Registered at Sub-Registrar Office</mat-label>
<mat-select placeholder="" formControlName="rent_agreement_registered" (selectionChange)="generateRegisterDetails(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start rent agreement date details -->
<mat-form-field style="width:30%" appearance="outline" *ngIf="units.controls['agreement_date']">
<mat-label>Date of Agreement</mat-label>
<input matInput [max]="maxDate" [matDatepicker]="agreementpicker" formControlName="agreement_date"
placeholder="" (dateChange)="calculateExpiryDate($event,u)" readonly>
<mat-datepicker-toggle matSuffix [for]="agreementpicker" disabled="false"></mat-datepicker-toggle>
<mat-datepicker #agreementpicker></mat-datepicker>
</mat-form-field>
<mat-form-field style="width:62%" appearance="outline" *ngIf="units.controls['agreement_no_months']">
<mat-label>No of Months for Which Property has been let out as per Agreement</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" maxlength="4" formControlName="agreement_no_months" (keyup)="calculateExpiryDate($event,u)" required>
</mat-form-field>
<mat-form-field style="width:30%" appearance="outline" *ngIf="units.controls['agreement_expiring_date']">
<mat-label>Date on which Agreement is Expiring</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="agreement_expiring_date" readonly>
</mat-form-field>
<mat-form-field style="width:62%" appearance="outline" *ngIf="units.controls['rental_remaining_months']">
<mat-label>No of Rental Months Remaining as per Agreement</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="rental_remaining_months" readonly>
</mat-form-field>
<!-- end -->
<!-- start agreement rent amount -->
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['agreement_monthly_rent_amount']">
<mat-label>Monthly Rent Amount as per Agreement</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="agreement_monthly_rent_amount" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.agreement_monthly_rent_amount != ''">{{"&#8377;"}} {{units.value.agreement_monthly_rent_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
<!-- end -->
<!-- start Security Deposit amount as per agreement -->
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['agreement_security_deposit_amount']">
<mat-label>Security Deposit Amount as per Agreement</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="agreement_security_deposit_amount" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.agreement_security_deposit_amount != ''">{{"&#8377;"}} {{units.value.agreement_security_deposit_amount | numberToWords}} Only</mat-hint>
</mat-form-field>
<!-- end -->
<!-- start validate agreement amount -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['monthly_rent_amount'] && units.controls['agreement_monthly_rent_amount'] && validateAgreementAmt(units.controls['monthly_rent_amount'] ? units.value.monthly_rent_amount :'',units.controls['agreement_monthly_rent_amount'] ? units.value.agreement_monthly_rent_amount:'') !=0">
<mat-label>There is a Difference of Rs.{{validateAgreementAmt(units.value.monthly_rent_amount,units.value.agreement_monthly_rent_amount)}} in the rent amount as per agreement and actual rent received. Why?</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="differences_loanapplicant_rentagreement">
</mat-form-field>
<!-- end -->
<!-- start name of owners as per agreement -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['agreement_property_owners_name']">
<mat-label>Name of Owner / Owners of Rented Property as per Rent Agreement</mat-label>
<mat-select placeholder="Name"
formControlName="agreement_property_owners_name" [compareWith]="compareObjects" multiple (selectionChange)="generateAgreementOtherOwners(units.value.agreement_property_owners_name,u)" required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:28%" appearance="outline" *ngIf="units.controls['agreement_property_owner_other']">
<mat-label>Specify Other Owner/Owners</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="agreement_property_owner_other" required>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="units.controls['agreement_property_owner_other_relationship']">
<mat-label>Relation of Owner to Loan Applicant</mat-label>
<mat-select placeholder="" formControlName="agreement_property_owner_other_relationship" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rGroup of relationShipList" [label]="rGroup.groupName">
<!-- <mat-option>Select</mat-option> -->
<mat-option [value]="relation" *ngFor="let relation of rGroup.groupValues">{{relation.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="units.controls['agreement_property_owner_other_relation_to']">
<mat-label>Relation To</mat-label>
<mat-select placeholder="" formControlName="agreement_property_owner_other_relation_to" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rtGroup of mergeCompanyApplicant" [label]="rtGroup.groupName">
<mat-option [value]="relationto" *ngFor="let relationto of rtGroup.groupValues">{{relationto.id=="0" ? 'Not Applicable' : relationto.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start tenant agreeent name -->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['agreement_tenant_lessees_name']">
<mat-label>Name of Tenants / Lessees as per Rent Agreement</mat-label>
<textarea matInput rows="4" placeholder="" formControlName="agreement_tenant_lessees_name" required></textarea>
</mat-form-field>
<!-- end -->
<!-- end -->
<!-- start met tenant/lessees-->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['met_tenant_lessees_options']">
<mat-label>Tenant(s) / Lessee(s) Met During Visit of the Rented Property</mat-label>
<mat-select placeholder="" formControlName="met_tenant_lessees_options" (selectionChange)="generateTenantMetDetails(units.value,u)" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['name_tenant_lessees_per_met']">
<mat-label>Name of the Tenant / Lessee Met</mat-label>
<!-- <mat-select placeholder="" formControlName="name_tenant_lessees_per_met" required>
<mat-option [value]="metTenant" *ngFor="let metTenant of units.value.name_tenant_lessees">{{metTenant.name}}</mat-option>
</mat-select> -->
<input matInput autocomplete="off" placeholder="" formControlName="name_tenant_lessees_per_met" required>
</mat-form-field>
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['name_tenant_lessees_reason_per_met']">
<mat-label>Why Tenant / Lessee not Met ?</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="name_tenant_lessees_reason_per_met" required>
</mat-form-field>
<!-- end -->
<!--start tenant met owners-->
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['property_owner_per_met']">
<mat-label>Name of Owner as per Tenant / Lessee Met</mat-label>
<mat-select placeholder="Name"
formControlName="property_owner_per_met" [compareWith]="compareObjects" multiple (selectionChange)="generateMetOtherOwners(units.value,u)" required>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:28%" appearance="outline" *ngIf="units.controls['property_owner_other_per_met']">
<mat-label>Specify Other Owner/Owners</mat-label>
<input matInput autocomplete="off" placeholder="" formControlName="property_owner_other_per_met" required>
</mat-form-field>
<mat-form-field style="width:35%" appearance="outline" *ngIf="units.controls['property_owner_other_relationship_per_met']">
<mat-label>Relation of Owner to Loan Applicant</mat-label>
<mat-select placeholder="" formControlName="property_owner_other_relationship_per_met" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rGroup of relationShipList" [label]="rGroup.groupName">
<!-- <mat-option>Select</mat-option> -->
<mat-option [value]="relation" *ngFor="let relation of rGroup.groupValues">{{relation.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field style="width:25%" appearance="outline" *ngIf="units.controls['property_owner_other_relation_to_per_met']">
<mat-label>Relation To</mat-label>
<mat-select placeholder="" formControlName="property_owner_other_relation_to_per_met" [compareWith]="compareObjects" required>
<mat-optgroup *ngFor="let rtGroup of mergeCompanyApplicant" [label]="rtGroup.groupName">
<mat-option [value]="relationto" *ngFor="let relationto of rtGroup.groupValues">{{relationto.id=="0" ? 'Not Applicable' : relationto.name | titlecase}}</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
<!-- end -->
<!-- start met payment -->
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['paid_monthly_rent_per_met']">
<mat-label>Monthly Rent Amount Paid as per Tenant / Lessee Met</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="paid_monthly_rent_per_met" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.paid_monthly_rent_per_met != ''">{{"&#8377;"}} {{units.value.paid_monthly_rent_per_met | numberToWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width:46%" appearance="outline" *ngIf="units.controls['period_of_stay_per_met']">
<mat-label>Period (Months) of Stay as per Tenant / Lessee Met</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="period_of_stay_per_met" maxlength="5" required>
</mat-form-field>
<mat-form-field style="width:100%" appearance="outline" *ngIf="units.controls['payment_mode_per_met']">
<mat-label>Mode of Payment of Rent as Validated by PD Officer with Tenant / Lessee During Visit</mat-label>
<mat-select placeholder="" formControlName="payment_mode_per_met" [compareWith]="compareSingleObjects" (selectionChange)="generatePaymentOptions(units.value,u,2)" required>
<mat-option *ngFor="let payment of paymentPaidOptions" [value]="payment">
{{payment.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:29%;" appearance="outline" *ngIf="units.controls['amount_received_bank_per_met']">
<mat-label>Amount Paid in Bank</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="amount_received_bank_per_met" (keyup)="ValidatedRentAmount(units.value,u,2)" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.amount_received_bank_per_met != ''">{{"&#8377;"}} {{units.value.amount_received_bank_per_met | numberToWords}} Only</mat-hint>
<mat-error *ngIf="units.controls['amount_received_bank_per_met'].hasError('max')">Given Value Is More Than Rent Amount</mat-error>
<mat-error *ngIf="units.controls['amount_received_bank_per_met'].hasError('min')">Given Value Is Less Than Rent Amount</mat-error>
</mat-form-field>
<mat-form-field style="width:29%;" appearance="outline" *ngIf="units.controls['amount_received_cash_per_met']">
<mat-label>Amount Paid in Cash</mat-label>
<input matInput OnlyNumber autocomplete="off" placeholder="" formControlName="amount_received_cash_per_met" required>
<mat-hint align="start" style="font-size:90%" *ngIf="units.value.amount_received_cash_per_met != ''">{{"&#8377;"}} {{units.value.amount_received_cash_per_met | numberToWords}} Only</mat-hint>
<mat-error *ngIf="units.controls['amount_received_cash_per_met'].hasError('max')">Given Value Is More Than Rent Amount</mat-error>
<mat-error *ngIf="units.controls['amount_received_cash_per_met'].hasError('min')">Given Value Is Less Than Rent Amount</mat-error>
</mat-form-field>
<mat-form-field style="width:30%;" appearance="outline" *ngIf="units.controls['payment_received_reason_per_met']">
<mat-label>Reason for Paid Multiple Payment Mode</mat-label>
<textarea matInput placeholder="" formControlName="payment_received_reason_per_met" required></textarea>
</mat-form-field>
<!-- start validate appplicant/agreement payment options -->
<div *ngIf="units.controls['paid_monthly_rent_per_met'] && units.controls['payment_mode'] && units.controls['monthly_rent_amount'] && units.controls['payment_mode_per_met']">
<mat-form-field style="width:100%" appearance="outline" *ngIf="(units.value.monthly_rent_amount>0 && units.value.paid_monthly_rent_per_met>0 && units.value.payment_mode!='' && units.value.payment_mode_per_met!='') && (units.value.monthly_rent_amount!=units.value.paid_monthly_rent_per_met) || units.value.payment_mode_per_met.id != 2 "><!-- || units.value.payment_mode.id!=units.value.payment_mode_per_met.id -->
<mat-label>What is the Reason for Difference in Rent Amount</mat-label><!-- or Mode of Payment -->
<input matInput autocomplete="off" placeholder="" formControlName="payment_difference_per_met">
</mat-form-field>
</div>
<!-- end -->
<!-- end met payment -->
</div>
</mat-card-content>
<mat-card-actions align="end">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeUnit(u)" *ngIf="_rentalForm.value.property_unit_details.length>1"
matTooltip="Remove Unit" matTooltipPosition="above">
<mat-icon>delete</mat-icon>
</button>
</mat-card-actions>
</mat-card>
</ng-container>
<div fxLayout="row" style="margin-top: 2%;margin-bottom:2%; ">
<div fxFlex="100" align="center">
<button type="button" mat-flat-button (click)="addMoreUnitDetails()"
matTooltip="Add More Unit" matTooltipPosition="above" color="primary">
<strong>Add More Unit</strong>
</button>
</div>
</div>
<!-- unit end -->
<mat-card>
<mat-card-header>
<mat-card-title>
Third Party Check
</mat-card-title>
</mat-card-header>
<mat-card-content>
<div fxLayout="row wrap">
<!-- start third party check -->
<mat-form-field style="width:100%" appearance="outline">
<mat-label>Third party check done on prevailing rent in the area</mat-label>
<mat-select placeholder="" formControlName="done_third_party_check" required>
<mat-option value="1">Yes</mat-option>
<mat-option value="0">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%;" appearance="outline" *ngIf="_rentalForm.controls['whom_third_party_check_done']">
<mat-label>Name of person with whom Third Party Check on going rentals in the area done</mat-label>
<input matInput placeholder="" formControlName="whom_third_party_check_done" required>
</mat-form-field>
<mat-form-field style="width:100%;" appearance="outline" *ngIf="_rentalForm.controls['description_third_party_check_done']">
<mat-label>Description of the person with whom the Third Party Check is done</mat-label>
<textarea matInput placeholder="" formControlName="description_third_party_check_done" required></textarea>
</mat-form-field>
<mat-form-field style="width:100%;" appearance="outline" *ngIf="_rentalForm.controls['rental_rates_third_party_check_done']">
<mat-label>Rental rates in the area as per the person with whom Third Party Check is done</mat-label>
<textarea matInput placeholder="" formControlName="rental_rates_third_party_check_done" required></textarea>
</mat-form-field>
<mat-form-field style="width:100%;" appearance="outline" *ngIf="_rentalForm.controls['why_third_party_check_not_done']">
<mat-label>Why Third party check not done</mat-label>
<textarea matInput placeholder="" formControlName="why_third_party_check_not_done" required></textarea>
</mat-form-field>
<!-- end -->
<div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100" class="m-gap p-gap" *ngFor="let ad of existing_rental_list let i = index;">
<mat-card>
<div class="card-property grad">
<div class="title d-flex">
<div fxFlex="70" align="left"><strong>Property {{i+1}}</strong></div>
<div fxFlex="30" align="end"><i class="fa fa-edit fa-1x align-self-center" (click)="editRIDetails(ad.rental_existing_data)"></i></div>
</div>
<br>
<div class="address">{{ad.address}} </div>
<br>
<div class="desc d-flex">{{ad.city}} - {{ad.state}} - {{ad.pincode}} </div>
<div class="amts d-flex">
<div class="temp align-self-center">Annual Rent Amount as per Applicant : {{ad.applicants_rent}} </div>
</div>
</div>
</mat-card>
</div>
<div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100" class="m-gap p-gap">
<mat-card>
<div class="card-property grad center">
<div style="margin-top: 55px !important;">
<i class="fa fa-plus fa-3x align-self-center" (click)="addMoreRIDetails()"><div class="addfont">Add Property </div></i>
</div>
</div>
</mat-card>
</div>
</div>
</mat-card-content>
</mat-card>
</mat-dialog-content>
<mat-dialog-actions>
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="rental_remark"></textarea>
</mat-form-field>
</div>
<div fxFlex="40" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="saveRental(_rentalForm.value)"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-actions>
</form>
<notifier-container></notifier-container>

View File

@ -1,21 +1,52 @@
.paragraph_change {
.dialog_title {
color: #fff !important;
background-color: #e00201 !important;
}
mat-form-field {
margin: 0 2%;
}
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
background-color: #e00201 !important;
}
.card-property {
height: 250px;
color: black;
}
.align-margin {
margin-left: 2%;
margin-right: 2%;
.card-property{
padding: 2rem;
line-height: 1.3rem;
}
.rent-unit {
margin-left: 2%;
margin-top: 1%;
.addfont{
font-size: 1.2rem !important;
font: 500 20px/32px Roboto, "Helvetica Neue", sans-serif !important;
}
.total-rent-amt{
margin-left: 1%;
.fa:hover{
color: #e00201 !important;
}
.title {
font-size: 1.2rem !important;
line-height: 40px;
}
.address {
font-size: 1.2rem !important;
line-height: 1.2rem;
}
.desc {
font-size: 1.2rem !important;
line-height: 1.2rem;
}
.amts {
height: 80px;
}
.grad {
background: whitesmoke;
color:black;
}
.temp {
font-size: 1.2rem !important;
color : #e00201 !important;
display: inline-block;
}

View File

@ -4,51 +4,92 @@
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="30" fxFlex.xl="30" *ngFor="let master of pdMasterData">
<mat-card style="margin: 15px;min-width: 80%;max-width: 100%;box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important;">
<mat-card-content style="background-color: whitesmoke;">
<mat-list role="list">
<mat-list-item class="center" role="listitem">
<strong>{{master.lender_short_name}}</strong>
</mat-list-item>
<mat-list-item class="center" role="listitem">
{{master.branch_name}}
</mat-list-item>
<mat-list-item class="center" role="listitem" *ngIf="master.lender_applicant_id">
{{master.lender_applicant_id}}
</mat-list-item>
<mat-list-item class="center" role="listitem" *ngIf="master.lender_applicant_id">
{{master.pd_date_of_initiation}}
</mat-list-item>
<mat-list-item role="listitem" class="center" *ngIf="master.product_name">
{{master.product_name}}
</mat-list-item>
<mat-list-item class="center" role="listitem" *ngIf="master.subproduct_name">
{{master.subproduct_name}}
</mat-list-item>
<mat-list-item class="center" role="listitem" *ngIf="master.loan_amount">
<i class="fa-1x fa fa-rupee"></i><small style="margin-left: 2%; font-size: inherit">{{master.loan_amount}}</small>
</mat-list-item>
<mat-list-item class="center" role="listitem" *ngIf="master.pd_type_name">
<mat-card-content style="background-color: whitesmoke;padding:0px !important;">
<mat-list role="list">
<mat-list-item role="listitem" style="background-color:#e00201;">
<div fxFlex="row">
<div fxFlex="100">
<div fxFlex="100" align="center" *ngIf="master.pd_type_name" style="color:#fff;">
<i class="fa-1x fa fa-check-circle"></i><small style="margin-left: 2%; font-size: inherit">{{master.pd_type_name}}</small>
</mat-list-item>
</div>
</div>
</div>
</mat-list-item>
<mat-list-item role="listitem" style="height:54px !important;padding:2px;">
<div fxFlex="row">
<div fxFlex="100">
<div fxFlex="50" align="left">
<strong>{{master.lender_short_name}}</strong>
</div>
<div fxFlex="50" align="right">
{{master.branch_name}}
</div>
</div>
</div>
</mat-list-item>
<hr>
<mat-list-item role="listitem" style="height:54px !important;padding:2px;">
<div fxFlex="row">
<div fxFlex="100">
<div fxFlex="50" align="left" *ngIf="master.lender_applicant_id">
{{master.lender_applicant_id}}
</div>
<div fxFlex="50" align="right" *ngIf="master.lender_applicant_id">
{{master.pd_date_of_initiation}}
</div>
</div>
</div>
</mat-list-item>
<hr>
<mat-list-item role="listitem" style="height:54px !important;padding:2px;">
<div fxFlex="row">
<div fxFlex="100">
<div fxFlex="100" align="left" *ngIf="master.product_name">
{{master.product_name}}<br>
<span *ngIf="master.subproduct_name" style="font-size:0.9rem !important;">{{master.subproduct_name}}</span>
</div>
</div>
</div>
</mat-list-item>
<hr>
<mat-list-item role="listitem">
<div fxFlex="row">
<div fxFlex="100">
<div fxFlex="100" align="right" *ngIf="master.loan_amount">
<i class="fa-1x fa fa-rupee"></i><small style="margin-left: 2%; font-size: inherit">{{master.loan_amount}}</small>
</div>
</div>
</div>
</mat-list-item>
</mat-list>
<div>
<mat-card-title style="color:#e00201;">Lender Contact Details</mat-card-title>
<mat-list>
<mat-list-item align="left" *ngIf="master.pd_contact_person">
<i class="fa-1x fa fa-user"></i><small style="margin-left: 2%; font-size: inherit">{{master.pd_contact_person}}</small>
</mat-list-item>
<mat-list-item align="left" *ngIf="master.pd_contact_mobileno">
<i class="fa-1x fa fa-phone"></i><small style="margin-left: 2%; font-size: inherit">{{master.pd_contact_mobileno}}</small>
</mat-list-item>
</mat-list>
</div>
</mat-card-content>
<mat-card-actions align="center">
<button mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
</button>
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button>
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
</mat-card-actions>
</mat-card>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="70" fxFlex.xl="70" class="content-data" *ngFor="let master of pdMasterData">
<div fxLayout="row">
<div fxFlex="100" align="right">
<div fxFlex="100" align="right">
<button mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
</button>
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button>
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus==pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
</div>
@ -57,7 +98,93 @@
<div fxLayout="row wrap">
<div fxFlex="50" *ngFor="let addresses of master.addresses;">
<mat-card style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important" *ngIf="addresses.pincode">
<mat-card style="box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important;border-radius: 5px !important;border-bottom:1px solid #e00201 !important;" *ngIf="addresses.pincode">
<mat-card class="headerdesign" style="background-color: #e00201;margin:0px !important;">
<!-- this is for set primary address of the PD actions-->
<div [ngSwitch]="addresses.is_primary" style="padding:10px !important;">
<div *ngSwitchCase="1">
<!-- <div fxFlex="50" align="left">
<div fxFlex="100" style="color: #e00201">
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}
</div>
</div> -->
<div fxLayout="row nowrap">
<div fxFlex="100">
<div fxFlex="40" align="left" style="color: #fff">
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}
</div>
<div fxFlex="60" align="right">
<button *ngIf="addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button>
<button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button>
<button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button>
<button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && enableStartPD" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,master.pd_status)"><mat-icon>question_answer</mat-icon></button>
</div>
</div>
</div>
<div fxLayout="row nowrap">
<div fxFlex="100">
<div fxFlex="40" align="left" style="color: #fff">
<div *ngIf="master.pd_allocated_to && master.fk_pd_type==1">
{{master.pd_allocated_to | titlecase}}
</div>
<div *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2">
{{master.executive_name | titlecase}}
</div>
<div *ngIf="master.centralofficer && master.fk_pd_type==3">
{{master.centralofficer | titlecase}}
</div>
</div>
<div fxFlex="60" align="right" style="color: #fff" *ngIf="master.scheduled_on">
{{master.scheduled_on}}
</div>
</div>
</div>
</div>
<div *ngSwitchCase="0">
<div fxLayout="row nowrap">
<div fxFlex="100">
<mat-card-actions align="right" *ngIf="master.fk_primary_address_id==null && addresses.addtional_pd_data.length==0">
<button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button>
</mat-card-actions>
<mat-card-actions align="right" *ngIf="master.fk_primary_address_id!=null && addresses.addtional_pd_data.length==0 && master.pd_status==pdStatusCheck.ADD_ON_PENDING">
<!-- master.pd_status==pdStatusCheck.ADD_ON_PENDING -->
<button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button>
</mat-card-actions>
<div *ngIf="master.fk_primary_address_id!=null && addresses.addtional_pd_data.length>0">
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #fff">
{{addresses.addtional_pd_data[0].pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : addresses.addtional_pd_data[0].pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : addresses.addtional_pd_data[0].pd_status | titlecase}}
</div>
<div fxFlex="60" align="right">
<button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button>
<button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button>
<button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button>
</div>
</div>
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #fff">
<div *ngIf="addresses.addtional_pd_data[0].pd_allocated_to && addresses.addtional_pd_data[0].fk_pd_type==1">
{{addresses.addtional_pd_data[0].pd_allocated_to | titlecase}}
</div>
<div *ngIf="addresses.addtional_pd_data[0].executive_name && addresses.addtional_pd_data[0].centralofficer && addresses.addtional_pd_data[0].fk_pd_type==2">
{{addresses.addtional_pd_data[0].executive_name | titlecase}}
</div>
<div *ngIf="addresses.addtional_pd_data[0].centralofficer && addresses.addtional_pd_data[0].fk_pd_type==3">
{{addresses.addtional_pd_data[0].centralofficer | titlecase}}
</div>
</div>
<div fxFlex="60" align="right" style="color: #fff" *ngIf="addresses.addtional_pd_data[0].scheduled_on">
{{addresses.addtional_pd_data[0].scheduled_on}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</mat-card>
<mat-card-content>
<div fxLayout="row nowrap">
<div fxFlex="10" appPdLocatedMapView [value]="addresses">
@ -71,114 +198,20 @@
</div>
</mat-card-content>
<!-- <mat-divider></mat-divider> -->
<!-- this is for set primary address of the PD actions-->
<div [ngSwitch]="addresses.is_primary">
<div *ngSwitchCase="1">
<mat-card-actions>
<!-- <div fxFlex="50" align="left">
<div fxFlex="100" style="color: #e00201">
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}
</div>
</div> -->
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #e00201">
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}
</div>
<div fxFlex="60" align="right">
<button *ngIf="addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate Address for Additional PD Process' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button>
<button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button>
<button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button>
<button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && enableStartPD" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,master.pd_status)"><mat-icon>question_answer</mat-icon></button>
</div>
</div>
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #e00201">
<div *ngIf="master.pd_allocated_to && master.fk_pd_type==1">
{{master.pd_allocated_to | titlecase}}
</div>
<div *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2">
{{master.executive_name | titlecase}}
</div>
<div *ngIf="master.centralofficer && master.fk_pd_type==3">
{{master.centralofficer | titlecase}}
</div>
</div>
<div fxFlex="60" align="right" style="color: #e00201" *ngIf="master.scheduled_on">
{{master.scheduled_on}}
</div>
</div>
</mat-card-actions>
</div>
<div *ngSwitchCase="0">
<mat-card-actions align="right" *ngIf="master.fk_primary_address_id==null && addresses.addtional_pd_data.length==0">
<button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate Address for Additional PD Process' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button>
</mat-card-actions>
<mat-card-actions align="right" *ngIf="master.fk_primary_address_id!=null && addresses.addtional_pd_data.length==0 && master.pd_status==pdStatusCheck.ADD_ON_PENDING">
<!-- master.pd_status==pdStatusCheck.ADD_ON_PENDING -->
<button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate Address for Additional PD Process' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button>
</mat-card-actions>
<mat-card-actions align="right" *ngIf="master.fk_primary_address_id!=null && addresses.addtional_pd_data.length>0">
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #e00201">
{{addresses.addtional_pd_data[0].pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : addresses.addtional_pd_data[0].pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : addresses.addtional_pd_data[0].pd_status | titlecase}}
</div>
<div fxFlex="60" align="right">
<button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button>
<button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button>
<button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button>
</div>
</div>
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #e00201">
<div *ngIf="addresses.addtional_pd_data[0].pd_allocated_to && addresses.addtional_pd_data[0].fk_pd_type==1">
{{addresses.addtional_pd_data[0].pd_allocated_to | titlecase}}
</div>
<div *ngIf="addresses.addtional_pd_data[0].executive_name && addresses.addtional_pd_data[0].centralofficer && addresses.addtional_pd_data[0].fk_pd_type==2">
{{addresses.addtional_pd_data[0].executive_name | titlecase}}
</div>
<div *ngIf="addresses.addtional_pd_data[0].centralofficer && addresses.addtional_pd_data[0].fk_pd_type==3">
{{addresses.addtional_pd_data[0].centralofficer | titlecase}}
</div>
</div>
<div fxFlex="60" align="right" style="color: #e00201" *ngIf="addresses.addtional_pd_data[0].scheduled_on">
{{addresses.addtional_pd_data[0].scheduled_on}}
</div>
</div>
</mat-card-actions>
</div>
</div>
</mat-card>
</div>
<div fxFlex="50">
<mat-card style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important">
<mat-card-header>
<mat-card-title>Lender Contact Details</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-list>
<mat-list-item *ngIf="master.pd_contact_person">
<i class="fa-1x fa fa-user"></i><small style="margin-left: 2%; font-size: inherit">{{master.pd_contact_person}}</small>
</mat-list-item>
<mat-list-item *ngIf="master.pd_contact_mobileno">
<i class="fa-1x fa fa-phone"></i><small style="margin-left: 2%; font-size: inherit">{{master.pd_contact_mobileno}}</small>
</mat-list-item>
</mat-list>
</mat-card-content>
</mat-card>
</div>
<div fxFlex="50" *ngIf="master.remarks">
<mat-card style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important">
<mat-card-header>
<mat-card-title>Remarks</mat-card-title>
<mat-card style="box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important;border-radius: 5px !important;border-bottom:1px solid #e00201 !important;">
<mat-card-header style="background-color:#e00201;">
<mat-card-title style="color:#fff;">Remarks</mat-card-title>
</mat-card-header>
<mat-card-content>
<p>{{master.remarks}}</p>
</mat-card-content>
</mat-card>
</div>
</div>

View File

@ -1,3 +1,4 @@
.cardEdit {
float:right;
padding-top:3%;
@ -12,7 +13,12 @@
.metaDataStyle{
height:89px !important;
}
.headerdesign{
border-radius: 5px !important;
// border-bottom-left-radius: 5px !important;
// border-bottom-right-radius: 5px !important;
box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important;
}
:host {
margin-left: -5px;
@ -35,12 +41,12 @@
}
}
.mat-list .mat-list-item.center .mat-list-item-content{
justify-content: center;
// color: #fff
}
.mat-list .mat-list-item.center .mat-list-text>*{
margin: 0 auto 0 0;
}
// .mat-list .mat-list-item.center .mat-list-item-content{
// justify-content: center;
// // color: #fff
// }
// .mat-list .mat-list-item.center .mat-list-text>*{
// margin: 0 auto 0 0;
// }

View File

@ -118,6 +118,7 @@ import { RentalVerificationComponent } from './list-pd/start-pd/forms/rental-ver
import { InitiateAdditionalPdComponent } from './list-pd/initiate-additional-pd/initiate-additional-pd.component';
import { ManageDailyPurchaseComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-purchase/manage-daily-purchase.component';
import { DailyPurchaseDetailsComponent } from './list-pd/start-pd/forms/assessed-income/daily-purchase-details/daily-purchase-details.component';
import { ManageRentalVerificationComponent } from './list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component';
/**
* Custom angular notifier options
@ -164,7 +165,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
};
@NgModule({
declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent],
declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent],
imports: [
CommonModule,
ManagePdRoutingModule,
@ -197,13 +198,13 @@ const pdCustomNotifierOptions: NotifierOptions = {
AgmCoreModule.forRoot({apiKey: 'AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg'}),OwlDateTimeModule,
OwlNativeDateTimeModule,
],
exports: [PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent],
exports: [PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent],
providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent,
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent],
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent],
})
export class ManagePdModule {
}

View File

@ -63,7 +63,6 @@ export class PdTrigerService {
catchError(this.handleError('role', []))
)
}
/* To get addresses From T_PD_ADDRESS table.,
* Used In 1) edit pd trigger component
* 2) Address Form
@ -678,5 +677,14 @@ export class PdTrigerService {
}
//To Get State City Name Pincode
//From Name : Rental Information
getStateCityNamesAndPincode(values): Observable<any> {
return this._http.post(this.apiUrl + 'getStateCityNamesAndPincode', { "records":values })
.pipe(
catchError(this.handleError('role', []))
)
}
}