Address and Rental verification changes done
This commit is contained in:
parent
90dcf477e8
commit
a0a713b5d3
@ -555,6 +555,7 @@ countRowsForTextarea(text){
|
||||
|
||||
}
|
||||
initAddress(AddressDetails){
|
||||
console.log('null Checking',AddressDetails);
|
||||
|
||||
if(AddressDetails != null){
|
||||
return this.fb.group({
|
||||
@ -566,6 +567,7 @@ countRowsForTextarea(text){
|
||||
citySearch:[''],
|
||||
stateSearch:[''],
|
||||
pinSearch:[''],
|
||||
pd_address_id: [AddressDetails.pd_address_id],
|
||||
pincode: [AddressDetails.pincode],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
||||
pincode_others: [AddressDetails.pincode_others, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||
// locality: [AddressDetails.locality, Validators.compose([Validators.required])],
|
||||
@ -589,6 +591,7 @@ countRowsForTextarea(text){
|
||||
stateSearch:[''],
|
||||
pinSearch:[''],
|
||||
pincode: [''],
|
||||
pd_address_id: [''],
|
||||
pincode_others: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||
// locality: ['', Validators.compose([Validators.required])],
|
||||
// locality_others: [''],
|
||||
@ -626,6 +629,7 @@ return this.fb.group({
|
||||
pinSearch:[''],
|
||||
alternative_city:[''],
|
||||
alternative_pincode:[''],
|
||||
alternative_pd_address_id:[''],
|
||||
alternative_pincode_others:[''],
|
||||
reason_for_alternative_address:['']
|
||||
})
|
||||
@ -637,6 +641,7 @@ else{
|
||||
stateSearch:[''],
|
||||
citySearch:[''],
|
||||
pinSearch:[''],
|
||||
alternative_pd_address_id:[''],
|
||||
alternative_city:[add_values.alternative_city],
|
||||
alternative_pincode:[add_values.alternative_pincode],
|
||||
alternative_pincode_others:[add_values.alternative_pincode_others],
|
||||
@ -919,6 +924,7 @@ else{
|
||||
'state': datas.state,
|
||||
'city': datas.city,
|
||||
'pincode': datas.pincode,
|
||||
'pd_address_id': datas.pd_address_id,
|
||||
'pincode_others': datas.pincode ? datas.pincode_others : ''
|
||||
}
|
||||
this.getCityAndPincodeDetails(datas.state, index, 1);
|
||||
@ -1395,6 +1401,7 @@ else{
|
||||
'state': datas.fk_state,
|
||||
'city': datas.fk_city,
|
||||
'pincode':datas.pincode_id,
|
||||
'pd_address_id': datas.pd_address_id,
|
||||
'pincode_others': datas.other_pincode,
|
||||
'locality': '',
|
||||
'locality_others': '',
|
||||
|
||||
@ -75,6 +75,7 @@ export class PdQuestionBusinessAssetsPage {
|
||||
lender_short_name: any;
|
||||
product_abbr: any;
|
||||
pd_value_params:any;
|
||||
CurrentAddressLabel=null;
|
||||
@ViewChild('childComp') child: PdGeneralImagesPage
|
||||
|
||||
|
||||
@ -219,7 +220,56 @@ export class PdQuestionBusinessAssetsPage {
|
||||
if (initiated_address_check == false ) {
|
||||
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((data, inx) => {
|
||||
if(initiated_address_check == false){
|
||||
data.address=data.alternative_address
|
||||
data.state=data.alternative_state
|
||||
data.city=data.alternative_city
|
||||
data.pincode=data.alternative_pincode
|
||||
}
|
||||
this.qustcat.getStateWiseCities(data.state).subscribe(res=>{
|
||||
if(res.dataStatus== true){
|
||||
console.log("state",res)
|
||||
this.cityArr=res.records.cities
|
||||
this.pinArr = res.records.pincode;
|
||||
let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == data.address_type)[0];
|
||||
let selectedState = this.m_state_for_address.filter(element => element.state_id == data.state)[0];
|
||||
let selectedCity = this.cityArr.filter(element => element.city_id == data.city)[0];
|
||||
let selectedPincode = this.pinArr.filter(element => element.pincode_id == data.pincode)[0];
|
||||
|
||||
console.log(selectedCity)
|
||||
|
||||
if(selectedAddressType != '' && selectedAddressType != undefined){
|
||||
this.addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
|
||||
}
|
||||
else{
|
||||
this.addressType=''
|
||||
}
|
||||
// let address = data.address + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (data.pincode == 1 ? data.pincode_others : selectedPincode.pincode);
|
||||
let address = data.address.replace(/\n/g,"") + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (data.pincode == 1 ? data.pincode_others : selectedPincode.pincode);
|
||||
|
||||
|
||||
|
||||
// let selectedAddressType = this.m_address_type.filter(element =>element.address_type_id == data.address_type)[0];
|
||||
// let address = data.address;
|
||||
// let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
|
||||
|
||||
this.placeholderName[inx] = 'Was any business activity seen at the '+ this.addressType+' during PD visit?';
|
||||
//console.log(this.placeholderName)
|
||||
let addressLabel = " : "+address+' / '+ this.addressType ;
|
||||
|
||||
this.CurrentAddressLabel = addressLabel;
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||
control.controls[0]['controls'].address_label.setValue(this.CurrentAddressLabel);
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
if(flag == 2){
|
||||
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' });
|
||||
|
||||
@ -279,12 +279,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Considered Profit Amount" formControlName="estimate_net_profit" type="number" readonly>
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_net_profit').value != ''">{{"₹"}} {{AV_netProfitAmtInwords[i]}} Only </mat-hint>
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="product_abbr == 'LAEP'">
|
||||
<input matInput autocomplete="off" placeholder="Annual Sales through Credit Card / POS machines" formControlName="estimate_posmachine_or_cc_annual_sales" type="number" (keyup)="inWords($event,i,13)">
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_posmachine_or_cc_annual_sales').value != ''">{{"₹"}} {{AV_CCAnnualSalesAmtInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!--Temporary-->
|
||||
<!-- <div *ngIf="details.get('estimate_net_profit').value != ''">
|
||||
@ -356,7 +351,7 @@
|
||||
<input matInput autocomplete="off" placeholder="What is the reason for the Loss?" formControlName="estimate_reason_for_loss">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field *ngIf="lender_short_name == 'CLIX' || lender_short_name == 'MWISE' || product_abbr == 'LAEP'">
|
||||
<mat-form-field *ngIf="(lender_short_name == 'CLIX' ? product_abbr !='BL' ? true : false : true) && (lender_short_name == 'MWISE' ? product_abbr != 'BL' ? true : false : true)">
|
||||
<input matInput autocomplete="off" placeholder="Annual Sales through Credit Card / POS machines" formControlName="estimate_posmachine_or_cc_annual_sales" type="number" (keyup)="inWords($event,i,13)">
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_posmachine_or_cc_annual_sales').value != ''">{{"₹"}} {{AV_CCAnnualSalesAmtInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@ -230,15 +230,15 @@
|
||||
<div *ngIf="currentLoans.controls.loan_info_available.value == 'No'&& currentLoans.controls['tot_outstanding_loans'] && currentLoans.controls.existing_loan.value == 'Yes'">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput autocomplete="off" type="text" placeholder="Total no of running loans" formControlName="tot_running_loans" (keypress)="keyPress($event)">
|
||||
<input matInput type="number" placeholder="Total no of running loans" formControlName="tot_running_loans" (keypress)="keyPress($event)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput autocomplete="off" OnlyNumber type="text" placeholder="Total EMI being paid" formControlName="tot_emi_paid" (keyup)="inWords($event,i,1)" (keypress)="keyPress($event)">
|
||||
<mat-hint align="end" *ngIf="currentLoans.value.tot_emi_paid.value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
<input matInput type="number" placeholder="Total EMI being paid" formControlName="tot_emi_paid" (keyup)="inWords($event,i,1)" (keypress)="keyPress($event)">
|
||||
<mat-hint align="end" *ngIf="currentLoans.get('tot_emi_paid').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput autocomplete="off" OnlyNumber type="text" placeholder="Total Outstanding of all running loans" formControlName="tot_outstanding_loans" (keyup)="inWords($event,i,2)" (keypress)="keyPress($event)">
|
||||
<mat-hint align="end" *ngIf="currentLoans.value.tot_outstanding_loans.value != ''">{{"₹"}} {{emiAmtInwords[i]}} Only</mat-hint>
|
||||
<input matInput type="number" placeholder="Total Outstanding of all running loans" formControlName="tot_outstanding_loans" (keyup)="inWords($event,i,2)" (keypress)="keyPress($event)">
|
||||
<mat-hint align="end" *ngIf="currentLoans.get('tot_outstanding_loans').value != ''">{{"₹"}} {{emiAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
|
||||
@ -15,7 +15,8 @@
|
||||
|
||||
<ion-content padding>
|
||||
<mat-label *ngIf="existing_rental_list.length == 0">No Records Found..</mat-label>
|
||||
<mat-card *ngFor="let info of existing_rental_list;let i=index" (click)="editDet(info.rental_existing_data)">
|
||||
<mat-card *ngFor="let info of existing_rental_list;let i=index">
|
||||
<div (click)="editDet(info.rental_existing_data)">
|
||||
<mat-card-header>
|
||||
<mat-card-title><h6>Property {{i+1}}</h6></mat-card-title>
|
||||
</mat-card-header>
|
||||
@ -23,6 +24,14 @@
|
||||
<mat-label>{{info.address}}</mat-label><br/>
|
||||
<mat-label>{{info.state}} {{info.city}} - {{info.pincode}}</mat-label></ion-icon><br/><br/>
|
||||
<mat-label style="color:orangered;font-size:14px;"><strong>Annual Rent Amount as per Applicant : {{info.applicants_rent | rupeeCurrencyFormat}}</strong></mat-label>
|
||||
</div>
|
||||
<ion-row>
|
||||
<ion-col col-12 style="text-align: right;padding: 0px;">
|
||||
<button ion-button clear>
|
||||
<ion-icon color="optblue" (click)="isactiveProperty(info)" name="md-trash"></ion-icon>
|
||||
</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</mat-card>
|
||||
<ion-fab bottom right>
|
||||
<button ion-fab color="optblue" (click)="addMore()"><ion-icon name="md-add"></ion-icon></button></ion-fab>
|
||||
|
||||
@ -125,4 +125,23 @@ this.loadingProvider.dataLoader();
|
||||
this.navCtrl.push(PdQuestionRentalInfoPage,{"values":passValues,'pdDetails':this.pdDetails,'FormId':this.form_details});
|
||||
}
|
||||
|
||||
isactiveProperty(info){
|
||||
// console.log('No 1',info);
|
||||
let params: any = {};
|
||||
// console.log('No 2',params);
|
||||
// params.parent_pdid = this.parent_pdid;
|
||||
params.fk_pd_id = this.pdDetails.pd_id;
|
||||
params.fk_form_id = this.form_details.form_id;
|
||||
params.rental_count_id = info.rental_count_id;
|
||||
params.company_id = null;
|
||||
this.qustCat.removeProperty(params)
|
||||
.subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
this.getAllRentalInfo();
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import { ConstantsProvider } from '../constants/constants';
|
||||
import { Observable } from 'rxjs';
|
||||
import {CacheService} from 'ionic-cache'
|
||||
import { state } from '@angular/animations';
|
||||
import { AwsServiceProvider } from '../aws-service/aws-service';
|
||||
|
||||
/*
|
||||
Generated class for the QuestionCategoryProvider provider.
|
||||
@ -15,8 +16,8 @@ const ttl = 60 * 60 * 24 * 7;
|
||||
@Injectable()
|
||||
|
||||
export class QuestionCategoryProvider {
|
||||
apiurl:any;
|
||||
constructor(public http: HttpClient,public constant:ConstantsProvider,private cache:CacheService) {
|
||||
apiurl:any;
|
||||
constructor(private _aws: AwsServiceProvider,public http: HttpClient,public constant:ConstantsProvider,private cache:CacheService) {
|
||||
console.log('Hello QuestionCategoryProvider Provider');
|
||||
this.apiurl = constant.environment();
|
||||
this.apiurl=this.apiurl.url
|
||||
@ -69,6 +70,12 @@ apiurl:any;
|
||||
return this.http.post(this.apiurl+'getPDFormDetails',records);
|
||||
}
|
||||
|
||||
removeProperty(params): Observable<any> {
|
||||
params.fk_createdby = this._aws.getlocale();
|
||||
return this.http.post(this.apiurl + 'deactiveFormData', { "records": params })
|
||||
|
||||
}
|
||||
|
||||
/**Assessed Form Details API */
|
||||
saveassessedForms(api,saveData)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user