pd report , export excel changes : kdk
This commit is contained in:
parent
755a493b96
commit
165228342c
@ -30,6 +30,7 @@
|
|||||||
"@ngx-translate/http-loader": "^3.0.1",
|
"@ngx-translate/http-loader": "^3.0.1",
|
||||||
"@swimlane/ngx-charts": "^7.0.1",
|
"@swimlane/ngx-charts": "^7.0.1",
|
||||||
"@swimlane/ngx-datatable": "11.1.5",
|
"@swimlane/ngx-datatable": "11.1.5",
|
||||||
|
"@types/file-saver": "^2.0.0",
|
||||||
"amazon-cognito-identity-js": "^2.0.27",
|
"amazon-cognito-identity-js": "^2.0.27",
|
||||||
"angular-calendar": "0.23.3",
|
"angular-calendar": "0.23.3",
|
||||||
"angular-notifier": "^4.1.1",
|
"angular-notifier": "^4.1.1",
|
||||||
@ -39,6 +40,7 @@
|
|||||||
"core-js": "^2.5.5",
|
"core-js": "^2.5.5",
|
||||||
"d3": "^4.9.1",
|
"d3": "^4.9.1",
|
||||||
"dragula": "3.7.2",
|
"dragula": "3.7.2",
|
||||||
|
"file-saver": "^2.0.0",
|
||||||
"font-awesome": "4.7.0",
|
"font-awesome": "4.7.0",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
"intl": "^1.2.4",
|
"intl": "^1.2.4",
|
||||||
|
|||||||
@ -7,12 +7,16 @@
|
|||||||
<mat-card style="min-height:540px;">
|
<mat-card style="min-height:540px;">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div align="end">
|
<div align="end">
|
||||||
<button mat-raised-button color="blue" (click)="reportReview('REMARKS')" style="padding: 0 28px !important;" [disabled]="qcStatus === 'QC_COMPLETED'">QC Remarks</button>
|
<button mat-raised-button color="blue" (click)="reportReview('REMARKS')" style="padding: 0 28px !important;" *ngIf="qcStatus !== 'QC_COMPLETED'">Notes</button>
|
||||||
<button mat-raised-button color="red" (click)="reportReview('COMPLETE')" style="padding: 0 28px !important;" [disabled]="qcStatus === 'QC_COMPLETED'">QC Complete</button>
|
<button mat-raised-button color="red" (click)="reportReview('COMPLETE')" style="padding: 0 28px !important;" *ngIf="qcStatus !== 'QC_COMPLETED'">QC Complete</button>
|
||||||
<!--{{ qcStatus }} -->
|
<!--{{ qcStatus }} -->
|
||||||
</div>
|
</div>
|
||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
<mat-tab label="PD Data">
|
<mat-tab label="PD Data">
|
||||||
|
<div>
|
||||||
|
Export
|
||||||
|
<button (click)="export()">Export Excel</button>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<label>Billing Name : </label> {{pdReportRecords?.billing_name}}
|
<label>Billing Name : </label> {{pdReportRecords?.billing_name}}
|
||||||
|
|||||||
@ -1,16 +1,21 @@
|
|||||||
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
||||||
import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject} 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 { saveAs as importedSaveAs } from "file-saver";
|
||||||
import { MatDialog,
|
|
||||||
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
|
import {
|
||||||
|
MatDialog,
|
||||||
MatDialogRef,
|
MatDialogRef,
|
||||||
MAT_DIALOG_DATA } from "@angular/material";
|
MAT_DIALOG_DATA
|
||||||
import { ModelEditPdReportComponent} from './model-edit-pd-report/model-edit-pd-report.component';
|
} from "@angular/material";
|
||||||
|
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
|
||||||
import { QcReviewComponent } from './qc-review/qc-review.component';
|
import { QcReviewComponent } from './qc-review/qc-review.component';
|
||||||
|
import { HttpResponse } from "@angular/common/http";
|
||||||
|
|
||||||
/**sweet alert */
|
/**sweet alert */
|
||||||
// import Swal from 'sweetalert2';
|
// import Swal from 'sweetalert2';
|
||||||
@ -21,7 +26,7 @@ import { QcReviewComponent } from './qc-review/qc-review.component';
|
|||||||
styleUrls: ['./pd-report.component.scss']
|
styleUrls: ['./pd-report.component.scss']
|
||||||
})
|
})
|
||||||
export class PdReportComponent implements OnInit {
|
export class PdReportComponent implements OnInit {
|
||||||
Url : SafeUrl;
|
Url: SafeUrl;
|
||||||
startPD: any;
|
startPD: any;
|
||||||
// public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
// public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
||||||
// public src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b';
|
// public src = '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';
|
||||||
@ -31,9 +36,9 @@ 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;
|
||||||
|
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
@ -86,13 +91,13 @@ export class PdReportComponent implements OnInit {
|
|||||||
return window.matchMedia(`(max-width: 1560px)`).matches;
|
return window.matchMedia(`(max-width: 1560px)`).matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
reGeneratePFReport(){
|
reGeneratePFReport() {
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD,
|
"pd_id": this.startPD,
|
||||||
"regenerate":"1"
|
"regenerate": "1"
|
||||||
};
|
};
|
||||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data=>{
|
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||||
if(data.dataStatus){
|
if (data.dataStatus) {
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.getPdReportVersionList();
|
this.getPdReportVersionList();
|
||||||
} else {
|
} else {
|
||||||
@ -106,8 +111,8 @@ export class PdReportComponent implements OnInit {
|
|||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD
|
"pd_id": this.startPD
|
||||||
};
|
};
|
||||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data=>{
|
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||||
if(data.dataStatus){
|
if (data.dataStatus) {
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.getPdReportVersionList();
|
this.getPdReportVersionList();
|
||||||
} else {
|
} else {
|
||||||
@ -119,11 +124,11 @@ export class PdReportComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public qcStatus: string = '';
|
public qcStatus: string = '';
|
||||||
getPdReportVersionList(){
|
getPdReportVersionList() {
|
||||||
this.pdTrigerService.getPdDocVersionList(this.startPD).subscribe(data => {
|
this.pdTrigerService.getPdDocVersionList(this.startPD).subscribe(data => {
|
||||||
if(data.status == 200 && data.dataStatus){
|
if (data.status == 200 && data.dataStatus) {
|
||||||
this.pdReportVersionList = [...data.records.reports_urls].reverse();
|
this.pdReportVersionList = [...data.records.reports_urls].reverse();
|
||||||
let datas = this.pdReportVersionList.filter((a)=>{return a.is_latest == 1;})
|
let datas = this.pdReportVersionList.filter((a) => { return a.is_latest == 1; })
|
||||||
this.latestPDDetails = datas[0];
|
this.latestPDDetails = datas[0];
|
||||||
this.qcStatus = data.records.pdstatus;
|
this.qcStatus = data.records.pdstatus;
|
||||||
// alert(JSON.stringify(this.latestPDDetails));
|
// alert(JSON.stringify(this.latestPDDetails));
|
||||||
@ -131,9 +136,9 @@ export class PdReportComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
// this.reGenerateBtn = true;
|
// this.reGenerateBtn = true;
|
||||||
this.generateBtn = true;
|
this.generateBtn = true;
|
||||||
this.message= data.msg;
|
this.message = data.msg;
|
||||||
}
|
}
|
||||||
}, err=> {
|
}, err => {
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -145,7 +150,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
this.pdReportRecords = data.records;
|
this.pdReportRecords = data.records;
|
||||||
// this.pdReportRecords = data.records.qu;
|
// this.pdReportRecords = data.records.qu;
|
||||||
}
|
}
|
||||||
}, err=> {
|
}, err => {
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -154,13 +159,13 @@ export class PdReportComponent implements OnInit {
|
|||||||
|
|
||||||
// load pd view component
|
// load pd view component
|
||||||
loadPdViewCompoent() {
|
loadPdViewCompoent() {
|
||||||
this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
|
this.router.navigate(['../../viewpd', this.startPD], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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, version_id: this.latestPDDetails.doc_name},
|
data: { startId: this.startPD, version_id: this.latestPDDetails.doc_name },
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -172,7 +177,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
changeVersion(pd : any): void {
|
changeVersion(pd: any): void {
|
||||||
this.latestPDDetails = pd;
|
this.latestPDDetails = pd;
|
||||||
console.log(this.latestPDDetails);
|
console.log(this.latestPDDetails);
|
||||||
}
|
}
|
||||||
@ -181,7 +186,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
|
|
||||||
reportReview(status): void {
|
reportReview(status): void {
|
||||||
const dialogRef = this.dialog.open(QcReviewComponent, {
|
const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||||
data: { startId : this.startPD, data_status: status },
|
data: { startId: this.startPD, data_status: status },
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -193,7 +198,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
changeDocumentEdit() : void{
|
changeDocumentEdit(): void {
|
||||||
|
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(DialogChangeCurrentVenrsion, {
|
const dialogRef = this.dialog.open(DialogChangeCurrentVenrsion, {
|
||||||
@ -201,7 +206,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
if(dataresult) {
|
if (dataresult) {
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD,
|
"pd_id": this.startPD,
|
||||||
"doc_name": this.latestPDDetails.doc_name
|
"doc_name": this.latestPDDetails.doc_name
|
||||||
@ -213,7 +218,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
}, err=> {
|
}, err => {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -254,6 +259,25 @@ export class PdReportComponent implements OnInit {
|
|||||||
// }s
|
// }s
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export() {
|
||||||
|
this.pdTrigerService.pdReportExportExcel().subscribe((blob: HttpResponse<Blob>) => {
|
||||||
|
if (blob) {
|
||||||
|
let datass = blob.headers.get('content-disposition');
|
||||||
|
let fileName = datass.split(/"/)[1];
|
||||||
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
|
const blobs = new Blob([blob],
|
||||||
|
{ type: 'application/vnd.ms-excel' });
|
||||||
|
const file = new File([blobs], fileName,
|
||||||
|
{ type: 'application/vnd.ms-excel' });
|
||||||
|
importedSaveAs(file);
|
||||||
|
} else {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -289,7 +313,7 @@ export class DialogChangeCurrentVenrsion implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfirmation(confim : Boolean) {
|
getConfirmation(confim: Boolean) {
|
||||||
this.dialogRef.close(confim);
|
this.dialogRef.close(confim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<!--<h3>Develop across all platforms</h3>-->
|
<!--<h3>Develop across all platforms</h3>-->
|
||||||
<div *ngIf="conformation === false" style="width: 220px;text-align: center; margin: 12px;">
|
<div *ngIf="conformation === false" style="width: 220px;text-align: center; margin: 12px;">
|
||||||
<p>
|
<p>
|
||||||
Because you've marked the document as QC Complete, you can't edit this document.
|
Once QC is Completed further edit will not be possible on this document.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="conformation" style="margin: 12px; width: 340px;">
|
<div *ngIf="conformation" style="margin: 12px; width: 340px;">
|
||||||
@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="showStatus == 'REMARKS'">
|
<div *ngIf="showStatus == 'REMARKS'">
|
||||||
<h2 mat-dialog-title>QC Remarks</h2>
|
<h2 mat-dialog-title>QC Notes</h2>
|
||||||
<mat-dialog-content class="mat-typography">
|
<mat-dialog-content class="mat-typography">
|
||||||
<div style="margin: 12px; width: 340px;">
|
<div style="margin: 12px; width: 340px;">
|
||||||
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above"
|
mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above"
|
||||||
(click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
|
(click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
|
||||||
|
|
||||||
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED || pdStatusCheck.COMPLETED" mat-raised-button
|
<button *ngIf="master.pd_type_name && (currentPDStatus===pdStatusCheck.QC_COMPLETED || currentPDStatus===pdStatusCheck.COMPLETED)" mat-raised-button
|
||||||
mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above"
|
mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above"
|
||||||
(click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
(click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||||
|
|
||||||
@ -191,24 +191,35 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="pdMasterData[0]?.pd_status === 'QC_COMPLETED'" class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50"
|
<div class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50"
|
||||||
fxFlex.lg="50" fxFlex.xl="50">
|
fxFlex.lg="50" fxFlex.xl="50">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<div style="color:red !important;">
|
<div style="color:red !important;">
|
||||||
<h6>QC Remarks</h6>
|
<h6>QC Notes</h6>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
{{ pdMasterData[0].qc_remarks}}</p>
|
{{ pdMasterData[0]?.qc_remarks}}</p>
|
||||||
<p>
|
|
||||||
{{ pdMasterData[0]?.qc_feedback}}</p>
|
|
||||||
<div>
|
|
||||||
<p>
|
|
||||||
<app-rating [rating]="pd_QC_Rating"></app-rating>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="pdMasterData[0]?.pd_status === 'QC_COMPLETED'" class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50"
|
||||||
|
fxFlex.lg="50" fxFlex.xl="50">
|
||||||
|
<div style="color:red !important;">
|
||||||
|
<h6>QC Remarks</h6>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
{{ pdMasterData[0]?.qc_rating}}
|
||||||
|
<div>
|
||||||
|
<app-rating [rating]="pd_QC_Rating"></app-rating>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="display: inline-block;">
|
||||||
|
{{ pdMasterData[0]?.qc_feedback}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,15 +1,20 @@
|
|||||||
/** Common Import Section */
|
/** Common Import Section */
|
||||||
import {Injectable} from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import {Observable} from 'rxjs';//for Datatables
|
import { Observable } from 'rxjs';//for Datatables
|
||||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import {catchError, map} from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
import {of} from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
/** Imported Service Files Are., */
|
/** Imported Service Files Are., */
|
||||||
import {AwsService} from '../../AwsService/aws.service';
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
|
|
||||||
/** Environment */
|
/** Environment */
|
||||||
import {environment} from 'environments/environment'
|
import { environment } from 'environments/environment'
|
||||||
|
import { RequestOptions } from "@angular/http";
|
||||||
|
import { ResponseContentType } from "@angular/http";
|
||||||
|
import { ResponseOptions } from "@angular/http";
|
||||||
|
import { HttpResponse } from "@angular/common/http";
|
||||||
|
import { tap } from "rxjs/internal/operators/tap";
|
||||||
|
|
||||||
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
|
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
|
||||||
|
|
||||||
@ -40,14 +45,14 @@ export class PdTrigerService {
|
|||||||
|
|
||||||
// get add pd master details
|
// get add pd master details
|
||||||
getAllMasterDatas(TableName: string): Observable<any> {
|
getAllMasterDatas(TableName: string): Observable<any> {
|
||||||
return this._http.post(this.apiUrl + 'getListOfMaster', {"master_name": TableName})
|
return this._http.post(this.apiUrl + 'getListOfMaster', { "master_name": TableName })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
saveForm(records: any): Observable<any> {
|
saveForm(records: any): Observable<any> {
|
||||||
records.fk_createdby = this._aws.getlocale();
|
records.fk_createdby = this._aws.getlocale();
|
||||||
let params = {records}
|
let params = { records }
|
||||||
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
@ -127,7 +132,7 @@ export class PdTrigerService {
|
|||||||
// get status based pd list
|
// get status based pd list
|
||||||
getTabStatusPdDetails(status: string): Observable<any> {
|
getTabStatusPdDetails(status: string): Observable<any> {
|
||||||
const tabStatus = status ?
|
const tabStatus = status ?
|
||||||
{params: new HttpParams().set('status', status)} : {};
|
{ params: new HttpParams().set('status', status) } : {};
|
||||||
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", tabStatus)
|
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", tabStatus)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -148,7 +153,7 @@ export class PdTrigerService {
|
|||||||
editData.pd_status = status;
|
editData.pd_status = status;
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -159,7 +164,7 @@ export class PdTrigerService {
|
|||||||
updatePdApplicant(editData: any): Observable<any> {
|
updatePdApplicant(editData: any): Observable<any> {
|
||||||
// editData.fk_updatedby = this._aws.getlocale();
|
// editData.fk_updatedby = this._aws.getlocale();
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDApplicants", {"pd_applicant_details": editData})
|
return this._http.post<any>(this.apiUrl + "updatePDApplicants", { "pd_applicant_details": editData })
|
||||||
|
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -168,7 +173,7 @@ export class PdTrigerService {
|
|||||||
|
|
||||||
// get pd allocation to details
|
// get pd allocation to details
|
||||||
getPdOfficerList(pdID: string): Observable<any> {
|
getPdOfficerList(pdID: string): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl + "getListPDOfficers", {"pdid": pdID})
|
return this._http.post<any>(this.apiUrl + "getListPDOfficers", { "pdid": pdID })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -178,7 +183,7 @@ export class PdTrigerService {
|
|||||||
updatePdOfficer(updateData: any): Observable<any> {
|
updatePdOfficer(updateData: any): Observable<any> {
|
||||||
updateData.fk_updatedby = this._aws.getlocale();
|
updateData.fk_updatedby = this._aws.getlocale();
|
||||||
// updateData.updatedon = currentdate;
|
// updateData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "allocatePD", {"records": updateData})
|
return this._http.post<any>(this.apiUrl + "allocatePD", { "records": updateData })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -188,7 +193,7 @@ export class PdTrigerService {
|
|||||||
updateSchedule(updateData: any): Observable<any> {
|
updateSchedule(updateData: any): Observable<any> {
|
||||||
updateData.fk_scheduled_by = this._aws.getlocale();
|
updateData.fk_scheduled_by = this._aws.getlocale();
|
||||||
// updateData.createdon = currentdate;
|
// updateData.createdon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "schdulePD", {"records": updateData})
|
return this._http.post<any>(this.apiUrl + "schdulePD", { "records": updateData })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -197,7 +202,7 @@ export class PdTrigerService {
|
|||||||
//load pd template details
|
//load pd template details
|
||||||
loadPDTemplates(pdId: string): Observable<any> {
|
loadPDTemplates(pdId: string): Observable<any> {
|
||||||
const options = pdId ?
|
const options = pdId ?
|
||||||
{params: new HttpParams().set('pd_id', pdId)} : {};
|
{ params: new HttpParams().set('pd_id', pdId) } : {};
|
||||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -231,8 +236,8 @@ export class PdTrigerService {
|
|||||||
// )
|
// )
|
||||||
// }
|
// }
|
||||||
// get assessed income form details
|
// get assessed income form details
|
||||||
getAssessedIncomeFormDetails(formDetails):Observable<any> {
|
getAssessedIncomeFormDetails(formDetails): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getAssessedIncome",formDetails)
|
return this._http.post<any>(this.apiUrl + "getAssessedIncome", formDetails)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -243,9 +248,9 @@ export class PdTrigerService {
|
|||||||
return of(result as T);
|
return of(result as T);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// common Pd form details get for the Pd Process
|
// common Pd form details get for the Pd Process
|
||||||
getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
getPDFormDetailsWithID(pdID, formID): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getPDFormDetails",{"pd_id":pdID,"pd_form_id" : formID})
|
return this._http.post<any>(this.apiUrl + "getPDFormDetails", { "pd_id": pdID, "pd_form_id": formID })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -257,7 +262,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
|||||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||||
// saveData[0].updatedon = currentdate;
|
// saveData[0].updatedon = currentdate;
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"savePDFormDetails",{"records":saveData})
|
return this._http.post<any>(this.apiUrl + "savePDFormDetails", { "records": saveData })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -270,7 +275,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
|||||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||||
// saveData[0].updatedon = currentdate;
|
// saveData[0].updatedon = currentdate;
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"savePDQuestions",{"records":saveData})
|
return this._http.post<any>(this.apiUrl + "savePDQuestions", { "records": saveData })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -280,59 +285,59 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
|||||||
// get Pd Final report Question Answer
|
// get Pd Final report Question Answer
|
||||||
|
|
||||||
getPdFinalReportDetails(pdId: number): Observable<any> {
|
getPdFinalReportDetails(pdId: number): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getFinalPDReportQuestions",{"pd_id":pdId})
|
return this._http.post<any>(this.apiUrl + "getFinalPDReportQuestions", { "pd_id": pdId })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getPDReportFinalDocument(pdId: any): Observable<any>{
|
getPDReportFinalDocument(pdId: any): Observable<any> {
|
||||||
pdId.fk_createdby = this._aws.getlocale();
|
pdId.fk_createdby = this._aws.getlocale();
|
||||||
return this._http.post<any>(this.apiUrl+"generatePDReport",{"records": pdId})
|
return this._http.post<any>(this.apiUrl + "generatePDReport", { "records": pdId })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getActualPDReportModelTemplate(pdId: any) : Observable<any>{
|
getActualPDReportModelTemplate(pdId: any): Observable<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', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePDReportDetails(records: any): Observable<any>{
|
updatePDReportDetails(records: any): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"saveNewVersionOfPDReport ",{"records": records})
|
return this._http.post<any>(this.apiUrl + "saveNewVersionOfPDReport ", { "records": records })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getPdDocVersionList(pdId: number): Observable<any>{
|
getPdDocVersionList(pdId: number): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getListOfPDReportVersions",{"records":{"pd_id":pdId}})
|
return this._http.post<any>(this.apiUrl + "getListOfPDReportVersions", { "records": { "pd_id": pdId } })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
swapOlderPDReportToLatest(pdId: any): Observable<any>{
|
swapOlderPDReportToLatest(pdId: any): Observable<any> {
|
||||||
pdId.fk_createdby = this._aws.getlocale();
|
pdId.fk_createdby = this._aws.getlocale();
|
||||||
alert(JSON.stringify(pdId));
|
alert(JSON.stringify(pdId));
|
||||||
return this._http.post<any>(this.apiUrl+"swapOlderPDReportToLatest",{"records": pdId})
|
return this._http.post<any>(this.apiUrl + "swapOlderPDReportToLatest", { "records": pdId })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getTypeofActivityForSuppliedInfoForm(pd_id: any): Observable<any>{
|
getTypeofActivityForSuppliedInfoForm(pd_id: any): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getTypeOfActivetyFromBusinessForm", {"records": { "pd_id" : pd_id }})
|
return this._http.post<any>(this.apiUrl + "getTypeOfActivetyFromBusinessForm", { "records": { "pd_id": pd_id } })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getQCReportFinalReviewDetails(pd_id: any, flag : string ): Observable<any>{
|
getQCReportFinalReviewDetails(pd_id: any, flag: string): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getQCLenderRemarks", {"records": { "pd_id" : pd_id, "flag" :flag }})
|
return this._http.post<any>(this.apiUrl + "getQCLenderRemarks", { "records": { "pd_id": pd_id, "flag": flag } })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -342,31 +347,51 @@ getTypeofActivityForSuppliedInfoForm(pd_id: any): Observable<any>{
|
|||||||
pdReviewStatusUpdate(editData: any): Observable<any> {
|
pdReviewStatusUpdate(editData: any): Observable<any> {
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//pd report export excel
|
||||||
|
pdReportExportExcel(): Observable<HttpResponse<Blob>> {
|
||||||
|
// const options: any = {
|
||||||
|
// observe: 'response',
|
||||||
|
// responseType: 'blob' as 'json'
|
||||||
|
// };
|
||||||
|
return this._http.get<HttpResponse<Blob>>(this.apiUrl + "downloadExcel", {
|
||||||
|
observe: 'response',
|
||||||
|
responseType: 'blob' as 'json'
|
||||||
|
})
|
||||||
|
.pipe(
|
||||||
|
tap<HttpResponse<any>>(
|
||||||
|
res => res,
|
||||||
|
err => {
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
}
|
||||||
|
)
|
||||||
|
// 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 '];
|
||||||
// let b : any = ['', '', 'twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety'];
|
// let b : any = ['', '', 'twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety'];
|
||||||
// if ((num = num.toString()).length > 9) return 'overflow';
|
// if ((num = num.toString()).length > 9) return 'overflow';
|
||||||
// let n : any = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/);
|
// let n : any = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/);
|
||||||
// if (!n) return; var str = '';
|
// if (!n) return; var str = '';
|
||||||
// str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + ' ' + a[n[1][1]]) + 'crore ' : '';
|
// str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + ' ' + a[n[1][1]]) + 'crore ' : '';
|
||||||
// str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' + a[n[2][1]]) + 'lakh ' : '';
|
// str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' + a[n[2][1]]) + 'lakh ' : '';
|
||||||
// str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' + a[n[3][1]]) + 'thousand ' : '';
|
// str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' + a[n[3][1]]) + 'thousand ' : '';
|
||||||
// str += (n[4] != 0) ? (a[Number(n[4])] || b[n[4][0]] + ' ' + a[n[4][1]]) + 'hundred ' : '';
|
// str += (n[4] != 0) ? (a[Number(n[4])] || b[n[4][0]] + ' ' + a[n[4][1]]) + 'hundred ' : '';
|
||||||
// str += (n[5] != 0) ? ((str != '') ? 'and ' : '') + (a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) + 'only ' : '';
|
// str += (n[5] != 0) ? ((str != '') ? 'and ' : '') + (a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) + 'only ' : '';
|
||||||
// return str;
|
// return str;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
convertNumberToWords(amount) {
|
convertNumberToWords(amount) {
|
||||||
//let words : any = new Array();
|
//let words : any = new Array();
|
||||||
let words :any = ['','One','Two','Three','Four','Five','Six','Seven','Eight','Nine','Ten','Eleven','Twelve','Thirteen','Fourteen','Fifteen','Sixteen','Seventeen','Eighteen','Nineteen','Twenty'];
|
let words: any = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty'];
|
||||||
words[30] = 'Thirty';
|
words[30] = 'Thirty';
|
||||||
words[40] = 'Forty';
|
words[40] = 'Forty';
|
||||||
words[50] = 'Fifty';
|
words[50] = 'Fifty';
|
||||||
@ -379,17 +404,17 @@ convertNumberToWords(amount) {
|
|||||||
let number = atemp[0].split(",").join("");
|
let number = atemp[0].split(",").join("");
|
||||||
let n_length = number.length;
|
let n_length = number.length;
|
||||||
let words_string = "";
|
let words_string = "";
|
||||||
let value : any;
|
let value: any;
|
||||||
if (n_length <= 9) {
|
if (n_length <= 9) {
|
||||||
var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
var received_n_array = new Array();
|
var received_n_array = new Array();
|
||||||
for (var i = 0; i < n_length; i++) {
|
for (var i = 0; i < n_length; i++) {
|
||||||
received_n_array[i] = number.substr(i, 1);
|
received_n_array[i] = number.substr(i, 1);
|
||||||
}
|
}
|
||||||
for (var i = 9 - n_length, j = 0; i < 9; i++, j++) {
|
for (var i = 9 - n_length, j = 0; i < 9; i++ , j++) {
|
||||||
n_array[i] = received_n_array[j];
|
n_array[i] = received_n_array[j];
|
||||||
}
|
}
|
||||||
for (var i = 0, j = 1; i < 9; i++, j++) {
|
for (var i = 0, j = 1; i < 9; i++ , j++) {
|
||||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||||
if (n_array[i] == 1) {
|
if (n_array[i] == 1) {
|
||||||
n_array[j] = 10 + (+n_array[j]);
|
n_array[j] = 10 + (+n_array[j]);
|
||||||
@ -425,13 +450,13 @@ convertNumberToWords(amount) {
|
|||||||
words_string = words_string.split(" ").join(" ");
|
words_string = words_string.split(" ").join(" ");
|
||||||
}
|
}
|
||||||
return words_string;
|
return words_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// save additional requirements
|
// save additional requirements
|
||||||
saveAdditionalRequirements(saveData: any): Observable<any> {
|
saveAdditionalRequirements(saveData: any): Observable<any> {
|
||||||
saveData.createdby = this._aws.getlocale();
|
saveData.createdby = this._aws.getlocale();
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"savePDAdditionalRequiremets",{"records":saveData})
|
return this._http.post<any>(this.apiUrl + "savePDAdditionalRequiremets", { "records": saveData })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -439,7 +464,7 @@ convertNumberToWords(amount) {
|
|||||||
|
|
||||||
stockFormAccess(pdid: any): Observable<any> {
|
stockFormAccess(pdid: any): Observable<any> {
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"getTypeOfActivetyFromBusinessForm",{"records":pdid})
|
return this._http.post<any>(this.apiUrl + "getTypeOfActivetyFromBusinessForm", { "records": pdid })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -454,10 +479,9 @@ convertNumberToWords(amount) {
|
|||||||
* Sriram
|
* Sriram
|
||||||
*/
|
*/
|
||||||
|
|
||||||
overAllSearchFormDetails(searchItem)
|
overAllSearchFormDetails(searchItem) {
|
||||||
{
|
let records = { 'records': searchItem };
|
||||||
let records = {'records':searchItem};
|
return this._http.post(this.apiUrl + 'filterPDList', records).pipe(
|
||||||
return this._http.post(this.apiUrl+'filterPDList',records).pipe(
|
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
<fieldset class="rating">
|
<fieldset class="rating">
|
||||||
<input type="radio" [name]="inputName" value="5" [checked]="rating===5" />
|
<input type="radio" [name]="inputName" value="5" [checked]="rating===5" />
|
||||||
<label title="Rocks!" (click)='onClick(5)'>5 stars</label>
|
<label title="Excellant" (mouseover)='over("Excellant")' (click)='onClick(5)'>5 stars</label>
|
||||||
|
|
||||||
<input type="radio" [name]="inputName" value="4" [checked]="rating===4" />
|
<input type="radio" [name]="inputName" value="4" [checked]="rating===4" />
|
||||||
<label title="Pretty good" (click)='onClick(4)'>4 stars</label>
|
<label title="Pretty good" (mouseover)='over("Pretty Good")' (click)='onClick(4)'>4 stars</label>
|
||||||
|
|
||||||
<input type="radio" [name]="inputName" value="3" [checked]="rating===3" />
|
<input type="radio" [name]="inputName" value="3" [checked]="rating===3" />
|
||||||
<label title="Meh" (click)='onClick(3)'>3 stars</label>
|
<label title="good" (mouseover)='over("Good")' (click)='onClick(3)'>3 stars</label>
|
||||||
|
|
||||||
<input type="radio" [name]="inputName" value="2" [checked]="rating===2" />
|
<input type="radio" [name]="inputName" value="2" [checked]="rating===2" />
|
||||||
<label title="Kinda bad" (click)='onClick(2)'>2 stars</label>
|
<label title="ok" (mouseover)='over("Ok")' (click)='onClick(2)'>2 stars</label>
|
||||||
|
|
||||||
<input type="radio" [name]="inputName" value="1" [checked]="rating===1" />
|
<input type="radio" [name]="inputName" value="1" [checked]="rating===1" />
|
||||||
<label title="Sucks big time" (click)='onClick(1)'>1 star</label>
|
<label title="not ok" (mouseover)='over("Not Ok")' (click)='onClick(1)'>1 star</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
.rating {
|
.rating {
|
||||||
float:left;
|
float:left;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rating:not(:checked) > input {
|
.rating:not(:checked) > input {
|
||||||
@ -40,3 +41,8 @@
|
|||||||
.rating > label:hover ~ input:checked ~ label {
|
.rating > label:hover ~ input:checked ~ label {
|
||||||
color: #ea0;
|
color: #ea0;
|
||||||
}
|
}
|
||||||
|
// .rating::after {
|
||||||
|
// content: "";
|
||||||
|
// clear: both;
|
||||||
|
// display: table;
|
||||||
|
// }
|
||||||
|
|||||||
@ -22,4 +22,9 @@ export class RatingComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lableVal: string = '';
|
||||||
|
over(val): void {
|
||||||
|
this.lableVal = val;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user