From 0391c87659cc747db7d949b4bb76a2d413885c0b Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 15 Mar 2019 19:37:44 +0530 Subject: [PATCH] QC Functionality changes --- .../model-edit-pd-report.component.html | 40 ++-- .../model-edit-pd-report.component.scss | 8 + .../model-edit-pd-report.component.ts | 7 +- .../pd-report/pd-report.component.html | 195 +++++++++--------- .../pd-report/pd-report.component.scss | 13 +- .../list-pd/pd-report/pd-report.component.ts | 12 +- .../qc-review/qc-review.component.ts | 6 +- .../model-edit-pd-report.component.html | 25 ++- .../model-edit-pd-report.component.scss | 8 + .../model-edit-pd-report.component.ts | 22 +- .../qc-pd-report/qc-pd-report.component.html | 99 +++++---- .../qc-pd-report/qc-pd-report.component.scss | 13 +- .../qc-pd-report/qc-pd-report.component.ts | 18 +- .../qc-review/qc-review.component.ts | 6 +- .../qc-list/qc-view/qc-view.component.html | 2 +- .../quality-check/qc-service/qc.service.ts | 2 + 16 files changed, 286 insertions(+), 190 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.html index 0c978aba3..8379ac773 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.html @@ -1,19 +1,23 @@ -

Edit PD Report Details

- - -
-
-
- - - + +

+
+ Edit PD Report Details
- - -

- - - - - - \ No newline at end of file + + + +
+
+ + +
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.scss index e69de29bb..21a517b38 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.scss @@ -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; + } \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.ts index 0b50cbef4..874d745c9 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component.ts @@ -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.!'); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html index 170ed331f..4564cf0b2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html @@ -1,96 +1,107 @@ - - - + +
+ - - - - - - - -
- -
- -
-
-
- - -
-
- - - -
- -
-
- -
-
-
- - -
-
-
-
{{message}}
-
- -
-
-
-
- -
- - - - - - - - - - -
- -
- -
-
- -
- - - -
+ + + -
-
- -
-
-
- - - - -
+ + +

{{ pd.doc_name }}

+ +

{{pd.createdby}} ({{pd.createdon}})

+
+ + +
+ + + + + + + View More + + + + +
+ +
+ +
+
+ +
+ + +
+
+ + + +
+ +
+
+ +
+
+ + + +
+
+
+
+
+
{{message}}
+
+ + + +
+
+
+
+ +
+ +
+ + + +
+ +
+ + +
+ +
+ + + +
+ +
+
+ +
+
+ + +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.scss index b8d8535d4..ce799dd58 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.scss @@ -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,5 +117,12 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7); } } - +.custm-list-item { + cursor: pointer; + } + .footer { + position: fixed; + bottom: 2%; + right: 2%; +} \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts index 9a8658e4e..1972b05d7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts @@ -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(); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/qc-review/qc-review.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/qc-review/qc-review.component.ts index c054a5d7c..7fa06f1f4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/qc-review/qc-review.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/qc-review/qc-review.component.ts @@ -78,17 +78,17 @@ export class QcReviewComponent implements OnInit { } onChange($event: any): void { - console.log('onChange'); // this.log += new Date() + "
"; } 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.!'); diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.html index 0c978aba3..e7b33e507 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.html @@ -1,19 +1,22 @@ -

Edit PD Report Details

- - +
+

+
+ Edit PD Report Details +
+ +

+
-
-
- - +
-
- - - \ No newline at end of file + + + + + diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.scss index e69de29bb..21a517b38 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.scss +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.scss @@ -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; + } \ No newline at end of file diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.ts index 4a76ad601..c1fc032ca 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.ts @@ -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 = { - // allowedContent: false, - // extraPlugins: 'divarea', - // forcePasteAsPlainText: true - // }; + this.ckeConfig = { + // allowedContent: false, + // extraPlugins: 'divarea', + // 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.!'); diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html index 3b00ea5cd..548a0c955 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html @@ -1,31 +1,42 @@ - - + +
- - + - - - - - -
+ + + + + +

{{ pd.doc_name }}

+ +

{{pd.createdby}} ({{pd.createdon}})

+
+ + +
+ + + + + + + View More + + + + +
-
+
+
@@ -42,39 +53,40 @@
+ + - - +
+
{{message}}
- + + +
- - - - - - - +
+ + - - + -
+
-
-
+ +
@@ -83,14 +95,13 @@
-
+
- - - - + - + \ No newline at end of file diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss index ded3d2c82..cb94a35c0 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss @@ -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; @@ -114,4 +116,13 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7); } } +} + +.custm-list-item { + cursor: pointer; + } + .footer { + position: fixed; + bottom: 2%; + right: 2%; } \ No newline at end of file diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts index d2aa1e577..8775e7f43 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts @@ -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(); diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts index c5c4df00f..77f1818f4 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts @@ -78,17 +78,17 @@ export class QcReviewComponent implements OnInit { } onChange($event: any): void { - console.log('onChange'); // this.log += new Date() + "
"; } 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.!'); diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index 5e61a209e..29dffd228 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -48,7 +48,7 @@ - + diff --git a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts index c57621a8a..add487f9e 100755 --- a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts +++ b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts @@ -316,6 +316,7 @@ export class QcService { } updatePDReportDetails(records: any): Observable { + records.fk_updatedby=this._aws.getlocale(); return this._http.post(this.apiUrl + "saveNewVersionOfPDReport ", { "records": records }) .pipe( catchError(this.handleError('operation', [])) @@ -331,6 +332,7 @@ export class QcService { swapOlderPDReportToLatest(pdId: any): Observable { pdId.fk_createdby = this._aws.getlocale(); + pdId.fk_updatedby = this._aws.getlocale(); return this._http.post(this.apiUrl + "swapOlderPDReportToLatest", { "records": pdId }) .pipe( catchError(this.handleError('operation', []))