pd report generation changes : kdk
This commit is contained in:
parent
ea1a4e14c6
commit
0e0ba46d6b
@ -2,7 +2,7 @@
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!--<h3>Develop across all platforms</h3>-->
|
||||
<div style="margin: 12px;">
|
||||
<form role="form" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
<form role="form" *ngIf="showEditor" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
<div class="form-group has-feedback">
|
||||
<ckeditor formControlName="content" name="myckeditor" required [config]="ckeConfig" debounce="500" (change)="onChange($event)">
|
||||
</ckeditor>
|
||||
|
||||
@ -47,24 +47,14 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
// alert(JSON.stringify(this.data));
|
||||
// this.ngForm.controls['content'].setValue('<h1>Home<h1>');
|
||||
this.pdTrigerService.getActualPDReportModelTemplate(this.data.startId).subscribe(data => {
|
||||
if(data.dataStatus){
|
||||
this.pdTrigerService.getActualPDReportModelTemplate(this.data).subscribe(data => {
|
||||
if(data['dataStatus']){
|
||||
this.recordData = data.records[0];
|
||||
|
||||
this.ngForm = this._formBuilder.group({
|
||||
content: [this.recordData.pd_report_latest_version_blob, Validators.compose([Validators.required])],
|
||||
isactive:[this.recordData.isactive]
|
||||
})
|
||||
this.showEditor = true;
|
||||
} else {
|
||||
this.recordData = data.records;
|
||||
this.ngForm = this._formBuilder.group({
|
||||
report_template_id: [null],
|
||||
fk_template_id: [this.questionId],
|
||||
content: [null, Validators.compose([Validators.required])],
|
||||
isactive:[1]
|
||||
})
|
||||
this.showEditor = true;
|
||||
});
|
||||
this.showEditor = true;
|
||||
}
|
||||
},err => {
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<mat-card style="min-height:540px;">
|
||||
<mat-card-content>
|
||||
<mat-tab-group>
|
||||
<mat-tab label="PD Report">
|
||||
<mat-tab label="PD Data">
|
||||
<div>
|
||||
<div>
|
||||
<label>Billing Name : </label> {{pdReportRecords?.billing_name}}
|
||||
@ -42,18 +42,36 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-tab>
|
||||
<mat-tab label="PD Report With Template">
|
||||
<mat-tab label="PD Report">
|
||||
<div>
|
||||
<div style="text-align: right;" class="mb-1">
|
||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
||||
(click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
||||
<div style="text-align: left; margin: 12px;" class="mb-1">
|
||||
<button mat-raised-button color="primary" *ngIf="generateBtn" (click)="generateNewPDReport()">Generate Report</button>
|
||||
<button mat-raised-button color="accent" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()">Re-generate Report</button>
|
||||
</div>
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<div style="text-align: right;">
|
||||
<mat-select style="width: 50%;" placeholder="Select PD Version" >
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let pd of pdReportVersionList" (click)="changeVersion(pd)" >
|
||||
{{ pd.doc_name }} <span *ngIf="pd.is_latest == 1" [style.color]="'green'">( Current Version )</span>
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</div>
|
||||
<div *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<div style="text-align: right;" class="mb-1">
|
||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
||||
*ngIf="latestPDDetails.is_latest == 1" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
||||
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0" (click)="changeDocumentEdit()">Enable Editable</button>
|
||||
</div>
|
||||
<div>
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<pdf-viewer [src]="src" [original-size]="false">
|
||||
</pdf-viewer>
|
||||
</div>
|
||||
</div>
|
||||
</mat-tab>
|
||||
|
||||
@ -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: `
|
||||
<div style="width: 220px;">
|
||||
<h3 style="text-align: center">Document is marked as final</h3>
|
||||
<p style="text-align: center"> Because you've marked the document as final, you can edit this document.</p>
|
||||
<div style="text-align: center; margin: 12px;" class="mb-1">
|
||||
<button mat-raised-button color="primary" (click)="getConfirmation(false)">Cancel</button>
|
||||
<button mat-raised-button color="accent" (click)="getConfirmation(true)">ok</button>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class DialogChangeCurrentVenrsion implements OnInit {
|
||||
|
||||
public m_questions: any;
|
||||
|
||||
public m_question_forms: any;
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<DialogChangeCurrentVenrsion>,
|
||||
@Inject(MAT_DIALOG_DATA) public data) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
getConfirmation(confim : Boolean) {
|
||||
this.dialogRef.close(confim);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -289,14 +289,15 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
||||
)
|
||||
}
|
||||
|
||||
getPDReportFinalDocument(pdId: number){
|
||||
return this._http.post<any>(this.apiUrl+"generatePDReport ",{"records":{"pd_id":pdId}})
|
||||
getPDReportFinalDocument(pdId: any){
|
||||
pdId.fk_createdby = this._aws.getlocale();
|
||||
return this._http.post<any>(this.apiUrl+"generatePDReport",{"records": pdId})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
getActualPDReportModelTemplate(pdId: number) {
|
||||
getActualPDReportModelTemplate(pdId: any) {
|
||||
return this._http.post<any>(this.apiUrl+"getLatestPDReportBlob ",{"records":{"pd_id":pdId}})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -310,6 +311,24 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
||||
)
|
||||
}
|
||||
|
||||
getPdDocVersionList(pdId: number){
|
||||
return this._http.post<any>(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<any>(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 '];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<mat-card style="width: 580px; min-height: 120px; padding: 6px;">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Forms List *" (selectionChange)="selectedFormTypes($event)">
|
||||
<mat-option *ngFor="let forms of m_question_forms" [value]="forms.form_id">{{ forms.pd_form_name }}</mat-option>
|
||||
<mat-option *ngFor="let forms of m_question_forms" [value]="forms.pd_form_id">{{ forms.pd_form_name }}</mat-option>
|
||||
</mat-select>
|
||||
<!--<mat-error *ngIf="submitted && answ['controls'].fk_lender_id.hasError('required')" class="mat-text-warn">Lender Type Required.!</mat-error>-->
|
||||
</mat-form-field>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user