Fairoj: IMGC changes and PD Report issue resolved
This commit is contained in:
parent
4ad3210184
commit
82ad8dbfe7
@ -58,7 +58,11 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
||||||
<input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
<!-- <input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute"> -->
|
||||||
|
<mat-select placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
||||||
|
<mat-option>Select</mat-option>
|
||||||
|
<mat-option *ngFor="let insti of finInstitutionList" [value]="insti.entity_fin_institution_id">{{insti.institute_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
</mat-form-field><br/>
|
</mat-form-field><br/>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|
||||||
|
|||||||
@ -60,6 +60,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
@ViewChild(AdminLayoutComponent) adminLayout:AdminLayoutComponent;
|
@ViewChild(AdminLayoutComponent) adminLayout:AdminLayoutComponent;
|
||||||
loadControl: boolean;
|
loadControl: boolean;
|
||||||
|
finInstitutionList: any;
|
||||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
||||||
private titleCase : TitleCasePipe,private userService:UserService) {
|
private titleCase : TitleCasePipe,private userService:UserService) {
|
||||||
@ -77,23 +78,36 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this.ListPdComponent.showListView(false);
|
this.ListPdComponent.showListView(false);
|
||||||
this.getUserDetails();
|
this.getUserDetails();
|
||||||
|
|
||||||
this.getProductsList();
|
// this.getProductsList();
|
||||||
this.getCustomerSegmentList();
|
// this.getCustomerSegmentList();
|
||||||
this.getStateCityList();
|
this.getStateCityList();
|
||||||
this.getPDTypeList();
|
// this.getPDTypeList();
|
||||||
|
|
||||||
this.getRelationMaster();
|
this.getRelationMaster();
|
||||||
this.getTitleMaster();
|
this.getTitleMaster();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
getProCusType(){
|
||||||
|
console.log("u",this.userDetails)
|
||||||
|
this._pd.getEntityPreferences(this.userDetails.fk_entity_id).subscribe(Response=>{
|
||||||
|
if(Response['dataStatus']){
|
||||||
|
this.pdTypeList=Response['records'].pd_types
|
||||||
|
this.customerSegmentAllList=Response['records'].customer_segments
|
||||||
|
this.productAllList=Response['records'].products
|
||||||
|
this.finInstitutionList=Response['records'].financial_institutions
|
||||||
|
}
|
||||||
|
this.loadFormData();
|
||||||
|
})
|
||||||
|
}
|
||||||
getUserDetails(){
|
getUserDetails(){
|
||||||
this.userService.getroles().subscribe(res=>{
|
this.userService.getroles().subscribe(res=>{
|
||||||
if(res['dataStatus']){
|
if(res['dataStatus']){
|
||||||
this.userDetails=res['records'][0];
|
this.userDetails=res['records'][0];
|
||||||
}
|
}
|
||||||
// console.log(this.userDetails)
|
// console.log(this.userDetails)
|
||||||
this.loadFormData();
|
this.getProCusType()
|
||||||
this.sales_and_credit_person.credit_person=[{userid:this.userDetails.userid,user_name:this.userDetails.user_first_name+' '+this.userDetails.user_last_name}]
|
this.sales_and_credit_person.credit_person=[{userid:this.userDetails.userid,user_name:this.userDetails.user_first_name+' '+this.userDetails.user_last_name}]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,12 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
<mat-form-field style="width: 28%" *ngIf="sales_and_credit_enable">
|
||||||
<input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
<!-- <input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute"> -->
|
||||||
|
<!-- <input matInput autocomplete="off" placeholder="Financial Institution" formControlName="imgc_fin_institute"> -->
|
||||||
|
<mat-select placeholder="Financial Institution" formControlName="imgc_fin_institute">
|
||||||
|
<mat-option>Select</mat-option>
|
||||||
|
<mat-option *ngFor="let insti of finInstitutionList" [value]="insti.entity_fin_institution_id">{{insti.institute_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 28%">
|
||||||
|
|||||||
@ -65,9 +65,11 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
sales_and_credit_person: any=[];
|
sales_and_credit_person: any=[];
|
||||||
|
|
||||||
userDetails: any;
|
userDetails: any;
|
||||||
|
finInstitutionList: any=[];
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef<EditPdMasterComponent>,
|
private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef<EditPdMasterComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe,private userService:UserService) {
|
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe,private userService:UserService) {
|
||||||
|
// console.log("hsdf",this.data)
|
||||||
this.notifier=notifier
|
this.notifier=notifier
|
||||||
this.currentPDStatus = data.records.pd_status;
|
this.currentPDStatus = data.records.pd_status;
|
||||||
this.pdid = data.records.pd_id;
|
this.pdid = data.records.pd_id;
|
||||||
@ -79,7 +81,7 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getProductsList()
|
// this.getProductsList()
|
||||||
|
|
||||||
// this.draftStatus="DRAFT";
|
// this.draftStatus="DRAFT";
|
||||||
// this.PDTriggerStatus="TRIGGERED";
|
// this.PDTriggerStatus="TRIGGERED";
|
||||||
@ -87,7 +89,7 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
|
|
||||||
// this.getProductsList();
|
// this.getProductsList();
|
||||||
this.getStateCityList();
|
this.getStateCityList();
|
||||||
this.getPDTypeList();
|
// this.getPDTypeList();
|
||||||
// this.getAddresses();
|
// this.getAddresses();
|
||||||
|
|
||||||
this.applicantLength=this.data.applicantLength;
|
this.applicantLength=this.data.applicantLength;
|
||||||
@ -100,9 +102,30 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// console.log(this.userDetails)
|
// console.log(this.userDetails)
|
||||||
// this.loadFormData();
|
// this.loadFormData();
|
||||||
|
this.getProCusType()
|
||||||
this.sales_and_credit_person.credit_person=[{userid:this.userDetails.userid,user_name:this.userDetails.user_first_name+' '+this.userDetails.user_last_name}]
|
this.sales_and_credit_person.credit_person=[{userid:this.userDetails.userid,user_name:this.userDetails.user_first_name+' '+this.userDetails.user_last_name}]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
getProCusType(){
|
||||||
|
console.log("u",this.userDetails)
|
||||||
|
this._pd.getEntityPreferences(this.userDetails.fk_entity_id).subscribe(Response=>{
|
||||||
|
if(Response['dataStatus']){
|
||||||
|
this.pdTypeList=Response['records'].pd_types
|
||||||
|
this.customerSegmentAllList=Response['records'].customer_segments
|
||||||
|
this.productAllList=Response['records'].products
|
||||||
|
if(this.data.records.fk_product_id){
|
||||||
|
// console.log(this.data.fk_product_id)
|
||||||
|
// console.log("vv",this.productAllList.filter(val=>val.product_id == this.data.records.fk_product_id).length > 0)
|
||||||
|
if(this.productAllList.filter(val=>val.product_id == this.data.records.fk_product_id).length > 0){
|
||||||
|
this.getSubproductList(this.data.records.fk_product_id,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.finInstitutionList=Response['records'].financial_institutions
|
||||||
|
}
|
||||||
|
this.getLenderList();
|
||||||
|
// this.loadFormData();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
getLenderList(){
|
getLenderList(){
|
||||||
this._pd.getLenderDetails().subscribe(
|
this._pd.getLenderDetails().subscribe(
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<div class="other-sideMenu">
|
<div class="other-sideMenu">
|
||||||
|
|
||||||
<!-- this is for completed pd report -->
|
<!-- this is for completed pd report -->
|
||||||
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED' || pdReportRecords.pd_status=='QC_COMPLETED'">
|
<ng-container *ngIf="pdReportRecords != '' && pdReportRecords.pd_status=='COMPLETED' || pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||||
<div *ngIf="reGenerateBtn">
|
<div *ngIf="reGenerateBtn">
|
||||||
|
|
||||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
|
|
||||||
</mat-sidenav>
|
</mat-sidenav>
|
||||||
<mat-toolbar color="primary">
|
<mat-toolbar color="primary" >
|
||||||
<!-- fxHide="false" fxHide.gt-sm -->
|
<!-- fxHide="false" fxHide.gt-sm -->
|
||||||
<!-- <button (click)="mailnav.toggle()" mat-icon-button>
|
<!-- <button (click)="mailnav.toggle()" mat-icon-button>
|
||||||
<mat-icon style="color: white;">short_text</mat-icon>
|
<mat-icon style="color: white;">short_text</mat-icon>
|
||||||
@ -44,6 +44,8 @@
|
|||||||
<!-- <span class="mr-1 ml-1">View More</span> -->
|
<!-- <span class="mr-1 ml-1">View More</span> -->
|
||||||
<span class="mr-1 ml-1">PD Report</span>
|
<span class="mr-1 ml-1">PD Report</span>
|
||||||
<span class="empty-spacer"></span>
|
<span class="empty-spacer"></span>
|
||||||
|
<span class="empty-spacer"></span>
|
||||||
|
<div style="margin-left: 65%;">
|
||||||
<button align="end" *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Score" matTooltipPosition="above" (click)="showAction()" ><mat-icon>arrow_upward</mat-icon></button>
|
<button align="end" *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Score" matTooltipPosition="above" (click)="showAction()" ><mat-icon>arrow_upward</mat-icon></button>
|
||||||
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="getFrameContent(IFrameContent)" style="margin-right: 2px;"><mat-icon>save</mat-icon></button>
|
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="getFrameContent(IFrameContent)" style="margin-right: 2px;"><mat-icon>save</mat-icon></button>
|
||||||
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Notes" matTooltipPosition="above" (click)="reportReview('REMARKS')" style="margin-right: 2px;"><mat-icon>notes</mat-icon></button>
|
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Notes" matTooltipPosition="above" (click)="reportReview('REMARKS')" style="margin-right: 2px;"><mat-icon>notes</mat-icon></button>
|
||||||
@ -51,10 +53,11 @@
|
|||||||
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Complete" matTooltipPosition="above" (click)="reportReview('COMPLETE')" style="margin-right: 2px;"><mat-icon>done_all</mat-icon></button>
|
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Complete" matTooltipPosition="above" (click)="reportReview('COMPLETE')" style="margin-right: 2px;"><mat-icon>done_all</mat-icon></button>
|
||||||
|
|
||||||
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Re-generate Report" matTooltipPosition="above" (click)="reGeneratePFReport()"><mat-icon>autorenew</mat-icon></button>
|
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Re-generate Report" matTooltipPosition="above" (click)="reGeneratePFReport()"><mat-icon>autorenew</mat-icon></button>
|
||||||
<button align="end" style="float:right" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Report" matTooltipPosition="above" (click)="downloadPDReport()"><mat-icon>get_app</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Report" matTooltipPosition="above" (click)="downloadPDReport()"><mat-icon>get_app</mat-icon></button>
|
||||||
<button align="end" style="float:right" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Pictures" matTooltipPosition="above" (click)="archivePDImages()"><mat-icon>save_alt</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Pictures" matTooltipPosition="above" (click)="archivePDImages()"><mat-icon>save_alt</mat-icon></button>
|
||||||
|
|
||||||
<button align="end" style="float:right" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdViewCompoent()" style="margin-right: 2px;"><mat-icon>close</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdViewCompoent()" style="margin-right: 2px;"><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
</mat-toolbar>
|
</mat-toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
public reGenerateBtn: Boolean = false;
|
public reGenerateBtn: Boolean = false;
|
||||||
public pdReportVersionList = [];
|
public pdReportVersionList = [];
|
||||||
// public src;
|
// public src;
|
||||||
pdReportRecords: any;
|
pdReportRecords: any='';
|
||||||
latestPDDetails: any;
|
latestPDDetails: any;
|
||||||
message: any;
|
message: any;
|
||||||
selectedIndex: Number;
|
selectedIndex: Number;
|
||||||
@ -58,7 +58,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
let encryptReportRandomString = this.route.snapshot.params['string'];
|
let encryptReportRandomString = this.route.snapshot.params['string'];
|
||||||
this.reportRandomString = this.apiUrl+'getPDReportHTML/'+encryptReportRandomString+'/'+this.startPD;
|
this.reportRandomString = this.apiUrl+'getPDReportHTML/'+encryptReportRandomString+'/'+this.startPD;
|
||||||
|
|
||||||
console.log("dd",this.reportRandomString)
|
// console.log("dd",this.reportRandomString)
|
||||||
this.getPdReportDetails();
|
this.getPdReportDetails();
|
||||||
// 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 = '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");
|
// 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");
|
||||||
@ -70,18 +70,12 @@ export class PdReportComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit(){
|
ngAfterViewInit(){
|
||||||
let encryptReportRandomString = this.route.snapshot.params['string'];
|
|
||||||
this.pdTrigerService.getPDReportHTML(encryptReportRandomString,this.startPD).subscribe(response=>{
|
|
||||||
|
|
||||||
this.dataContainer.nativeElement.innerHTML = response
|
|
||||||
console.log("data",this.dataContainer)
|
|
||||||
// this.loadComponent=true
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.listPDComponent.showListView(false);
|
this.listPDComponent.showListView(false);
|
||||||
|
|
||||||
this.getPdReportVersionList();
|
// this.getPdReportVersionList();
|
||||||
// start
|
// start
|
||||||
|
|
||||||
// end
|
// end
|
||||||
@ -98,6 +92,16 @@ export class PdReportComponent implements OnInit {
|
|||||||
// this.previous = 2;
|
// this.previous = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getHTMLPDReport(){
|
||||||
|
let encryptReportRandomString = this.route.snapshot.params['string'];
|
||||||
|
this.pdTrigerService.getPDReportHTML(encryptReportRandomString,this.startPD).subscribe(response=>{
|
||||||
|
|
||||||
|
this.dataContainer.nativeElement.innerHTML = response
|
||||||
|
// console.log("data",this.dataContainer)
|
||||||
|
// this.loadComponent=true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
isMac(): boolean {
|
isMac(): boolean {
|
||||||
let bool = false;
|
let bool = false;
|
||||||
@ -157,6 +161,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
this.qcStatus = data.records.pdstatus;
|
this.qcStatus = data.records.pdstatus;
|
||||||
// alert(JSON.stringify(this.latestPDDetails));
|
// alert(JSON.stringify(this.latestPDDetails));
|
||||||
this.reGenerateBtn = true;
|
this.reGenerateBtn = true;
|
||||||
|
this.getHTMLPDReport()
|
||||||
} else {
|
} else {
|
||||||
// this.reGenerateBtn = true;
|
// this.reGenerateBtn = true;
|
||||||
this.generateBtn = true;
|
this.generateBtn = true;
|
||||||
@ -172,6 +177,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
// this.pdReportRecords = data.records.question_answers;
|
// this.pdReportRecords = data.records.question_answers;
|
||||||
this.pdReportRecords = data.records;
|
this.pdReportRecords = data.records;
|
||||||
|
this.getPdReportVersionList()
|
||||||
// this.pdReportRecords = data.records.qu;
|
// this.pdReportRecords = data.records.qu;
|
||||||
}
|
}
|
||||||
}, err => {
|
}, err => {
|
||||||
@ -320,6 +326,43 @@ export class PdReportComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
downloadPDReport(){
|
||||||
|
let data = {
|
||||||
|
"pd_id": this.startPD,
|
||||||
|
"random_string":this.route.snapshot.params['string']
|
||||||
|
};
|
||||||
|
this.pdTrigerService.generatePDReportPDF(data).subscribe(data => {
|
||||||
|
if (data.dataStatus) {
|
||||||
|
window.open(data.records);
|
||||||
|
this.notifier.notify('success', 'Done Successfully..!');
|
||||||
|
} else {
|
||||||
|
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
|
||||||
|
// alert(err.html_format);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
archivePDImages(){
|
||||||
|
let data = {
|
||||||
|
"pd_id": this.startPD,
|
||||||
|
"form_id":"",
|
||||||
|
"random_string":this.route.snapshot.params['string']
|
||||||
|
};
|
||||||
|
this.pdTrigerService.archivePDImages(data).subscribe(data => {
|
||||||
|
if (data.dataStatus) {
|
||||||
|
window.open(data.records);
|
||||||
|
this.notifier.notify('success', 'Downloaded Successfully..!');
|
||||||
|
} else {
|
||||||
|
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
|
||||||
|
// alert(err.html_format);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -360,4 +403,6 @@ export class DialogChangeCurrentVenrsion implements OnInit {
|
|||||||
this.dialogRef.close(confim);
|
this.dialogRef.close(confim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -378,7 +378,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab>
|
<!-- <mat-tab>
|
||||||
<ng-template mat-tab-label>QC Notes</ng-template>
|
<ng-template mat-tab-label>QC Notes</ng-template>
|
||||||
<div>
|
<div>
|
||||||
<h6>QC Notes</h6>
|
<h6>QC Notes</h6>
|
||||||
@ -414,7 +414,7 @@
|
|||||||
<p>No Feedback</p>
|
<p>No Feedback</p>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab> -->
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>PD History</ng-template>
|
<ng-template mat-tab-label>PD History</ng-template>
|
||||||
<div *ngIf="masterPdLogsData.length>0; else nohistory">
|
<div *ngIf="masterPdLogsData.length>0; else nohistory">
|
||||||
|
|||||||
@ -357,6 +357,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
directTriggerPD(data: any, masterdetail: any) {
|
directTriggerPD(data: any, masterdetail: any) {
|
||||||
|
|
||||||
let pdid = masterdetail.pd_id;
|
let pdid = masterdetail.pd_id;
|
||||||
|
let random_string=masterdetail.random_string
|
||||||
let getValues = data.filter(val => val).map(Val => Val);
|
let getValues = data.filter(val => val).map(Val => Val);
|
||||||
this.FilteredFieldNames = getValues.map(x => {
|
this.FilteredFieldNames = getValues.map(x => {
|
||||||
let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x);
|
let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x);
|
||||||
@ -368,7 +369,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
this.editPdMaster(masterdetail, this.localcount);
|
this.editPdMaster(masterdetail, this.localcount);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let lenderMasterArray = { "pd_id": pdid }
|
let lenderMasterArray = { "pd_id": pdid,random_string:random_string }
|
||||||
this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
|
this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
this.notifier.notify('success', 'PD Status Updated.');
|
this.notifier.notify('success', 'PD Status Updated.');
|
||||||
|
|||||||
@ -758,5 +758,18 @@ export class PdTrigerService {
|
|||||||
getPDReportPDFpreview(random_string,pd_id,htmlData){
|
getPDReportPDFpreview(random_string,pd_id,htmlData){
|
||||||
return this._http.post(this.apiUrl+'getPDReportPDFpreview/'+random_string+'/'+pd_id,{records:{"pdid":pd_id,"myData":htmlData}},{responseType:'json'})
|
return this._http.post(this.apiUrl+'getPDReportPDFpreview/'+random_string+'/'+pd_id,{records:{"pdid":pd_id,"myData":htmlData}},{responseType:'json'})
|
||||||
}
|
}
|
||||||
|
//FOR TRIGGER PD PAGE MASTER FOR PRODUCT,CUS SEG,PD TYPE
|
||||||
|
getEntityPreferences(entity_id){
|
||||||
|
return this._http.get(this.apiUrl+'getEntityPreferences/'+entity_id)
|
||||||
|
}
|
||||||
|
|
||||||
|
//FOR REPORT
|
||||||
|
generatePDReportPDF(pdId: any): Observable<any> {
|
||||||
|
pdId.fk_createdby = this._aws.getlocale();
|
||||||
|
return this._http.post<any>(this.apiUrl + "generatePDReportPDF", { "records": pdId });
|
||||||
|
}
|
||||||
|
archivePDImages(Dtl : any): Observable<any> {
|
||||||
|
return this._http.post<any>(this.apiUrl + "archivePDImages", { "records": Dtl });
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user