Merge branch 'dmp-refactoring' of https://code-repo.d4science.org/MaDgiK-CITE/argos into dmp-refactoring

This commit is contained in:
Sofia Papacharalampous 2024-06-26 11:15:24 +03:00
commit bff183753b
2 changed files with 3 additions and 3 deletions

View File

@ -78,8 +78,8 @@ export class UserService {
catchError((error: any) => throwError(error))); catchError((error: any) => throwError(error)));
} }
exportCSV(): Observable<HttpResponse<Blob>> { exportCSV(hasTenantAdminMode: boolean): Observable<HttpResponse<Blob>> {
const url = `${this.apiBase}/export/csv`; const url = `${this.apiBase}/export/csv/${hasTenantAdminMode}`;
let headerXml: HttpHeaders = this.headers.set('Content-Type', 'application/xml'); let headerXml: HttpHeaders = this.headers.set('Content-Type', 'application/xml');
const params = new BaseHttpParams(); const params = new BaseHttpParams();
params.interceptorContext = { params.interceptorContext = {

View File

@ -216,7 +216,7 @@ export class UserListingComponent extends BaseListingComponent<User, UserLookup>
// //
export() { //TODO: send lookup to backend to export only filtered export() { //TODO: send lookup to backend to export only filtered
this.userService.exportCSV() this.userService.exportCSV(this.hasTenantAdminMode)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(response => { .subscribe(response => {
const blob = new Blob([response.body], { type: 'application/csv' }); const blob = new Blob([response.body], { type: 'application/csv' });