diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.ts index 032df923b..e0dfa50c1 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.ts @@ -82,19 +82,23 @@ export class ModelEditPdReportComponent implements OnInit { } myClick(): void { - // let template = this.ngForm.controls['mycontent'].value; - // let data = { - // template: template, - // template_id: this.questionId - // } + let template = this.ngForm.controls['content'].value; + // alert(template); + let data = { + content: template, + pd_id: this.data.startId + } + + // alert(JSON.stringify(data)); // var formValues = this.ngForm.value; // Object.keys(formValues).forEach((key) => (formValues[key] == null) && delete formValues[key]); - // this.templatesService.addPDReportModelTemplate(formValues).subscribe(data=>{ - // this.notifier.notify('success', 'Your Changes Updated.!'); - // }, err => { - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{ + this.notifier.notify('success', 'Your Changes Updated.!'); + this.dialogRef.close(); + }, err => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - // }) + }) } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html index af40f4bf2..ab93fd424 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html @@ -43,12 +43,18 @@ -
- +
+
+ +

- - +
+ + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts index b47b81f24..f9044faef 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts @@ -17,18 +17,27 @@ import { ModelEditPdReportComponent} from './model-edit-pd-report/model-edit-pd- export class PdReportComponent implements OnInit { Url : SafeUrl; startPD: any; - public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf'; - // public src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822'; + // public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf'; + // public src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b'; + public src; + public document; // public src; pdReportRecords:any; + private notifier: NotifierService; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent, private dialog: MatDialog, private sanitizer: DomSanitizer) { this.startPD = this.route.snapshot.params['pdid']; this.notifier = notifier; + // this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb'; + // this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b"); + // alert(JSON.stringify(this.src)); + // this.document = { name: 'Angular 2', + // description: 'An amazing Angular 2 pdf', + // url: { url: 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b', withCredentials: true } }; // this.Url = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822"); } @@ -55,7 +64,7 @@ export class PdReportComponent implements OnInit { this.pdTrigerService.getPDReportFinalDocument(this.startPD).subscribe(data => { if (data.status == 200) { // this.pdReportRecords = data.records.question_answers; - // this.src = data.records.pd_report_uri; + this.src = data.records.pd_report_uri; // alert(this.src); // this.pdReportRecords = data.records.qu; } @@ -78,6 +87,7 @@ export class PdReportComponent implements OnInit { }); dialogRef.afterClosed() .subscribe(dataresult => { + this.getPdReportFinalTemplateDetails(); // this.getQuestionsMasters(); // this.getBranch(); // this.isPopupOpened = false; 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 new file mode 100644 index 000000000..62e2d0d80 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html @@ -0,0 +1,120 @@ +
+ +

+
+
+
+ {{pageTitle}} +
+
+ + {{types.type_name}} + +
+
+ +
+
+ +
+

+ + + + + + + + + Yes + No + + + + + + + + + Yes + No + + + + + + + + + + + + + + + + Enter Valid Mobile Number. + + + + Enter Valid Landline Number. + + + + + + + + Select + + {{relationship.relation_with_business_name | titlecase}} + + + + + + +

Period of Relationship

+ + + + + + + + + + + + Select + + {{volume.name | titlecase}} + + + + +
+
+ +
+ +
+ + Remarks + + +
+
+ + +
+ +
+ + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.scss new file mode 100644 index 000000000..f18a47720 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.scss @@ -0,0 +1,20 @@ +.paragraph_change { + color: #e00201 !important; + } + mat-form-field { + margin: 0 2%; + } + #period_paragraph { + margin: 0 2%; + } + + .example-radio-group { + display: flex; + flex-direction: row; + flex-wrap: wrap; + } + + .example-radio-button { + margin: 0 4%; + color: #000 !important + } \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.spec.ts new file mode 100644 index 000000000..38e25f3ec --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NeighbourHoodComponent } from './neighbour-hood.component'; + +describe('NeighbourHoodComponent', () => { + let component: NeighbourHoodComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NeighbourHoodComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NeighbourHoodComponent); + 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/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 new file mode 100644 index 000000000..9919dd140 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.ts @@ -0,0 +1,270 @@ +import { Component, OnInit, Input, Output, Inject } from '@angular/core'; +import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; +import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from './../../../../../pd-service/pd-triger.service'; +import { parse } from 'url'; +@Component({ + selector: 'app-neighbour-hood', + templateUrl: './neighbour-hood.component.html', + styleUrls: ['./neighbour-hood.component.scss'] +}) +export class NeighbourHoodComponent implements OnInit { + pageTitle: string ="Neighbourhood / Reference Check"; + public _neighbourhoodForm: FormGroup; + pdid : string; + 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_neighbourhood_details: any= {'neighbourhood_name':'','do_know':'','how_long_do_know':'','is_applicant_owner':''}; + + busineesRelationshipList:any=[]; + volumeunitList:any=[]; + errorMessage:any; + constructor(notifier: NotifierService, private _pd: PdTrigerService ,private _fb: FormBuilder, @Inject(MAT_DIALOG_DATA) public data: any,) { + this.pdid = this.data.pdmaster_details.pd_id; + this.notifier = notifier; + this.form_id = 19; + } + + ngOnInit() { + this.initFormDetails(); + + // call neghbourhhod / reference check changes + this._neighbourhoodForm.controls['check_type'].valueChanges.subscribe(value => { + const referencecheckControl = this._neighbourhoodForm.controls['referencecheck_list']; + const neighbourhoodControl = this._neighbourhoodForm.controls['neighbourhood_list']; + if(value==0){ + referencecheckControl.controls = []; + referencecheckControl.setValue([]); + if(neighbourhoodControl.value.length==0){ + neighbourhoodControl.push(this.createNeighbourhood(this.default_neighbourhood_details)); + } + } + else { + neighbourhoodControl.controls = []; + neighbourhoodControl.setValue([]); + if(referencecheckControl.value.length==0){ + referencecheckControl.push(this.createReerenceCheck(this.default_reference_details)); + } + + } + }); + + } + + // init form details + initFormDetails() { + this._neighbourhoodForm = this._fb.group({ + pdid:this.pdid, + formid:this.form_id, + check_type:0, + neighbourhood_list: this._fb.array([]), + referencecheck_list: this._fb.array([]), + neighbour_reference_remark:'' + }); + // load form data + this.loadFormData(); + this.getMasterDetails('RELATIONWITHBUSINESS',1); + this.getMasterDetails('FREQUENCY',2); + + } + + // load form data + loadFormData(){ + let params: any = {}; + params.pd_id = this.pdid; + params.pd_form_id = '19'; + let referencecheckControl = this._neighbourhoodForm.controls['referencecheck_list']; + referencecheckControl.controls = []; + const neighbourhoodControl = this._neighbourhoodForm.controls['neighbourhood_list']; + neighbourhoodControl.controls=[]; + this._pd.retriveForm(params).subscribe(data => { + if(data.dataStatus) { + let exist_ref_details = data.records.referencecheck_list ? Object.keys(data.records.referencecheck_list).map((item)=>data.records.referencecheck_list[item]) : []; + let exist_neighbourhood_details = data.records.neighbourhood_list ? Object.keys(data.records.neighbourhood_list).map((item)=>data.records.neighbourhood_list[item]) : []; + if(exist_neighbourhood_details.length>0 && data.records.check_type==0){ + exist_neighbourhood_details.forEach(element => { + neighbourhoodControl.push(this.createNeighbourhood(element)); + }); + } + else if(exist_ref_details.length>0 && data.records.check_type==1){ + exist_ref_details.forEach(element => { + referencecheckControl.push(this.createReerenceCheck(element)); + }); + } + + this._neighbourhoodForm.controls['neighbour_reference_remark'].setValue(data.records.neighbour_reference_remark ? data.records.neighbour_reference_remark : ''); + this._neighbourhoodForm.controls['check_type'].setValue(data.records.check_type==1 ? 1 : data.records.check_type==0 ? 0 : ''); + } + + else { + neighbourhoodControl.push(this.createNeighbourhood(this.default_neighbourhood_details)); + + } + + }, error => this.errorMessage = error); + } + + // get all master details + getMasterDetails(table:string,type:number){ + this._pd.getAllMasterDatas(table).subscribe( + data => { + if (data.status == 200) { + if(type==1){ + this.busineesRelationshipList=data.records.filter(item => item.isactive == 1); + } + if(type==2){ + this.volumeunitList=data.records.filter(item => item.isactive == 1); + } + + } + }, error => this.errorMessage = error); + } + + + + + // create reference check form array + createReerenceCheck(elementValue:any){ + 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)])], + location:[elementValue.location,Validators.required], + relationship_with:[elementValue.relationship_with,Validators.required], + others: [elementValue.others], + year_relation_applicant:[elementValue.year_relation_applicant,Validators.required], + months_relation_applicant:[elementValue.months_relation_applicant,Validators.required], + business_volume_amount:[elementValue.business_volume_amount,Validators.required], + business_volume_unit:[elementValue.business_volume_unit, Validators.required], + }); + } + + // add more referencecheck details + + addReferencecheck(){ + const referenceControl = this._neighbourhoodForm.controls['referencecheck_list']; + referenceControl.push(this.createReerenceCheck(this.default_reference_details)); + } + + // remove referencecheck details + removeReferencecheck(renoveIndex) { + const remove_control = this._neighbourhoodForm.controls['referencecheck_list']; + remove_control.removeAt(renoveIndex) + } + + // create neighbourhood form array + createNeighbourhood(elementValue:any){ + return this._fb.group({ + neighbourhood_name: [elementValue.neighbourhood_name, Validators.required], + do_know: [elementValue.do_know,Validators.required], + how_long_do_know: [elementValue.how_long_do_know], + is_applicant_owner: [elementValue.is_applicant_owner], + }); + } + + // add more createNeighbourhood details + + addNeighbourhood(){ + const neighbourhoodControl = this._neighbourhoodForm.controls['neighbourhood_list']; + neighbourhoodControl.push(this.createNeighbourhood(this.default_neighbourhood_details)); + } + + // remove neighbour hood details + removeNeighbourhood(renoveIndex) { + const remove_control = this._neighbourhoodForm.controls['neighbourhood_list']; + remove_control.removeAt(renoveIndex) + } + + /** On Key Press Event For Mobile Number */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } + + //save heighbourhood forms + saveNeighbourhood(formData:any){ + let resultMessage:string=''; + if (this._neighbourhoodForm.invalid) { + this.validateAllFormFields(this._neighbourhoodForm); + return; + } + else{ + let saveRecords:any = {} + let referencecheck_list:any=[]; + let neighbourhood_list:any=[]; + if(formData.check_type==0){ + formData.neighbourhood_list.forEach((element,key) => { + neighbourhood_list.push({ + "neighbourhood_name":element.neighbourhood_name, + "do_know":element.do_know, + "how_long_do_know":element.how_long_do_know, + "is_applicant_owner":element.is_applicant_owner, + }) + }); + saveRecords.neighbourhood_list=neighbourhood_list; + resultMessage='Neihbourhood Updated.!' + } + else{ + // this for referencecheck_list for selected + formData.referencecheck_list.forEach((element,key) => { + referencecheck_list.push({ + "reference_name":element.reference_name, + "mobile":element.mobile, + "landline":element.landline, + "location":element.location, + "relationship_with":element.relationship_with, + "others":element.others, + "year_relation_applicant":element.year_relation_applicant, + "months_relation_applicant":element.months_relation_applicant, + "business_volume_amount":element.business_volume_amount, + "business_volume_unit":element.business_volume_unit, + }) + }); + saveRecords.referencecheck_list=referencecheck_list; + resultMessage='Reference Check Updated.!' + } + + saveRecords.check_type=formData.check_type; + saveRecords.pdid=formData.pdid; + saveRecords.formid=formData.formid; + saveRecords.neighbour_reference_remark=formData.neighbour_reference_remark; + this._pd.savePDFormDetailsWithID(saveRecords).subscribe( + dataresult => { + if (dataresult.status == 200) { + this.notifier.notify('success', resultMessage); + + } + else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + // this.errorMessage = "Some Thing Wents Wrong Try Again !"; + } + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }); + } + } + + // validate all form group and form array fields +validateAllFormFields(formGroup: any) { + 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); + } else if (control instanceof FormArray) { + this.validateAllFormFields(control); + } + }); +} + + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index ae390c0b5..f529d2abf 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -24,7 +24,7 @@ import {BusinessInfoComponent} from './forms/business-info/business-info.compone import {LenderRepresentativeComponent} from './forms/lender-representative/lender-representative.component'; import {LoanDetailsComponent} from './forms/loan-details/loan-details.component'; import {GeneralInfoComponent} from './forms/general-info/general-info.component'; - +import {NeighbourHoodComponent} from './forms/neighbour-hood/neighbour-hood.component'; @Component({ selector: 'app-start-pd', templateUrl: './start-pd.component.html', @@ -324,12 +324,6 @@ pdFullDetails:any=[]; this.pdFullDetails = data.records - // manually push genral forms for test should remove code move - // this.categoryFormButtons.unshift({ - // "form_id":18, - // "form_name": 'General Information', - // "isAnswered":false - // }) } else{ @@ -891,6 +885,19 @@ pdFullDetails:any=[]; this.loadTemplates(this.startPD); }); } + else if(this.selectedFormsCategory.form_id==19){ + const generaldialogRef = this.dialog.open(NeighbourHoodComponent, { + data: this.pdFullDetails, + position: { right: '0'}, + width:'80%', + disableClose: true + }); + generaldialogRef.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.loadTemplates(this.startPD); + }); + } } 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 cc4f52b56..0543efd33 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 @@ -78,6 +78,7 @@ import { PdRequirementComponent } from './list-pd/pd-requirement/pd-requirement. import { GeneralInfoComponent } from './list-pd/start-pd/forms/general-info/general-info.component'; import { ModelEditPdReportComponent } from './list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component'; import { OtherApplicantDetailsComponent } from './list-pd/start-pd/forms/other-applicant-details/other-applicant-details.component'; +import { NeighbourHoodComponent } from './list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component'; /** @@ -256,7 +257,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], + 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], // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], // providers: [PdTrigerService, GetGeometricLocationService], @@ -290,11 +291,11 @@ const pdCustomNotifierOptions: NotifierOptions = { OwlNativeDateTimeModule, ], // declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent], - exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent], + exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent], providers: [PdTrigerService, GetGeometricLocationService], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent, - ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent], + ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent], }) 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 de7093371..059b89e22 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 @@ -303,6 +303,13 @@ getPDFormDetailsWithID(pdID, formID ):Observable { ) } + updatePDReportDetails(records: any){ + return this._http.post(this.apiUrl+"saveNewVersionOfPDReport ",{"records": records}) + .pipe( + catchError(this.handleError('operation', [])) + ) + } + // inWords(num) { // let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];