diff --git a/src/app/app-root/admin-starter/admin-starter.component.html b/src/app/app-root/admin-starter/admin-starter.component.html new file mode 100644 index 0000000000000000000000000000000000000000..f8c4e18e07e499c3e9a2c8eb87ce5215009004c3 --- /dev/null +++ b/src/app/app-root/admin-starter/admin-starter.component.html @@ -0,0 +1,18 @@ +<mat-card fxFlex="0 0 400px" fxLayout="column"> + <mat-card-title>Verwaltung: Bitte Studie wählen</mat-card-title> + <mat-card-content> + <div fxLayoutGap="10px" fxLayout="column"> + <p *ngIf="(mds.loginData$ | async)?.workspaces.length === 0"> + Sie sind mit Administrator-Funktionen angemeldet. Aktuell sind keine Studien für Sie freigegeben. + </p> + <button mat-raised-button color="primary" (click)="buttonGotoWorkspaceAdmin(ws)" + *ngFor="let ws of (mds.loginData$ | async)?.workspaces"> + {{ws.name}} + </button> + </div> + </mat-card-content> + <mat-card-actions> + <button mat-raised-button color="foreground" *ngIf="(mds.loginData$ | async)?.isSuperadmin" [routerLink]="['/superadmin']">System-Admin</button> + <button mat-raised-button color="foreground" (click)="resetLogin()">Neu anmelden</button> + </mat-card-actions> +</mat-card> diff --git a/src/app/app-root/admin-starter/admin-starter.component.spec.ts b/src/app/app-root/admin-starter/admin-starter.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..f617ed0d82df678ae015d4725b5ae116cc0dd141 --- /dev/null +++ b/src/app/app-root/admin-starter/admin-starter.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AdminStarterComponent } from './admin-starter.component'; + +describe('WorkspaceAdminStarterComponent', () => { + let component: AdminStarterComponent; + let fixture: ComponentFixture<AdminStarterComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AdminStarterComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AdminStarterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/app-root/admin-starter/admin-starter.component.ts b/src/app/app-root/admin-starter/admin-starter.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..e9904c89f798e6365e333bb13a3957d7ac9c56d1 --- /dev/null +++ b/src/app/app-root/admin-starter/admin-starter.component.ts @@ -0,0 +1,24 @@ +import { Component } from '@angular/core'; +import {MainDataService} from "../../maindata.service"; +import {WorkspaceData} from "../../app.interfaces"; +import {Router} from "@angular/router"; + +@Component({ + templateUrl: './admin-starter.component.html', +}) +export class AdminStarterComponent { + + constructor( + private router: Router, + public mds: MainDataService + ) { } + + buttonGotoWorkspaceAdmin(ws: WorkspaceData) { + this.router.navigateByUrl('/admin/' + ws.id.toString() + '/files'); + } + + resetLogin() { + this.mds.setNewLoginData(); + this.router.navigate(['/']); + } +} diff --git a/src/app/app-root/app-root.component.html b/src/app/app-root/app-root.component.html deleted file mode 100644 index 4b415943a4a4e48ea4203fc25fc503936c4d9864..0000000000000000000000000000000000000000 --- a/src/app/app-root/app-root.component.html +++ /dev/null @@ -1,3 +0,0 @@ -<div class="root-frame" fxLayout="row wrap" fxLayoutAlign="center stretch"> - <router-outlet></router-outlet> -</div> diff --git a/src/app/app-root/app-root.component.ts b/src/app/app-root/app-root.component.ts index 79aab753022737e8432999d3789536265578ea10..85788888416013d2f6d5605207886a58081be30e 100644 --- a/src/app/app-root/app-root.component.ts +++ b/src/app/app-root/app-root.component.ts @@ -1,36 +1,30 @@ -import {Component, OnDestroy, OnInit} from '@angular/core'; -import {MainDataService} from "../maindata.service"; -import {FormControl, FormGroup, Validators} from "@angular/forms"; -import {CustomtextService} from "iqb-components"; +import {Component} from '@angular/core'; @Component({ - selector: 'app-app-root', - templateUrl: './app-root.component.html', + template: `<div class="root-frame" fxLayout="row wrap" fxLayoutAlign="center stretch"> + <router-outlet></router-outlet> + </div> + `, styles: ['.root-frame {padding: 80px;}'] }) -export class AppRootComponent implements OnInit, OnDestroy { - loginForm = new FormGroup({ - name: new FormControl('', [Validators.required, Validators.minLength(3)]), - pw: new FormControl('') - }); - +export class AppRootComponent { +/* constructor( public mds: MainDataService, - public cts: CustomtextService + private router: Router, + private route: ActivatedRoute ) { } ngOnInit(): void { - } - - login() { - const loginData = this.loginForm.value; - this.mds.appError$.next({ - label: loginData['name'], - description: loginData['pw'], - category: "FATAL" - }) - } - - ngOnDestroy() { - } + const loginData = this.mds.loginData$.getValue(); + if (loginData.adminToken.length > 0) { + this.router.navigate(['./admin-starter'], {relativeTo: this.route}); + } else if (loginData.loginToken.length > 0) { + this.router.navigate(['./code-input'], {relativeTo: this.route}); + } else if (loginData.personToken.length > 0) { + this.router.navigate(['./test-starter'], {relativeTo: this.route}); + } else { + this.router.navigate(['./login'], {relativeTo: this.route}); + } + } */ } diff --git a/src/app/app-root/app-status/app-status.component.css b/src/app/app-root/app-status/app-status.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/app/app-root/app-status/app-status.component.html b/src/app/app-root/app-status/app-status.component.html deleted file mode 100644 index a36e38a57bf784c8bd6e7d85965d1f3ed8d1e9fd..0000000000000000000000000000000000000000 --- a/src/app/app-root/app-status/app-status.component.html +++ /dev/null @@ -1 +0,0 @@ -<p>app-status works!</p> diff --git a/src/app/app-root/app-status/app-status.component.ts b/src/app/app-root/app-status/app-status.component.ts deleted file mode 100644 index a2c6b53b4d37dd79699ee5c6324905deab15bec4..0000000000000000000000000000000000000000 --- a/src/app/app-root/app-status/app-status.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-app-status', - templateUrl: './app-status.component.html', - styleUrls: ['./app-status.component.css'] -}) -export class AppStatusComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - -} diff --git a/src/app/app-root/code-input/code-input.component.html b/src/app/app-root/code-input/code-input.component.html new file mode 100644 index 0000000000000000000000000000000000000000..ef7d7b489ee708c4cdec4b29a7adb5de663f242f --- /dev/null +++ b/src/app/app-root/code-input/code-input.component.html @@ -0,0 +1,15 @@ +<mat-card fxFlex="0 0 400px"> + <form [formGroup]="codeinputform" (ngSubmit)="codeinput()"> + <mat-card-title>{{ 'login_codeInputTitle' | customtext:'login_codeInputTitle':cts.updateCount }}</mat-card-title> + <mat-card-subtitle>{{ 'login_codeInputPrompt' | customtext:'login_codeInputPrompt':cts.updateCount }}</mat-card-subtitle> + <mat-card-content> + <mat-form-field> + <input matInput formControlName="code" (keyup.enter)="codeinput()"> <!-- no placeholder! --> + </mat-form-field> + </mat-card-content> + <mat-card-actions> + <button mat-raised-button type="submit" [disabled]="codeinputform.invalid" color="primary">Weiter</button> + <button mat-raised-button color="foreground" (click)="resetLogin()">Neu anmelden</button> + </mat-card-actions> + </form> +</mat-card> diff --git a/src/app/app-root/app-status/app-status.component.spec.ts b/src/app/app-root/code-input/code-input.component.spec.ts similarity index 61% rename from src/app/app-root/app-status/app-status.component.spec.ts rename to src/app/app-root/code-input/code-input.component.spec.ts index f97e369e643742c4fa5ae32209ddfd724bbf3017..fbcbd63c2f1eed5ebcbe8e5cbe047ceb440ad7ae 100644 --- a/src/app/app-root/app-status/app-status.component.spec.ts +++ b/src/app/app-root/code-input/code-input.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { AppStatusComponent } from './app-status.component'; +import { CodeInputComponent } from './code-input.component'; describe('AppStatusComponent', () => { - let component: AppStatusComponent; - let fixture: ComponentFixture<AppStatusComponent>; + let component: CodeInputComponent; + let fixture: ComponentFixture<CodeInputComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ AppStatusComponent ] + declarations: [ CodeInputComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(AppStatusComponent); + fixture = TestBed.createComponent(CodeInputComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/app-root/code-input/code-input.component.ts b/src/app/app-root/code-input/code-input.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..90d5afcdef2e30afb7197c503a6968ab940baeea --- /dev/null +++ b/src/app/app-root/code-input/code-input.component.ts @@ -0,0 +1,58 @@ +import { Component } from '@angular/core'; +import {Router} from "@angular/router"; +import {MainDataService} from "../../maindata.service"; +import {FormControl, FormGroup, Validators} from "@angular/forms"; +import {CustomtextService, MessageDialogComponent, MessageDialogData, MessageType} from "iqb-components"; +import {MatDialog} from "@angular/material/dialog"; + +@Component({ + templateUrl: './code-input.component.html' +}) +export class CodeInputComponent { + codeinputform = new FormGroup({ + code: new FormControl('', [Validators.required, Validators.minLength(2)]), + }); + + constructor( + private router: Router, + public messageDialog: MatDialog, + public cts: CustomtextService, + public mds: MainDataService + ) { } + + codeinput() { + const loginData = this.mds.loginData$.getValue(); + const validCodes = Object.keys(loginData.booklets); + const myCode = this.codeinputform.get('code').value as string; + if (myCode.length === 0) { + this.messageDialog.open(MessageDialogComponent, { + width: '400px', + data: <MessageDialogData>{ + // @ts-ignore + title: this.cts.getCustomText('login_codeInputTitle') + ': Leer', + // @ts-ignore + content: this.cts.getCustomText('login_codeInputPrompt'), + type: MessageType.error + } + }); + } else if (validCodes.indexOf(myCode) < 0) { + this.messageDialog.open(MessageDialogComponent, { + width: '400px', + data: <MessageDialogData>{ + // @ts-ignore + title: this.cts.getCustomText('login_codeInputTitle') + ': Ungültig', + // @ts-ignore + content: this.cts.getCustomText('login_codeInputPrompt'), + type: MessageType.error + } + }); + } else { + this.mds.setCode(myCode); + } + } + + resetLogin() { + this.mds.setNewLoginData(); + this.router.navigate(['/']); + } +} diff --git a/src/app/app-root/login/login.component.ts b/src/app/app-root/login/login.component.ts index afa6861b39345e2ad4b45c163a2eb4326aedc589..ad34ace69eea024a697400bb2e826b0cef261bbf 100644 --- a/src/app/app-root/login/login.component.ts +++ b/src/app/app-root/login/login.component.ts @@ -1,9 +1,12 @@ import {Component, OnDestroy, OnInit} from '@angular/core'; import {FormControl, FormGroup, Validators} from "@angular/forms"; import {MainDataService} from "../../maindata.service"; -import {CustomtextService} from "iqb-components"; +import {CustomtextService, ServerError} from "iqb-components"; import {ActivatedRoute, Router} from "@angular/router"; import {Subscription} from "rxjs"; +import {appconfig} from "../../app.config"; +import {LoginData} from "../../app.interfaces"; +import {BackendService} from "../../backend.service"; @Component({ templateUrl: './login.component.html', @@ -26,6 +29,7 @@ export class LoginComponent implements OnInit, OnDestroy { constructor( public mds: MainDataService, public cts: CustomtextService, + private bs: BackendService, private router: Router, private route: ActivatedRoute ) { } @@ -37,16 +41,48 @@ export class LoginComponent implements OnInit, OnDestroy { } login() { + this.mds.incrementDelayedProcessesCount(); const loginData = this.loginForm.value; LoginComponent.oldLoginName = loginData['name']; - this.mds.appError$.next({ - label: loginData['name'], - description: loginData['pw'], - category: "FATAL" - }); - if (this.returnTo) { - this.router.navigateByUrl(this.returnTo); - } + this.bs.login(loginData['name'], loginData['pw']).subscribe( + loginData => { + if (loginData instanceof ServerError) { + const e = loginData as ServerError; + this.mds.appError$.next({ + label: e.labelNice, + description: e.labelSystem + ' (' + e.code.toString + ')', + category: "PROBLEM" + }); + this.mds.addCustomtextsFromDefList(appconfig.customtextsLogin); + // no change in other data + } else { + if ((loginData as LoginData).customTexts) { + this.cts.addCustomTexts((loginData as LoginData).customTexts); + } + this.mds.setNewLoginData(loginData as LoginData); + + if (this.returnTo) { + this.router.navigateByUrl(this.returnTo); + } else { + const loginDataCleaned = this.mds.loginData$.getValue(); + if (loginDataCleaned.adminToken.length > 0) { + this.router.navigate(['../admin-starter'], {relativeTo: this.route}); + } else if (loginDataCleaned.loginToken.length > 0) { + this.router.navigate(['../code-input'], {relativeTo: this.route}); + } else if (loginDataCleaned.personToken.length > 0) { + this.router.navigate(['../test-starter'], {relativeTo: this.route}); + } else { + this.mds.appError$.next({ + label: 'Keine Berechtigung für diese Anmeldedaten gefunden.', + description: 'Request ohne Fehler, aber kein Token?!', + category: "PROBLEM" + }); + } + } + } + this.mds.decrementDelayedProcessesCount(); + } + ); } ngOnDestroy() { diff --git a/src/app/app-routing-guards.ts b/src/app/app-routing-guards.ts new file mode 100644 index 0000000000000000000000000000000000000000..2ba5fb0d6e004049db3cc032ed34a40328ad51d6 --- /dev/null +++ b/src/app/app-routing-guards.ts @@ -0,0 +1,18 @@ +import {Injectable} from "@angular/core"; +import {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot} from "@angular/router"; +import {MainDataService} from "./maindata.service"; +import {Observable} from "rxjs"; + +@Injectable() +export class AdminRouteActivateGuard implements CanActivate { + constructor( + private mds: MainDataService, + ) { + } + + canActivate( + next: ActivatedRouteSnapshot, + state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean { + + } +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index e18980daeeff6764a16d966eac0870d2559d92e4..812657c438ab17e7a0ffa78aeab09787b485fb0c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -5,16 +5,19 @@ import { Routes, RouterModule } from '@angular/router'; import {AppRootComponent} from "./app-root/app-root.component"; import {LoginComponent} from "./app-root/login/login.component"; import {SysCheckStarterComponent} from "./app-root/sys-check-starter/sys-check-starter.component"; +import {AdminStarterComponent} from "./app-root/admin-starter/admin-starter.component"; +import {CodeInputComponent} from "./app-root/code-input/code-input.component"; const routes: Routes = [ {path: '', redirectTo: 'r', pathMatch: 'full'}, {path: 'r', component: AppRootComponent, children: [ - {path: '', redirectTo: 'login', pathMatch: 'full'}, {path: 'login/:returnTo', component: LoginComponent}, {path: 'about', component: AboutComponent}, {path: 'check-starter', component: SysCheckStarterComponent}, + {path: 'admin-starter', component: AdminStarterComponent}, + {path: 'code-input', component: CodeInputComponent}, {path: '**', component: LoginComponent} ] }, diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ccba68728eac9cbb021b5df318ef2743c46d2204..2216949f9a8ab5dc8a650cf1a2b32d545b0b3d97 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -38,78 +38,72 @@ export class AppComponent implements OnInit, OnDestroy { } ngOnInit() { - this.mds.addCustomtextsFromDefList(appconfig.customtextsApp); - this.mds.addCustomtextsFromDefList(appconfig.customtextsLogin); - this.mds.addCustomtextsFromDefList(appconfig.customtextsBooklet); - - this.appErrorSubscription = this.mds.appError$.subscribe(err => { - if (err) { - this.showError = true; - } - }); + setTimeout(() => { + this.mds.addCustomtextsFromDefList(appconfig.customtextsApp); + this.mds.addCustomtextsFromDefList(appconfig.customtextsLogin); + this.mds.addCustomtextsFromDefList(appconfig.customtextsBooklet); - window.addEventListener('message', (event: MessageEvent) => { - const msgData = event.data; - const msgType = msgData['type']; - if ((msgType !== undefined) && (msgType !== null)) { - if (msgType.substr(0, 3) === 'vo.') { - this.mds.postMessage$.next(event); + this.appErrorSubscription = this.mds.appError$.subscribe(err => { + if (err) { + this.showError = true; } - } - }); + }); - this.bs.getSysConfig().subscribe(sc => { - this.mds.setDefaultCustomtexts(sc); - this.mds.addCustomtextsFromDefList(appconfig.customtextsApp); - // restore login status if stored in localStorage - const adminToken = AppComponent.getStringFromLocalStorage('at'); - if (adminToken) { - this.bs.getAdminSession(adminToken).subscribe( - (admindata: LoginData) => { - if (admindata instanceof ServerError) { - this.mds.setNewLoginData(); - } else { - this.mds.setNewLoginData(admindata); - } + window.addEventListener('message', (event: MessageEvent) => { + const msgData = event.data; + const msgType = msgData['type']; + if ((msgType !== undefined) && (msgType !== null)) { + if (msgType.substr(0, 3) === 'vo.') { + this.mds.postMessage$.next(event); } - ); - } else { - const loginToken = AppComponent.getStringFromLocalStorage('lt'); - if (loginToken) { - const personToken = AppComponent.getStringFromLocalStorage('pt'); - let bookletDbId = 0; - if (personToken) { - const bookletDbIdStr = AppComponent.getStringFromLocalStorage('bi'); - if (bookletDbIdStr) { - bookletDbId = Number(bookletDbIdStr); // TODO: not used after assigning? - } - } - const code = AppComponent.getStringFromLocalStorage('c'); + } + }); - // bookletDbId is not yet checked by getLoginData, only passed-through - this.bs.getSession(loginToken, personToken).subscribe(ld => { - if (ld instanceof ServerError) { - this.mds.setNewLoginData(); - } else { - const loginData = ld as LoginData; - loginData.loginToken = loginToken; - loginData.personToken = personToken; - if (personToken.length === 0) { - loginData.code = code; - loginData.testId = 0; - } - this.mds.setNewLoginData(loginData); - if (loginData.customTexts) { - this.cts.addCustomTexts(loginData.customTexts); + this.bs.getSysConfig().subscribe(sc => { + this.mds.setDefaultCustomtexts(sc); + this.mds.addCustomtextsFromDefList(appconfig.customtextsApp); + // restore login status if stored in localStorage + const adminToken = AppComponent.getStringFromLocalStorage('at'); + if (adminToken) { + this.bs.getAdminSession(adminToken).subscribe( + (admindata: LoginData) => { + if (admindata instanceof ServerError) { + this.mds.setNewLoginData(); + } else { + this.mds.setNewLoginData(admindata); } } - }); + ); } else { - this.mds.setNewLoginData(); - this.mds.addCustomtextsFromDefList(appconfig.customtextsLogin); - this.mds.addCustomtextsFromDefList(appconfig.customtextsBooklet); + const loginToken = AppComponent.getStringFromLocalStorage('lt'); + if (loginToken) { + const personToken = AppComponent.getStringFromLocalStorage('pt'); + const code = AppComponent.getStringFromLocalStorage('c'); + + this.bs.getSession(loginToken, personToken).subscribe(ld => { + if (ld instanceof ServerError) { + this.mds.setNewLoginData(); + } else { + const loginData = ld as LoginData; + loginData.loginToken = loginToken; + loginData.personToken = personToken; + if (personToken.length === 0) { + loginData.code = code; + loginData.testId = 0; + } + this.mds.setNewLoginData(loginData); + if (loginData.customTexts) { + this.cts.addCustomTexts(loginData.customTexts); + } + } + }); + } else { + this.mds.setNewLoginData(); + this.mds.addCustomtextsFromDefList(appconfig.customtextsLogin); + this.mds.addCustomtextsFromDefList(appconfig.customtextsBooklet); + } } - } + }); }); } diff --git a/src/app/app.interfaces.ts b/src/app/app.interfaces.ts index e4e53795da79b68acce8ee6014b35335f7e18ad1..fddbc07419beeb9be4c3067fe58138107548ce01 100644 --- a/src/app/app.interfaces.ts +++ b/src/app/app.interfaces.ts @@ -12,6 +12,24 @@ export interface BookletListByCode { [code: string]: string[]; } +export enum AuthType { + LOGIN = "LOGIN", + ADMIN = "ADMIN", + PERSON = "PERSON", + SUPERADMIN = "SUPERADMIN" +} + +export interface AccessRightList { + [key: string]: string[]; +} + +export interface AuthData { + token: string; + authTypes: AuthType[]; + displayName: string; + accessRights: AccessRightList; +} + export interface LoginData { loginToken: string; personToken: string; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8b6ec3e345c9b213243c9e3c71839ba79093814b..96a42e44d17be624561f06bf5592ae925bf65a49 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -31,7 +31,8 @@ import {RouterModule} from "@angular/router"; import { AppRootComponent } from './app-root/app-root.component'; import { SysCheckStarterComponent } from './app-root/sys-check-starter/sys-check-starter.component'; import { LoginComponent } from './app-root/login/login.component'; -import { AppStatusComponent } from './app-root/app-status/app-status.component'; +import { CodeInputComponent } from './app-root/code-input/code-input.component'; +import { AdminStarterComponent } from './app-root/admin-starter/admin-starter.component'; @@ -43,7 +44,8 @@ import { AppStatusComponent } from './app-root/app-status/app-status.component'; AppRootComponent, SysCheckStarterComponent, LoginComponent, - AppStatusComponent + CodeInputComponent, + AdminStarterComponent ], imports: [ ApplicationModule, diff --git a/src/app/maindata.service.ts b/src/app/maindata.service.ts index f73a6dcf9ac6abafb42cc308556d3497a752bcd6..8f5326227a3d85f31dcb3d684994f6b447b4c1db 100644 --- a/src/app/maindata.service.ts +++ b/src/app/maindata.service.ts @@ -58,6 +58,8 @@ export class MainDataService { this.delayedProcessesCount$.next(this.delayedProcessesCount$.getValue() - 1); } + + // ensures consistency setNewLoginData(logindata?: LoginData) { const myLoginData: LoginData = MainDataService.defaultLoginData; diff --git a/src/app/superadmin/superadmin.component.html b/src/app/superadmin/superadmin.component.html index d1a5470ae8803453ab9ecf31da9a1067ec3d0a75..81c55274caa62899ba46b52a2d321ef6eb894223 100644 --- a/src/app/superadmin/superadmin.component.html +++ b/src/app/superadmin/superadmin.component.html @@ -1,12 +1,7 @@ -<div id="buttonsContainer" fxLayout="row" fxLayoutAlign="start center"> - <a [routerLink]="['/']"> - <img src="assets/IQB-LogoA.png" matTooltip="Startseite"/> - </a> - <div fxLayout="row wrap" fxLayoutAlign="space-around center" fxFlex> - <div class="error-msg">{{ (mds.globalErrorMsg$ | async)?.labelNice }}</div> - <div>IQB-Testcenter Systemverwaltung</div> - </div> +<div class="page-header"> + <p>IQB-Testcenter Systemverwaltung</p> </div> + <div class="page-body"> <div class="adminbackground"> diff --git a/src/app/sys-check/sys-check.component.scss b/src/app/sys-check/sys-check.component.scss index 8c5e8094d2e692970668c9f557164fa2063aad84..6dc3520dd6a8694c5235ec35e1d77ff94f96ffc0 100644 --- a/src/app/sys-check/sys-check.component.scss +++ b/src/app/sys-check/sys-check.component.scss @@ -1,4 +1,4 @@ -::ng-deep .scrollable { +::ng-deep .scrollable { /* TODO ng-deep is deprecated */ overflow: auto; box-sizing: border-box; position: absolute; @@ -16,6 +16,6 @@ mat-card { margin: 10px; } -::ng-deep .mat-card-header-text { +::ng-deep .mat-card-header-text { /* TODO ng-deep is deprecated */ margin-left: 0 !important; } diff --git a/src/app/workspace-admin/workspace.component.html b/src/app/workspace-admin/workspace.component.html index 6f5cf00c4d26e4735c49e8b90d0cc25c25d8e7df..8bd3f2db9d742240fff08a0fa71e2812b3b20ffe 100644 --- a/src/app/workspace-admin/workspace.component.html +++ b/src/app/workspace-admin/workspace.component.html @@ -1,17 +1,9 @@ -<div id="buttonsContainer" fxLayout="row" fxLayoutAlign="start center"> - <a [routerLink]="['/']"> - <img src="assets/IQB-LogoA.png" matTooltip="Startseite"/> - </a> - <div fxLayout="row wrap" fxLayoutAlign="space-between center" fxFlex> - <div class="error-msg">{{ (mds.globalErrorMsg$ | async)?.labelNice }}</div> - <div>IQB-Testcenter Verwaltung</div> - <div>{{ wds.wsName }} ({{ wds.wsRole }})</div> - </div> +<div class="page-header"> + <p>IQB-Testcenter Verwaltung: {{wds.wsName}} ({{ wds.wsRole }})</p> </div> + <div class="page-body"> <div class="adminbackground"> - - <nav mat-tab-nav-bar> <a mat-tab-link *ngFor="let link of wds.navLinks"