From 2c91799dd6535c2f045db51bba93f21d362133fb Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 12 Dec 2018 20:36:32 +0530 Subject: [PATCH 1/3] loan details Changes :ps --- .../loan-details/loan-details.component.html | 46 +++--- .../loan-details/loan-details.component.ts | 146 ++++++++++++++++-- 2 files changed, 150 insertions(+), 42 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index 7d9d47cbd..66eb0c29f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -54,7 +54,7 @@ + formControlName="is_topup" required> Yes No @@ -73,12 +73,13 @@ {{"₹"}} {{topUpAmtInWords}} Only - + + {{"₹"}} {{ownContributionInWords}} Only - + {{ sour.name }} @@ -97,17 +98,14 @@ - - -

Mortgage -

- - + +

Mortgage

- + {{ typeprop.property_name }} + -
- - + + + {{owner.applicant_name}} - Others + Others (Please Specify) - + + + + + - - - - {{ status.name }} {{status.id}} - - + + {{ status.name }} {{status.id}} + + {{"₹"}} {{valAsPerAgmtInWords}} Only --> - - - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts index a0776c18b..1b5a1cf33 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -31,15 +31,20 @@ import {ActivatedRoute, Router} from '@angular/router'; export class LoanDetailsComponent implements OnInit { public loanDetailsForm: FormGroup; private notifier: NotifierService; + pdid: number; form_id: number; exist_loan_amt: any; applicants: any; productAbbr: any; + subProductName: any; + isOtherPurpose: boolean = false; isSource: boolean = false; mortageCheck : boolean = true; + OtherOwnerFlag : boolean; + endUserList: any = []; ownerNames: any = []; m_endUseofLoad = []; @@ -55,6 +60,10 @@ export class LoanDetailsComponent implements OnInit { topUpAmtInWords: any; pageTitle: string ="Loan Details"; + mortageCardAccess: boolean; + mortageAccess: boolean = false; + propertyType : any; + constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, @@ -63,6 +72,7 @@ export class LoanDetailsComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { this.applicants = this.pd_all_details.pdapplicants_detials; this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr; + this.subProductName = this.pd_all_details.pdmaster_details.subproduct_name; this.exist_loan_amt = this.pd_all_details.pdmaster_details.loan_amount != '' ? this.pd_all_details.pdmaster_details.loan_amount :''; this.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt); this.form_id = 10; @@ -99,9 +109,15 @@ export class LoanDetailsComponent implements OnInit { let ownername: any = []; owner.forEach(val => { ownername.push(val.owner_name); + if(val.owner_name == 'Others'){ + this.OtherOwnerFlag = true; + } + else{ + this.OtherOwnerFlag = false; + } }); - console.log('enduse', enduse); - console.log('ownername', ownername); + // console.log('enduse', enduse); + // console.log('ownername', ownername); this.loanDetailsForm.controls['loan_amount'].setValue(value.records.loan_amount); if(value.records.loan_amount){ this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); } @@ -126,18 +142,28 @@ export class LoanDetailsComponent implements OnInit { if (value.records.other_bt_lender) { this.loanDetailsForm.controls['other_bt_lender'].setValue(value.records.other_bt_lender); } - - this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution); - if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); } - - this.loanDetailsForm.controls['source'].setValue(value.records.source); + if(value.records.is_transfer != 'yes'){ + this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution); + if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); } + + this.loanDetailsForm.controls['source'].setValue(value.records.source); + } + if (value.records.lender_name_type) { this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type); } + this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level); this.loanDetailsForm.controls['property_type'].setValue(value.records.property_type); + this.propertyType = value.records.property_type; + //console.log(value.records.property_type); + this.mortage_type(value.records.property_type); + //console.log(this.propertyType); + this.loanDetailsForm.controls['property_type_others'].setValue(value.records.property_type_others); this.loanDetailsForm.controls['owner_name'].setValue(ownername); + this.loanDetailsForm.controls['other_owners_name'].setValue(value.records.other_owners_name); this.loanDetailsForm.controls['construction_status'].setValue(value.records.construction_status); + if(value.records.construction_status == 4 ){ this.loanDetailsForm.controls['percentage_of_construction'].setValue(value.records.percentage_of_construction); } @@ -150,6 +176,12 @@ export class LoanDetailsComponent implements OnInit { this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks); } }) + + if(this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL'){ + this.mortageCardAccess = false; + }else{ + this.mortageCardAccess = true; + } } // ============= @@ -182,9 +214,42 @@ getM_sourceofamount() { // this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe( this._pd.getAllMasterDatas('MORTAGEPROPERTIES').subscribe( data => { - // console.log('sadfdfads',this.productAbbr); - this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1); - this.m_mortageTypeProperty = data.records.filter(data => data.group_name == this.productAbbr); + + // this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1); + // this.m_mortageTypeProperty = data.records.filter(data => data.group_name == this.productAbbr); + if(data.dataStatus==true){ + let that = this; + this.m_mortageTypeProperty = data.records.filter( + function(data){ + if(that.productAbbr != "LAP"){ + if(data.group_name == that.productAbbr && data.isactive==1){ + console.log('if data'); + return data; + } + } + else if(that.productAbbr == "LAP"){ + if(data.sub_group_name == that.subProductName && data.isactive==1){ + console.log('else data'); + return data; + } + } + // if(data.isactive==1 && data.group_name != "LAP"){ + // if(data.group_name == that.productAbbr){ + // return data;} + // }else if(data.group_name == "LAP" && data.sub_group_name == that.subProductName){ + // return data; + // }else{ + // return ; + // } + }); + + // console.log(this.m_mortageTypeProperty); + // console.log(this.propertyType); + // this.mortage_type(this.propertyType); + // if(this.propertyType != ''){ + // this.mortage_type(this.propertyType); + // } + } }, error => { // this.notifier.notify('warning', 'No Category Records Found.!'); @@ -227,12 +292,14 @@ getM_sourceofamount() { topup_amount: [''], lender: [''], other_bt_lender : [''], - own_contribution: ['', Validators.compose([Validators.required])], - source: ['', Validators.compose([Validators.required])], + own_contribution: [''], + source: [''], lender_name_type: [''], emi_level: ['', Validators.compose([Validators.required])], property_type: ['', Validators.compose([Validators.required])], + property_type_others:[''], owner_name: ['', Validators.compose([Validators.required])], + other_owners_name :[''], construction_status: ['', Validators.compose([Validators.required])], percentage_of_construction : [''], emv_per_customer: ['', Validators.compose([Validators.required])], @@ -250,6 +317,18 @@ getM_sourceofamount() { }); } ownerNameChange(event) { + let EventValue; + + event.value.forEach(option => { + EventValue = option; + if(EventValue == 'Others'){ + this.OtherOwnerFlag = true; + } + else{ + this.OtherOwnerFlag = false; + } + }); + // this.ownerNames = []; // event.value.forEach(option => { // this.ownerNames.push({owner_name: option}); @@ -282,6 +361,13 @@ getM_sourceofamount() { if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') { records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value; } + else if(this.loanDetailsForm.controls['is_transfer'].value == 'no') { + records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value; + records.source = this.loanDetailsForm.controls['source'].value; + if (this.loanDetailsForm.controls['source'].value == 'other') { + records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value; + } + } if (this.loanDetailsForm.controls['is_topup'].value == 'yes') { records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value; } @@ -292,13 +378,9 @@ getM_sourceofamount() { records.other_bt_lender = this.loanDetailsForm.controls['other_bt_lender'].value; } - records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value; - records.source = this.loanDetailsForm.controls['source'].value; - if (this.loanDetailsForm.controls['source'].value == 'other') { - records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value; - } records.emi_level = this.loanDetailsForm.controls['emi_level'].value; records.property_type = this.loanDetailsForm.controls['property_type'].value; + records.property_type_others = this.loanDetailsForm.controls['property_type_others'].value; // records.owner_name_group = this.ownerNames; // console.log(this.loanDetailsForm.controls['owner_name'].value); let dataOwner_name = []; @@ -306,6 +388,7 @@ getM_sourceofamount() { dataOwner_name.push({owner_name: element}) }); records.owner_name_group = dataOwner_name; + records.other_owners_name = this.loanDetailsForm.controls['other_owners_name'].value; records.construction_status = this.loanDetailsForm.controls['construction_status'].value; records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value; records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value; @@ -337,10 +420,21 @@ getM_sourceofamount() { this.loanDetailsForm.controls['is_topup'].clearValidators(); this.loanDetailsForm.controls['is_topup'].updateValueAndValidity(); // console.log('no',event.value); + this.loanDetailsForm.controls['source'].setValidators([Validators.required]); + this.loanDetailsForm.controls['source'].updateValueAndValidity(); + + this.loanDetailsForm.controls['own_contribution'].setValidators([Validators.required]); + this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity(); } else if(event.value == 'yes'){ this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]); this.loanDetailsForm.controls['is_topup'].updateValueAndValidity(); + + this.loanDetailsForm.controls['source'].clearValidators(); + this.loanDetailsForm.controls['source'].updateValueAndValidity(); + + this.loanDetailsForm.controls['own_contribution'].clearValidators(); + this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity(); // console.log('yes',event.value); } @@ -379,4 +473,22 @@ getM_sourceofamount() { } } + /** + * mortage_type + */ + mortage_type(mortage_value) + { + //console.log(mortage_value); + //let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id==mortage_value)[0]; + let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id == mortage_value)[0]; + // console.log(mortagetypes); + if(mortagetypes.property_name=='Others (Please Specify)'){ + this.mortageAccess = true; + }else{ + this.mortageAccess = false; + } + + + } + } From 70f6310d1ef3c3669c3e831678ccb3a78ef1ac4a Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 12 Dec 2018 20:45:16 +0530 Subject: [PATCH 2/3] Address and Financial : ps --- .../forms/address/address.component.html | 68 ++++++- .../forms/address/address.component.ts | 137 ++++++++++++- .../financial-info.component.html | 48 ++++- .../financial-info.component.ts | 185 +++++++++++++++--- 4 files changed, 394 insertions(+), 44 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index edf72fb72..32628e73b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -51,7 +51,7 @@ formControlName="locality_others">
- + {{data.description}} @@ -59,7 +59,7 @@ - + {{data.rating}} @@ -86,11 +86,15 @@ - + - + + + + + Yes @@ -98,18 +102,64 @@ - - + + + + {{m_addressType.address_type}} - - + + - + +
+ + + {{i+1}} . {{PremisesLabel[i]}} + + + + + + + + + + {{CL.name}} + + + + + + + + + {{ownerShip.name}} + + + + + + + + + + + + + + + +
+
- + + - + + - + + + Net Profit + Net Loss + + + + + + - + + + + + + + + + + - + + - + --> +
+ + +
+
+
+ + -- + + {{ pd.doc_name }} ( Current Version ) + + +
+
+
+
+ + +
+
+ + +
+
-
-
- -
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 f9044faef..f773a14ba 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 @@ -1,14 +1,19 @@ import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser'; -import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy} from '@angular/core'; +import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject} from '@angular/core'; import {FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl} from '@angular/forms'; import {ActivatedRoute, Router} from '@angular/router'; import {NotifierService} from 'angular-notifier'; import {ListPdComponent} from './../list-pd.component'; import {PdTrigerService} from '../../../pd-service/pd-triger.service'; -import { MatDialog } from "@angular/material"; +import { MatDialog, + MatDialogRef, + MAT_DIALOG_DATA } from "@angular/material"; import { ModelEditPdReportComponent} from './model-edit-pd-report/model-edit-pd-report.component'; +/**sweet alert */ +// import Swal from 'sweetalert2'; + @Component({ selector: 'app-pd-report', templateUrl: './pd-report.component.html', @@ -21,10 +26,12 @@ export class PdReportComponent implements OnInit { // 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 generateBtn: Boolean = false; + public reGenerateBtn: Boolean = false; + public pdReportVersionList = []; // public src; pdReportRecords:any; - + latestPDDetails: any; private notifier: NotifierService; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, @@ -39,13 +46,61 @@ export class PdReportComponent implements OnInit { // 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"); - } ngOnInit() { this.listPDComponent.showListView(false); this.getPdReportDetails(); - this.getPdReportFinalTemplateDetails(); + this.getPdReportVersionList(); + } + + reGeneratePFReport(){ + let data = { + "pd_id": this.startPD, + "regenerate":"1" + }; + this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data=>{ + if(data.dataStatus){ + this.notifier.notify('success', 'Your Changes Updated.!'); + this.getPdReportVersionList(); + } else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + } + }, err => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }) + } + generateNewPDReport() { + let data = { + "pd_id": this.startPD + }; + this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data=>{ + if(data.dataStatus){ + this.notifier.notify('success', 'Your Changes Updated.!'); + this.getPdReportVersionList(); + } else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + } + }, err => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }) + } + + getPdReportVersionList(){ + this.pdTrigerService.getPdDocVersionList(this.startPD).subscribe(data => { + if(data.status == 200 && data.dataStatus){ + this.pdReportVersionList = [...data.records].reverse(); + let datas = this.pdReportVersionList.filter((a)=>{return a.is_latest == 1;}) + this.latestPDDetails = datas[0]; + // alert(JSON.stringify(this.latestPDDetails)); + this.reGenerateBtn = true; + } else { + // this.reGenerateBtn = true; + this.generateBtn = true; + } + }, err=> { + + }) } getPdReportDetails() { @@ -60,18 +115,6 @@ export class PdReportComponent implements OnInit { }) } - getPdReportFinalTemplateDetails(){ - this.pdTrigerService.getPDReportFinalDocument(this.startPD).subscribe(data => { - if (data.status == 200) { - // this.pdReportRecords = data.records.question_answers; - this.src = data.records.pd_report_uri; - // alert(this.src); - // this.pdReportRecords = data.records.qu; - } - }, err=> { - - }) - } // load pd view component @@ -82,232 +125,122 @@ export class PdReportComponent implements OnInit { // add questions popup model call addNewQuestion() { const dialogRef = this.dialog.open(ModelEditPdReportComponent, { - data: { startId : this.startPD}, + data: { startId : this.startPD, version_id: this.latestPDDetails.doc_name}, disableClose: true }); dialogRef.afterClosed() .subscribe(dataresult => { - this.getPdReportFinalTemplateDetails(); + // this.getPdReportFinalTemplateDetails(); // this.getQuestionsMasters(); // this.getBranch(); // this.isPopupOpened = false; }); } + changeVersion(pd : any): void { + this.latestPDDetails = pd; + } + + changeDocumentEdit() : void{ + + + const dialogRef = this.dialog.open(DialogChangeCurrentVenrsion, { + disableClose: true + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + if(dataresult) { + let data = { + "pd_id": this.startPD, + "doc_name": this.latestPDDetails.doc_name + }; + this.pdTrigerService.swapOlderPDReportToLatest(data).subscribe(data => { + if (data.status == 200) { + this.notifier.notify('success', 'Your Changes Updated.!'); + this.getPdReportVersionList(); + } else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + } + }, err=> { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }) + } else { + } + }); + + + + + // Swal('User Created'); + // swal({ + // title: 'Error!', + // text: 'Do you want to continue', + // type: 'error', + // confirmButtonText: 'Cool' + // }); + + // Swal({ + // title: 'Are you sure?', + // type: 'warning', + // showCancelButton: true, + // confirmButtonColor: '#3085d6', + // cancelButtonColor: '#d33', + // confirmButtonText: SwalButtonText + // }).then((result) => { + // if (result.value) { + // // this._mastersService.editMasterDetails(ActiveDatas,'CITY') + // // .subscribe(dataresult=>{ + // // if (dataresult.dataStatus == true){ + // // Swal(this.SwalMessage,'success'); + // // this.getCity(); + // // } + // // else{ + // // Swal("Sorry Try Again !"); + // // } + // // }); + // } + // else{ + // // this.getCity(); + // }s + // }) + } } - // let Records = { - // "dataStatus": true, - // "status": 200, - // "records": { - // "pd_id": "1", - // "fk_lender_id": "7", - // "lender_full_name": "check", - // "lender_short_name": "check", - // "fk_entity_billing_id": "1", - // "billing_name": "ICICI- CHENNAI", - // "lender_applicant_id": "Le123", - // "pd_date_of_initiation": "06\/10\/2018", - // "fk_product_id": "8", - // "product_name": "Land Loan", - // "product_abbr": "LL", - // "fk_subproduct_id": "1", - // "subproduct_name": "Purchase (Resale) Loan. ", - // "subproduct_abbr": "HL PUR-RESALE", - // "fk_pd_type": "1", - // "pd_type_name": "Full PD ", - // "pd_status": "COMPLETED", - // "pd_status_name": null, - // "pd_specific_clarification": null, - // "createdon": "06\/10\/2018 05:43:58", - // "fk_createdby": "1", - // "updatedon": "16\/11\/2018 11:11:00", - // "fk_updatedby": "1", - // "createdby": "Krishna kumar", - // "updatedby": "Krishna kumar", - // "fk_pd_allocation_type": "1", - // "pd_allocation_type_name": "AUTO", - // "fk_pd_allocated_to": "128", - // "pd_allocated_to": "VinothKumar S", - // "executive_id": null, - // "executive_name": null, - // "central_pd_officer_id": null, - // "centralofficer": null, - // "fk_pd_template_id": "11", - // "template_name": "TMB", - // "fk_customer_segment": "2", - // "customer_segment_name": "Salary Cheque", - // "customer_segment_abbr": "SAL-CHQ", - // "pd_officier_final_judgement": null, - // "pd_agency_id": null, - // "agency_name": null, - // "loan_amount": "60000", - // "addressline1": "MGR Street,Vengaivasal Main Road", - // "addressline2": "Santhoshpuram", - // "addressline3": "chennai", - // "fk_city": "2", - // "city_name": "Chennai", - // "fk_state": "2", - // "state_name": "Tamil Nadu", - // "pincode": "600100", - // "pd_contact_person": "Ram", - // "pd_contact_mobileno": "32131233", - // "scheduled_on": "31\/12\/2018 12:59 PM", - // "completed_on": null, - // "remarks": null, - // "pd_applicant_details": [ - // { - // "pd_co_applicant_id": "1", - // "fk_pd_id": "1", - // "applicant_name": "Karthi Raj", - // "applicant_type": "1", - // "mobile_no": "4234234155", - // "email": "sivak@gmail.com", - // "addressline1": null, - // "addressline2": null, - // "addressline3": null, - // "fk_city": null, - // "fk_state": null, - // "pincode": null, - // "relation": "brother", - // "relation_name": null, - // "landline": null - // }, - // { - // "pd_co_applicant_id": "2", - // "fk_pd_id": "1", - // "applicant_name": "ramesh", - // "applicant_type": "0", - // "mobile_no": "3123123213", - // "email": "", - // "addressline1": null, - // "addressline2": null, - // "addressline3": null, - // "fk_city": null, - // "fk_state": null, - // "pincode": null, - // "relation": "brother", - // "relation_name": null, - // "landline": null - // } - // ], - // "question_answers": { - // "form_details": [ - // { - // "Name": "Supplied Details", - // "Details": [ - // { - // "question": "What are the main raw materials?(MEG Only)", - // "answer": "check checkcheck" - // }, - // { - // "question": "Supplier Name", - // "answer": "Resico" - // }, - // { - // "question": "Contact Person Name", - // "answer": "Karthick" - // }, - // { - // "question": "Contact Mobile Number", - // "answer": "9874115221" - // }, - // { - // "question": "Payment Mode", - // "answer": "Immediate Or Advanced Payment" - // }, - // { - // "question": "% of immediate \/ Advance Payment Purchase to Total Purchase?", - // "answer": "212" - // }, - // { - // "question": "Credit Period", - // "answer": "" - // }, - // { - // "question": "Frequency of Purchase", - // "answer": "Monthly" - // }, - // { - // "question": "Others Details", - // "answer": "" - // } - // ]}, - // { - // "Name": "Client Details", - // "Details": [ - // { - // "question": "Client Name", - // "answer": "Venba" - // }, - // { - // "question": "Contact Person Name", - // "answer": "test" - // }, - // { - // "question": "Contact Mobile Number", - // "answer": "9685471122" - // }, - // { - // "question": "Payment Mode", - // "answer": "Combination of Both" - // }, - // { - // "question": "% of immediate \/ Advance Payment Purchase to Total Purchase?", - // "answer": "12" - // }, - // { - // "question": "Credit Period", - // "answer": "10" - // }, - // { - // "question": "Frequency of Purchase", - // "answer": "Weekly" - // }, - // { - // "question": "Others Details", - // "answer": "" - // } - // ]}, - // { "Name": "Personal Details", - // "Details": [ - // { - // "question": "Name", - // "answer": "Karthi Raj" - // }, - // { - // "question": "Age", - // "answer": "50" - // }, - // { - // "question": "Entity", - // "answer": "Individual" - // }, - // { - // "question": "Name", - // "answer": "ramesh" - // }, - // { - // "question": "Age", - // "answer": "45" - // }, - // { - // "question": "Entity", - // "answer": "Individual" - // }, - // { - // "question": "Relationship With Main Applicant", - // "answer": "Brother" - // }, - // { - // "question": "Remarks", - // "answer": "good" - // } - // ]} - // ], - // "general_questions": [ - // ] - // } - // } - // } + +@Component({ + selector: 'dialog-overview-example-dialog', + styles: [` +.listHover: hover { + background: yellow; + }` + ], + template: ` +
+

Document is marked as final

+

Because you've marked the document as final, you can edit this document.

+
+ + +
+
+ ` +}) +export class DialogChangeCurrentVenrsion implements OnInit { + + public m_questions: any; + + public m_question_forms: any; + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data) { + } + + ngOnInit(): void { + } + + getConfirmation(confim : Boolean) { + this.dialogRef.close(confim); + } + +} 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 0543efd33..25ce4b54e 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 @@ -70,7 +70,7 @@ import { LenderRepresentativeComponent } from './list-pd/start-pd/forms/lender-r import { AssessedIncomeComponent } from './list-pd/start-pd/forms/assessed-income/assessed-income.component'; import { TelePdAllocationComponent } from './list-pd/tele-pd-allocation/tele-pd-allocation.component'; -import { PdReportComponent } from './list-pd/pd-report/pd-report.component'; +import { PdReportComponent, DialogChangeCurrentVenrsion } from './list-pd/pd-report/pd-report.component'; import {RentalInfoComponent} from "./list-pd/start-pd/forms/rental-info/rental-info.component"; import { AllocationViewMoreComponent } from './list-pd/allocation-view-more/allocation-view-more.component'; @@ -257,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, NeighbourHoodComponent], + 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], // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], // providers: [PdTrigerService, GetGeometricLocationService], @@ -295,7 +295,7 @@ const pdCustomNotifierOptions: NotifierOptions = { 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, NeighbourHoodComponent], + ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion], }) 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 059b89e22..f281ec28c 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 @@ -289,14 +289,15 @@ getPDFormDetailsWithID(pdID, formID ):Observable { ) } - getPDReportFinalDocument(pdId: number){ - return this._http.post(this.apiUrl+"generatePDReport ",{"records":{"pd_id":pdId}}) + getPDReportFinalDocument(pdId: any){ + pdId.fk_createdby = this._aws.getlocale(); + return this._http.post(this.apiUrl+"generatePDReport",{"records": pdId}) .pipe( catchError(this.handleError('operation', [])) ) } - getActualPDReportModelTemplate(pdId: number) { + getActualPDReportModelTemplate(pdId: any) { return this._http.post(this.apiUrl+"getLatestPDReportBlob ",{"records":{"pd_id":pdId}}) .pipe( catchError(this.handleError('operation', [])) @@ -310,6 +311,24 @@ getPDFormDetailsWithID(pdID, formID ):Observable { ) } + getPdDocVersionList(pdId: number){ + return this._http.post(this.apiUrl+"getListOfPDReportVersions",{"records":{"pd_id":pdId}}) + .pipe( + catchError(this.handleError('operation', [])) + ) + } + + swapOlderPDReportToLatest(pdId: any){ + pdId.fk_createdby = this._aws.getlocale(); + alert(JSON.stringify(pdId)); + return this._http.post(this.apiUrl+"swapOlderPDReportToLatest",{"records": pdId}) + .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 ']; diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/category-question-answer/dialog-category-question-list.html b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/category-question-answer/dialog-category-question-list.html index c156a07e0..53dce1ff6 100755 --- a/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/category-question-answer/dialog-category-question-list.html +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/category-question-answer/dialog-category-question-list.html @@ -3,7 +3,7 @@ - {{ forms.pd_form_name }} + {{ forms.pd_form_name }}