- 1" (click)="removeLanguage(i,1)">
+ 1" (click)="removeAssetsDetails(i,1)">
@@ -654,7 +655,7 @@
+ class="mr-1 mb-1 hover-icon" (click)="addAssetDetails($event,1); false">add
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
index 90c350611..f1cd2ec9d 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
@@ -38,7 +38,11 @@ export class AssetsInfoComponent implements OnInit {
public m_assets_type = [];
public m_relation = [];
public applicants: any;
-
+ otherEmiamtFlag : boolean = false;
+ businessEmiAmtFlag : boolean = false;
+ public m_any_asset_loan_type = [{'value': "yes",'viewValue': "Yes"},
+ {'value': "no",'viewValue': "No"},
+ {'value': "nan",'viewValue': "NA"}]
// public m_assets_type = [
// {
// 'id': "1",
@@ -177,38 +181,38 @@ public m_investmentType = [];
}
public viewerOptions: any = {
- navbar: false,
- toolbar: {
- zoomIn: 4,
- zoomOut: 4,
- oneToOne: 4,
- reset: 4,
- prev: 4,
- play: {
- show: 4,
- size: 'large',
- },
- next: 4,
- rotateLeft: 4,
- rotateRight: 4,
- flipHorizontal: 4,
- flipVertical: 4,
- }
-};
+ navbar: false,
+ toolbar: {
+ zoomIn: 4,
+ zoomOut: 4,
+ oneToOne: 4,
+ reset: 4,
+ prev: 4,
+ play: {
+ show: 4,
+ size: 'large',
+ },
+ next: 4,
+ rotateLeft: 4,
+ rotateRight: 4,
+ flipHorizontal: 4,
+ flipVertical: 4,
+ }
+ };
ngOnInit() {
- this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => {
- this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
- });
+ this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => {
+ this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
+ });
- this.getPdSupplierFormDetails();
- this.getM_Assets_Type();
- this.getM_PropertyType();
- this.getM_InvestmentType();
- this.getM_FreqOfPurchase();
- this.getM_Relation();
- //this.getM_InsuranceType();
+ this.getPdSupplierFormDetails();
+ this.getM_Assets_Type();
+ this.getM_PropertyType();
+ this.getM_InvestmentType();
+ this.getM_FreqOfPurchase();
+ this.getM_Relation();
+ //this.getM_InsuranceType();
}
// ======================
@@ -351,7 +355,7 @@ public m_investmentType = [];
name_of_the_owner: [''],
other_owner:[''],
relation: [''],
- // purchase_year: [''],
+ //purchase_year: [''],
//purchase_month: [''],
emi: [''],
emi_paid: [''],
@@ -367,9 +371,9 @@ public m_investmentType = [];
business_details: this._formBuilder.array([]),
business_approximate_market_value: [''],
business_name_of_the_owner: [data],
- // other_owner:[''],
- // relation:[''],
- // purchase_year: [''],
+ //other_owner:[''],
+ //relation:[''],
+ //purchase_year: [''],
//purchase_month: [''],
business_emi: [''],
business_emi_paid: [''],
@@ -614,8 +618,8 @@ public m_investmentType = [];
name_of_the_owner: [data.name_of_the_owner],
other_owner:[data.other_owner || ''],
relation: [data.relation || ''],
- // purchase_year: [data.purchase_year],
- // purchase_month: [data.purchase_month],
+ // purchase_year: [data.purchase_year],
+ // purchase_month: [data.purchase_month],
emi: [data.emi || 0],
emi_paid: [data.emi_paid || ''],
original_loan_tenure: [data.original_loan_tenure || ''],
@@ -623,6 +627,7 @@ public m_investmentType = [];
elapsed_tenure: [data.elapsed_tenure || '']
});
}
+
initBusinessDetailsWithdata(data) {
return this._formBuilder.group({
business_assets_mode: [data.business_assets_mode],
@@ -631,15 +636,16 @@ public m_investmentType = [];
business_name_of_the_owner: [data.business_name_of_the_owner],
// other_owner:[data.other_owner || ''],
// relation: [data.relation || ''],
- // purchase_year: [data.purchase_year],
- // purchase_month: [data.purchase_month],
- business_emi: [data.business_emi || 0],
- business_emi_paid: [data.business_emi_paid || ''],
- business_original_loan_tenure: [data.business_original_loan_tenure || ''],
- business_balance_tenure: [data.business_balance_tenure || ''],
- business_elapsed_tenure: [data.business_elapsed_tenure || '']
+ // purchase_year: [data.purchase_year],
+ // purchase_month: [data.purchase_month],
+ business_emi: [data.business_emi || 0],
+ business_emi_paid: [data.business_emi_paid || ''],
+ business_original_loan_tenure: [data.business_original_loan_tenure || ''],
+ business_balance_tenure: [data.business_balance_tenure || ''],
+ business_elapsed_tenure: [data.business_elapsed_tenure || '']
});
}
+
loadDetails: boolean;
addAssetsDetailsWithData(supp_data) {
console.log(supp_data);
@@ -654,8 +660,8 @@ public m_investmentType = [];
name_of_the_owner: val.name_of_the_owner,
other_owner:val.other_owner,
relation: val.relation,
- // purchase_year: val.purchase_year,
- // purchase_month: val.purchase_month,
+ // purchase_year: val.purchase_year,
+ // purchase_month: val.purchase_month,
emi: val.emi,
emi_paid: val.emi_paid,
original_loan_tenure: val.original_loan_tenure,
@@ -685,21 +691,22 @@ public m_investmentType = [];
business_name_of_the_owner: val.business_name_of_the_owner,
// other_owner: val.other_owner,
// relation : val.relation,
- // purchase_year: val.purchase_year,
- // purchase_month: val.purchase_month,
- business_emi: val.business_emi,
- business_emi_paid: val.business_emi_paid,
- business_original_loan_tenure: val.business_original_loan_tenure,
- business_elapsed_tenure: val.business_elapsed_tenure,
- business_balance_tenure: val.business_balance_tenure
+ // purchase_year: val.purchase_year,
+ // purchase_month: val.purchase_month,
+ business_emi: val.business_emi,
+ business_emi_paid: val.business_emi_paid,
+ business_original_loan_tenure: val.business_original_loan_tenure,
+ business_elapsed_tenure: val.business_elapsed_tenure,
+ business_balance_tenure: val.business_balance_tenure
};
+
// const control =
this._assetsQuesFrom.controls['assets_details'];
// control.push(this.initDetailsWithdata(vals));
// this.setAssetsDetailsWithData(vals.business_assets_mode, val.details, control.length - 1)
const control = this._assetsQuesFrom.controls['business_assets_details'];
control.push(this.initBusinessDetailsWithdata(vals));
- this.setAssetsDetailsWithData2(vals.business_assets_mode, val.business_details, control.length - 1)
+ this.setBusinessAssetsDetailsWithData(vals.business_assets_mode, val.business_details, control.length - 1)
}
}
//this.loadDetails = true;
@@ -762,7 +769,7 @@ public m_investmentType = [];
}
}
- setAssetsDetailsWithData2(assets_details_mode: any, datas: any, i: any): void {
+ setBusinessAssetsDetailsWithData(assets_details_mode: any, datas: any, i: any): void {
let val = i;
let data = datas;
const arr = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
@@ -813,9 +820,10 @@ public m_investmentType = [];
}
}
- addSupplierDetails(e,flag) {
- console.log(flag);
- console.log(e);
+ /** Add More Asset using Flag Both "Other Asset" And "Business Asset" */
+ addAssetDetails(e,flag) {
+ // console.log(flag);
+ // console.log(e);
if(flag == 1){
const control = this._assetsQuesFrom.controls['assets_details'];
control.push(this.initDetails());
@@ -824,14 +832,16 @@ public m_investmentType = [];
control.push(this.initBusinessDetails(this.businessProfessionName));
}
}
- removeLanguage(i: number,flag) {
- if(flag == 1){
- const control = this._assetsQuesFrom.controls['assets_details'];
- control.removeAt(i);
- }else if(flag == 2){
- const control = this._assetsQuesFrom.controls['business_assets_details'];
- control.removeAt(i);
- }
+
+ /** To remove The Added Asset using Flag Both "Other Asset" And "Business Asset" */
+ removeAssetsDetails(i: number,flag) {
+ if(flag == 1){
+ const control = this._assetsQuesFrom.controls['assets_details'];
+ control.removeAt(i);
+ }else if(flag == 2){
+ const control = this._assetsQuesFrom.controls['business_assets_details'];
+ control.removeAt(i);
+ }
}
public paymentModeTextBox: number;
@@ -845,10 +855,22 @@ public m_investmentType = [];
this.freqPurchaseTextBox = e.value;
}
+ /** Show/hide EMI amount Field using Flag Both "other Asset" and "business"
+ * REF = "Other Asset type at last Field"
+ **/
+ selectedAssetLoanType(e: any,flag): void {
+ if(flag == 1){
+ this.otherEmiamtFlag = (e == 'yes') ? true : false;
+ }
+ else if(flag == 2){
+ this.businessEmiAmtFlag = (e == 'yes') ? true : false;
+ }
+ }
/** To Save/Edited Popup Data */
onSubmit() {
this.submitted = true;
+
// stop here if form is invalid
if (this._assetsQuesFrom.invalid) {
return;
@@ -876,22 +898,19 @@ public m_investmentType = [];
}
});
- // Add BRANCH data with help Service File
+ // Save the data with help of Service
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
dataresult => {
if (dataresult.status == 200) {
- // console.log(dataresult);
this.notifier.notify('success', 'Record Saved Successfully.!');
// this.dialogRef.close();
// alert("sample alert for Saving");
}
else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- // this.errorMessage = "Some Thing Wents Wrong Try Again !";
}
}, error => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
- // this.errorMessage = "Something Wents Wrong Try Again !";
// this.dialogRef.close();
});
//After Saving the BRANCH data then popup close
@@ -905,7 +924,8 @@ public m_investmentType = [];
arr.controls.splice(0);
this.getPdSupplierFormDetails();
}
- /** On Key Press Event For Mobile Number */
+
+ /** On Key Press Event For Number only Accepting */
keyPress(event: any) {
const pattern = /[0-9\-\.\ ]/;
@@ -915,7 +935,8 @@ public m_investmentType = [];
}
}
- loanCalc(details ,flag)
+ /** To calculating Loan Elapsed Tenure both "Other Asset" And "Business Asset" using Flag */
+ loanTenureCalc(details ,flag)
{
if(flag == 1){
//console.log(details.value);
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
index 4385d2676..ef48af123 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
@@ -20,67 +20,112 @@