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) constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
{ {
this.notifier = notifier; 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_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 Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change Discussions'; 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() { ngOnInit() {

View File

@ -302,7 +302,7 @@
</div> </div>
<!--Desction Dynamic details : END --> <!--Desction Dynamic details : END -->
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <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%"> style="width:45%">
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value" <input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value"
OnlyNumber type="text" autocomplete="off" (keyup)="inWords($event,i,2)"> 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_propertyType = [];
public m_address_type = []; public m_address_type = [];
public m_vehicle_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 = []; PropertyOwnedType: any = [];
existCompanyList: any = []; existCompanyList: any = [];
mergeCompanyApplicant: any = []; mergeCompanyApplicant: any = [];
@ -89,7 +93,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
/** init Function */ /** init Function */
ngOnInit() { ngOnInit() {
console.clear();
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => { // this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; // 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.getPdSupplierFormDetails();
this.getM_Assets_Type(); this.getM_Assets_Type();
this.getM_PropertyType(); this.getM_PropertyType();
this.getM_Address_Type(); this.getM_Address_Type();
this.getM_Vehicle_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 */ /** Assets Type For Dropdown List */
@ -199,37 +213,52 @@ export class BusinessAssetsInfoComponent implements OnInit {
// // const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address']; // // const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
if (data.records.addresses.length > 0) { if (data.records.addresses.length > 0) {
data.records.addresses.forEach((data, inx) => { data.records.addresses.forEach((dataValue, inx) => {
this.addressLabel[inx] = ''; this.addressLabel[inx] = '';
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);
let selectedAddressType = this.m_address_type.filter(element => element.address_type_id == data.address_type)[0]; this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
let address = data.address; let addressLabel = address + ' / ' + addressType;
let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others; let vals = {
address_label: addressLabel,
this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?'; business_years: '',
let addressLabel = address + ' / ' + addressType; business_month: '',
business_address_availability: '',
let vals = { business_is_pd_visited: '',
address_label: addressLabel, business_pd_visited_remark: '',
business_years: '', business_approximate_market_value: '',
business_month: '', business_ownership_type: '',
business_address_availability: '', business_monthly_rented_amt: '',
business_is_pd_visited: '', business_name_of_the_owner: '',
business_pd_visited_remark: '', business_name_of_the_other_owner: '',
business_approximate_market_value: '', business_vintage: '',
business_ownership_type: '', business_purchase_year: '',
business_monthly_rented_amt: '', business_emi: ''
business_name_of_the_owner: '', }
business_name_of_the_other_owner: '', const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
business_vintage: '', control.push(this.initBusinessAddressDetailsWithdata(vals));
business_purchase_year: '', }
business_emi: '' });
}
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetailsWithdata(vals));
}); });
} }
else { 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 = { let vals = {
address_label: val.address_label, address_label: val.address_label,
business_years: val.business_years, business_years: val.business_years,
@ -584,11 +619,11 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_vintage: val.business_vintage, business_vintage: val.business_vintage,
business_purchase_year: val.business_purchase_year, business_purchase_year: val.business_purchase_year,
business_emi: val.business_emi business_emi: val.business_emi
}; }
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address']; const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetailsWithdata(vals)); control.push(this.initBusinessAddressDetailsWithdata(vals));
// this.initBusinessDetailsWithdata(vals) // this.initBusinessDetailsWithdata(vals)
} });
} else { } else {
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address']; const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
control.push(this.initBusinessAddressDetails()); control.push(this.initBusinessAddressDetails());

View File

@ -96,7 +96,8 @@
</mat-form-field> </mat-form-field>
</div> </div>
<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> <br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field> <mat-form-field>

View File

@ -121,6 +121,34 @@ export class BusinessBankingDetailsComponent implements OnInit {
this.getM_BTLenderList(); this.getM_BTLenderList();
this.salaryField = this.pd_cus_segment.substring(0, 2) == 'SE' ? false : true; 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 = {}; let params: any = {};
params.pd_id = this.pdid; params.pd_id = this.pdid;
params.pd_form_id = '21'; params.pd_form_id = '21';

View File

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

View File

@ -17,8 +17,7 @@
<mat-form-field style="width:50%;"> <mat-form-field style="width:50%;">
<mat-select placeholder="Customer Behaviour" formControlName="final_custormer_remark_type"> <mat-select placeholder="Customer Behaviour" formControlName="final_custormer_remark_type">
<mat-option>Select</mat-option> <mat-option>Select</mat-option>
<mat-option *ngFor="let pm of m_remarkTypeCustomerBehaviour" [value]="pm.customer_behaviour_id">{{ <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>
pm.description }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['final_custormer_remark_type'].value == 1"> <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> OnlyNumber type="text" readonly>
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' "> <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"> <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 {{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}} {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i> </i>
</span> </span>
<span *ngIf="details.get('financial_profit_to_sale_variation').value > 0" <span *ngIf="details.get('financial_profit_to_sale_variation').value > 0"
class="greenhighlight"> 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 {{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}} {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i> <b> </i> <b>
{{details.get('financial_profit_to_sale_variation').value}} {{details.get('financial_profit_to_sale_variation').value}}
@ -195,9 +195,9 @@
</span> </span>
<span *ngIf="details.get('financial_profit_to_sale_variation').value < 0" <span *ngIf="details.get('financial_profit_to_sale_variation').value < 0"
class="highlight"> 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 {{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}} {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}}
</i> <b> </i> <b>
{{(details.get('financial_profit_to_sale_variation').value).replace('-', {{(details.get('financial_profit_to_sale_variation').value).replace('-',

View File

@ -30,7 +30,7 @@
{{loanAmtInWords}} Only</mat-hint> {{loanAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 28%"> <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" <input matInput placeholder="No of months" formControlName="loan_tenure"
OnlyNumber type="text" autocomplete="off"> OnlyNumber type="text" autocomplete="off">
</mat-form-field> </mat-form-field>

View File

@ -387,7 +387,7 @@ export class NeighbourHoodComponent implements OnInit {
// saveRecords.check_type=formData.check_type; // saveRecords.check_type=formData.check_type;
saveRecords.pdid=formData.pdid; saveRecords.pdid=formData.pdid;
saveRecords.formid=formData.formid; 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; saveRecords.neighbour_reference_remark=formData.neighbour_reference_remark;
this._pd.savePDFormDetailsWithID(saveRecords).subscribe( this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
dataresult => { dataresult => {