diff --git a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.ts b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.ts index 07133e856..949d1b4b3 100644 --- a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.ts +++ b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.ts @@ -68,7 +68,6 @@ export class SimpleDoughnutChartComponent implements OnChanges { newData.push(null); } }); - console.log(newData); this.chartData = newData; } diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts index c2f530fd5..4d8725fab 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -19,7 +19,7 @@ import { download } from '../utils/file-download-utils'; import { humanize } from '../utils/functions'; import { FileStatusWrapper } from '../screens/file/model/file-status.wrapper'; import { ProjectWrapper } from './model/project.wrapper'; - +import { saveAs } from 'file-saver'; export interface AppState { projects: ProjectWrapper[]; activeProjectId: string; @@ -237,8 +237,8 @@ export class AppStateService { if (!project) { project = this.activeProject.project; } - this._fileManagementControllerService.downloadRedactionReportForProject(project.projectId, true, 'response').subscribe((data) => { - download(data, 'redaction-report-' + project.projectName + '.docx'); + this._fileManagementControllerService.downloadRedactionReportForProject(project.projectId, true, 'body').subscribe((data) => { + saveAs(data, 'redaction-report-' + project.projectName + '.docx'); }); } @@ -354,8 +354,8 @@ export class AppStateService { if (!file) { file = this.activeFile; } - this._fileManagementControllerService.downloadRedactionReport({ fileIds: [file.fileId] }, true, 'response').subscribe((data) => { - download(data, 'redaction-report-' + file.filename + '.docx'); + this._fileManagementControllerService.downloadRedactionReport({ fileIds: [file.fileId] }, true, 'body').subscribe((data) => { + saveAs(data, 'redaction-report-' + file.filename + '.docx'); }); } diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index bfcb40971..d447e7e9e 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,5 +1,5 @@ { "OAUTH_URL": "https://redkc-staging.iqser.cloud/auth/realms/redaction", "OAUTH_CLIENT_ID": "redaction", - "API_URL": "https://timo-redaction-dev.iqser.cloud" + "API_URL": "https://redapi-staging.iqser.cloud" } diff --git a/libs/red-ui-http/src/lib/api/fileManagementController.service.ts b/libs/red-ui-http/src/lib/api/fileManagementController.service.ts index 47b59cc9b..9d7ef1043 100644 --- a/libs/red-ui-http/src/lib/api/fileManagementController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileManagementController.service.ts @@ -420,7 +420,8 @@ export class FileManagementControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/download/report`, { + return this.httpClient.request('post', `${this.basePath}/download/report`, { + responseType: 'blob', body: body, params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -474,7 +475,8 @@ export class FileManagementControllerService { // to determine the Content-Type header const consumes: string[] = []; - return this.httpClient.request('get', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`, { + return this.httpClient.request('get', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`, { + responseType: 'blob', params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers,