From 8baa759ab9fd5e00fbf0c2dc68ede4c6edb9c563 Mon Sep 17 00:00:00 2001 From: Venkat Kandagaddala Date: Wed, 13 Nov 2024 12:04:29 +0530 Subject: [PATCH 1/2] Fixed the report name --- .../components/batch-details/batch-details.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/project/ws/app/src/lib/routes/blended-program-approvals/components/batch-details/batch-details.component.ts b/project/ws/app/src/lib/routes/blended-program-approvals/components/batch-details/batch-details.component.ts index 5ac97787..424db7d5 100644 --- a/project/ws/app/src/lib/routes/blended-program-approvals/components/batch-details/batch-details.component.ts +++ b/project/ws/app/src/lib/routes/blended-program-approvals/components/batch-details/batch-details.component.ts @@ -612,10 +612,8 @@ export class BatchDetailsComponent implements OnInit { const downloadUrl = this.reportStatusList[0].downloadLink.split('gcpbpreports/') [this.reportStatusList[0].downloadLink.split('gcpbpreports/').length - 1] const fileExtension = downloadUrl.split('.').pop()?.toLowerCase() - const roleName = this.userDetails.roles.includes("MDO_LEADER") ? "MDO_LEADER" : - this.userDetails.roles.includes("MDO_LEADER") ? "MDO_ADMIN" : '' // tslint:disable-next-line: max-line-length - const fileName = `_Enrollment_Requests_Report_${roleName}_${batchDetails.name.split(' ').join('')}_Enrollment_Requests_Report_${this.formatDate(this.reportStatusList[0].lastReportGeneratedOn)}.${fileExtension}` + const fileName = `MDO_${batchDetails.name.split(' ').join('')}_Enrollment_Requests_Report_${this.formatDate(this.reportStatusList[0].lastReportGeneratedOn)}.${fileExtension}` await this.bpService.downloadReport(downloadUrl, fileName) } From 3a8eceb733457703ab9a0713367efd0a9ff44d90 Mon Sep 17 00:00:00 2001 From: Venkat Kandagaddala Date: Wed, 13 Nov 2024 12:51:05 +0530 Subject: [PATCH 2/2] Updated the reportRequester in the generate report --- .../components/batch-details/batch-details.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project/ws/app/src/lib/routes/blended-program-approvals/components/batch-details/batch-details.component.ts b/project/ws/app/src/lib/routes/blended-program-approvals/components/batch-details/batch-details.component.ts index 424db7d5..07dda2c5 100644 --- a/project/ws/app/src/lib/routes/blended-program-approvals/components/batch-details/batch-details.component.ts +++ b/project/ws/app/src/lib/routes/blended-program-approvals/components/batch-details/batch-details.component.ts @@ -589,11 +589,14 @@ export class BatchDetailsComponent implements OnInit { } async generateReport() { const batchDetails = this.batchData + const roleName = this.userDetails.roles.includes("MDO_LEADER") ? "MDO_LEADER" : + this.userDetails.roles.includes("MDO_ADMIN") ? "MDO_ADMIN" : '' const reqBody = { request: { orgId: this.userDetails.rootOrgId || '', courseId: this.programData.identifier || '', batchId: batchDetails.batchId || '', + reportRequester: roleName, surveyId: this.programData.wfSurveyLink.split('/')[this.programData.wfSurveyLink.split('/').length - 1] || '', }, }