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>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!--<h3>Develop across all platforms</h3>-->
|
||||
<form role="form" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
Edit PD Report Details
|
||||
</div>
|
||||
|
||||
</h2>
|
||||
<mat-dialog-content *ngIf="showEditor">
|
||||
<div style="margin: 12px;">
|
||||
<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>
|
||||
<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> -->
|
||||
</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>
|
||||
</div>
|
||||
<!--<div [innerHTML]="mycontent | safeHtml"></div>-->
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
<!--<button mat-button [mat-dialog-close]="true" cdkFocusInitial>Install</button>-->
|
||||
</mat-dialog-actions>
|
||||
<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;
|
||||
recordData: any;
|
||||
log = '';
|
||||
showEditor= false;
|
||||
showEditor: boolean= false;
|
||||
@ViewChild('myckeditor') ckeditor: any;
|
||||
/**
|
||||
* Notifier service
|
||||
@ -85,7 +85,10 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
|
||||
this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.dialogRef.close();
|
||||
this.dialogRef.close({
|
||||
status: true
|
||||
}
|
||||
);
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
|
||||
@ -1,31 +1,42 @@
|
||||
<!-- this is for completed pd report -->
|
||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
||||
<mat-card-content *ngIf="reGenerateBtn"ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
||||
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
||||
<div *ngIf="reGenerateBtn">
|
||||
|
||||
<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">
|
||||
<!-- <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 class="compose-btn mat-warn mat-raised-button mb-1" type="button" [disabled]="reGenerateBtn===false" (click)="reGeneratePFReport()"><b>Re-generate Report</b></button>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
</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">
|
||||
|
||||
<div 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 style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<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>
|
||||
@ -42,39 +53,40 @@
|
||||
|
||||
</figure>
|
||||
</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-card-content>
|
||||
<mat-card-content *ngIf="generateBtn" style="max-height:400px;overflow: auto;">
|
||||
</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()">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>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button color="blue" class="m-1 mb-1" type="button" (click)="reportReview('REMARKS')">Notes</button>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</ng-container>
|
||||
<!-- this is for qc completed pd report -->
|
||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
||||
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||
|
||||
<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}}-->
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<div *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<ng-container *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;">
|
||||
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
@ -83,14 +95,13 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
||||
</mat-card-actions>
|
||||
<div class="footer">
|
||||
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
|
||||
</div>
|
||||
|
||||
</mat-card>
|
||||
</ng-container>
|
||||
<notifier-container></notifier-container>
|
||||
@ -7,7 +7,9 @@
|
||||
}
|
||||
:host /deep/ {
|
||||
mat-sidenav {
|
||||
max-width: 300px;
|
||||
max-width: 400px;
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.mat-sidenav-content {
|
||||
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;
|
||||
latestPDDetails: any;
|
||||
message: any;
|
||||
selectedIndex: Number;
|
||||
private notifier: NotifierService;
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
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();
|
||||
let datas = this.pdReportVersionList.filter((a) => { return a.is_latest == 1; })
|
||||
this.latestPDDetails = datas[0];
|
||||
this.selectedIndex = 0;
|
||||
this.qcStatus = data.records.pdstatus;
|
||||
// alert(JSON.stringify(this.latestPDDetails));
|
||||
this.reGenerateBtn = true;
|
||||
@ -169,6 +171,9 @@ export class PdReportComponent implements OnInit {
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.status==true){
|
||||
this.getPdReportVersionList();
|
||||
}
|
||||
// this.getPdReportFinalTemplateDetails();
|
||||
// this.getQuestionsMasters();
|
||||
// this.getBranch();
|
||||
@ -176,9 +181,9 @@ export class PdReportComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
changeVersion(pd: any): void {
|
||||
changeVersion(pd: any,selIndex:Number): void {
|
||||
this.latestPDDetails = pd;
|
||||
console.log(this.latestPDDetails);
|
||||
this.selectedIndex = selIndex;
|
||||
}
|
||||
|
||||
|
||||
@ -190,6 +195,9 @@ export class PdReportComponent implements OnInit {
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.status==true){
|
||||
this.getPdReportVersionList();
|
||||
}
|
||||
// this.getPdReportFinalTemplateDetails();
|
||||
// this.getQuestionsMasters();
|
||||
// this.getBranch();
|
||||
|
||||
@ -78,17 +78,17 @@ export class QcReviewComponent implements OnInit {
|
||||
}
|
||||
|
||||
onChange($event: any): void {
|
||||
console.log('onChange');
|
||||
// this.log += new Date() + "<br />";
|
||||
}
|
||||
|
||||
myClick(): void {
|
||||
let template = this.ngForm.value;
|
||||
template.pd_id = this.data.startId;
|
||||
console.log(JSON.stringify(template));
|
||||
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.dialogRef.close();
|
||||
this.dialogRef.close({
|
||||
status: true
|
||||
});
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
|
||||
@ -1,19 +1,22 @@
|
||||
<h2 mat-dialog-title>Edit PD Report Details</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!--<h3>Develop across all platforms</h3>-->
|
||||
<form role="form" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
Edit PD Report Details
|
||||
</div>
|
||||
|
||||
</h2>
|
||||
<mat-dialog-content *ngIf="showEditor">
|
||||
<div style="margin: 12px;">
|
||||
<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>
|
||||
<button [disabled]="ngForm.invalid" class="btn btn-primary" (click)="myClick()">Save</button>
|
||||
</form>
|
||||
<!-- <button [disabled]="ngForm.invalid" mat-raised-button color="primary" type="button" (click)="myClick()">Save</button> -->
|
||||
</div>
|
||||
<!--<div [innerHTML]="mycontent | safeHtml"></div>-->
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
<!--<button mat-button [mat-dialog-close]="true" cdkFocusInitial>Install</button>-->
|
||||
<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;
|
||||
}
|
||||
@ -13,7 +13,7 @@ import {
|
||||
@Component({
|
||||
selector: 'app-model-edit-pd-report',
|
||||
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 {
|
||||
|
||||
@ -23,7 +23,7 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
ckeConfig: any;
|
||||
recordData: any;
|
||||
log = '';
|
||||
showEditor= false;
|
||||
showEditor: boolean= false;
|
||||
@ViewChild('myckeditor') ckeditor: any;
|
||||
/**
|
||||
* Notifier service
|
||||
@ -51,7 +51,7 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
if(data['dataStatus']){
|
||||
this.recordData = data.records[0];
|
||||
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]
|
||||
});
|
||||
this.showEditor = true;
|
||||
@ -59,11 +59,12 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
},err => {
|
||||
|
||||
});
|
||||
// this.ckeConfig = {
|
||||
this.ckeConfig = {
|
||||
// allowedContent: false,
|
||||
// extraPlugins: 'divarea',
|
||||
// forcePasteAsPlainText: true
|
||||
// };
|
||||
// forcePasteAsPlainText: true,
|
||||
height:250,
|
||||
};
|
||||
}
|
||||
|
||||
onChange($event: any): void {
|
||||
@ -85,7 +86,10 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
|
||||
this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.dialogRef.close();
|
||||
this.dialogRef.close({
|
||||
status: true
|
||||
}
|
||||
);
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
|
||||
@ -1,31 +1,42 @@
|
||||
<!-- this is for completed pd report -->
|
||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
||||
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
||||
<div *ngIf="reGenerateBtn">
|
||||
|
||||
<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">
|
||||
<!-- <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 class="compose-btn mat-warn mat-raised-button mb-1" type="button" [disabled]="reGenerateBtn===false" (click)="reGeneratePFReport()"><b>Re-generate Report</b></button>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
</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">
|
||||
|
||||
<div 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 style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<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>
|
||||
@ -42,39 +53,40 @@
|
||||
|
||||
</figure>
|
||||
</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-card-content>
|
||||
<mat-card-content *ngIf="generateBtn" style="max-height:400px;overflow: auto;">
|
||||
</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()">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>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button color="blue" class="m-1 mb-1" type="button" (click)="reportReview('REMARKS')">Notes</button>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</ng-container>
|
||||
<!-- this is for qc completed pd report -->
|
||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
||||
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||
|
||||
<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}}-->
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<div *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<ng-container *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;">
|
||||
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
@ -83,14 +95,13 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
||||
</mat-card-actions>
|
||||
<div class="footer">
|
||||
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
|
||||
</div>
|
||||
|
||||
</mat-card>
|
||||
</ng-container>
|
||||
<notifier-container></notifier-container>
|
||||
@ -7,7 +7,9 @@
|
||||
}
|
||||
:host /deep/ {
|
||||
mat-sidenav {
|
||||
max-width: 300px;
|
||||
max-width: 400px;
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.mat-sidenav-content {
|
||||
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;
|
||||
latestPDDetails: any;
|
||||
message: any;
|
||||
selectedIndex: Number;
|
||||
|
||||
private notifier: NotifierService;
|
||||
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();
|
||||
let datas = this.pdReportVersionList.filter((a) => { return a.is_latest == 1; })
|
||||
this.latestPDDetails = datas[0];
|
||||
this.selectedIndex = 0;
|
||||
|
||||
this.qcStatus = data.records.pdstatus;
|
||||
// alert(JSON.stringify(this.latestPDDetails));
|
||||
this.generateBtn=false;
|
||||
this.reGenerateBtn = true;
|
||||
} else {
|
||||
// this.reGenerateBtn = true;
|
||||
@ -164,10 +168,17 @@ export class QcPdReportComponent implements OnInit {
|
||||
addNewQuestion() {
|
||||
const dialogRef = this.dialog.open(ModelEditPdReportComponent, {
|
||||
data: { startId: this.startPD, version_id: this.latestPDDetails.doc_name },
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.status==true){
|
||||
this.getPdReportVersionList();
|
||||
}
|
||||
// this.getPdReportFinalTemplateDetails();
|
||||
// this.getQuestionsMasters();
|
||||
// this.getBranch();
|
||||
@ -175,9 +186,9 @@ export class QcPdReportComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
changeVersion(pd: any): void {
|
||||
changeVersion(pd: any,selIndex: Number): void {
|
||||
this.latestPDDetails = pd;
|
||||
console.log(this.latestPDDetails);
|
||||
this.selectedIndex = selIndex;
|
||||
}
|
||||
|
||||
|
||||
@ -189,6 +200,9 @@ export class QcPdReportComponent implements OnInit {
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.status==true){
|
||||
this.getPdReportVersionList();
|
||||
}
|
||||
// this.getPdReportFinalTemplateDetails();
|
||||
// this.getQuestionsMasters();
|
||||
// this.getBranch();
|
||||
|
||||
@ -78,17 +78,17 @@ export class QcReviewComponent implements OnInit {
|
||||
}
|
||||
|
||||
onChange($event: any): void {
|
||||
console.log('onChange');
|
||||
// this.log += new Date() + "<br />";
|
||||
}
|
||||
|
||||
myClick(): void {
|
||||
let template = this.ngForm.value;
|
||||
template.pd_id = this.data.startId;
|
||||
console.log(JSON.stringify(template));
|
||||
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.dialogRef.close();
|
||||
this.dialogRef.close({
|
||||
status:true
|
||||
});
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
<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="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>
|
||||
<!-- {{master | json}} -->
|
||||
|
||||
|
||||
@ -316,6 +316,7 @@ export class QcService {
|
||||
}
|
||||
|
||||
updatePDReportDetails(records: any): Observable<any> {
|
||||
records.fk_updatedby=this._aws.getlocale();
|
||||
return this._http.post<any>(this.apiUrl + "saveNewVersionOfPDReport ", { "records": records })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
@ -331,6 +332,7 @@ export class QcService {
|
||||
|
||||
swapOlderPDReportToLatest(pdId: any): Observable<any> {
|
||||
pdId.fk_createdby = this._aws.getlocale();
|
||||
pdId.fk_updatedby = this._aws.getlocale();
|
||||
return this._http.post<any>(this.apiUrl + "swapOlderPDReportToLatest", { "records": pdId })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user