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",
|
||||
"@swimlane/ngx-charts": "^7.0.1",
|
||||
"@swimlane/ngx-datatable": "11.1.5",
|
||||
"@types/file-saver": "^2.0.0",
|
||||
"amazon-cognito-identity-js": "^2.0.27",
|
||||
"angular-calendar": "0.23.3",
|
||||
"angular-notifier": "^4.1.1",
|
||||
@ -39,6 +40,7 @@
|
||||
"core-js": "^2.5.5",
|
||||
"d3": "^4.9.1",
|
||||
"dragula": "3.7.2",
|
||||
"file-saver": "^2.0.0",
|
||||
"font-awesome": "4.7.0",
|
||||
"hammerjs": "2.0.8",
|
||||
"intl": "^1.2.4",
|
||||
|
||||
@ -7,12 +7,16 @@
|
||||
<mat-card style="min-height:540px;">
|
||||
<mat-card-content>
|
||||
<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="red" (click)="reportReview('COMPLETE')" style="padding: 0 28px !important;" [disabled]="qcStatus === 'QC_COMPLETED'">QC Complete</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;" *ngIf="qcStatus !== 'QC_COMPLETED'">QC Complete</button>
|
||||
<!--{{ qcStatus }} -->
|
||||
</div>
|
||||
<mat-tab-group>
|
||||
<mat-tab label="PD Data">
|
||||
<div>
|
||||
Export
|
||||
<button (click)="export()">Export Excel</button>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<label>Billing Name : </label> {{pdReportRecords?.billing_name}}
|
||||
|
||||
@ -5,12 +5,17 @@ import {ActivatedRoute, Router} from '@angular/router';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { ListPdComponent } from './../list-pd.component';
|
||||
|
||||
import { saveAs as importedSaveAs } from "file-saver";
|
||||
|
||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||
import { MatDialog,
|
||||
import {
|
||||
MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA } from "@angular/material";
|
||||
MAT_DIALOG_DATA
|
||||
} from "@angular/material";
|
||||
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
|
||||
import { QcReviewComponent } from './qc-review/qc-review.component';
|
||||
import { HttpResponse } from "@angular/common/http";
|
||||
|
||||
/**sweet alert */
|
||||
// import Swal from 'sweetalert2';
|
||||
@ -254,6 +259,25 @@ export class PdReportComponent implements OnInit {
|
||||
// }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.!');
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<!--<h3>Develop across all platforms</h3>-->
|
||||
<div *ngIf="conformation === false" style="width: 220px;text-align: center; margin: 12px;">
|
||||
<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>
|
||||
</div>
|
||||
<div *ngIf="conformation" style="margin: 12px; width: 340px;">
|
||||
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="showStatus == 'REMARKS'">
|
||||
<h2 mat-dialog-title>QC Remarks</h2>
|
||||
<h2 mat-dialog-title>QC Notes</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<div style="margin: 12px; width: 340px;">
|
||||
<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"
|
||||
(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"
|
||||
(click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
|
||||
@ -191,24 +191,35 @@
|
||||
</ng-template>
|
||||
|
||||
</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">
|
||||
<mat-card>
|
||||
<div style="color:red !important;">
|
||||
<h6>QC Remarks</h6>
|
||||
<h6>QC Notes</h6>
|
||||
</div>
|
||||
<p>
|
||||
{{ pdMasterData[0].qc_remarks}}</p>
|
||||
<p>
|
||||
{{ pdMasterData[0]?.qc_feedback}}</p>
|
||||
<div>
|
||||
<p>
|
||||
<app-rating [rating]="pd_QC_Rating"></app-rating>
|
||||
</p>
|
||||
</div>
|
||||
{{ pdMasterData[0]?.qc_remarks}}</p>
|
||||
|
||||
</mat-card>
|
||||
</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>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
|
||||
@ -10,6 +10,11 @@ import {AwsService} from '../../AwsService/aws.service';
|
||||
|
||||
/** 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', ' ');
|
||||
|
||||
@ -349,6 +354,26 @@ getTypeofActivityForSuppliedInfoForm(pd_id: any): Observable<any>{
|
||||
)
|
||||
}
|
||||
|
||||
//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) {
|
||||
// let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];
|
||||
@ -454,8 +479,7 @@ convertNumberToWords(amount) {
|
||||
* Sriram
|
||||
*/
|
||||
|
||||
overAllSearchFormDetails(searchItem)
|
||||
{
|
||||
overAllSearchFormDetails(searchItem) {
|
||||
let records = { 'records': searchItem };
|
||||
return this._http.post(this.apiUrl + 'filterPDList', records).pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<fieldset class="rating">
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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>
|
||||
@ -1,6 +1,7 @@
|
||||
|
||||
.rating {
|
||||
float:left;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.rating:not(:checked) > input {
|
||||
@ -40,3 +41,8 @@
|
||||
.rating > label:hover ~ input:checked ~ label {
|
||||
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