issues fixed : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-03-20 18:41:53 +05:30
parent 29b5536a4b
commit 3ae9236b43
10 changed files with 118 additions and 56 deletions

View File

@ -18,8 +18,8 @@ export class PdStatusChangeDialogueComponent implements OnInit {
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
{
this.notifier = notifier;
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussions' : this.data.pd_status=='COMPLETED' ? 'Complete Discussions' : 'Change Discussions';
this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change Discussions';
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion';
this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion';
}
ngOnInit() {

View File

@ -302,7 +302,7 @@
</div>
<!--Desction Dynamic details : END -->
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 5"
<mat-form-field *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5"
style="width:45%">
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value"
OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,2)">

View File

@ -53,7 +53,11 @@ export class BusinessAssetsInfoComponent implements OnInit {
public m_propertyType = [];
public m_address_type = [];
public m_vehicle_type = [];
public m_state_for_address = [];
public m_city_for_address = [];
public m_pincode_for_address = [];
public cityArr: any = [];
public pinArr: any = [];
PropertyOwnedType: any = [];
existCompanyList: any = [];
mergeCompanyApplicant: any = [];
@ -89,7 +93,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
/** init Function */
ngOnInit() {
console.clear();
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
// });
@ -115,12 +119,22 @@ export class BusinessAssetsInfoComponent implements OnInit {
}
})
this.getM_State_For_Address();
this.getPdSupplierFormDetails();
this.getM_Assets_Type();
this.getM_PropertyType();
this.getM_Address_Type();
this.getM_Vehicle_Type();
this.getM_Address_Type();
}
getM_State_For_Address(){
this.pdTrigerService.getAllMasterDatas('STATE').subscribe(
data => {
this.m_state_for_address = data.records.filter(data => data.isactive == 1);
})
}
/** Assets Type For Dropdown List */
@ -164,7 +178,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.m_vehicle_type = data.records.filter(data => data.is_active == 1);
})
}
//Get Data Based on PDID and FORMID
apiLoadFinish: boolean = false;
getPdSupplierFormDetails() {
@ -197,39 +211,54 @@ export class BusinessAssetsInfoComponent implements OnInit {
let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1);
// // const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
if (data.records.addresses.length > 0) {
data.records.addresses.forEach((data, inx) => {
data.records.addresses.forEach((dataValue, inx) => {
this.addressLabel[inx] = '';
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 ' + addressType + ' during PD visit?';
let addressLabel = address + ' / ' + addressType;
let vals = {
address_label: addressLabel,
business_years: '',
business_month: '',
business_address_availability: '',
business_is_pd_visited: '',
business_pd_visited_remark: '',
business_approximate_market_value: '',
business_ownership_type: '',
business_monthly_rented_amt: '',
business_name_of_the_owner: '',
business_name_of_the_other_owner: '',
business_vintage: '',
business_purchase_year: '',
business_emi: ''
}
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetailsWithdata(vals));
this.pdTrigerService.getStateWiseCities(dataValue.state).subscribe(data => {
if (data.status == 200) {
// console.log(data.records);
this.cityArr = data.records.cities;
this.pinArr = data.records.pincode;
// console.log('cityArr',this.cityArr);
// console.log('pinArr',this.pinArr);
// console.log('flag',flag);
console.log('this.m_state_for_address',this.m_state_for_address);
let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == dataValue.address_type)[0];
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];
let selectedPincode = this.pinArr.filter(element => element.pincode_id == dataValue.pincode)[0];
// console.log(selectedCity);
// console.log(selectedPincode);
// console.log(selectedCity[0].city_name);
// console.log(selectedPincode[0].pincode);
console.log('selectedState',selectedState);
let addressType = dataValue.address_type != 1 ? selectedAddressType.address_type : dataValue.address_type_others;
let address = dataValue.address + ' , ' + 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;
let vals = {
address_label: addressLabel,
business_years: '',
business_month: '',
business_address_availability: '',
business_is_pd_visited: '',
business_pd_visited_remark: '',
business_approximate_market_value: '',
business_ownership_type: '',
business_monthly_rented_amt: '',
business_name_of_the_owner: '',
business_name_of_the_other_owner: '',
business_vintage: '',
business_purchase_year: '',
business_emi: ''
}
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetailsWithdata(vals));
}
});
});
}
else {
@ -568,7 +597,13 @@ export class BusinessAssetsInfoComponent implements OnInit {
});
for (let val of result) {
// for (let val of result) {
result.forEach((val, index) => {
var splitted_label = val.address_label.split("/", 2);
// console.log(splitted_label)
// console.log(splitted_label[0],splitted_label[1]);
this.placeholderName[index] = 'Was any business activity seen at the ' + splitted_label[1] != '' ? splitted_label[1] : 'Address Type' + ' during PD visit?';
let vals = {
address_label: val.address_label,
business_years: val.business_years,
@ -584,11 +619,11 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_vintage: val.business_vintage,
business_purchase_year: val.business_purchase_year,
business_emi: val.business_emi
};
}
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetailsWithdata(vals));
// this.initBusinessDetailsWithdata(vals)
}
});
} else {
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetails());

View File

@ -96,7 +96,8 @@
</mat-form-field>
</div>
<div>
<label>Number of Years / Months since account was started</label>
<!-- <label>Number of Years / Months since account was started</label> -->
<label>Approximate Vintage of the Account</label>
<br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field>

View File

@ -121,6 +121,34 @@ export class BusinessBankingDetailsComponent implements OnInit {
this.getM_BTLenderList();
this.salaryField = this.pd_cus_segment.substring(0, 2) == 'SE' ? false : true;
this._pd.retriveForm({'pd_id':this.pdid,'pd_form_id':13,'company_id':this.company_id}).subscribe(data => {
// let businessVal = data.records;
// console.log('businessVal',businessVal,data.records.partners);
if (data.status == 200) {
let PartnrArray = Object.keys(data.records.partners).map(function (key) {
return data.records.partners[key];
});
console.log(PartnrArray);
console.log(data.records.partners);
PartnrArray.forEach((datas,index) => {
let sum1 = PartnrArray.map(officer => officer.Current_business_experiance_month).reduce((sum, val) => sum + +val, 0);
// console.log('SumOfYear',SumOfYear);
// console.log('SumOfMonth',SumOfMonth);
});
// let SumOfYear = PartnrArray[index].Current_business_experiance_month.reduce((sum, val) => sum + +val, 0);
// let SumOfMonth = PartnrArray[index].Current_business_experiance_year.reduce((sum, val) => sum + +val, 0);
// let SumOfYear = month.reduce((sum, val) => sum + +val, 0);
// let SumOfMonth = year.reduce((sum, val) => sum + +val, 0);
let sum1 = PartnrArray.map(arr => arr.map(data => data.Current_business_experiance_month).reduce((sum, val) => sum + +val, 0))
console.log('sum1',sum1);
}
});
let params: any = {};
params.pd_id = this.pdid;
params.pd_form_id = '21';

View File

@ -126,18 +126,17 @@
</mat-form-field> -->
<div style="width:100%">
<mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Original Tenure in Months"
<input matInput autocomplete="off" placeholder="Original Tenture in Months" OnlyNumber type="text"
formControlName="original_tenure" (change)="checkTenure(details);calculateTenure(details)">
</mat-form-field>
<mat-form-field style="width:35%">
<input matInput autocomplete="off" placeholder="Current Balance Tenure in Months"
<input matInput autocomplete="off" placeholder="Current Balance Tenture in Months" OnlyNumber type="text"
formControlName="current_balance_tenure" (change)="calculateTenure(details)">
<mat-error>Invalid Balance Tenure.</mat-error>
<mat-error>Invalid Balance Tenture.</mat-error>
<!-- //*ngIf="current_balance_tenure.hasError('min')" class="mat-text-warn" -->
</mat-form-field>
<mat-form-field style="width:25%">
<input matInput placeholder="Elapsed Tenure in Months" readonly
formControlName="elapsed_tenure" autocomplete="off">
<input matInput placeholder="Elapsed Tenture in Months" readonly formControlName="elapsed_tenure">
</mat-form-field>
</div>

View File

@ -17,8 +17,7 @@
<mat-form-field style="width:50%;">
<mat-select placeholder="Customer Behaviour" formControlName="final_custormer_remark_type">
<mat-option>Select</mat-option>
<mat-option *ngFor="let pm of m_remarkTypeCustomerBehaviour" [value]="pm.customer_behaviour_id">{{
pm.description }}</mat-option>
<mat-option *ngFor="let pm of m_remarkTypeCustomerBehaviour" [value]="pm.customer_behaviour_id">{{pm.customer_behaviour_id == 1 ? 'Other Negative Behaviour': pm.description }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['final_custormer_remark_type'].value == 1">

View File

@ -177,17 +177,17 @@
OnlyNumber type="text" readonly>
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' ">
<span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
No difference in Profit sales % in FY <i>
No difference in Profit/Loss to sales % in FY <i>
{{details.get('financial_year').value}} </i> over
Profit sales % in FY <i>
Profit/Loss to sales % in FY <i>
{{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i>
</span>
<span *ngIf="details.get('financial_profit_to_sale_variation').value > 0"
class="greenhighlight">
Increase in Profit sales % in FY <i>
Increase in Profit/Loss to sales % in FY <i>
{{details.get('financial_year').value}} </i> over
Profit sales % in FY <i>
Profit/Loss to sales % in FY <i>
{{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i> <b>
{{details.get('financial_profit_to_sale_variation').value}}
@ -195,9 +195,9 @@
</span>
<span *ngIf="details.get('financial_profit_to_sale_variation').value < 0"
class="highlight">
Decrease in Profit sales % in FY <i>
Decrease in Profit/Loss to sales % in FY <i>
{{details.get('financial_year').value}} </i> over
Profit sales % in FY <i>
Profit/Loss to sales % in FY <i>
{{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i> <b>
{{(details.get('financial_profit_to_sale_variation').value).replace('-',

View File

@ -30,7 +30,7 @@
{{loanAmtInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 28%">
<mat-label>Loan Tenure applied for?</mat-label>
<mat-label>Loan Tenture applied for?</mat-label>
<input matInput placeholder="No of months" formControlName="loan_tenure"
OnlyNumber type="text" autocomplete="off">
</mat-form-field>

View File

@ -387,7 +387,7 @@ export class NeighbourHoodComponent implements OnInit {
// saveRecords.check_type=formData.check_type;
saveRecords.pdid=formData.pdid;
saveRecords.formid=formData.formid;
saveRecords.neighbourhood_status = formData.check_type == 0 ? formData.neighbourhood_status : '';
saveRecords.neighbourhood_status = formData.neighbourhood_status!='' ? formData.neighbourhood_status : '';
saveRecords.neighbour_reference_remark=formData.neighbour_reference_remark;
this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
dataresult => {