Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
05b64e4a5d
@ -1,19 +1,23 @@
|
|||||||
<h2 mat-dialog-title>Edit PD Report Details</h2>
|
<form role="form" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||||
<mat-dialog-content class="mat-typography">
|
<h2 mat-dialog-title class="paragraph_change">
|
||||||
<!--<h3>Develop across all platforms</h3>-->
|
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||||
<div style="margin: 12px;">
|
Edit PD Report Details
|
||||||
<form role="form" *ngIf="showEditor" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
|
||||||
<div class="form-group has-feedback">
|
|
||||||
<ckeditor formControlName="content" name="myckeditor" required [config]="ckeConfig" debounce="500" (change)="onChange($event)">
|
|
||||||
</ckeditor>
|
|
||||||
<!--<div *ngIf="myckeditor.invalid && myckeditor.touched" class="help-block">Required field.</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<button [disabled]="ngForm.invalid" class="btn btn-primary" (click)="myClick()">Save</button>
|
|
||||||
</form>
|
</h2>
|
||||||
</div>
|
<mat-dialog-content *ngIf="showEditor">
|
||||||
<!--<div [innerHTML]="mycontent | safeHtml"></div>-->
|
<div style="margin: 12px;">
|
||||||
</mat-dialog-content>
|
<div class="form-group has-feedback">
|
||||||
<mat-dialog-actions align="end">
|
<ckeditor formControlName="content" name="myckeditor" required [config]="ckeConfig" debounce="500" (change)="onChange($event)">
|
||||||
<button mat-button mat-dialog-close>Cancel</button>
|
</ckeditor>
|
||||||
<!--<button mat-button [mat-dialog-close]="true" cdkFocusInitial>Install</button>-->
|
</div>
|
||||||
</mat-dialog-actions>
|
<!-- <button [disabled]="ngForm.invalid" mat-raised-button color="primary" type="button" (click)="myClick()">Save</button> -->
|
||||||
|
</div>
|
||||||
|
</mat-dialog-content>
|
||||||
|
<mat-dialog-actions align="end">
|
||||||
|
<button [disabled]="ngForm.invalid && showEditor===false" mat-raised-button color="primary" type="button" (click)="myClick()">Save</button>
|
||||||
|
<button mat-button mat-dialog-close mat-raised-button color="primary" type="button">Cancel</button>
|
||||||
|
</mat-dialog-actions>
|
||||||
|
</form>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
::ng-deep .cdk-global-overlay-wrapper{
|
||||||
|
justify-content: center !important;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.paragraph_change {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #e00201 !important;
|
||||||
|
}
|
||||||
@ -23,7 +23,7 @@ export class ModelEditPdReportComponent implements OnInit {
|
|||||||
ckeConfig: any;
|
ckeConfig: any;
|
||||||
recordData: any;
|
recordData: any;
|
||||||
log = '';
|
log = '';
|
||||||
showEditor= false;
|
showEditor: boolean= false;
|
||||||
@ViewChild('myckeditor') ckeditor: any;
|
@ViewChild('myckeditor') ckeditor: any;
|
||||||
/**
|
/**
|
||||||
* Notifier service
|
* Notifier service
|
||||||
@ -85,7 +85,10 @@ export class ModelEditPdReportComponent implements OnInit {
|
|||||||
|
|
||||||
this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{
|
this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.dialogRef.close();
|
this.dialogRef.close({
|
||||||
|
status: true
|
||||||
|
}
|
||||||
|
);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
|
||||||
|
|||||||
@ -1,96 +1,107 @@
|
|||||||
<!-- this is for completed pd report -->
|
<!-- this is for completed pd report -->
|
||||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
||||||
<mat-card-content *ngIf="reGenerateBtn"ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
<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">
|
||||||
<button matTooltip="Menu" matTooltipPosition="above" (click)="mailnav.toggle()" color="primary" fxHide="false" fxshow.gt-sm mat-icon-button mat-raised-button>
|
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||||
<mat-icon style="color: white;">short_text</mat-icon>
|
<!-- <button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button> -->
|
||||||
</button>
|
<button class="compose-btn mat-warn mat-raised-button mb-1" type="button" [disabled]="reGenerateBtn===false" (click)="reGeneratePFReport()"><b>Re-generate Report</b></button>
|
||||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
|
||||||
<mat-card style="text-align:center;" *ngIf="qcStatus !== 'QC_COMPLETED'"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()" style="padding: 0 58px !important;" >Re-generate Report</button></mat-card>
|
|
||||||
<button type="button" mat-menu-item *ngFor="let pd of pdReportVersionList" [ngClass]="{'active': selectedItem == item}" (click)="changeVersion(pd)" style="font-size: 0.9em !important;height:6% !important;line-height: normal !important;">
|
|
||||||
{{ pd.doc_name }}<span *ngIf="pd.is_latest == 1" [style.color]="'green'">( Current Version )</span><br>
|
|
||||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdby}}</span><br>
|
|
||||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdon}}</span>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
<mat-nav-list style="background-color: white !important">
|
||||||
|
<a mat-list-item *ngFor="let pd of pdReportVersionList; let itemIndex = index;" (click)="changeVersion(pd, itemIndex)">
|
||||||
|
<h4 mat-line [ngStyle]="{'color':pd.is_latest == 1 && itemIndex == selectedIndex ? '#e00201' : pd.is_latest == 1 && itemIndex != selectedIndex ? 'green' : pd.is_latest !=1 && itemIndex == selectedIndex ? '#e00201' : 'rgba(0, 0, 0, 0.87)' }">{{ pd.doc_name }}</h4>
|
||||||
|
<!-- <h4 mat-line>{{ pd.doc_name }}</h4> -->
|
||||||
|
<p mat-line> {{pd.createdby}} ({{pd.createdon}}) </p>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-nav-list>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-sidenav>
|
||||||
|
<mat-toolbar color="primary">
|
||||||
|
<!-- fxHide="false" fxHide.gt-sm -->
|
||||||
|
<button (click)="mailnav.toggle()" mat-icon-button>
|
||||||
|
<mat-icon style="color: white;">short_text</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-sidenav>
|
<span class="mr-1 ml-1">View More</span>
|
||||||
|
</mat-toolbar>
|
||||||
|
|
||||||
|
|
||||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
|
||||||
<!--{{qcStatus}}-->
|
|
||||||
<figure style="min-height: 240px;">
|
|
||||||
|
|
||||||
<div *ngIf="latestPDDetails">
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
<div style="margin: 12px;
|
<!--{{qcStatus}}-->
|
||||||
background: #ddd;
|
<figure style="min-height: 240px;">
|
||||||
padding: 8px;">
|
|
||||||
<div style="text-align: right" class="mb-1">
|
|
||||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
|
||||||
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
|
||||||
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0 && qcStatus !== 'QC_COMPLETED'" type="button" (click)="changeDocumentEdit()">Restore</button>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="reGenerateBtn">
|
|
||||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
|
||||||
</pdf-viewer>
|
|
||||||
<!-- latestPDDetails.doc_uri -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
<div *ngIf="latestPDDetails">
|
||||||
</div>
|
<div style="margin: 12px;">
|
||||||
|
<!-- background: #ddd;
|
||||||
|
padding: 8px;" -->
|
||||||
|
<div style="text-align: right" class="mb-1">
|
||||||
|
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
||||||
|
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
||||||
|
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0 && qcStatus !== 'QC_COMPLETED'" type="button" (click)="changeDocumentEdit()">Restore</button>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="reGenerateBtn">
|
||||||
|
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||||
|
</pdf-viewer>
|
||||||
|
<!-- latestPDDetails.doc_uri -->
|
||||||
|
</div>
|
||||||
|
|
||||||
</figure>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-sidenav-container>
|
|
||||||
</mat-card-content>
|
|
||||||
<mat-card-content *ngIf="generateBtn" style="max-height:400px;overflow: auto;">
|
|
||||||
<div fxLayout="row wrap">
|
|
||||||
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
|
|
||||||
<div fxFlex="100">
|
|
||||||
<h5 style="text-align:center;color: black;"> {{message}}</h5>
|
|
||||||
<div style="text-align:center;">
|
|
||||||
<button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()">Generate Report</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</mat-card-content>
|
</figure>
|
||||||
<mat-card-actions align="end">
|
</div>
|
||||||
<button mat-raised-button color="blue" class="m-1 mb-1" type="button" (click)="reportReview('REMARKS')">Notes</button>
|
<div class="footer">
|
||||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="reportReview('COMPLETE')">QC Complete</button>
|
<button mat-raised-button color="blue" type="button" (click)="reportReview('REMARKS')" style="margin-right: 2px;">Notes</button>
|
||||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
<button mat-raised-button color="primary" type="button" (click)="reportReview('COMPLETE')" style="margin-right: 2px;">QC Complete</button>
|
||||||
</mat-card-actions>
|
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
|
||||||
</mat-card>
|
</div>
|
||||||
|
|
||||||
|
</mat-sidenav-container>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="generateBtn">
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
|
||||||
|
<div fxFlex="100">
|
||||||
|
<h5 style="text-align:center;color: black;"> {{message}}</h5>
|
||||||
|
<div style="text-align:center;">
|
||||||
|
<button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()" style="margin-right: 2px;">Generate Report</button>
|
||||||
|
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ng-container>
|
||||||
<!-- this is for qc completed pd report -->
|
<!-- this is for qc completed pd report -->
|
||||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
|
||||||
|
|
||||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<div *ngIf="reGenerateBtn" 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">
|
<ng-container *ngIf="latestPDDetails">
|
||||||
<div style="margin: 12px;
|
<div style="margin: 12px;">
|
||||||
background: #ddd;
|
|
||||||
padding: 8px;">
|
|
||||||
|
|
||||||
<div *ngIf="reGenerateBtn">
|
<div *ngIf="reGenerateBtn">
|
||||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||||
</pdf-viewer>
|
</pdf-viewer>
|
||||||
<!-- latestPDDetails.doc_uri -->
|
<!-- latestPDDetails.doc_uri -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</ng-container>
|
||||||
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
<div class="footer">
|
||||||
<mat-card-actions align="end">
|
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
|
||||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
</div>
|
||||||
</mat-card-actions>
|
|
||||||
|
|
||||||
</mat-card>
|
</ng-container>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -7,7 +7,9 @@
|
|||||||
}
|
}
|
||||||
:host /deep/ {
|
:host /deep/ {
|
||||||
mat-sidenav {
|
mat-sidenav {
|
||||||
max-width: 300px;
|
max-width: 400px;
|
||||||
|
max-height: 500px;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.mat-sidenav-content {
|
.mat-sidenav-content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -116,4 +118,11 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custm-list-item {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 2%;
|
||||||
|
right: 2%;
|
||||||
|
}
|
||||||
@ -39,6 +39,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
pdReportRecords: any;
|
pdReportRecords: any;
|
||||||
latestPDDetails: any;
|
latestPDDetails: any;
|
||||||
message: any;
|
message: any;
|
||||||
|
selectedIndex: Number;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
|
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
|
||||||
@ -129,6 +130,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
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.selectedIndex = 0;
|
||||||
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;
|
||||||
@ -169,6 +171,9 @@ export class PdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
|
if(dataresult.status==true){
|
||||||
|
this.getPdReportVersionList();
|
||||||
|
}
|
||||||
// this.getPdReportFinalTemplateDetails();
|
// this.getPdReportFinalTemplateDetails();
|
||||||
// this.getQuestionsMasters();
|
// this.getQuestionsMasters();
|
||||||
// this.getBranch();
|
// this.getBranch();
|
||||||
@ -176,9 +181,9 @@ export class PdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
changeVersion(pd: any): void {
|
changeVersion(pd: any,selIndex:Number): void {
|
||||||
this.latestPDDetails = pd;
|
this.latestPDDetails = pd;
|
||||||
console.log(this.latestPDDetails);
|
this.selectedIndex = selIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -190,6 +195,9 @@ export class PdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
|
if(dataresult.status==true){
|
||||||
|
this.getPdReportVersionList();
|
||||||
|
}
|
||||||
// this.getPdReportFinalTemplateDetails();
|
// this.getPdReportFinalTemplateDetails();
|
||||||
// this.getQuestionsMasters();
|
// this.getQuestionsMasters();
|
||||||
// this.getBranch();
|
// this.getBranch();
|
||||||
|
|||||||
@ -78,17 +78,17 @@ export class QcReviewComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onChange($event: any): void {
|
onChange($event: any): void {
|
||||||
console.log('onChange');
|
|
||||||
// this.log += new Date() + "<br />";
|
// this.log += new Date() + "<br />";
|
||||||
}
|
}
|
||||||
|
|
||||||
myClick(): void {
|
myClick(): void {
|
||||||
let template = this.ngForm.value;
|
let template = this.ngForm.value;
|
||||||
template.pd_id = this.data.startId;
|
template.pd_id = this.data.startId;
|
||||||
console.log(JSON.stringify(template));
|
|
||||||
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.dialogRef.close();
|
this.dialogRef.close({
|
||||||
|
status: true
|
||||||
|
});
|
||||||
}, err => {
|
}, err => {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +1,22 @@
|
|||||||
<h2 mat-dialog-title>Edit PD Report Details</h2>
|
<form role="form" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||||
<mat-dialog-content class="mat-typography">
|
<h2 mat-dialog-title class="paragraph_change">
|
||||||
<!--<h3>Develop across all platforms</h3>-->
|
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||||
|
Edit PD Report Details
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</h2>
|
||||||
|
<mat-dialog-content *ngIf="showEditor">
|
||||||
<div style="margin: 12px;">
|
<div style="margin: 12px;">
|
||||||
<form role="form" *ngIf="showEditor" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<ckeditor formControlName="content" name="myckeditor" required [config]="ckeConfig" debounce="500" (change)="onChange($event)">
|
<ckeditor formControlName="content" name="myckeditor" required [config]="ckeConfig" debounce="500" (change)="onChange($event)">
|
||||||
</ckeditor>
|
</ckeditor>
|
||||||
<!--<div *ngIf="myckeditor.invalid && myckeditor.touched" class="help-block">Required field.</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<button [disabled]="ngForm.invalid" class="btn btn-primary" (click)="myClick()">Save</button>
|
<!-- <button [disabled]="ngForm.invalid" mat-raised-button color="primary" type="button" (click)="myClick()">Save</button> -->
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<!--<div [innerHTML]="mycontent | safeHtml"></div>-->
|
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
<mat-dialog-actions align="end">
|
<mat-dialog-actions align="end">
|
||||||
<button mat-button mat-dialog-close>Cancel</button>
|
<button [disabled]="ngForm.invalid && showEditor===false" mat-raised-button color="primary" type="button" (click)="myClick()">Save</button>
|
||||||
<!--<button mat-button [mat-dialog-close]="true" cdkFocusInitial>Install</button>-->
|
<button mat-button mat-dialog-close mat-raised-button color="primary" type="button">Cancel</button>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
</form>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
::ng-deep .cdk-global-overlay-wrapper{
|
||||||
|
justify-content: center !important;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.paragraph_change {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #e00201 !important;
|
||||||
|
}
|
||||||
@ -13,7 +13,7 @@ import {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-model-edit-pd-report',
|
selector: 'app-model-edit-pd-report',
|
||||||
templateUrl: './model-edit-pd-report.component.html',
|
templateUrl: './model-edit-pd-report.component.html',
|
||||||
styleUrls: ['./model-edit-pd-report.component.scss']
|
styleUrls: ['./model-edit-pd-report.component.scss'],
|
||||||
})
|
})
|
||||||
export class ModelEditPdReportComponent implements OnInit {
|
export class ModelEditPdReportComponent implements OnInit {
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ export class ModelEditPdReportComponent implements OnInit {
|
|||||||
ckeConfig: any;
|
ckeConfig: any;
|
||||||
recordData: any;
|
recordData: any;
|
||||||
log = '';
|
log = '';
|
||||||
showEditor= false;
|
showEditor: boolean= false;
|
||||||
@ViewChild('myckeditor') ckeditor: any;
|
@ViewChild('myckeditor') ckeditor: any;
|
||||||
/**
|
/**
|
||||||
* Notifier service
|
* Notifier service
|
||||||
@ -51,7 +51,7 @@ export class ModelEditPdReportComponent implements OnInit {
|
|||||||
if(data['dataStatus']){
|
if(data['dataStatus']){
|
||||||
this.recordData = data.records[0];
|
this.recordData = data.records[0];
|
||||||
this.ngForm = this._formBuilder.group({
|
this.ngForm = this._formBuilder.group({
|
||||||
content: [this.recordData.pd_report_latest_version_blob, Validators.compose([Validators.required])],
|
content: [this.recordData.content, Validators.compose([Validators.required])],
|
||||||
isactive:[this.recordData.isactive]
|
isactive:[this.recordData.isactive]
|
||||||
});
|
});
|
||||||
this.showEditor = true;
|
this.showEditor = true;
|
||||||
@ -59,11 +59,12 @@ export class ModelEditPdReportComponent implements OnInit {
|
|||||||
},err => {
|
},err => {
|
||||||
|
|
||||||
});
|
});
|
||||||
// this.ckeConfig = {
|
this.ckeConfig = {
|
||||||
// allowedContent: false,
|
// allowedContent: false,
|
||||||
// extraPlugins: 'divarea',
|
// extraPlugins: 'divarea',
|
||||||
// forcePasteAsPlainText: true
|
// forcePasteAsPlainText: true,
|
||||||
// };
|
height:250,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange($event: any): void {
|
onChange($event: any): void {
|
||||||
@ -85,7 +86,10 @@ export class ModelEditPdReportComponent implements OnInit {
|
|||||||
|
|
||||||
this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{
|
this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.dialogRef.close();
|
this.dialogRef.close({
|
||||||
|
status: true
|
||||||
|
}
|
||||||
|
);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +1,42 @@
|
|||||||
<!-- this is for completed pd report -->
|
<!-- this is for completed pd report -->
|
||||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
||||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
<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">
|
||||||
<button matTooltip="Menu" matTooltipPosition="above" (click)="mailnav.toggle()" color="primary" fxHide="false" fxshow.gt-sm mat-icon-button mat-raised-button>
|
|
||||||
<mat-icon style="color: white;">short_text</mat-icon>
|
|
||||||
</button>
|
|
||||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||||
<mat-card style="text-align:center;" *ngIf="qcStatus !== 'QC_COMPLETED'"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()" style="padding: 0 58px !important;" >Re-generate Report</button></mat-card>
|
<!-- <button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button> -->
|
||||||
<button type="button" mat-menu-item *ngFor="let pd of pdReportVersionList" [ngClass]="{'active': selectedItem == item}" (click)="changeVersion(pd)" style="font-size: 0.9em !important;height:6% !important;line-height: normal !important;">
|
<button class="compose-btn mat-warn mat-raised-button mb-1" type="button" [disabled]="reGenerateBtn===false" (click)="reGeneratePFReport()"><b>Re-generate Report</b></button>
|
||||||
{{ pd.doc_name }}<span *ngIf="pd.is_latest == 1" [style.color]="'green'">( Current Version )</span><br>
|
|
||||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdby}}</span><br>
|
|
||||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdon}}</span>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
</button>
|
<mat-nav-list style="background-color: white !important">
|
||||||
</mat-sidenav>
|
<a mat-list-item *ngFor="let pd of pdReportVersionList; let itemIndex = index;" (click)="changeVersion(pd, itemIndex)">
|
||||||
|
<h4 mat-line [ngStyle]="{'color':pd.is_latest == 1 && itemIndex == selectedIndex ? '#e00201' : pd.is_latest == 1 && itemIndex != selectedIndex ? 'green' : pd.is_latest !=1 && itemIndex == selectedIndex ? '#e00201' : 'rgba(0, 0, 0, 0.87)' }">{{ pd.doc_name }}</h4>
|
||||||
|
<!-- <h4 mat-line>{{ pd.doc_name }}</h4> -->
|
||||||
|
<p mat-line> {{pd.createdby}} ({{pd.createdon}}) </p>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
</mat-nav-list>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-sidenav>
|
||||||
|
<mat-toolbar color="primary">
|
||||||
|
<!-- fxHide="false" fxHide.gt-sm -->
|
||||||
|
<button (click)="mailnav.toggle()" mat-icon-button>
|
||||||
|
<mat-icon style="color: white;">short_text</mat-icon>
|
||||||
|
</button>
|
||||||
|
<span class="mr-1 ml-1">View More</span>
|
||||||
|
</mat-toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div 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">
|
||||||
<div style="margin: 12px;
|
<div style="margin: 12px;">
|
||||||
background: #ddd;
|
<!-- background: #ddd;
|
||||||
padding: 8px;">
|
padding: 8px;" -->
|
||||||
<div style="text-align: right" class="mb-1">
|
<div style="text-align: right" class="mb-1">
|
||||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
||||||
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
||||||
@ -42,39 +53,40 @@
|
|||||||
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
<button mat-raised-button color="blue" type="button" (click)="reportReview('REMARKS')" style="margin-right: 2px;">Notes</button>
|
||||||
|
<button mat-raised-button color="primary" type="button" (click)="reportReview('COMPLETE')" style="margin-right: 2px;">QC Complete</button>
|
||||||
|
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</mat-sidenav-container>
|
</mat-sidenav-container>
|
||||||
</mat-card-content>
|
</div>
|
||||||
<mat-card-content *ngIf="generateBtn" style="max-height:400px;overflow: auto;">
|
<div *ngIf="generateBtn">
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
|
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<h5 style="text-align:center;color: black;"> {{message}}</h5>
|
<h5 style="text-align:center;color: black;"> {{message}}</h5>
|
||||||
<div style="text-align:center;">
|
<div style="text-align:center;">
|
||||||
<button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()">Generate Report</button>
|
<button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()" style="margin-right: 2px;">Generate Report</button>
|
||||||
|
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-card-content>
|
</div>
|
||||||
<mat-card-actions align="end">
|
|
||||||
<button mat-raised-button color="blue" class="m-1 mb-1" type="button" (click)="reportReview('REMARKS')">Notes</button>
|
</ng-container>
|
||||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="reportReview('COMPLETE')">QC Complete</button>
|
|
||||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
|
||||||
</mat-card-actions>
|
|
||||||
</mat-card>
|
|
||||||
<!-- this is for qc completed pd report -->
|
<!-- this is for qc completed pd report -->
|
||||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
|
||||||
|
|
||||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<div *ngIf="reGenerateBtn" 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">
|
<ng-container *ngIf="latestPDDetails">
|
||||||
<div style="margin: 12px;
|
<div style="margin: 12px;">
|
||||||
background: #ddd;
|
|
||||||
padding: 8px;">
|
|
||||||
|
|
||||||
<div *ngIf="reGenerateBtn">
|
<div *ngIf="reGenerateBtn">
|
||||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||||
@ -83,14 +95,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</ng-container>
|
||||||
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
<div class="footer">
|
||||||
<mat-card-actions align="end">
|
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
|
||||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
</div>
|
||||||
</mat-card-actions>
|
|
||||||
|
|
||||||
</mat-card>
|
</ng-container>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -7,7 +7,9 @@
|
|||||||
}
|
}
|
||||||
:host /deep/ {
|
:host /deep/ {
|
||||||
mat-sidenav {
|
mat-sidenav {
|
||||||
max-width: 300px;
|
max-width: 400px;
|
||||||
|
max-height: 500px;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.mat-sidenav-content {
|
.mat-sidenav-content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -115,3 +117,12 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custm-list-item {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 2%;
|
||||||
|
right: 2%;
|
||||||
|
}
|
||||||
@ -37,6 +37,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
pdReportRecords: any;
|
pdReportRecords: any;
|
||||||
latestPDDetails: any;
|
latestPDDetails: any;
|
||||||
message: any;
|
message: any;
|
||||||
|
selectedIndex: Number;
|
||||||
|
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
@ -128,8 +129,11 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
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.selectedIndex = 0;
|
||||||
|
|
||||||
this.qcStatus = data.records.pdstatus;
|
this.qcStatus = data.records.pdstatus;
|
||||||
// alert(JSON.stringify(this.latestPDDetails));
|
// alert(JSON.stringify(this.latestPDDetails));
|
||||||
|
this.generateBtn=false;
|
||||||
this.reGenerateBtn = true;
|
this.reGenerateBtn = true;
|
||||||
} else {
|
} else {
|
||||||
// this.reGenerateBtn = true;
|
// this.reGenerateBtn = true;
|
||||||
@ -164,10 +168,17 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
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 },
|
||||||
|
maxWidth: '100vw',
|
||||||
|
maxHeight: '100vh',
|
||||||
|
height: '100%',
|
||||||
|
width: '100%',
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
|
if(dataresult.status==true){
|
||||||
|
this.getPdReportVersionList();
|
||||||
|
}
|
||||||
// this.getPdReportFinalTemplateDetails();
|
// this.getPdReportFinalTemplateDetails();
|
||||||
// this.getQuestionsMasters();
|
// this.getQuestionsMasters();
|
||||||
// this.getBranch();
|
// this.getBranch();
|
||||||
@ -175,9 +186,9 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
changeVersion(pd: any): void {
|
changeVersion(pd: any,selIndex: Number): void {
|
||||||
this.latestPDDetails = pd;
|
this.latestPDDetails = pd;
|
||||||
console.log(this.latestPDDetails);
|
this.selectedIndex = selIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -189,6 +200,9 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
|
if(dataresult.status==true){
|
||||||
|
this.getPdReportVersionList();
|
||||||
|
}
|
||||||
// this.getPdReportFinalTemplateDetails();
|
// this.getPdReportFinalTemplateDetails();
|
||||||
// this.getQuestionsMasters();
|
// this.getQuestionsMasters();
|
||||||
// this.getBranch();
|
// this.getBranch();
|
||||||
|
|||||||
@ -78,17 +78,17 @@ export class QcReviewComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onChange($event: any): void {
|
onChange($event: any): void {
|
||||||
console.log('onChange');
|
|
||||||
// this.log += new Date() + "<br />";
|
// this.log += new Date() + "<br />";
|
||||||
}
|
}
|
||||||
|
|
||||||
myClick(): void {
|
myClick(): void {
|
||||||
let template = this.ngForm.value;
|
let template = this.ngForm.value;
|
||||||
template.pd_id = this.data.startId;
|
template.pd_id = this.data.startId;
|
||||||
console.log(JSON.stringify(template));
|
|
||||||
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.dialogRef.close();
|
this.dialogRef.close({
|
||||||
|
status:true
|
||||||
|
});
|
||||||
}, err => {
|
}, err => {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
<span *ngFor="let master of pdMasterData">
|
<span *ngFor="let master of pdMasterData">
|
||||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
|
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
|
||||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && 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.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 && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID,master.pd_status)"><mat-icon>question_answer</mat-icon></button>
|
<!-- <button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID,master.pd_status)"><mat-icon>question_answer</mat-icon></button> -->
|
||||||
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.COMPLETED || 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.COMPLETED || 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>
|
||||||
<!-- {{master | json}} -->
|
<!-- {{master | json}} -->
|
||||||
|
|
||||||
|
|||||||
@ -316,6 +316,7 @@ export class QcService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updatePDReportDetails(records: any): Observable<any> {
|
updatePDReportDetails(records: any): Observable<any> {
|
||||||
|
records.fk_updatedby=this._aws.getlocale();
|
||||||
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', []))
|
||||||
@ -331,6 +332,7 @@ export class QcService {
|
|||||||
|
|
||||||
swapOlderPDReportToLatest(pdId: any): Observable<any> {
|
swapOlderPDReportToLatest(pdId: any): Observable<any> {
|
||||||
pdId.fk_createdby = this._aws.getlocale();
|
pdId.fk_createdby = this._aws.getlocale();
|
||||||
|
pdId.fk_updatedby = this._aws.getlocale();
|
||||||
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', []))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user