Fairoj: PD Report issues resolved

This commit is contained in:
venbatechnologies@gmail.com 2019-09-10 17:34:59 +05:30
parent 82ad8dbfe7
commit 807107bad5

View File

@ -126,7 +126,7 @@ export class PdReportComponent implements OnInit {
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
if (data.dataStatus) {
this.notifier.notify('success', 'Your Changes Updated.!');
this.getPdReportVersionList();
// this.getPdReportVersionList();
} else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
@ -173,15 +173,37 @@ export class PdReportComponent implements OnInit {
}
getPdReportDetails() {
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
if (data.status == 200) {
// this.pdReportRecords = data.records.question_answers;
this.pdReportRecords = data.records;
this.getPdReportVersionList()
// this.pdReportRecords = data.records.qu;
}
}, err => {
//OLD FUN
// this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
// if (data.status == 200) {
// // this.pdReportRecords = data.records.question_answers;
// this.pdReportRecords = data.records;
// this.getPdReportVersionList()
// // this.pdReportRecords = data.records.qu;
// }
// }, err => {
// })
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
if (data.status == 200) {
// console.log('getPdReportDetails',data);
this.pdReportRecords = data.records;
this.qcStatus = data.records.pd_status;
// console.log(this.qcStatus);
this.generateBtn = data.records.is_original_report_created == 1 ? false : true;
// console.log(this.generateBtn);
this.reGenerateBtn = data.records.is_original_report_created == 1 ? true : false;
// console.log(this.reGenerateBtn);
}
else{
this.generateBtn = true;
// console.log('else',this.generateBtn);
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
}
this.getHTMLPDReport()
}, err => {
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
})
}