diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts
index 247b93d73..68e8d57a9 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts
@@ -42,7 +42,7 @@ export class EditPdApplicantComponent implements OnInit {
this._EditApplicantForm = this._fb.group({
fk_applicant_primary_id: [null],
applicant_name: [null, Validators.compose([Validators.required])],
- mobile_no: [null, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12)])],
+ mobile_no: [null, Validators.compose([Validators.minLength(10),Validators.maxLength(12)])],
stdcode: [null, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])],
landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])],
company_name: [null],
@@ -59,7 +59,7 @@ export class EditPdApplicantComponent implements OnInit {
this._EditApplicantForm = this._fb.group({
fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id],
applicant_name: [this.mainApplicantData[0].applicant_name, Validators.compose([Validators.required])],
- mobile_no: [this.mainApplicantData[0].mobile_no, Validators.compose([Validators.required,Validators.required,Validators.minLength(10),Validators.maxLength(12)])],
+ mobile_no: [this.mainApplicantData[0].mobile_no, Validators.compose([Validators.minLength(10),Validators.maxLength(12)])],
stdcode: [stdcode, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])],
landline: [landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
company_name: [this.mainApplicantData[0].company_name],
@@ -76,9 +76,19 @@ export class EditPdApplicantComponent implements OnInit {
}
createItem(listData): FormGroup {
if(listData){
+ console.log(listData.landline);
+ let stdcode;
+ let landline;
+ if(listData.landline != null){
let stdcodesearch = listData.landline.search("-");
- let stdcode = listData.landline.substr(0,stdcodesearch);
- let landline = listData.landline.substr(+stdcodesearch + 1,8);
+ stdcode = listData.landline.substr(0,stdcodesearch);
+ //console.log(stdcode);
+ landline = listData.landline.substr(+stdcodesearch + 1,8);}
+ else{
+ stdcode = null;
+ landline = null;
+ }
+ console.log(landline);
return this._fb.group({
label: ['Co Applicant'],
fk_applicant_primary_id: [listData.pd_co_applicant_id],
@@ -136,13 +146,28 @@ export class EditPdApplicantComponent implements OnInit {
"isactive":1
}];
formValue.coApplicantItems.forEach((itemElement, itemIndex) => {
+ // console.log(itemElement.coapplicant_stdcode);
+ // console.log(itemElement.coapplicant_landline);
+ let concat_landline
+ if(itemElement.coapplicant_stdcode != null && itemElement.coapplicant_landline != null){
+ let std = itemElement.coapplicant_stdcode == '' ? '' : itemElement.coapplicant_stdcode;
+ let landline = itemElement.coapplicant_landline == '' ? '' : itemElement.coapplicant_landline;
+ concat_landline = std+'-'+landline;
+ }else if(itemElement.coapplicant_stdcode == '' && itemElement.coapplicant_landline == ''){
+ concat_landline = null;
+ }else{
+ concat_landline = null;
+ }
+
+
+ console.log(concat_landline);
let obj1 = {
"fk_pd_id": this.data.pdID,
"pd_co_applicant_id": itemElement.fk_applicant_primary_id,
"applicant_name":itemElement.coapplicantName,
"relation":itemElement.relationship,
"mobile_no":itemElement.coapplicant_mobile_no,
- "landline":itemElement.coapplicant_stdcode+'-'+itemElement.coapplicant_landline,
+ "landline":concat_landline,
"applicant_type":itemElement.applicant_type,
"company_name":itemElement.company_name,
"isactive":1
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html
index d2346740d..a70160469 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html
@@ -101,7 +101,8 @@
@@ -217,15 +241,15 @@
-
+
-
+
-
+
@@ -357,7 +381,8 @@
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 e6ddfeeb3..40db78e79 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
@@ -47,6 +47,16 @@ export class AssetsInfoComponent implements OnInit {
OtherAppxMarketAmtInwords : any = [];
emiAmtInwords : any = [];
OtherEmiAmtInwords : any = [];
+ PremiumPaidInwords : any = [];
+ OtherPremiumPaidInwords: any = [];
+ SumAssuredInwords: any = [];
+ OtherSumAssuredInwords: any = [];
+ AmtInvestInwords: any = [];
+ OtherAmtInvestInwords: any = [];
+ AssetValueInwords: any = [];
+ OtherAssetValueInwords: any = [];
+ B_emiAmtInwords: any = [];
+ O_emiAmtInwords: any = [];
// public m_assets_type = [
// {
// 'id': "1",
@@ -299,6 +309,8 @@ public m_investmentType = [];
getPdSupplierFormDetails() {
this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '4').subscribe(
data => {
+ console.log(data);
+ console.log(data.records);
if (data) {
if (data.dataStatus) {
this.formLoadData(data.records);
@@ -314,6 +326,7 @@ public m_investmentType = [];
}
formLoadData(val) {
+ console.log(val);
if (val !== null) {
let value = val;
this._assetsQuesFrom = this._formBuilder.group({
@@ -635,6 +648,7 @@ public m_investmentType = [];
}
initBusinessDetailsWithdata(data) {
+
return this._formBuilder.group({
business_assets_mode: [data.business_assets_mode],
business_details: this._formBuilder.array([]),
@@ -654,10 +668,16 @@ public m_investmentType = [];
loadDetails: boolean;
addAssetsDetailsWithData(supp_data) {
- console.log(supp_data);
+ //console.log(supp_data);
var result = Object.keys(supp_data).map(function (key) {
return supp_data[key];
});
+ result.forEach((datas,index) => {
+
+ this.OtherAppxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(datas.approximate_market_value);
+ this.OtherEmiAmtInwords[index] = this.pdTrigerService.convertNumberToWords(datas.emi_paid);
+
+ });
if (result.length > 0) {
for (let val of result) {
let vals = {
@@ -684,12 +704,16 @@ public m_investmentType = [];
addBusinessAssetsDetailsWithData(supp_data) {
- console.log(supp_data);
-
var result = Object.keys(supp_data).map(function (key) {
return supp_data[key];
});
+
if (result.length > 0) {
+ result.forEach((datas,index) => {
+ this.appxMarketAmtInwords[index] = this.pdTrigerService.convertNumberToWords(datas.business_approximate_market_value);
+ this.emiAmtInwords[index] = this.pdTrigerService.convertNumberToWords(datas.business_emi_paid);
+ });
+
for (let val of result) {
let vals = {
business_assets_mode: val.business_assets_mode,
@@ -706,10 +730,6 @@ public m_investmentType = [];
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.setBusinessAssetsDetailsWithData(vals.business_assets_mode, val.business_details, control.length - 1)
@@ -755,16 +775,27 @@ public m_investmentType = [];
break;
}
case '6': {
+ data.forEach((datas,i) => {
+ this.OtherPremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.premium_paid);
+ this.OtherSumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.sum_assured);
+ });
const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
control.push(this.loadInsuranceDescriptionWithData(data));
break;
}
case '7': {
+ data.forEach((datas,i) => {
+ this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.amount_of_invest);
+ });
const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
control.push(this.loadInvestDescriptionWithData(data));
break;
}
case '8': {
+ data.forEach((datas,i) => {
+ this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(+data.any_other_asset_value);
+ this.O_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.other_asset_emi_amt);
+ });
const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
control.push(this.otherAssetsDescriptionWithData(data));
break;
@@ -776,6 +807,7 @@ public m_investmentType = [];
}
setBusinessAssetsDetailsWithData(assets_details_mode: any, datas: any, i: any): void {
+ console.log(datas);
let val = i;
let data = datas;
const arr = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
@@ -806,16 +838,27 @@ public m_investmentType = [];
break;
}
case '6': {
+ data.forEach((datas,i) => {
+ this.PremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.premium_paid);
+ this.SumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.sum_assured);
+ });
const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
control.push(this.loadInsuranceDescriptionWithData(data));
break;
}
case '7': {
+ data.forEach((datas,i) => {
+ this.AmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.amount_of_invest);
+ });
const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
control.push(this.loadInvestDescriptionWithData(data));
break;
}
case '8': {
+ data.forEach((datas,i) => {
+ this.AssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(+data.any_other_asset_value);
+ this.B_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.other_asset_emi_amt);
+ });
const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
control.push(this.otherBusinessAssetsDescriptionWithData(data));
break;
@@ -875,6 +918,7 @@ public m_investmentType = [];
/** To Save/Edited Popup Data */
onSubmit() {
+ console.log(this._assetsQuesFrom.value);
this.submitted = true;
// stop here if form is invalid
@@ -903,7 +947,7 @@ public m_investmentType = [];
val.business_elapsed_tenure = '';
}
});
-
+console.log(answerFormValues);
// Save the data with help of Service
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
dataresult => {
@@ -979,8 +1023,38 @@ inWords(e,i,flag){
case 4 :
this.OtherEmiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
break;
+ case 5 :
+ this.PremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 6 :
+ this.OtherPremiumPaidInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 7 :
+ this.SumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 8 :
+ this.OtherSumAssuredInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 9 :
+ this.AmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 10 :
+ this.OtherAmtInvestInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 11 :
+ this.AssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 12 :
+ this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 13:
+ this.B_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
+ case 14:
+ this.O_emiAmtInwords[i] = this.pdTrigerService.convertNumberToWords(e.target.value);
+ break;
default:
break;
}
}
-}
+}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
index 68a1078bd..45d918e60 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
@@ -18,13 +18,13 @@
- Manufacturing Details
+ Manufacturing Details
-
{{a+1}} . Raw Material
+
{{a+1}} . Raw Material
@@ -62,7 +62,7 @@
- Please comment on the stock level observed?
+ Please comment on the stock level observed?
@@ -80,7 +80,7 @@
-
{{b+1}} Finished Goods
+
{{b+1}} Finished Goods
@@ -109,7 +109,7 @@
- Please comment on the finished goods stock level observed?
+ Please comment on the finished goods stock level observed?
@@ -128,7 +128,7 @@
-
{{c+1}} Traded Goods
+
{{c+1}} Traded Goods
@@ -158,7 +158,7 @@
- Please comment on the Traded Goods stock level observed?
+ Please comment on the Traded Goods stock level observed?
@@ -185,10 +185,10 @@
-
+
-
{{d+1}} Finished Goods
+
{{d+1}} Finished Goods
@@ -218,7 +218,7 @@
- Please comment on the finished goods stock level observed?
+ Please comment on the finished goods stock level observed?
@@ -237,7 +237,7 @@
-
{{e+1}} Traded Goods
+
{{e+1}} Traded Goods
@@ -267,7 +267,7 @@
- Please comment on the Traded Goods stock level observed?
+ Please comment on the Traded Goods stock level observed?
@@ -298,7 +298,7 @@
-
{{f+1}} Finished Goods
+
{{f+1}} Finished Goods
@@ -328,7 +328,7 @@
- Please comment on the finished goods stock level observed?
+ Please comment on the finished goods stock level observed?
@@ -348,7 +348,7 @@
-
{{g+1}} Traded Goods
+
{{g+1}} Traded Goods
@@ -378,7 +378,7 @@
- Please comment on the Traded Goods stock level observed?
+ Please comment on the Traded Goods stock level observed?
@@ -515,7 +515,7 @@
- Remarks
+ Remarks
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.scss
index baeef985a..69732ceb7 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.scss
@@ -16,7 +16,9 @@
// background: #62B013;
// color: white;
// }
-
+.highlight {
+ color: red;
+ }
.paragraph_change {
color: #fff !important;
background-color: #e00201 !important;