pd report changes : kdk
This commit is contained in:
parent
0f57f5c359
commit
05d9a87460
@ -6,6 +6,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<mat-card style="min-height:540px;">
|
<mat-card style="min-height:540px;">
|
||||||
<mat-card-content>
|
<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>
|
||||||
|
<!--{{ qcStatus }} -->
|
||||||
|
</div>
|
||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
<mat-tab label="PD Data">
|
<mat-tab label="PD Data">
|
||||||
<div>
|
<div>
|
||||||
@ -45,8 +50,6 @@
|
|||||||
<mat-tab label="PD Report">
|
<mat-tab label="PD Report">
|
||||||
<div *ngIf="reGenerateBtn">
|
<div *ngIf="reGenerateBtn">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
|
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
@ -64,13 +67,13 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
<mat-card *ngIf="qcStatus === 'QC_COMPLETED'" style="text-align:center;position: absolute;
|
<!--<mat-card *ngIf="qcStatus === 'QC_COMPLETED'" style="text-align:center;position: absolute;
|
||||||
bottom: 10px;"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reportReview()" style="padding: 0 58px !important;">QC Review</button> </mat-card>
|
bottom: 10px;"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reportReview()" style="padding: 0 58px !important;">QC Review</button> </mat-card>-->
|
||||||
</mat-sidenav>
|
</mat-sidenav>
|
||||||
|
|
||||||
|
|
||||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
{{qcStatus}}
|
<!--{{qcStatus}}-->
|
||||||
<figure style="min-height: 240px;">
|
<figure style="min-height: 240px;">
|
||||||
|
|
||||||
<div *ngIf="latestPDDetails">
|
<div *ngIf="latestPDDetails">
|
||||||
|
|||||||
@ -179,9 +179,9 @@ export class PdReportComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
reportReview(): void {
|
reportReview(status): void {
|
||||||
const dialogRef = this.dialog.open(QcReviewComponent, {
|
const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||||
data: { startId : this.startPD },
|
data: { startId : this.startPD, data_status: status },
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
|
|||||||
@ -1,6 +1,36 @@
|
|||||||
<h2 mat-dialog-title>QC Completed Review</h2>
|
<div *ngIf="showStatus == 'COMPLETE'">
|
||||||
|
<h2 mat-dialog-title>QC Complete</h2>
|
||||||
<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 *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.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="conformation" style="margin: 12px; width: 340px;">
|
||||||
|
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||||
|
<div>
|
||||||
|
<app-rating [rating]="ngForm.get('qc_rating').value" (ratingClick)='ratingComponentClick($event)'></app-rating>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="qc_feedback"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</mat-dialog-content>
|
||||||
|
<mat-dialog-actions align="end">
|
||||||
|
<button mat-button class="btn btn-primary" *ngIf="conformation === false" (click)="conformation = true">Ok</button>
|
||||||
|
<button mat-button class="btn btn-primary" *ngIf="conformation" (click)="myClick()">Save</button>
|
||||||
|
<button mat-button mat-dialog-close>Cancel</button>
|
||||||
|
</mat-dialog-actions>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="showStatus == 'REMARKS'">
|
||||||
|
<h2 mat-dialog-title>QC Remarks</h2>
|
||||||
|
<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>
|
||||||
<div>
|
<div>
|
||||||
@ -9,9 +39,6 @@
|
|||||||
<textarea matInput placeholder="Remarks" formControlName="qc_remarks"></textarea>
|
<textarea matInput placeholder="Remarks" formControlName="qc_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<app-rating [rating]="ngForm.get('qc_rating').value" (ratingClick)='ratingComponentClick($event)'></app-rating>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
@ -19,5 +46,4 @@
|
|||||||
<button mat-button class="btn btn-primary" (click)="myClick()">Save</button>
|
<button mat-button class="btn btn-primary" (click)="myClick()">Save</button>
|
||||||
<button mat-button mat-dialog-close>Cancel</button>
|
<button mat-button mat-dialog-close>Cancel</button>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
</div>
|
||||||
|
|
||||||
@ -17,10 +17,12 @@ import {
|
|||||||
})
|
})
|
||||||
export class QcReviewComponent implements OnInit {
|
export class QcReviewComponent implements OnInit {
|
||||||
|
|
||||||
|
conformation: Boolean = false;
|
||||||
@Input() questionId: number;
|
@Input() questionId: number;
|
||||||
ngForm: FormGroup;
|
ngForm: FormGroup;
|
||||||
recordData: any;
|
recordData: any;
|
||||||
showForm: Boolean;
|
showForm: Boolean;
|
||||||
|
showStatus : any;
|
||||||
/**
|
/**
|
||||||
* Notifier service
|
* Notifier service
|
||||||
*/
|
*/
|
||||||
@ -31,7 +33,7 @@ export class QcReviewComponent implements OnInit {
|
|||||||
private dialogRef: MatDialogRef<QcReviewComponent>,
|
private dialogRef: MatDialogRef<QcReviewComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
|
this.showStatus = this.data.data_status;
|
||||||
// this.mycontent = `<p>My html content</p>`;
|
// this.mycontent = `<p>My html content</p>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,19 +42,39 @@ export class QcReviewComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getQcCompleteReviewStatus() {
|
getQcCompleteReviewStatus() {
|
||||||
this.pdTrigerService.getQCReportFinalReviewDetails(this.data.startId, "QC").subscribe(data => {
|
let type ; '';
|
||||||
|
if( this.showStatus === 'REMARKS'){
|
||||||
|
type = 'QC_REMARKS';
|
||||||
|
this.pdTrigerService.getQCReportFinalReviewDetails(this.data.startId, type).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({
|
||||||
qc_remarks: [this.recordData.qc_remarks],
|
qc_remarks: [this.recordData.qc_remarks],
|
||||||
qc_rating: [Number(this.recordData.qc_rating)],
|
pd_status: [this.recordData.pd_status]
|
||||||
pd_status: [this.recordData.pd_status],
|
|
||||||
})
|
})
|
||||||
this.showForm = true;
|
this.showForm = true;
|
||||||
}
|
}
|
||||||
},err => {
|
},err => {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
} else if(this.showStatus === 'COMPLETE') {
|
||||||
|
type = 'QC';
|
||||||
|
this.pdTrigerService.getQCReportFinalReviewDetails(this.data.startId, type).subscribe(data => {
|
||||||
|
if(data['dataStatus']){
|
||||||
|
this.recordData = data.records[0];
|
||||||
|
this.ngForm = this._formBuilder.group({
|
||||||
|
qc_feedback: [this.recordData.qc_feedback],
|
||||||
|
qc_rating: [Number(this.recordData.qc_rating)],
|
||||||
|
pd_status: ["QC_COMPLETED"],
|
||||||
|
})
|
||||||
|
this.showForm = true;
|
||||||
|
}
|
||||||
|
},err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange($event: any): void {
|
onChange($event: any): void {
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
||||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" 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.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" 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" 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>
|
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED || 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>
|
||||||
|
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
|
||||||
<br>
|
<br>
|
||||||
@ -174,6 +174,23 @@
|
|||||||
</mat-card>
|
</mat-card>
|
||||||
</ng-template>
|
</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" fxFlex.lg="50" fxFlex.xl="50">
|
||||||
|
<mat-card>
|
||||||
|
<div style="color:red !important;">
|
||||||
|
<h6>QC Remarks</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>
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -64,11 +64,14 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
this.viewPdDetails(this.viewID);
|
this.viewPdDetails(this.viewID);
|
||||||
}
|
}
|
||||||
|
pd_QC_Rating: Number;
|
||||||
|
|
||||||
viewPdDetails(editID:string){
|
viewPdDetails(editID:string){
|
||||||
this._pd.editPdDetails(editID).subscribe(
|
this._pd.editPdDetails(editID).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.pdMasterData=data.records.pd_master_details;
|
this.pdMasterData=data.records.pd_master_details;
|
||||||
|
this.pd_QC_Rating = Number(this.pdMasterData[0].qc_rating);
|
||||||
this.pdApplicantData= data.records.applicants_details;
|
this.pdApplicantData= data.records.applicants_details;
|
||||||
this.pdDocumentsData=data.records.pd_documnets;
|
this.pdDocumentsData=data.records.pd_documnets;
|
||||||
this.masterPdLogsData=data.records.pd_logs.master;
|
this.masterPdLogsData=data.records.pd_logs.master;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user