mentioned issue fixes - 150219 : ps
This commit is contained in:
parent
5d61a8e04e
commit
8cad63b52f
@ -632,7 +632,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
setBusinessAssetsDetailsWithData(assets_details_mode: any, datas: any, i: any): void {
|
||||
|
||||
console.log('datas',datas);
|
||||
let val = i;
|
||||
let data = datas;
|
||||
|
||||
@ -653,7 +653,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
case '3': {
|
||||
let business_Four_Weeler_datas : any;
|
||||
data.forEach((datas,i) => {
|
||||
business_Four_Weeler_datas = { 'manufacturer_model_vehicle': datas.manufacturer_model_vehicle };
|
||||
business_Four_Weeler_datas = { 'manufacturer_model_vehicle': datas.manufacturer_model_vehicle ,'vehicle_type':datas.vehicle_type,'other_vehicle_type':datas.other_vehicle_type};
|
||||
});
|
||||
const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
|
||||
control.push(this.load_Four_WeelerWithData(business_Four_Weeler_datas));
|
||||
|
||||
@ -46,6 +46,8 @@ export class CurrentLoanComponent implements OnInit {
|
||||
frequencyData: any = [];
|
||||
loanTypeData: any = [];
|
||||
investmentTypeData: any = [];
|
||||
propertyTypeData: any = [];
|
||||
addressTypeData: any = [];
|
||||
applicants: any;
|
||||
placeholderName : any = [];
|
||||
IDXval : any;
|
||||
@ -98,6 +100,8 @@ export class CurrentLoanComponent implements OnInit {
|
||||
this.getMasterDetails('FREQUENCY',2);
|
||||
this.getMasterDetails('EXISTINGLOANTYPES',3);
|
||||
this.getMasterDetails('INVESTMENTTYPE',4);
|
||||
this.getMasterDetails('PROPERTIES',5);
|
||||
this.getMasterDetails('ADDRESSTYPE',6);
|
||||
|
||||
this.initCurrentloanForm();
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
@ -154,25 +158,26 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// console.log('else part',value.status);
|
||||
console.log('else part',value.status);
|
||||
this._pd.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
|
||||
// console.log(data);
|
||||
console.log(data);
|
||||
|
||||
if(data.dataStatus == true){
|
||||
|
||||
// console.log(data.record);
|
||||
console.log(data.record);
|
||||
|
||||
let AssetData = data.record;
|
||||
|
||||
// console.log(AssetData.business_assets);
|
||||
// console.log(AssetData.other_assests);
|
||||
console.log(AssetData.business_assets);
|
||||
console.log(AssetData.other_assests);
|
||||
|
||||
if(AssetData.business_assets.length>0){
|
||||
AssetData.business_assets.map(element => {
|
||||
this.dataFromAssets.push({mode:element.business_assets_mode,
|
||||
mode_name:element.business_assets_mode_name,
|
||||
details:element.business_details,
|
||||
owner_name:element.business_name_of_the_owner})
|
||||
owner_name:element.business_name_of_the_owner,
|
||||
form_type:'Data From Business Assets'})
|
||||
});
|
||||
}
|
||||
|
||||
@ -181,10 +186,11 @@ export class CurrentLoanComponent implements OnInit {
|
||||
this.dataFromAssets.push({mode:element.assets_mode,
|
||||
mode_name:element.assets_mode_name,
|
||||
details:element.details,
|
||||
owner_name:element.name_of_the_owner
|
||||
owner_name:element.name_of_the_owner,
|
||||
form_type:'Data From Other Asset'
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// id: "4", name: "Equipments and machinaries", isactive: "1", flag: "1", is_others: "0"
|
||||
// id: "7", name: "Investments", isactive: "1", flag: "0", is_others: "0"
|
||||
@ -192,7 +198,8 @@ export class CurrentLoanComponent implements OnInit {
|
||||
// id: "2", name: "Property", isactive: "1", flag: "1", is_others: "0"
|
||||
// id: "3", name: "Vehicle", isactsive: "1", flag: "1", is_others: "0"
|
||||
// id: "1", name: "Others", isactive: "1", flag: "1", is_others: "1"}
|
||||
|
||||
console.log(this.dataFromAssets);
|
||||
console.log(this.dataFromAssets.length);
|
||||
if(this.dataFromAssets.length > 0){
|
||||
let labelarray : any = [];
|
||||
|
||||
@ -203,15 +210,31 @@ export class CurrentLoanComponent implements OnInit {
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.any_other_assets;
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 2){
|
||||
console.log(val.form_type);
|
||||
let data;
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.property_type_name;
|
||||
data = v.property_type;
|
||||
if(v.property_type != 1){
|
||||
if(val.form_type == 'Data From Business Assets'){
|
||||
data = this.addressTypeData.filter(item => item.address_type_id == v.property_type)[0].address_type;
|
||||
}
|
||||
else if(val.form_type == 'Data From Other Asset'){
|
||||
data = this.propertyTypeData.filter(item => item.id == v.property_type)[0].name;
|
||||
}
|
||||
else{
|
||||
data = '';
|
||||
}
|
||||
}else{
|
||||
data=v.other_property_type;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 3){
|
||||
@ -219,7 +242,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.manufacturer_model_vehicle;
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 4){
|
||||
@ -227,7 +250,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.equipment_manufacturing_description;
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
let description = data != '' ? ' ( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 6){
|
||||
@ -276,7 +299,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
// console.log('else,else.part');
|
||||
control.push(this.createLoanDetail(null));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -465,6 +488,12 @@ export class CurrentLoanComponent implements OnInit {
|
||||
else if(type==4 && val.isactive == 1){
|
||||
this.investmentTypeData.push(val);
|
||||
}
|
||||
else if(type==5 && val.isactive == 1){
|
||||
this.propertyTypeData.push(val);
|
||||
}
|
||||
else if(type==6 && val.isactive == 1){
|
||||
this.addressTypeData.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@ -577,7 +577,13 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
control.push(formData);
|
||||
} else {
|
||||
records.forEach((val,index) => {
|
||||
this.RentAmount[index] = this._pd.convertNumberToWords(val.rent);
|
||||
// console.log(val.rent);
|
||||
// console.log(+val.rent);
|
||||
if(val.rent != null){
|
||||
// console.log('if');
|
||||
this.RentAmount[index] = this._pd.convertNumberToWords(val.rent);
|
||||
}
|
||||
this.FamilyMemberAsLabel[index] = this.selectPerson.filter(item => item.pd_co_applicant_id == val.selected_person)[0].applicant_name;
|
||||
//for (let val of records)
|
||||
this.getCity(val.residence_state,index);
|
||||
let formData: FormGroup = this.fb.group({
|
||||
@ -609,7 +615,9 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
||||
val.forEach((vals,index) => {
|
||||
// for (let vals of val) {
|
||||
if(vals.earning_gross_income_per_month != null){
|
||||
this.IncomePerMonth[index] = this._pd.convertNumberToWords(vals.earning_gross_income_per_month);
|
||||
}
|
||||
let datas = this.fb.group({
|
||||
family_member_name: [vals.family_member_name || null, Validators.compose([])],
|
||||
family_member_relationship: [vals.family_member_relationship || null, Validators.compose([])],
|
||||
|
||||
@ -834,18 +834,18 @@ export class FinancialInfoComponent implements OnInit {
|
||||
/** Calculating Sale Variation Based on Prev.Year ( Datas returns in percentage )
|
||||
* Label name = " Sale Variation from Previous Year in % "
|
||||
*/
|
||||
if (val.annual_sale != ''){
|
||||
if (index != 0) {
|
||||
|
||||
|
||||
if (index != 0) {
|
||||
if(annual_sale != ''){
|
||||
let annual_sale_variation = (( annual_sale - prev_annual_sale)/prev_annual_sale) * 100 ;
|
||||
let final_annual_sale_variation = (annual_sale_variation!= Infinity) ? !(Number.isNaN(annual_sale_variation)) ? annual_sale_variation.toFixed(2): 0.00 : 0.00;
|
||||
|
||||
childArray.controls.financial_annualsales_variation.setValue(final_annual_sale_variation);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(val.annual_sale == ''){
|
||||
childArray.controls.financial_annualsales_variation.setValue(0.00);
|
||||
else{
|
||||
childArray.controls.financial_annualsales_variation.setValue(0.00);
|
||||
}
|
||||
|
||||
|
||||
prev_annual_sale = annual_sale;
|
||||
/******************************************** Calculation Sale Variation ends Here ******************************************************************************************************/
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<input matInput placeholder="ApplicantName" formControlName="applicant_name" autocomplete="off">
|
||||
<input class="capitalize" matInput placeholder="ApplicantName" formControlName="applicant_name" autocomplete="off">
|
||||
<!-- {{details.value.applicant_name | titlecase}} -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@ -33,6 +33,9 @@
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.capitalize{
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.table-checkbox {
|
||||
margin-left: 15% !important;
|
||||
}
|
||||
|
||||
@ -478,16 +478,16 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// console.log('control',control.dirty);
|
||||
// console.log('control',control.dirty);
|
||||
// control.markAsDirty({onlySelf:true});
|
||||
console.log(control);
|
||||
// control.removeAt(findex);
|
||||
// console.log(control);
|
||||
control.removeAt(findex);
|
||||
|
||||
let controls = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||
console.log('control',control);
|
||||
// console.log('control',control);
|
||||
let name = details.value.applicant_name;
|
||||
let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
|
||||
control.markAsDirty({onlySelf:true});
|
||||
console.log('control',);
|
||||
// controls.removeAt(index1);
|
||||
// control.markAsDirty({onlySelf:true});
|
||||
// console.log('control',);
|
||||
controls.removeAt(index1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<mat-card class="p-2 mb-2" style="height: 370px !important;">
|
||||
<mat-card class="p-2 mb-2" style="height: auto !important;">
|
||||
<!-- height: 370px !important; -->
|
||||
<div fxLayout="row" fxLayoutWrap="wrap" class="mb-3">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="30" fxFlex.xl="30" class="profile-center" style="text-align:center;">
|
||||
<!--<div class="mb-1">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user