address and rental verification changes
This commit is contained in:
parent
9ce164155c
commit
61beb9d3ae
@ -145,6 +145,8 @@ export class AddressComponent implements OnInit {
|
|||||||
'state': datas.fk_state,
|
'state': datas.fk_state,
|
||||||
'city': datas.fk_city,
|
'city': datas.fk_city,
|
||||||
'pincode': datas.pincode_id,
|
'pincode': datas.pincode_id,
|
||||||
|
'pd_address_id': datas.pd_address_id,
|
||||||
|
|
||||||
// 'pincode_others': datas.pincode_id == 1 ? datas.other_pincode :'',
|
// 'pincode_others': datas.pincode_id == 1 ? datas.other_pincode :'',
|
||||||
}
|
}
|
||||||
this.getCityAndPincodeDetails(datas.fk_state, index, 1);
|
this.getCityAndPincodeDetails(datas.fk_state, index, 1);
|
||||||
@ -243,6 +245,7 @@ export class AddressComponent implements OnInit {
|
|||||||
stateSearch: [''],
|
stateSearch: [''],
|
||||||
citySearch: [''],
|
citySearch: [''],
|
||||||
pinSearch: [''],
|
pinSearch: [''],
|
||||||
|
pd_address_id: [AddressDetails.pd_address_id],
|
||||||
state: [AddressDetails.state],
|
state: [AddressDetails.state],
|
||||||
city: [AddressDetails.city],
|
city: [AddressDetails.city],
|
||||||
pincode: [AddressDetails.pincode],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
pincode: [AddressDetails.pincode],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
||||||
@ -258,6 +261,7 @@ export class AddressComponent implements OnInit {
|
|||||||
stateSearch: [''],
|
stateSearch: [''],
|
||||||
citySearch: [''],
|
citySearch: [''],
|
||||||
pinSearch: [''],
|
pinSearch: [''],
|
||||||
|
pd_address_id: [''],
|
||||||
pincode_others: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
pincode_others: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -273,6 +277,8 @@ export class AddressComponent implements OnInit {
|
|||||||
alternative_pincode: [AddressDetails.alternative_pincode],
|
alternative_pincode: [AddressDetails.alternative_pincode],
|
||||||
stateSearch:[''],
|
stateSearch:[''],
|
||||||
citySearch:[''],
|
citySearch:[''],
|
||||||
|
pinSearch:[''],
|
||||||
|
alternative_pd_address_id:[''],
|
||||||
alternative_pincode_others: [AddressDetails.alternative_pincode_others, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
alternative_pincode_others: [AddressDetails.alternative_pincode_others, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||||
reason_for_alternative_address: [AddressDetails.reason_for_alternative_address, Validators.compose([Validators.required])],
|
reason_for_alternative_address: [AddressDetails.reason_for_alternative_address, Validators.compose([Validators.required])],
|
||||||
});
|
});
|
||||||
@ -287,6 +293,7 @@ export class AddressComponent implements OnInit {
|
|||||||
stateSearch:[''],
|
stateSearch:[''],
|
||||||
citySearch:[''],
|
citySearch:[''],
|
||||||
pinSearch:[''],
|
pinSearch:[''],
|
||||||
|
alternative_pd_address_id: [''],
|
||||||
alternative_pincode_others:['', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
alternative_pincode_others:['', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||||
reason_for_alternative_address: ['', Validators.compose([Validators.required])],
|
reason_for_alternative_address: ['', Validators.compose([Validators.required])],
|
||||||
});
|
});
|
||||||
@ -680,6 +687,7 @@ export class AddressComponent implements OnInit {
|
|||||||
'state': datas.state,
|
'state': datas.state,
|
||||||
'city': datas.city,
|
'city': datas.city,
|
||||||
'pincode': datas.pincode,
|
'pincode': datas.pincode,
|
||||||
|
'pd_address_id': datas.pd_address_id,
|
||||||
// 'pincode_others': datas.pincode ? datas.pincode_others : ''
|
// 'pincode_others': datas.pincode ? datas.pincode_others : ''
|
||||||
}
|
}
|
||||||
this.getCityAndPincodeDetails(datas.state, index, 1);
|
this.getCityAndPincodeDetails(datas.state, index, 1);
|
||||||
|
|||||||
@ -39,6 +39,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
isOtherOwner: any = [];
|
isOtherOwner: any = [];
|
||||||
loadDetails: boolean;
|
loadDetails: boolean;
|
||||||
|
|
||||||
|
CurrentAddressLabel=null;
|
||||||
|
|
||||||
CustSegAbbr: any;
|
CustSegAbbr: any;
|
||||||
generalExistBusinessYear: Number;
|
generalExistBusinessYear: Number;
|
||||||
generalExistBusinessMonth: Number;
|
generalExistBusinessMonth: Number;
|
||||||
@ -228,13 +230,58 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
|
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
if(flag == 1){
|
if(flag == 1){
|
||||||
|
// console.log('first',flag == 1)
|
||||||
let initiated_address_check = data.records.hasOwnProperty('is_pd_done_on_initiated_address') ? data.records.is_pd_done_on_initiated_address : true;
|
let initiated_address_check = data.records.hasOwnProperty('is_pd_done_on_initiated_address') ? data.records.is_pd_done_on_initiated_address : true;
|
||||||
this.addressList.push({ key_name: 'initiate_address', value: data.records.addresses[0].address, description: 'Initiated Address' });
|
this.addressList.push({ key_name: 'initiate_address', value: data.records.addresses[0].address, description: 'Initiated Address' });
|
||||||
if (initiated_address_check == false ) {
|
if (initiated_address_check == false ) {
|
||||||
this.addressList.push({ key_name: 'alternative_addresses', value: data.records.alternative_addresses[0].alternative_address, description: 'Alternative Address' });
|
this.addressList.push({ key_name: 'alternative_addresses', value: data.records.alternative_addresses[0].alternative_address, description: 'Alternative Address' });
|
||||||
}
|
}
|
||||||
|
let addressarry= data.records.addresses
|
||||||
|
if(initiated_address_check == false){
|
||||||
|
addressarry = data.records.alternative_addresses
|
||||||
|
}
|
||||||
|
addressarry.forEach((dataValue, inx) => {
|
||||||
|
if(initiated_address_check == false){
|
||||||
|
dataValue.address=dataValue.alternative_address
|
||||||
|
dataValue.state=dataValue.alternative_state
|
||||||
|
dataValue.city=dataValue.alternative_city
|
||||||
|
dataValue.pincode=dataValue.alternative_pincode
|
||||||
|
}
|
||||||
|
//
|
||||||
|
this.pdTrigerService.getStateWiseCities(dataValue.state).subscribe(data => {
|
||||||
|
|
||||||
|
if (data.status == 200) {
|
||||||
|
|
||||||
|
this.cityArr = data.records.cities;
|
||||||
|
this.pinArr = data.records.pincode;
|
||||||
|
|
||||||
|
let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == dataValue.address_type)[0];
|
||||||
|
// console.log('typedata',selectedAddressType);
|
||||||
|
let selectedState = this.m_state_for_address.filter(element => element.state_id == dataValue.state)[0];
|
||||||
|
let selectedCity = this.cityArr.filter(element => element.city_id == dataValue.city)[0];
|
||||||
|
// console.log(selectedCity,dataValue.city,selectedState);
|
||||||
|
let selectedPincode = this.pinArr.filter(element => element.pincode_id == dataValue.pincode)[0];
|
||||||
|
|
||||||
|
let addressType = dataValue.address_type != 1 ? selectedAddressType.address_type : dataValue.address_type_others;
|
||||||
|
this.address_type = addressType;
|
||||||
|
let address = dataValue.address.replace(/\n/g,"") + ' , ' + selectedCity.city_name + ',' + selectedState.name + '-' + (dataValue.pincode == 1 ? dataValue.pincode_others : selectedPincode.pincode);
|
||||||
|
|
||||||
|
this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
|
||||||
|
let addressLabel = address + ' / ' + addressType;
|
||||||
|
|
||||||
|
this.CurrentAddressLabel = addressLabel;
|
||||||
|
// console.log(addressLabel);
|
||||||
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
|
||||||
|
// console.log(addressLabel,control);
|
||||||
|
control.controls[0]['controls'].address_label.setValue(this.CurrentAddressLabel);
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
else if(flag == 2){
|
else if(flag == 2){
|
||||||
|
// console.log('Second',flag == 1)
|
||||||
let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1);
|
let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1);
|
||||||
this.addressList.push({ key_name: 'initiate_address', value: data.records.addresses[0].address, description: 'Initiated Address' });
|
this.addressList.push({ key_name: 'initiate_address', value: data.records.addresses[0].address, description: 'Initiated Address' });
|
||||||
let initiated_address_check = data.records.hasOwnProperty('is_pd_done_on_initiated_address') ? data.records.is_pd_done_on_initiated_address : true;
|
let initiated_address_check = data.records.hasOwnProperty('is_pd_done_on_initiated_address') ? data.records.is_pd_done_on_initiated_address : true;
|
||||||
@ -676,8 +723,9 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
let addressType = splitted_label[1] != '' ? splitted_label[1] : 'Address Type';
|
let addressType = splitted_label[1] != '' ? splitted_label[1] : 'Address Type';
|
||||||
this.placeholderName[index] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
|
this.placeholderName[index] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
|
||||||
this.address_type = addressType;
|
this.address_type = addressType;
|
||||||
|
// console.log(this.CurrentAddressLabel)
|
||||||
let vals = {
|
let vals = {
|
||||||
address_label: val.address_label,
|
address_label: this.CurrentAddressLabel == null ? val.address_label : this.CurrentAddressLabel,
|
||||||
business_years: val.business_years,
|
business_years: val.business_years,
|
||||||
business_month: val.business_month,
|
business_month: val.business_month,
|
||||||
business_address_availability: val.business_address_availability,
|
business_address_availability: val.business_address_availability,
|
||||||
|
|||||||
@ -397,12 +397,7 @@
|
|||||||
{{AV_netProfitAmtInwords[i]}} Only </mat-hint> -->
|
{{AV_netProfitAmtInwords[i]}} Only </mat-hint> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:54%" *ngIf="lender_short_name == 'CLIX' || lender_short_name == 'MWISE' || product_abbr == 'LAEP'">
|
|
||||||
<input matInput placeholder="Annual Sales through Credit Card / POS machines"
|
|
||||||
formControlName="estimate_posmachine_or_cc_annual_sales">
|
|
||||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_posmachine_or_cc_annual_sales').value != ''">{{"₹"}}
|
|
||||||
{{details.get('estimate_posmachine_or_cc_annual_sales').value | numberToWords}} Only</mat-hint>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -482,6 +477,12 @@
|
|||||||
formControlName="estimate_reason_for_loss">
|
formControlName="estimate_reason_for_loss">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<mat-form-field style="width:54%" *ngIf="lender_short_name == 'CLIX' || lender_short_name == 'MWISE' || product_abbr == 'LAEP'">
|
||||||
|
<input matInput placeholder="Annual Sales through Credit Card / POS machines"
|
||||||
|
formControlName="estimate_posmachine_or_cc_annual_sales">
|
||||||
|
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_posmachine_or_cc_annual_sales').value != ''">{{"₹"}}
|
||||||
|
{{details.get('estimate_posmachine_or_cc_annual_sales').value | numberToWords}} Only</mat-hint>
|
||||||
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -30,7 +30,15 @@
|
|||||||
<div class="amts d-flex">
|
<div class="amts d-flex">
|
||||||
<div class="temp align-self-center">Annual Rent Amount as per Applicant : {{ad.applicants_rent}} </div>
|
<div class="temp align-self-center">Annual Rent Amount as per Applicant : {{ad.applicants_rent}} </div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="d-flex align-self-center" fxLayoutAlign="end center">
|
||||||
|
<div class="temp">
|
||||||
|
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button
|
||||||
|
mat-icon-button matTooltip="Remove" (click)="isactiveProperty(ad)"
|
||||||
|
matTooltipPosition="above">
|
||||||
|
<mat-icon>delete</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
background-color: #e00201 !important;
|
background-color: #e00201 !important;
|
||||||
}
|
}
|
||||||
.card-property {
|
.card-property {
|
||||||
height: 250px;
|
height: 300px;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import { Component, OnInit, Inject } from '@angular/core';
|
|||||||
import { MatDialog, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialog, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { PdTrigerService } from './../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from './../../../../../pd-service/pd-triger.service';
|
||||||
import { ManageRentalVerificationComponent } from './manage-rental-verification/manage-rental-verification.component';
|
import { ManageRentalVerificationComponent } from './manage-rental-verification/manage-rental-verification.component';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-rental-verification',
|
selector: 'app-rental-verification',
|
||||||
@ -33,14 +34,16 @@ export class RentalVerificationComponent implements OnInit {
|
|||||||
|
|
||||||
existing_rental_list: any = [];
|
existing_rental_list: any = [];
|
||||||
existing_rental_count_id: any;
|
existing_rental_count_id: any;
|
||||||
|
private notifier: NotifierService;
|
||||||
|
|
||||||
|
constructor(notifier: NotifierService,private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialog: MatDialog) {
|
||||||
constructor(private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialog: MatDialog) {
|
|
||||||
this.parentData = this.data;
|
this.parentData = this.data;
|
||||||
|
this.notifier = notifier;
|
||||||
this.parent_pdid = this.data.pdmaster_details.parent_pd_id;
|
this.parent_pdid = this.data.pdmaster_details.parent_pd_id;
|
||||||
this.pdid = this.data.pdmaster_details.pd_id;
|
this.pdid = this.data.pdmaster_details.pd_id;
|
||||||
this.form_id = 17;
|
this.form_id = 17;
|
||||||
this.main_applicant = this.data.pdmaster_details.main_applicant;
|
this.main_applicant = this.data.pdmaster_details.main_applicant;
|
||||||
|
console.log('user records',this.data.pdmaster_details)
|
||||||
this.lender_applicant_id = this.data.pdmaster_details.lender_applicant_id;
|
this.lender_applicant_id = this.data.pdmaster_details.lender_applicant_id;
|
||||||
this.subproduct_abbr = this.data.pdmaster_details.subproduct_abbr;
|
this.subproduct_abbr = this.data.pdmaster_details.subproduct_abbr;
|
||||||
this.customer_segment_abbr = this.data.pdmaster_details.customer_segment_abbr;
|
this.customer_segment_abbr = this.data.pdmaster_details.customer_segment_abbr;
|
||||||
@ -95,6 +98,7 @@ export class RentalVerificationComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadFormData() {
|
loadFormData() {
|
||||||
|
this.existing_rental_list=[]
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.parent_pdid = this.parent_pdid;
|
params.parent_pdid = this.parent_pdid;
|
||||||
params.pd_id = this.pdid;
|
params.pd_id = this.pdid;
|
||||||
@ -207,4 +211,25 @@ export class RentalVerificationComponent implements OnInit {
|
|||||||
this.data.pdapplicants_detials.splice(index, 1);
|
this.data.pdapplicants_detials.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isactiveProperty(ad){
|
||||||
|
// console.log('No 1',ad);
|
||||||
|
let params: any = {};
|
||||||
|
// console.log('No 2',params);
|
||||||
|
// params.parent_pdid = this.parent_pdid;
|
||||||
|
params.fk_pd_id = this.pdid;
|
||||||
|
params.fk_form_id = this.form_id;
|
||||||
|
params.rental_count_id = ad.rental_count_id;
|
||||||
|
params.company_id = null;
|
||||||
|
this._pd.removeProperty(params)
|
||||||
|
.subscribe(data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.notifier.notify('success', 'Deleted Successfully.!');
|
||||||
|
this.loadFormData();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -63,6 +63,13 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
removeProperty(params): Observable<any> {
|
||||||
|
params.fk_createdby = this._aws.getlocale();
|
||||||
|
return this._http.post(this.apiUrl + 'deactiveFormData', { "records": params })
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
/* To get Files., */
|
/* To get Files., */
|
||||||
retriveFile(PDID,FormID,CompanyID): Observable<any> {
|
retriveFile(PDID,FormID,CompanyID): Observable<any> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user