pd report generation changes : kdk

This commit is contained in:
dineshkumarkannan 2018-12-13 09:52:25 +05:30
parent ea1a4e14c6
commit 0e0ba46d6b
7 changed files with 227 additions and 267 deletions

View File

@ -2,7 +2,7 @@
<mat-dialog-content class="mat-typography"> <mat-dialog-content class="mat-typography">
<!--<h3>Develop across all platforms</h3>--> <!--<h3>Develop across all platforms</h3>-->
<div style="margin: 12px;"> <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"> <div class="form-group has-feedback">
<ckeditor formControlName="content" name="myckeditor" required [config]="ckeConfig" debounce="500" (change)="onChange($event)"> <ckeditor formControlName="content" name="myckeditor" required [config]="ckeConfig" debounce="500" (change)="onChange($event)">
</ckeditor> </ckeditor>

View File

@ -47,23 +47,13 @@ export class ModelEditPdReportComponent implements OnInit {
ngOnInit() { ngOnInit() {
// alert(JSON.stringify(this.data)); // alert(JSON.stringify(this.data));
// this.ngForm.controls['content'].setValue('<h1>Home<h1>'); // this.ngForm.controls['content'].setValue('<h1>Home<h1>');
this.pdTrigerService.getActualPDReportModelTemplate(this.data.startId).subscribe(data => { this.pdTrigerService.getActualPDReportModelTemplate(this.data).subscribe(data => {
if(data.dataStatus){ if(data['dataStatus']){
this.recordData = data.records[0]; this.recordData = data.records[0];
this.ngForm = this._formBuilder.group({ this.ngForm = this._formBuilder.group({
content: [this.recordData.pd_report_latest_version_blob, Validators.compose([Validators.required])], content: [this.recordData.pd_report_latest_version_blob, Validators.compose([Validators.required])],
isactive:[this.recordData.isactive] 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 => { },err => {

View File

@ -7,7 +7,7 @@
<mat-card style="min-height:540px;"> <mat-card style="min-height:540px;">
<mat-card-content> <mat-card-content>
<mat-tab-group> <mat-tab-group>
<mat-tab label="PD Report"> <mat-tab label="PD Data">
<div> <div>
<div> <div>
<label>Billing Name : </label> {{pdReportRecords?.billing_name}} <label>Billing Name : </label> {{pdReportRecords?.billing_name}}
@ -42,20 +42,38 @@
</div> </div>
</div> </div>
</mat-tab> </mat-tab>
<mat-tab label="PD Report With Template"> <mat-tab label="PD Report">
<div> <div>
<div style="text-align: right;" class="mb-1"> <div style="text-align: left; margin: 12px;" class="mb-1">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above" <button mat-raised-button color="primary" *ngIf="generateBtn" (click)="generateNewPDReport()">Generate Report</button>
(click)="addNewQuestion()"><mat-icon>edit</mat-icon></button> <button mat-raised-button color="accent" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()">Re-generate Report</button>
</div> </div>
<hr> <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; <div style="margin: 12px;
background: #ddd; background: #ddd;
padding: 8px;"> padding: 8px;">
<pdf-viewer [src]="src" [original-size]="false"> <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> </pdf-viewer>
</div> </div>
</div> </div>
</div>
</div>
</div>
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
</mat-card-content> </mat-card-content>

View File

@ -1,14 +1,19 @@
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser'; 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 {FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl} from '@angular/forms';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {NotifierService} from 'angular-notifier'; import {NotifierService} from 'angular-notifier';
import {ListPdComponent} from './../list-pd.component'; import {ListPdComponent} from './../list-pd.component';
import {PdTrigerService} from '../../../pd-service/pd-triger.service'; 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'; import { ModelEditPdReportComponent} from './model-edit-pd-report/model-edit-pd-report.component';
/**sweet alert */
// import Swal from 'sweetalert2';
@Component({ @Component({
selector: 'app-pd-report', selector: 'app-pd-report',
templateUrl: './pd-report.component.html', 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 = '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 src;
public document; public document;
public generateBtn: Boolean = false;
public reGenerateBtn: Boolean = false;
public pdReportVersionList = [];
// public src; // public src;
pdReportRecords:any; pdReportRecords:any;
latestPDDetails: any;
private notifier: NotifierService; private notifier: NotifierService;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
@ -39,13 +46,61 @@ export class PdReportComponent implements OnInit {
// description: 'An amazing Angular 2 pdf', // 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 } }; // 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"); // 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() { ngOnInit() {
this.listPDComponent.showListView(false); this.listPDComponent.showListView(false);
this.getPdReportDetails(); 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() { 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 // load pd view component
@ -82,232 +125,122 @@ export class PdReportComponent implements OnInit {
// add questions popup model call // add questions popup model call
addNewQuestion() { addNewQuestion() {
const dialogRef = this.dialog.open(ModelEditPdReportComponent, { const dialogRef = this.dialog.open(ModelEditPdReportComponent, {
data: { startId : this.startPD}, data: { startId : this.startPD, version_id: this.latestPDDetails.doc_name},
disableClose: true disableClose: true
}); });
dialogRef.afterClosed() dialogRef.afterClosed()
.subscribe(dataresult => { .subscribe(dataresult => {
this.getPdReportFinalTemplateDetails(); // this.getPdReportFinalTemplateDetails();
// this.getQuestionsMasters(); // this.getQuestionsMasters();
// this.getBranch(); // this.getBranch();
// this.isPopupOpened = false; // 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, @Component({
// "status": 200, selector: 'dialog-overview-example-dialog',
// "records": { styles: [`
// "pd_id": "1", .listHover: hover {
// "fk_lender_id": "7", background: yellow;
// "lender_full_name": "check", }`
// "lender_short_name": "check", ],
// "fk_entity_billing_id": "1", template: `
// "billing_name": "ICICI- CHENNAI", <div style="width: 220px;">
// "lender_applicant_id": "Le123", <h3 style="text-align: center">Document is marked as final</h3>
// "pd_date_of_initiation": "06\/10\/2018", <p style="text-align: center"> Because you've marked the document as final, you can edit this document.</p>
// "fk_product_id": "8", <div style="text-align: center; margin: 12px;" class="mb-1">
// "product_name": "Land Loan", <button mat-raised-button color="primary" (click)="getConfirmation(false)">Cancel</button>
// "product_abbr": "LL", <button mat-raised-button color="accent" (click)="getConfirmation(true)">ok</button>
// "fk_subproduct_id": "1", </div>
// "subproduct_name": "Purchase (Resale) Loan. ", </div>
// "subproduct_abbr": "HL PUR-RESALE", `
// "fk_pd_type": "1", })
// "pd_type_name": "Full PD ", export class DialogChangeCurrentVenrsion implements OnInit {
// "pd_status": "COMPLETED",
// "pd_status_name": null, public m_questions: any;
// "pd_specific_clarification": null,
// "createdon": "06\/10\/2018 05:43:58", public m_question_forms: any;
// "fk_createdby": "1", constructor(
// "updatedon": "16\/11\/2018 11:11:00", public dialogRef: MatDialogRef<DialogChangeCurrentVenrsion>,
// "fk_updatedby": "1", @Inject(MAT_DIALOG_DATA) public data) {
// "createdby": "Krishna kumar", }
// "updatedby": "Krishna kumar",
// "fk_pd_allocation_type": "1", ngOnInit(): void {
// "pd_allocation_type_name": "AUTO", }
// "fk_pd_allocated_to": "128",
// "pd_allocated_to": "VinothKumar S", getConfirmation(confim : Boolean) {
// "executive_id": null, this.dialogRef.close(confim);
// "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": [
// ]
// }
// }
// }

View File

@ -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 { 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 { 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 {RentalInfoComponent} from "./list-pd/start-pd/forms/rental-info/rental-info.component";
import { AllocationViewMoreComponent } from './list-pd/allocation-view-more/allocation-view-more.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, // AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
// OwlNativeDateTimeModule, // 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], // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
// providers: [PdTrigerService, GetGeometricLocationService], // providers: [PdTrigerService, GetGeometricLocationService],
@ -295,7 +295,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
providers: [PdTrigerService, GetGeometricLocationService], providers: [PdTrigerService, GetGeometricLocationService],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent, 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 { export class ManagePdModule {

View File

@ -289,14 +289,15 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
) )
} }
getPDReportFinalDocument(pdId: number){ getPDReportFinalDocument(pdId: any){
return this._http.post<any>(this.apiUrl+"generatePDReport ",{"records":{"pd_id":pdId}}) pdId.fk_createdby = this._aws.getlocale();
return this._http.post<any>(this.apiUrl+"generatePDReport",{"records": pdId})
.pipe( .pipe(
catchError(this.handleError('operation', [])) catchError(this.handleError('operation', []))
) )
} }
getActualPDReportModelTemplate(pdId: number) { getActualPDReportModelTemplate(pdId: any) {
return this._http.post<any>(this.apiUrl+"getLatestPDReportBlob ",{"records":{"pd_id":pdId}}) return this._http.post<any>(this.apiUrl+"getLatestPDReportBlob ",{"records":{"pd_id":pdId}})
.pipe( .pipe(
catchError(this.handleError('operation', [])) 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) { // inWords(num) {
// let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen ']; // let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];

View File

@ -3,7 +3,7 @@
<mat-card style="width: 580px; min-height: 120px; padding: 6px;"> <mat-card style="width: 580px; min-height: 120px; padding: 6px;">
<mat-form-field> <mat-form-field>
<mat-select placeholder="Forms List *" (selectionChange)="selectedFormTypes($event)"> <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-select>
<!--<mat-error *ngIf="submitted && answ['controls'].fk_lender_id.hasError('required')" class="mat-text-warn">Lender Type Required.!</mat-error>--> <!--<mat-error *ngIf="submitted && answ['controls'].fk_lender_id.hasError('required')" class="mat-text-warn">Lender Type Required.!</mat-error>-->
</mat-form-field> </mat-form-field>