diff --git a/src/app/start/start.component.css b/src/app/start/start.component.css index d8d922ba5b26e0f7038c538d744147541d824964..5b0d7dccc5371ab0350d50bf7bfddadcc41c2715 100644 --- a/src/app/start/start.component.css +++ b/src/app/start/start.component.css @@ -5,7 +5,3 @@ .status { background-color: lightgrey; } - -.error-msg { - color: brown; -} diff --git a/src/app/workspace/backend.service.ts b/src/app/workspace/backend.service.ts index 4c8146082ee0043e1cb1d65f90fd755b34a13bb9..e56ca36f4dfc0fe00493e1df5d4131a4df4ff5c2 100644 --- a/src/app/workspace/backend.service.ts +++ b/src/app/workspace/backend.service.ts @@ -1,6 +1,6 @@ import { GetFileResponseData, CheckWorkspaceResponseData, BookletsStarted, SysCheckStatistics, ReviewData, LogData, UnitResponse, ResultData, MonitorData } from './workspace.interfaces'; import { Injectable, Inject } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http'; +import { HttpClient, HttpHeaders, HttpErrorResponse, HttpUrlEncodingCodec } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; // import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { catchError } from 'rxjs/operators'; @@ -18,24 +18,6 @@ export class BackendService { } - // ******************************************************************* - // Fehlerbehandlung beim Aufrufer - getFile(filetype: string, filename: string): Observable<GetFileResponseData[] | ServerError> { - const httpOptions = { - headers: new HttpHeaders({ - 'Content-Type': 'application/json' - }) - }; - return this.http - .post<GetFileResponseData[]>(this.serverUrl + 'getFile.php', { - ft: filetype, - fn: filename - }, httpOptions) - .pipe( - catchError(ErrorHandler.handle) - ); - } - // ******************************************************************* getFiles(): Observable<GetFileResponseData[] | ServerError> { return this.http diff --git a/src/app/workspace/files/files.component.ts b/src/app/workspace/files/files.component.ts index 0beafb6e8a5994e26aaf55b95cc702939765d120..e9350259b134ae92d17b83d22bcd5ef03f76b2ee 100644 --- a/src/app/workspace/files/files.component.ts +++ b/src/app/workspace/files/files.component.ts @@ -153,8 +153,10 @@ export class FilesComponent implements OnInit, OnDestroy { // *********************************************************************************** getDownloadRef(element: GetFileResponseData): string { return this.serverUrl - + 'admin/php_admin/getFile.php?t=' + element.type - + '&fn=' + element.filename; + + 'php/getFile.php?t=' + element.type + + '&fn=' + element.filename + + '&at=' + this.mds.adminToken + + '&ws=' + this.wds.ws.toString(); } checkWorkspace() { diff --git a/src/app/workspace/workspace.component.html b/src/app/workspace/workspace.component.html index b162d5216d53e15b991eac91f4cd7966c01f6612..45c74fcb4bf3330be84eef898096e8be44764f3d 100644 --- a/src/app/workspace/workspace.component.html +++ b/src/app/workspace/workspace.component.html @@ -2,9 +2,9 @@ <a [routerLink]="['/']"> <img src="assets/IQB-LogoA.png" matTooltip="Startseite"/> </a> - <div fxLayout="row" fxLayoutAlign="end center"> - <p>{{ pageTitle }}</p> - </div> + <div class="error-msg">{{ (mds.globalErrorMsg$ | async)?.labelNice }}</div> + <div>IQB-Testcenter Verwaltung</div> + <div>{{ pageTitle }}</div> </div> <div class="page-body"> <div class="adminbackground"> diff --git a/src/styles.css b/src/styles.css index 5f1fdb8420eccc2fa86d9cfcedef0c2fdfcdaf50..a7578e00f336c912d31f0ff12604b768e84648b7 100644 --- a/src/styles.css +++ b/src/styles.css @@ -12,7 +12,7 @@ overflow-x: auto; position: absolute; width: 100%; - top: 50px; + top: 60px; bottom: 0; } @@ -33,3 +33,7 @@ .logo img { width: 100px; } + +.error-msg { + color: brown; +}