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 0cceec89d..247b93d73 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 @@ -43,6 +43,7 @@ export class EditPdApplicantComponent implements OnInit { 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)])], + stdcode: [null, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])], landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])], company_name: [null], applicant_type: [1], @@ -54,7 +55,6 @@ export class EditPdApplicantComponent implements OnInit { loadApplicantFormData() { let stdcodesearch = this.mainApplicantData[0].landline.search("-"); let stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch); - console.log(stdcode); let landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8); this._EditApplicantForm = this._fb.group({ fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index 6f2bfb35d..f4a58047d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -106,6 +106,16 @@ +
+ + + + + + + +
+ -

Type of Premises

-
+ +
{{at.address_type}}
@@ -181,7 +192,7 @@ formControlName="premises_remarks" style="width: 65%;" autocomplete="off">
- + @@ -329,7 +329,7 @@
- + {{ asset.name }} @@ -504,6 +504,30 @@ + + + + {{owner.applicant_name}} + + + +
+ + + +
+
+ + + + {{relations.name}} + + + +
@@ -511,12 +535,12 @@ Yes No - NAN + NA - - + + 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 827c39105..b4d11a7e7 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 @@ -197,10 +197,12 @@ public m_investmentType = []; }; ngOnInit() { + + this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { + this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; + }); this.getPdSupplierFormDetails(); - this.getOwnerName(); - this.getM_Assets_Type(); this.getM_PropertyType(); this.getM_InvestmentType(); @@ -210,11 +212,7 @@ public m_investmentType = []; } // ====================== -getOwnerName(){ - this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { - this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; - }); -} + getM_Assets_Type() { this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( @@ -329,7 +327,7 @@ getOwnerName(){ this.initDetails(), ]), business_assets_details : this._formBuilder.array([ - this.initBusinessDetails(), + this.initBusinessDetails(this.businessProfessionName), ]), assets_form_remark:[''] }); @@ -363,12 +361,12 @@ getOwnerName(){ }); } - initBusinessDetails() { + initBusinessDetails(data) { return this._formBuilder.group({ business_assets_mode: ['', Validators.compose([Validators.required])], business_details: this._formBuilder.array([]), business_approximate_market_value: ['', Validators.compose([])], - business_name_of_the_owner: [this.businessProfessionName, Validators.compose([])], + business_name_of_the_owner: [data], // other_owner:[''], // relation:[''], // purchase_year: ['', Validators.compose([])], @@ -441,9 +439,14 @@ getOwnerName(){ break; } case '8': { - const control = (flag == 1) ? (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray - : (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('details') as FormArray ; - control.push(this.otherAssetsDescription()); + if(flag == 1){ + const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray ; + control.push(this.otherAssetsDescription()); + } + else if (flag == 2){ + const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ; + control.push(this.otherBusinessAssetsDescription()); + } break; } default: { @@ -473,6 +476,19 @@ getOwnerName(){ } otherAssetsDescription() { + return this._formBuilder.group({ + any_other_assets: ['', Validators.compose([Validators.required])], + name_of_the_owner:[''], + other_owner:[''], + relation:[''], + any_other_asset_value : [''], + any_other_asset_loan : [''], + other_asset_emi_amt : [''] + + }); + } + + otherBusinessAssetsDescription() { return this._formBuilder.group({ any_other_assets: ['', Validators.compose([Validators.required])], any_other_asset_value : [''], @@ -522,13 +538,6 @@ getOwnerName(){ }); } - loadPropertyWithData2(data) { - return this._formBuilder.group({ - property_type: [data.property_type, Validators.compose([Validators.required])] - //property_type:[''] - }); - } - loadJwellDescriptionWithData(data) { return this._formBuilder.group({ jwell_description: [data.jwell_description, Validators.compose([Validators.required])] @@ -544,12 +553,26 @@ getOwnerName(){ otherAssetsDescriptionWithData(data) { return this._formBuilder.group({ any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])], + name_of_the_owner:[data.name_of_the_owner], + other_owner:[data.other_owner], + relation:[data.relation], any_other_asset_value : [data.any_other_asset_value], any_other_asset_loan : [data.any_other_asset_loan], other_asset_emi_amt : [data.other_asset_emi_amt] }); } + otherBusinessAssetsDescriptionWithData(data) { + return this._formBuilder.group({ + any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])], + any_other_asset_value : [data.any_other_asset_value], + any_other_asset_loan : [data.any_other_asset_loan], + other_asset_emi_amt : [data.other_asset_emi_amt] + }); + } + + + loadInsuranceDescriptionWithData(data) { return this._formBuilder.group({ //insurance_type: [data.insurance_type, Validators.compose([Validators.required])], @@ -748,7 +771,7 @@ getOwnerName(){ switch (assets_details_mode) { case '1': { const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ; - control.push(this.loadPropertyWithData2(data)); + control.push(this.loadPropertyWithData(data)); break; } case '2': { @@ -781,7 +804,7 @@ getOwnerName(){ } case '8': { const control = (this._assetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ; - control.push(this.otherAssetsDescriptionWithData(data)); + control.push(this.otherBusinessAssetsDescriptionWithData(data)); break; } default: { @@ -798,7 +821,7 @@ getOwnerName(){ control.push(this.initDetails()); }else if(flag == 2){ const control = this._assetsQuesFrom.controls['business_assets_details']; - control.push(this.initBusinessDetails()); + control.push(this.initBusinessDetails(this.businessProfessionName)); } } removeLanguage(i: number,flag) { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html index e8da740ae..d137527b2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html @@ -57,11 +57,15 @@ - + Enter Valid Mobile Number. - + + + Enter Valid STD Code. + - + Enter Valid Landline Number. @@ -77,7 +81,7 @@ - +

Period of Relationship

diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts index 9919dd140..ce94b7288 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts @@ -16,7 +16,7 @@ export class NeighbourHoodComponent implements OnInit { form_id:number; private notifier: NotifierService; check_type:any=[{'id':0,'type_name':'Neighbourhood'},{'id':1,'type_name':'Reference Check'}] - default_reference_details: any= {'reference_name':'','mobile':'','landline':'','location':'','relationship_with':'','year_relation_applicant':'','months_relation_applicant':'','business_volume_amount':'','business_volume_unit':''}; + default_reference_details: any= {'reference_name':'','mobile':'','landline':'-','location':'','relationship_with':'','year_relation_applicant':'','months_relation_applicant':'','business_volume_amount':'','business_volume_unit':''}; default_neighbourhood_details: any= {'neighbourhood_name':'','do_know':'','how_long_do_know':'','is_applicant_owner':''}; busineesRelationshipList:any=[]; @@ -128,10 +128,14 @@ export class NeighbourHoodComponent implements OnInit { // create reference check form array createReerenceCheck(elementValue:any){ + let stdcodesearch = elementValue.landline.search("-"); + let stdcode = elementValue.landline.substr(0,stdcodesearch); + let landline = elementValue.landline.substr(+stdcodesearch + 1,8); return this._fb.group({ reference_name: [elementValue.reference_name, Validators.required], mobile: [elementValue.mobile,Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(10)])], - landline: [elementValue.landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])], + std_code: [stdcode,Validators.compose([Validators.minLength(2),Validators.maxLength(4)])], + landline: [landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])], location:[elementValue.location,Validators.required], relationship_with:[elementValue.relationship_with,Validators.required], others: [elementValue.others], @@ -217,7 +221,7 @@ export class NeighbourHoodComponent implements OnInit { referencecheck_list.push({ "reference_name":element.reference_name, "mobile":element.mobile, - "landline":element.landline, + "landline":element.std_code+'-'+element.landline, "location":element.location, "relationship_with":element.relationship_with, "others":element.others, 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 397353269..184df23a6 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 @@ -49,8 +49,8 @@
- - {{"₹"}} {{M_rawValueInWords}} Only (keyup)="inWords($event,1)" + + {{"₹"}} {{M_rawValueInWords}} Only @@ -96,8 +96,8 @@ - - {{"₹"}} {{M_goodsValueInWords}} Only (keyup)="inWords($event,2)" + + {{"₹"}} {{M_goodsValueInWords}} Only @@ -144,8 +144,8 @@ - - {{"₹"}} {{M_tradedGoodsValueInWords}} Only(keyup)="inWords($event,3)" + + {{"₹"}} {{M_tradedGoodsValueInWords}} Only @@ -204,8 +204,8 @@ - - {{"₹"}} {{R_goodsValueInWords}} Only(keyup)="inWords($event,4)" + + {{"₹"}} {{R_goodsValueInWords}} Only @@ -253,8 +253,8 @@ - - {{"₹"}} {{R_tradedGoodsValueInWords}} Only(keyup)="inWords($event,5)" + + {{"₹"}} {{R_tradedGoodsValueInWords}} Only @@ -314,8 +314,8 @@ - - {{"₹"}} {{T_goodsValueInWords}} Only(keyup)="inWords($event,6)" + + {{"₹"}} {{T_goodsValueInWords}} Only @@ -364,8 +364,8 @@ - - {{"₹"}} {{T_tradedGoodsValueInWords}} Only (keyup)="inWords($event,7)" + + {{"₹"}} {{T_tradedGoodsValueInWords}} Only diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts index 6c83ae348..d220137bd 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts @@ -122,7 +122,7 @@ export class StockComponent implements OnInit { } public initstockForms(record){ - +console.log(record); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = this.form_id; @@ -301,8 +301,11 @@ export class StockComponent implements OnInit { manufacturingForm: Boolean = false; manufacturingFormCreation(record) { + console.log(record); let arr = record.filter(data => data.type_of_activity_id == 1); + console.log(arr); if (arr.length > 0) { + console.log(arr.length); this.manufacturingForm = true; return this.fb.group({ manufacturing_raw_materials: this.fb.array([]), @@ -368,19 +371,26 @@ export class StockComponent implements OnInit { // console.log(305,'else') for (let val of datas.manufacturing_raw_materials) { // console.log(val); - + if(val.raw_value){ + this.M_rawValueInWords = this._pd.convertNumberToWords(val.raw_value); + } rawMaterial.push(this.createRawmaterial(val)); + } for (let val of datas.manufacturing_finished_goods) { // console.log(val); - + if(val.goods_value){ + this.M_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); + } finishedGoods.push(this.createGoods(val)); } for (let val of datas.manufacturing_traded_goods) { // console.log(val); - + if(val.estimated_traded_goods_value){ + this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); + } tradedGoods.push(this.createTradedGoods(val)); } @@ -449,12 +459,18 @@ export class StockComponent implements OnInit { for (let val of datas.retail_finished_goods) { // console.log(val); - + + if(val.goods_value){ + this.R_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); + } finishedGoods.push(this.createGoods(val)); } for (let val of datas.retail_traded_goods) { // console.log(val); + if(val.estimated_traded_goods_value){ + this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); + } tradedGoods.push(this.createTradedGoods(val)); } @@ -531,12 +547,17 @@ export class StockComponent implements OnInit { for (let val of datas.trading_finished_goods) { // console.log(val); - + if(val.goods_value){ + this.T_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); + } finishedGoods.push(this.createGoods(val)); } for (let val of datas.trading_traded_goods) { // console.log(val); + if(val.estimated_traded_goods_value){ + this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); + } tradedGoods.push(this.createTradedGoods(val)); } @@ -758,6 +779,7 @@ export class StockComponent implements OnInit { /** To Convert Amount into Words */ inWords(e,flag:number){ + switch(flag){ case 1 : this.M_rawValueInWords = this._pd.convertNumberToWords(e.target.value);