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 dbd40f65e..6c622dc6c 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 @@ -28,23 +28,23 @@
- {{ asset.name | titlecase }} + {{ asset.name }}
-
+
- {{ prop.name | titlecase }} + {{ prop.name }} - +
@@ -52,7 +52,7 @@
-
+
@@ -67,7 +67,7 @@
-
+
@@ -85,7 +85,7 @@
- -
+
@@ -122,10 +122,10 @@ - {{ freqn.name | titlecase }} + {{ freqn.name }} - +
@@ -154,16 +154,16 @@ - {{ ins_type.name | titlecase }} + {{ ins_type.name }} - + - + @@ -182,7 +182,7 @@
-
+
@@ -192,27 +192,7 @@
- - - - - - - {{val.name}} - - - - - - - - - +
- + {{"₹"}} {{OtherAppxMarketAmtInwords[i]}} Only - + @@ -276,7 +256,7 @@ -->
- + @@ -296,7 +276,7 @@
- + Yes No @@ -317,7 +297,7 @@
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 16a9a412c..ac7fc409e 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 @@ -77,6 +77,7 @@ export class AssetsInfoComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.applicants = this.pd_all_details.pdapplicants_detials; + this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1) this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.notifier = notifier; } @@ -106,27 +107,29 @@ export class AssetsInfoComponent implements OnInit { // this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => { // this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ; // }); - this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ - if(data.dataStatus){ - this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); - } + // this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ + // if(data.dataStatus){ + // this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); + // } - let modifyCompanyList : any=[]; - if(this.existCompanyList.length>0){ - modifyCompanyList = this.existCompanyList.map(element => { - return {id:element.company_order_id.toString(),name:element.company_name,group_id:1}; - }); - this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) - } - let modifyApplicantList: any=[]; - if(this.applicants.length > 0){ - modifyApplicantList = this.applicants.map(element => { - return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; - }); - this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) + // let modifyCompanyList : any=[]; + // if(this.existCompanyList.length>0){ + // modifyCompanyList = this.existCompanyList.map(element => { + // return {id:element.company_order_id.toString(),name:element.company_name,group_id:1}; + // }); + // this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) + // } + + // }) + // get applicant list + let modifyApplicantList: any=[]; + if(this.applicants.length > 0){ + modifyApplicantList = this.applicants.map(element => { + return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; + }); + this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) - } - }) + } this.getPdSupplierFormDetails(); this.getM_Assets_Type(); @@ -143,7 +146,7 @@ export class AssetsInfoComponent implements OnInit { getM_Assets_Type() { this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( data => { - this.m_assets_type = data.records.filter(data => data.isactive == 1); + this.m_assets_type = data.records.filter(data => data.isactive == 1 && data.id != 4); }, error => { this.notifier.notify('warning', 'No Category Records Found.!'); @@ -298,35 +301,35 @@ export class AssetsInfoComponent implements OnInit { switch (e.value) { case '1': { + const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray ; + control.push(this.otherAssetsDescription()); + break; + } + case '2': { let val = i; const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; control.push(this.loadProperty()); break; } - case '2': { + case '3': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; control.push(this.load_Four_Weeler()); break; } - case '3': { + case '4': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; control.push(this.loadEquipmentManufacturingDescription()); break; } - case '4': { + case '5': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; //control.push(this.loadJwellDescription()); break; } - case '5': { - const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - - control.push(this.loadConsumerDurableDescription()); - break; - } + case '6': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; @@ -339,11 +342,7 @@ export class AssetsInfoComponent implements OnInit { control.push(this.loadInvestDescription()); break; } - case '8': { - const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray ; - control.push(this.otherAssetsDescription()); - break; - } + default: { break; } @@ -379,8 +378,8 @@ export class AssetsInfoComponent implements OnInit { otherAssetsDescription() { return this._formBuilder.group({ any_other_assets: [''], - name_of_the_owner:[''], - other_owner:[''], + //name_of_the_owner:[''], + //other_owner:[''], //relation:[''], any_other_asset_value : [''], any_other_asset_loan : [''], @@ -411,7 +410,7 @@ export class AssetsInfoComponent implements OnInit { return this._formBuilder.group({ investments_type: [''], other_investments_type:[''], - amount_of_invest: [], + amount_of_invest: [''], bank_name: [''] }); } @@ -456,8 +455,8 @@ export class AssetsInfoComponent implements OnInit { otherAssetsDescriptionWithData(data) { return this._formBuilder.group({ any_other_assets: [data.any_other_assets], - name_of_the_owner:[data.name_of_the_owner], - other_owner:[data.other_owner], + // 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], @@ -584,6 +583,22 @@ export class AssetsInfoComponent implements OnInit { switch (assets_details_mode) { case '1': { + let array_data : any; + data.forEach((datas,i) => { + array_data = { 'any_other_assets': datas.any_other_assets, + 'name_of_the_owner':datas.name_of_the_owner, + 'other_owner':datas.other_owner, + //'relation':datas.relation, + 'any_other_asset_value' : datas.any_other_asset_value, + 'any_other_asset_loan' : datas.any_other_asset_loan, + }; + this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.any_other_asset_value); + }); + const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; + control.push(this.otherAssetsDescriptionWithData(array_data)); + break; + } + case '2': { let array_data : any; data.forEach((datas,i) => { array_data = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type }; @@ -592,7 +607,7 @@ export class AssetsInfoComponent implements OnInit { control.push(this.loadPropertyWithData(array_data)); break; } - case '2': { + case '3': { let array_data : any; data.forEach((datas,i) => { array_data = { 'manufacturer_model_vehicle': datas.manufacturer_model_vehicle }; @@ -601,7 +616,7 @@ export class AssetsInfoComponent implements OnInit { control.push(this.load_Four_WeelerWithData(array_data)); break; } - case '3': { + case '4': { let array_data : any; data.forEach((datas,i) => { array_data = { 'equipment_manufacturing_description': datas.equipment_manufacturing_description }; @@ -610,20 +625,12 @@ export class AssetsInfoComponent implements OnInit { control.push(this.loadEquipmentManufacturingDescriptionWithData(array_data)); break; } - case '4': { + case '5': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; //control.push(this.loadJwellDescriptionWithData(data)); break; } - case '5': { - let array_data : any; - data.forEach((datas,i) => { - array_data = { 'consumer_durable_description': datas.consumer_durable_description }; - }); - const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.loadConsumerDurableDescriptionWithData(array_data)); - break; - } + case '6': { let array_data : any; data.forEach((datas,i) => { @@ -654,22 +661,7 @@ export class AssetsInfoComponent implements OnInit { control.push(this.loadInvestDescriptionWithData(array_data)); break; } - case '8': { - let array_data : any; - data.forEach((datas,i) => { - array_data = { 'any_other_assets': datas.any_other_assets, - 'name_of_the_owner':datas.name_of_the_owner, - 'other_owner':datas.other_owner, - //'relation':datas.relation, - 'any_other_asset_value' : datas.any_other_asset_value, - 'any_other_asset_loan' : datas.any_other_asset_loan, - }; - this.OtherAssetValueInwords[i] = this.pdTrigerService.convertNumberToWords(+datas.any_other_asset_value); - }); - const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.otherAssetsDescriptionWithData(array_data)); - break; - } + default: { break; } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index 2f63c207e..1d0e0f11c 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -160,9 +160,9 @@
-
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts index e4e0a4d80..e8721a0d7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts @@ -55,6 +55,8 @@ export class BankingDetailsComponent implements OnInit { this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase(); this.pd_cus_segment = this.pd_cus_segment.substring(0,3); this.applicants = this.pd_all_details.pdapplicants_detials; + this.applicants = this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1) + this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); this.notifier = notifier; @@ -83,29 +85,14 @@ export class BankingDetailsComponent implements OnInit { ngOnInit() { this.step = 0; this.initBankingForm(); - this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ - if(data.dataStatus){ - this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); - } - - let modifyCompanyList : any=[]; - if(this.existCompanyList.length>0){ - modifyCompanyList = this.existCompanyList.map(element => { - return {id:element.company_order_id.toString(),name:element.company_name,group_id:1}; - }); - this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) - - } - - let modifyApplicantList: any=[]; - if(this.applicants.length > 0){ - modifyApplicantList = this.applicants.map(element => { - return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; - }); - this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) - - } - }) + let modifyApplicantList: any=[]; + if(this.applicants.length > 0){ + modifyApplicantList = this.applicants.map(element => { + return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; + }); + this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) + + } this.getM_AccountType(); this.getM_BTLenderList(); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html index dbe46dee9..240abb48c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html @@ -205,7 +205,7 @@ {{"₹"}} {{appxMarketAmtInwords[i]}} Only - - - - + +
- + Vintage diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts index 12c0f2cb9..247cade65 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts @@ -85,7 +85,7 @@ export class BusinessAssetsInfoComponent implements OnInit { // }); this.pdTrigerService.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ if(data.dataStatus){ - this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true); + this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true && val.company_order_id==this.company_id); } let modifyCompanyList : any=[]; @@ -95,14 +95,14 @@ export class BusinessAssetsInfoComponent implements OnInit { }); this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) } - let modifyApplicantList: any=[]; - if(this.applicants.length > 0){ - modifyApplicantList = this.applicants.map(element => { - return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; - }); - this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) + // let modifyApplicantList: any=[]; + // if(this.applicants.length > 0){ + // modifyApplicantList = this.applicants.map(element => { + // return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2}; + // }); + // this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList}) - } + // } }) this.getPdSupplierFormDetails(); @@ -165,7 +165,7 @@ export class BusinessAssetsInfoComponent implements OnInit { //Get Data Based on PDID and FORMID apiLoadFinish: boolean = false; getPdSupplierFormDetails() { - this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '22').subscribe( + this.pdTrigerService.getPDFormDetailsWithCompanyID(this.pdid, '22',this.company_id).subscribe( data => { if (data) { if (data.dataStatus) { @@ -589,11 +589,11 @@ export class BusinessAssetsInfoComponent implements OnInit { this.freqPurchaseTextBox = e.value; } // // compare objects for merge two master table details - // compareObjects(o1: any, o2: any) { - // if(o1.id == o2.id && o1.group_id == o2.group_id) - // return true; - // else return false - // } + compareObjects(o1: any, o2: any) { + if(o1.id == o2.id && o1.group_id == o2.group_id) + return true; + else return false + } // // check others checkOthers(values){ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html new file mode 100644 index 000000000..d6a1ecfd0 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html @@ -0,0 +1,240 @@ +
+

+
+ {{pageTitle}} +
+
+ +
+

+ + + + + + +
+ + + + +

Banking Details #{{i+1}} +

+
+
+ + + + + {{val.name}} + + + + + + + + + + + {{ btLen.lender_name }} + + + + + + + + + + {{ prop.name }} + + + + + + Yes + No + + + +
+ + + Yes + No + NA + + + + + + {{"₹"}} {{amtInwords[i]}} Only + +
+
+ +
+
+ + + + + + +
+
+ +
+ +
+ + + + + +
+ +
+ +
+
+ +
+
+ +
+
+
+ + + + + + +
+
+ +
+ + Remarks + + +
+
+ +
+
+ +
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss new file mode 100644 index 000000000..edb0c1f7a --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss @@ -0,0 +1,102 @@ +.banlFields mat-form-field { + width: 27%; + margin: 0 2%; + } + .bankForm .button { + float: right; + width: 10px; + background: #62B013; + color: white; + } + .mat-form-field-appearance-legacy .mat-hint{ + color:rgba(0, 0, 0, 0.8) !important; + } + + ::ng-deep .cdk-global-overlay-wrapper{ + justify-content: center !important; + } + .paragraph_change { + color: #fff !important; + background-color: #e00201 !important; + } + .mat-card-content { + background-color: white; + } + .mat-card-actions { + background-color: white; + } + + mat-form-field { + margin: 0 2%; + } + $base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important; + $product-bg-color-hover: rgba(103, 58, 183, 0.7); + .p-list-main { + background: white; + margin: auto; + position: relative; + overflow: hidden !important; + border-radius: 10px 10px 10px 10px; + box-shadow: $base-card-box-shadow; + transform: scale(0.95); + transition: box-shadow 0.5s, transform 0.5s; + &:hover { + transform: scale(1); + box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); + } + .p-list { + position: relative; + .top { + height: 100%; + width: 100%; + // background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center; + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + } + .bottom { + width: 200%; + height: 15%; + transition: transform 0.5s; + h1 { + margin: 0; + padding: 0; + } + p { + margin: 0; + padding: 0; + } + .left { + height: 100%; + width: 50%; + background: #f4f4f4; + position: relative; + float: left; + .details { + padding: 5px; + float: left; + // width: calc(70% - 40px); + } + + } + .right { + width: 50%; + background: #A6CDDE; + color: white; + float: right; + height: 200%; + overflow: hidden; + .details { + padding: 20px; + float: right; + width: calc(70% - 40px); + } + + + } + } + } + + } + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.spec.ts new file mode 100644 index 000000000..28dbbb892 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BusinessBankingDetailsComponent } from './business-banking-details.component'; + +describe('BusinessBankingDetailsComponent', () => { + let component: BusinessBankingDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ BusinessBankingDetailsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BusinessBankingDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts new file mode 100644 index 000000000..d69fbe2de --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts @@ -0,0 +1,327 @@ +import { + Component, + OnInit, + Inject, + Input +} from '@angular/core'; + +import { + FormBuilder, + FormGroup, + Validators, + FormArray, FormControl, AbstractControl, +} from '@angular/forms'; + +import { NotifierService } from 'angular-notifier'; + +import { + MatDialog, + MatDialogRef, + MAT_DIALOG_DATA +} from '@angular/material'; +/** Service */ +import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; +import {ActivatedRoute, Router} from "@angular/router"; + +@Component({ + selector: 'app-business-banking-details', + templateUrl: './business-banking-details.component.html', + styleUrls: ['./business-banking-details.component.scss'] +}) +export class BusinessBankingDetailsComponent implements OnInit { + + pdid: number; + pageTitle: string ="Banking Information"; + public bankingForm: FormGroup; + step: number; + private notifier: NotifierService; + public pd_cus_segment:string; + public applicants: any; + m_accountType= []; + m_btLenderList = []; + salaryField : boolean; + OtherFlag : any = []; + limitCaseFlag : any = []; + amtInwords : any = []; + emiAmtInwords : any = []; + + existCompanyList: any =[]; + mergeCompanyApplicant: any=[]; + company_id: String; + constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, + private router: Router, + private _pd: PdTrigerService, + private dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { + this.pdid = this.pd_all_details.pdmaster_details.pd_id; + this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase(); + this.pd_cus_segment = this.pd_cus_segment.substring(0,3); + this.applicants = this.pd_all_details.pdapplicants_detials; + this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'}); + this.notifier = notifier; + this.company_id = this.pd_all_details.company_id; + + } + + 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, + } +}; + + ngOnInit() { + this.step = 0; + this.initBankingForm(); + this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ + if(data.dataStatus){ + this.existCompanyList = data.records.filter(val =>val.is_active===true && val.is_company_applicant===true && val.company_order_id==this.company_id); + } + + let modifyCompanyList : any=[]; + if(this.existCompanyList.length>0){ + modifyCompanyList = this.existCompanyList.map(element => { + return {id:element.company_order_id.toString(),name:element.company_name,group_id:1}; + }); + this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList}) + + } + }) + + this.getM_AccountType(); + this.getM_BTLenderList(); + + this.salaryField = this.pd_cus_segment.substring(0,2) == 'SE' ? false : true ; + let params: any = {}; + params.pd_id = this.pdid; + params.pd_form_id = '21'; + params.company_id = this.company_id; + this._pd.retriveForm(params).subscribe(data => { + // console.log('data', data); + const control = this.bankingForm.controls['itemRows']; + if (data.status == 200) { + this.bankingForm.controls.banking_form_remark.setValue(data.records.banking_form_remark); + var result = Object.keys(data.records.banking_details).map(function (key) { + return data.records.banking_details[key]; + }); + if (result.length == 0) { + control.push(this.createBankarray()); + } else { + result.forEach((datas,index) => { + this.amtInwords[index] = this._pd.convertNumberToWords(+datas.limit); + // this.selectedBorrower(datas.applicant_name,index); + this.selectedAccTypeChanges(+datas.account_type,index) + + // this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi); + control.push(this.createBankarray()); + }); + this.bankingForm.controls.itemRows.setValue(result); + } + } else { + control.push(this.createBankarray()); + } + }); + } + + // ====================== + + getM_AccountType() { + this._pd.getAllMasterDatas('ACCOUNTTYPE').subscribe( + data => { + this.m_accountType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_BTLenderList(){ + this._pd.getAllMasterDatas('BTLENDERLIST').subscribe( + data => { + this.m_btLenderList = data.records.filter(data => data.isactive == 1 && data.lender_type == 1); + }) + } + + public initBankingForm(): void { + this.bankingForm = this.fb.group({ + banking_form_remark: [''], + itemRows: this.fb.array([]) + }); + } + + createBankarray() { + return this.fb.group({ + applicant_name: [''], + other_applicant : [''], + bank_name: [''], + other_bank: [''], + account_type: [''], + //salary: [''], + salary: this.pd_cus_segment.substring(0,2) == 'SE' ? [''] : [''], + limit: [''], + //is_main: [''], + //is_main: [this.pd_cus_segment == 'SAL' ? '' : ''], + //is_main:[''], + is_main: this.pd_cus_segment == 'SAL' ? [''] : [''], + vintage_year: [''], + vintage_month: [''], + }); + + } + + addBankdetails(index, event) { + event.stopPropagation(); + const control = this.bankingForm.controls['itemRows']; + let length = control.length; + this.step = length; + control.push(this.createBankarray()); + // if(this.pd_cus_segment != 'SAL') { + // this.bankingForm.controls.is_main.setValidators([Validators.required]); + // this.bankingForm.controls.is_main.updateValueAndValidity(); + // } + } + + deleteBankdetails(index: number) { + // console.log('index value -', index); + const control = this.bankingForm.controls['itemRows']; + control.removeAt(index); + } + + setStep(index: number) { + this.step = index; + } + + bankSubmit() { + let records: any = {}; + records.pdid = this.pdid; + records.formid = '21'; + records.company_id = this.company_id; records.banking_form_remark = this.bankingForm.controls.banking_form_remark.value; + // records.fk_createdby = '252'; + records.banking_details = this.bankingForm.controls['itemRows'].value; + // console.log('data', records); + this._pd.saveForm(records).subscribe(data => { + if(data.status == 200) { + this.notifier.notify('success', 'Saved Successfully.'); + // this.dialogRef.close(); + setTimeout(() =>{ + this.dialogRef.close(); + },3000); + } + else{ + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + } + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }); + } + + validateAllFormFields(formGroup: FormGroup) { + Object.keys(formGroup.controls).forEach(field => { + const control = formGroup.get(field); + if (control instanceof FormControl) { + control.markAsTouched({onlySelf: true}); + } else if (control instanceof FormGroup) { + this.validateAllFormFields(control); + } + }); + } + + // selectedBorrower(e,i){ + // if(e == 0){ + // this.OtherFlag[i] = true; + // } + // else{ + // this.OtherFlag[i] = false; + // } + // } + + + // compare objects for merge two master table details + compareObjects(o1: any, o2: any) { + if(o1.id == o2.id && o1.group_id == o2.group_id) + return true; + else return false + } + + + // check others + checkOthers(values){ + if(values!=null) { + return values.id==0 ? true : false; + } + else { + return false; + } + + } + + selectedAccTypeChanges(event: any,i){ + + if(event == 2 || event == 1) { + this.limitCaseFlag[i] = false; + + // const control = this.bankingForm.controls['itemRows']; + + // control.controls[0].get('limit').clearValidators(); + // control.controls[0].get('limit').updateValueAndValidity(); + + } + else{ + this.limitCaseFlag[i] = true; + } + + } + /** To Convert Month into Year */ + ConvertMonthintoYear(itemrow,e){ + //console.log(itemrow); + + let year = itemrow.controls.vintage_year.value; + + let converted_month : number = e%12; + let converted_year : number = e/12; + + itemrow.controls.vintage_year.setValue(+year + +Math.floor(converted_year)); + itemrow.controls.vintage_month.setValue(Math.floor(converted_month)); + + } + + /** Amount InWords */ + inWords(e,i,flag){ + switch(flag){ + case 1 : + this.amtInwords[i] = this._pd.convertNumberToWords(e.target.value); + break; + case 2 : + this.emiAmtInwords[i] = this._pd.convertNumberToWords(e.target.value); + break; + default: + break; + } + } + + /** On Key Press Event For Numbers */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts index b75abc822..8fe05e19e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts @@ -10,7 +10,7 @@ import {StockComponent} from './../../forms/stock/stock.component'; import {FinancialInfoComponent} from './../../forms/financial-info/financial-info.component'; import {BusinessInfoComponent} from './../../forms/business-info/business-info.component'; import { BusinessAssetsInfoComponent } from './../../forms/business-assets-info/business-assets-info.component'; - +import { BusinessBankingDetailsComponent } from './../../forms/business-banking-details/business-banking-details.component'; @Component({ selector: 'app-business-info-group', templateUrl: './business-info-group.component.html', @@ -129,6 +129,19 @@ export class BusinessInfoGroupComponent implements OnInit { this.getCompanyListForBusiness(); }); } + else if(details.form_id==21) { + const dialogRef = this.dialog.open(BusinessBankingDetailsComponent, { + data: this.pd_all_details, + position: { right: '0'}, + width:'80%', + disableClose: true + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + this.getCompanyListForBusiness(); + }); + + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index 23299ad72..4d181b847 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -744,16 +744,20 @@ - - +
+
+
+ +
+
@@ -1130,6 +1134,27 @@ + + + + Digital Payments + + + + + Yes + No + + + + + Yes + No + + + + + Seasonality @@ -1291,16 +1316,24 @@ - + + +
+
+
+ +
+
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts index fd8d7f821..56a8e8296 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -324,6 +324,8 @@ export class BusinessInfoComponent implements OnInit { }); if(selectedRetail.length > 0) { selectedRetail.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert'); + selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); + selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedRetail.forEach((element,index)=>{ retailControl.push(this.createActivity()); if(element.area_of_sale=='Within India'){ @@ -383,6 +385,8 @@ export class BusinessInfoComponent implements OnInit { }); if(selectedWholesale.length > 0) { selectedWholesale.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert'); + selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); + selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedWholesale.forEach((element,index)=>{ wholesaleControl.push(this.createActivity()); if(element.area_of_sale=='Within India'){ @@ -444,7 +448,8 @@ export class BusinessInfoComponent implements OnInit { }); if(selectedService.length > 0) { selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert'); - + selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); + selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedService.forEach((element,index)=>{ serviceProviderControl.push(this.createServiceActivity()); if(element.area_of_sale=='Within India'){ @@ -659,6 +664,12 @@ export class BusinessInfoComponent implements OnInit { this.businessForm.value.manufacturing_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl(this.businessForm.value.export_import_cert, Validators.required)) : this.businessForm.removeControl('export_import_cert'); this.businessForm.value.manufacturing_activity_details.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl(this.businessForm.value.factory_cert, Validators.required)) : this.businessForm.removeControl('factory_cert'); this.businessForm.value.service_provider_activity_details.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl(this.businessForm.value.practice_cert, Validators.required)) : this.businessForm.removeControl('practice_cert'); + // check activity for extra question make dynamic + + this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl(this.businessForm.value.applicant_use_mobile_wallets)) : this.businessForm.removeControl('applicant_use_mobile_wallets'); + this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl(this.businessForm.value.applicant_use_pos_machines)) : this.businessForm.removeControl('applicant_use_pos_machines'); + + } // change area of sale options in manufacturing diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html index e66657954..cba7fb278 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -16,35 +16,60 @@
Product #{{l+1}}
-
- - - +
+ {{ pm.name }} + - + - - +
+
+ + + + {{tl.name}} + + + + + + + + Select + + {{comrelShip.name}} + + Not Applicable + +
- - + + - + + +   -   + + + +
+
+ {{ pm.name }} - - + +
@@ -55,17 +80,20 @@
-
- - +
+ +
+
+
+ + -
- -
-
+ +
@@ -76,8 +104,8 @@
Trading Product #{{l+1}}
-
- +
+ {{ pm.name }} @@ -85,24 +113,51 @@ - + - - +
+
+ + + + {{tl.name}} + + + + + + + + Select + + {{comrelShip.name}} + + Not Applicable + +
- - + + - + + +   -   + + + +
+
+ + {{ pm.name }} - - + +
@@ -113,16 +168,18 @@
-
- - - -
- -
-
+
+
+ +
+
+
+ + + +
@@ -136,32 +193,58 @@
Service Provided #{{l+1}}
- + {{ pm.name }} + + + +
+
- - - - - + + + + {{tl.name}} + + + + + + + + Select + + {{comrelShip.name}} + + Not Applicable + +
- - + + - + + +   -   + + + +
+
+ {{ pm.name }} - - + +
@@ -172,17 +255,20 @@
-
- - - -
- -
+
+
+ +
+
+
+ + + +
+
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts index e8fc68ee6..991802e81 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts @@ -41,7 +41,8 @@ export class ClientInfoComponent implements OnInit { public m_paymentModeType = []; private notifier: NotifierService; - + companyRelationShipList: any=[]; + titleList: any=[]; public m_manufacturingProducts = [ { @@ -75,7 +76,7 @@ export class ClientInfoComponent implements OnInit { notifier: NotifierService, private _formBuilder: FormBuilder, private pdTrigerService: PdTrigerService, - @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { + @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef) { this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.form_id = 2; this.company_id = this.pd_all_details.company_id; @@ -128,9 +129,9 @@ export class ClientInfoComponent implements OnInit { // ] // }; let datas = data.records; - this.m_manufacturingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 1 ){return data}}).map(data=> [...data.prodcuts]); - this.m_tradingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 3 ){return data}}).map(data=> [...data.prodcuts]); - this.m_suplierProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 4 ){return data}}).map(data=> [...data.prodcuts]); + this.m_manufacturingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 2 ){return data}}).map(data=> [...data.prodcuts]); + this.m_tradingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 4){return data}}).map(data=> [...data.prodcuts]); + this.m_suplierProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 5 ){return data}}).map(data=> [...data.prodcuts]); // alert(JSON.stringify(this.m_manufacturingProducts[0])); this.initFormLoadDetails(datas.type_of_activity); }else { @@ -147,6 +148,8 @@ export class ClientInfoComponent implements OnInit { // this.getM_FreqOfPurchase(); this.getM_PaymentModeType(); // this.getPdSupplierFormDetails(); + this.getMasterDetails('COMPANYRELATIONSHIPS',1); + this.getMasterDetails('TITLES',2); } retaildTradingForm: Boolean = false; @@ -171,7 +174,7 @@ export class ClientInfoComponent implements OnInit { // wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]), }); // Load form details for manufacturing - let arr = record.filter(data => data.type_of_activity_id == 1); + let arr = record.filter(data => data.type_of_activity_id == 2); if (arr.length > 0) { // let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) { // return dataForm.main_raw_materials[key]; @@ -183,7 +186,7 @@ export class ClientInfoComponent implements OnInit { } // Load form details for the wholeshale trading details - let arr1 = record.filter(data => data.type_of_activity_id == 3); + let arr1 = record.filter(data => data.type_of_activity_id == 4); if (arr1.length > 0) { // let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) { // return dataForm.trading_products[key]; @@ -195,7 +198,7 @@ export class ClientInfoComponent implements OnInit { } // Load form details for the service provider prduct details - let arr2 = record.filter(data => data.type_of_activity_id == 4); + let arr2 = record.filter(data => data.type_of_activity_id == 5); if (arr2.length > 0) { // let api_service_provider_products = Object.keys(dataForm.service_products).map(function (key) { // return dataForm.service_products[key]; @@ -205,7 +208,7 @@ export class ClientInfoComponent implements OnInit { this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null); } // Load form details for the retail trading details - let arr3 = record.filter(data => data.type_of_activity_id == 2); + let arr3 = record.filter(data => data.type_of_activity_id == 3); if (arr3.length > 0) { this.retaildTradingForm = true; } @@ -214,23 +217,24 @@ export class ClientInfoComponent implements OnInit { this._supplierQuesFrom = this._formBuilder.group({ pdid: [this.pdid], formid: ['2'], + company_id:[this.company_id], manufacturing_details: this._formBuilder.array([this.manufacturingFormCreation(record)]), trade_details: this._formBuilder.array([this.tradingFormCreation(record)]), service_provider_details: this._formBuilder.array([this.serviceProviderFormCreation(record)]), supplier_info_form_remark: [dataForm.supplier_info_form_remark || null] // wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id == 1); + let arr = record.filter(data => data.type_of_activity_id == 2); if (arr.length > 0) { this.initManufacturingProductsDetails(null); this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null); } - let arr1 = record.filter(data => data.type_of_activity_id == 3); + let arr1 = record.filter(data => data.type_of_activity_id == 4); if (arr1.length > 0) { this.initTradingProductsDetails(null); this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null); } - let arr2 = record.filter(data => data.type_of_activity_id == 4); + let arr2 = record.filter(data => data.type_of_activity_id == 5); if (arr2.length > 0) { let api_service_provider_products = Object.keys(dataForm.service_products).map(function (key) { return dataForm.service_products[key]; @@ -239,7 +243,7 @@ export class ClientInfoComponent implements OnInit { this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(null); } // Load form details for the retail trading details - let arr3 = record.filter(data => data.type_of_activity_id == 2); + let arr3 = record.filter(data => data.type_of_activity_id == 3); if (arr3.length > 0) { this.retaildTradingForm = true; } @@ -256,23 +260,23 @@ export class ClientInfoComponent implements OnInit { supplier_info_form_remark: [] // wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id == 1); + let arr = record.filter(data => data.type_of_activity_id == 2); if (arr.length > 0) { this.initManufacturingProductsDetails(null); this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null); } - let arr1 = record.filter(data => data.type_of_activity_id == 3); + let arr1 = record.filter(data => data.type_of_activity_id == 4); if (arr1.length > 0) { this.initTradingProductsDetails(null); this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null); } - let arr2 = record.filter(data => data.type_of_activity_id == 4); + let arr2 = record.filter(data => data.type_of_activity_id == 5); if (arr2.length > 0) { this.initServiceProviderProductsDetails(null); this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(null); } // Load form details for the retail trading details - let arr3 = record.filter(data => data.type_of_activity_id == 2); + let arr3 = record.filter(data => data.type_of_activity_id == 3); if (arr3.length > 0) { this.retaildTradingForm = true; } @@ -287,7 +291,7 @@ export class ClientInfoComponent implements OnInit { manufacturingForm: Boolean = false; manufacturingFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id == 1); + let arr = val.filter(data => data.type_of_activity_id == 2); if (arr.length > 0) { this.manufacturingForm = true; return this._formBuilder.group({ @@ -302,7 +306,7 @@ export class ClientInfoComponent implements OnInit { tradingForm: Boolean = false; tradingFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id == 3); + let arr = val.filter(data => data.type_of_activity_id == 4); if (arr.length > 0) { this.tradingForm = true; return this._formBuilder.group({ @@ -316,7 +320,7 @@ export class ClientInfoComponent implements OnInit { serviceProviderForm: Boolean = false; serviceProviderFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id == 4); + let arr = val.filter(data => data.type_of_activity_id == 5); if (arr.length > 0) { this.serviceProviderForm = true; return this._formBuilder.group({ @@ -345,18 +349,26 @@ export class ClientInfoComponent implements OnInit { manufacturing_product_name: [''], manufacturing_client_name: [''], manufacturing_contact_person_name: [''], - manufacturing_contact_person_mobile_number: [''], + manufacturing_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], manufacturing_payment_type: [''], manufacturing_credit_days: [''], + person_title_name:[''], + person_designation:[''], + person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], }) } else { return this._formBuilder.group({ manufacturing_product_name: [records.manufacturing_product_name || null], manufacturing_client_name: [records.manufacturing_client_name || null], manufacturing_contact_person_name: [records.manufacturing_contact_person_name || null], - manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null], + manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], manufacturing_payment_type: [records.manufacturing_payment_type || null], manufacturing_credit_days: [records.manufacturing_credit_days || null], + person_title_name:[records.person_title_name || null], + person_designation:[records.person_designation || null], + person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], }) } } @@ -378,20 +390,28 @@ export class ClientInfoComponent implements OnInit { trade_product_name: [''], trade_client_name: [''], trade_product_contact_person_name: [''], - trade_product_contact_person_mobile_number: [''], + trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], trade_product_payment_type: [''], trade_product_frequency_of_purchase: [''], trade_product_credit_days: [''], + person_title_name:[''], + person_designation:[''], + person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], }) } else { return this._formBuilder.group({ trade_product_name: [records.trade_product_name], trade_client_name: [records.trade_client_name], trade_product_contact_person_name: [records.trade_product_contact_person_name], - trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number], + trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], trade_product_payment_type: [records.trade_product_payment_type], trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase], trade_product_credit_days: [records.trade_product_credit_days], + person_title_name:[records.person_title_name || null], + person_designation:[records.person_designation || null], + person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], }) } } @@ -413,20 +433,28 @@ export class ClientInfoComponent implements OnInit { service_provider_product_name: [''], service_provider_client_name: [''], service_provider_product_contact_person_name: [''], - service_provider_product_contact_person_mobile_number: [''], + service_provider_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], service_provider_product_payment_type: [''], service_provider_product_frequency_of_purchase: [''], service_provider_product_credit_days: [''], + person_title_name:[''], + person_designation:[''], + person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], }) } else { return this._formBuilder.group({ service_provider_product_name: [records.service_provider_product_name], service_provider_client_name: [records.service_provider_client_name], service_provider_product_contact_person_name: [records.service_provider_product_contact_person_name], - service_provider_product_contact_person_mobile_number: [records.service_provider_product_contact_person_mobile_number], + service_provider_product_contact_person_mobile_number: [records.service_provider_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], service_provider_product_payment_type: [records.service_provider_product_payment_type], service_provider_product_frequency_of_purchase: [records.service_provider_product_frequency_of_purchase], service_provider_product_credit_days: [records.service_provider_product_credit_days], + person_title_name:[records.person_title_name || null], + person_designation:[records.person_designation || null], + person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], }) } } @@ -494,6 +522,25 @@ export class ClientInfoComponent implements OnInit { ) } + // get all master details + getMasterDetails(table:string,type:number){ + this.pdTrigerService.getAllMasterDatas(table).subscribe( + data => { + if (data.dataStatus) { + if(type==1){ + this.companyRelationShipList=data.records.filter(item => item.name != 'Others'); + + } + if(type==2){ + this.titleList=data.records.filter(val=>val.isactive==1); + + } + + + } + }, error => this.errorMessage = error); + } + // ================== @@ -502,6 +549,7 @@ export class ClientInfoComponent implements OnInit { this.submitted = true; // stop here if form is invalid if (this._supplierQuesFrom.invalid) { + this.notifier.notify('warning', 'Please Check All Mandatory Fields.!'); return; } else { var answerFormValues = this._supplierQuesFrom.value; @@ -522,7 +570,10 @@ export class ClientInfoComponent implements OnInit { dataresult => { if (dataresult.status == 200) { // console.log(dataresult); - this.notifier.notify('success', 'Record Saved Successfully.!'); + this.notifier.notify('success', 'Saved Successfully.!'); + setTimeout(() =>{ + this.dialogRef.close(); + },3000); // this.dialogRef.close(); // alert("sample alert for Saving"); } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index 14aaa7e9b..6fec2b84d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -16,30 +16,59 @@
Raw Material #{{l+1}}
-
- +
+ - + - - - +
-
- - - - - - {{ pm.name }} +
+ + + + {{tl.name}} + + + + + + + + + Select + + {{comrelShip.name}} + + Not Applicable - - - -
+
+
+ + + + + + +   -   + + + +
+
+ + + {{ pm.name }} + + + + + +
+
@@ -48,16 +77,19 @@
-
- - - -
- +
+
+ +
+
+ + +
+
@@ -69,28 +101,55 @@
Trading Product #{{l+1}}
-
- +
+ - + - +
+
+ + + + {{tl.name}} + + + + + + + Select + + {{comrelShip.name}} + + Not Applicable + +
-
- - +
+ + + - + + +   -   + + + +
+
+ {{ pm.name }} - - + +
@@ -101,16 +160,19 @@
-
- - - -
- +
+
+ +
+
+ + +
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts index 62520e33b..3a056c536 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts @@ -43,16 +43,18 @@ export class SupplierInfoComponent implements OnInit { public m_paymentModeType = []; private notifier: NotifierService; - + titleList: any=[]; + companyRelationShipList: any=[]; constructor( notifier: NotifierService, private _formBuilder: FormBuilder, private pdTrigerService: PdTrigerService, - @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { + @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef) { this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.form_id = 1; this.company_id = this.pd_all_details.company_id this.notifier = notifier; + } public viewerOptions: any = { navbar: false, @@ -112,6 +114,8 @@ export class SupplierInfoComponent implements OnInit { // this.getM_FreqOfPurchase(); this.getM_PaymentModeType(); // this.getPdSupplierFormDetails(); + this.getMasterDetails('COMPANYRELATIONSHIPS',1); + this.getMasterDetails('TITLES',2); } @@ -136,7 +140,7 @@ export class SupplierInfoComponent implements OnInit { supplier_info_form_remark: [dataForm.supplier_info_form_remark || null] // wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id == 1); + let arr = record.filter(data => data.type_of_activity_id == 2); if(arr.length > 0) { // let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) { // return dataForm.main_raw_materials[key]; @@ -146,7 +150,7 @@ export class SupplierInfoComponent implements OnInit { this.initManufacturingProductsDetails(api_main_raw_materials); this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null); } - let arr1 = record.filter(data => data.type_of_activity_id == 2 || 3); + let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id ==4); if(arr1.length > 0) { // let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) { // return dataForm.trading_products[key]; @@ -166,19 +170,19 @@ export class SupplierInfoComponent implements OnInit { supplier_info_form_remark: [dataForm.supplier_info_form_remark || null] // wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id == 1); + let arr = record.filter(data => data.type_of_activity_id == 2); if(arr.length > 0) { this.initManufacturingProductsDetails(null); this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null); } - let arr1 = record.filter(data => data.type_of_activity_id == 2 || 3); + let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4); if(arr1.length > 0) { this.initTradingProductsDetails(null); this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trading_products_total_payments_percent_on_credit || null); } this.noRecordsFound = true; } - let arr2 = record.filter(data => data.type_of_activity_id == 4); + let arr2 = record.filter(data => data.type_of_activity_id == 5); if(arr2.length > 0) { this.serviceProviderForm = true; } @@ -186,22 +190,23 @@ export class SupplierInfoComponent implements OnInit { this._supplierQuesFrom = this._formBuilder.group({ pdid: [this.pdid], formid: ['1'], + company_id: [this.company_id], manufacturing_details: this._formBuilder.array([this.manufacturingFormCreation(record)]), trade_details: this._formBuilder.array([this.tradingFormCreation(record)]), supplier_info_form_remark: [] // wholesale_trade_details: this._formBuilder.array([this.tradingFormCreation(record)]), }); - let arr = record.filter(data => data.type_of_activity_id == 1); + let arr = record.filter(data => data.type_of_activity_id == 2); if(arr.length > 0) { this.initManufacturingProductsDetails(null); this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null); } - let arr1 = record.filter(data => data.type_of_activity_id == 2 || 3); + let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id== 4); if(arr1.length > 0) { this.initTradingProductsDetails(null); this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null); } - let arr2 = record.filter(data => data.type_of_activity_id == 4); + let arr2 = record.filter(data => data.type_of_activity_id == 5); if(arr2.length > 0) { this.serviceProviderForm = true; } @@ -216,7 +221,7 @@ export class SupplierInfoComponent implements OnInit { manufacturingForm: Boolean = false; manufacturingFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id == 1); + let arr = val.filter(data => data.type_of_activity_id == 2); if (arr.length > 0) { this.manufacturingForm = true; return this._formBuilder.group({ @@ -231,7 +236,7 @@ export class SupplierInfoComponent implements OnInit { tradingForm: Boolean = false; tradingFormCreation(val) { - let arr = val.filter(data => data.type_of_activity_id == 2 || 3); + let arr = val.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4); if (arr.length > 0) { this.tradingForm = true; return this._formBuilder.group({ @@ -259,21 +264,30 @@ export class SupplierInfoComponent implements OnInit { return this._formBuilder.group({ manufacturing_raw_material_name: [''], manufacturing_supplier_name: [''], + person_title_name:[''], + person_designation:[''], manufacturing_contact_person_name: [''], - manufacturing_contact_person_mobile_number: [''], + manufacturing_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], manufacturing_payment_type: [''], manufacturing_credit_days: [''], manufacturing_frequency_of_purchase: [''], + person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], + }) } else { return this._formBuilder.group({ manufacturing_raw_material_name: [records.manufacturing_raw_material_name || null], manufacturing_supplier_name: [records.manufacturing_supplier_name || null], + person_title_name:[records.person_title_name || null], + person_designation:[records.person_title_name || null], manufacturing_contact_person_name: [records.manufacturing_contact_person_name || null], - manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null], + manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], manufacturing_payment_type: [records.manufacturing_payment_type || null], manufacturing_credit_days: [records.manufacturing_credit_days || null], manufacturing_frequency_of_purchase: [records.manufacturing_frequency_of_purchase || null], + person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], }) } } @@ -294,8 +308,12 @@ export class SupplierInfoComponent implements OnInit { return this._formBuilder.group({ trade_product_name: [''], trade_supplier_name: [''], + person_title_name:[''], + person_designation:[], trade_product_contact_person_name: [''], - trade_product_contact_person_mobile_number: [''], + trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], + person_stdcode:[null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:[null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], trade_product_payment_type: [''], trade_product_frequency_of_purchase: [''], trade_product_credit_days: [''], @@ -303,9 +321,13 @@ export class SupplierInfoComponent implements OnInit { } else { return this._formBuilder.group({ trade_product_name: [records.trade_product_name], + person_title_name:[records.person_title_name], + person_designation:[records.person_designation], trade_supplier_name: [records.trade_supplier_name], trade_product_contact_person_name: [records.trade_product_contact_person_name], - trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number], + trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number, Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], + person_stdcode:[records.person_stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], + person_landline:[records.person_landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], trade_product_payment_type: [records.trade_product_payment_type], trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase], trade_product_credit_days: [records.trade_product_credit_days], @@ -337,6 +359,25 @@ export class SupplierInfoComponent implements OnInit { control.removeAt(inx); } + // get all master details + getMasterDetails(table:string,type:number){ + this.pdTrigerService.getAllMasterDatas(table).subscribe( + data => { + if (data.dataStatus) { + if(type==1){ + this.companyRelationShipList=data.records.filter(item => item.name != 'Others'); + + } + if(type==2){ + this.titleList=data.records.filter(val=>val.isactive==1); + + } + + + } + }, error => this.errorMessage = error); + } + // ================== //getM_FreqOfPurchase() { @@ -371,21 +412,25 @@ export class SupplierInfoComponent implements OnInit { this.submitted = true; // stop here if form is invalid if (this._supplierQuesFrom.invalid) { + this.notifier.notify('warning', 'Please Check All Mandatory Fields.!'); + return; } else { var answerFormValues = this._supplierQuesFrom.value; //To Remove The "Null" With Key also Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]); - console.log(JSON.stringify(answerFormValues)); //Add BRANCH data with help Service File this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe( dataresult => { if (dataresult.status == 200) { // console.log(dataresult); - this.notifier.notify('success', 'Record Saved Successfully.!'); + this.notifier.notify('success', 'Saved Successfully.!'); // this.dialogRef.close(); // alert("sample alert for Saving"); + setTimeout(() =>{ + this.dialogRef.close(); + },3000); } else { this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index 01bd42905..b84c413de 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -92,6 +92,7 @@ import { SharedModule } from "app/shared/shared.module"; import { BusinessInfoGroupComponent } from './list-pd/start-pd/forms/business-info-group/business-info-group.component'; import { SearchRelationPipe } from './../pd-pipes/search-relation.pipe'; import { BusinessAssetsInfoComponent } from './list-pd/start-pd/forms/business-assets-info/business-assets-info.component'; +import { BusinessBankingDetailsComponent } from './list-pd/start-pd/forms/business-banking-details/business-banking-details.component'; /** * Custom angular notifier options @@ -269,7 +270,7 @@ const pdCustomNotifierOptions: NotifierOptions = { // AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule, // OwlNativeDateTimeModule, // ], - declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, BusinessAssetsInfoComponent], + declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent], // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], // providers: [PdTrigerService, GetGeometricLocationService], @@ -313,7 +314,7 @@ const pdCustomNotifierOptions: NotifierOptions = { {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent, - ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent], + ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent], }) export class ManagePdModule { diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index 9b6851706..96bea43f3 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -255,6 +255,13 @@ export class PdTrigerService { catchError(this.handleError('operation', [])) ) } + // common Pd form details get for the Pd Process + getPDFormDetailsWithCompanyID(pdID, formID,companyID): Observable { + return this._http.post(this.apiUrl + "getPDFormDetails", { "pd_id": pdID, "pd_form_id": formID,"company_id": companyID}) + .pipe( + catchError(this.handleError('operation', [])) + ) + } // save Pd form details savePDFormDetailsWithID(saveData: any): Observable {