Commit 8f062f2b authored by Lukas Burgey's avatar Lukas Burgey

Rework user data service

parent 8cb27251
<div class="body" class="mat-typography" class="body" >
<div *ngIf="userService.subscribeLoggedIn() | async">
<div *ngIf="(userService.subscribeUser() | async) as user">
<mat-tab-group>
<mat-tab label="Your VOs">
<div class="mat-typography" class="body">
<h2>Your Virtual Organisations</h2>
<div *ngIf="(userService.subscribeSpecific(userService.groupSelector) | async) as groups; else noGroups">
<mat-accordion *ngIf="groups.length > 0; else noGroups">
<div>
<mat-accordion *ngIf="(userService.subscribeGroups() | async) as groups">
<app-vo-data *ngFor="let group of groups" [group]="group"></app-vo-data>
</mat-accordion>
<ng-template #noGroups>
<p>
You are not member in any Virtual Organisations.
</p>
</ng-template>
</div>
<ng-template #noGroups>
<p>
You are not member in any Virtual Organisations.
</p>
</ng-template>
</div>
</mat-tab>
<!--
......
......@@ -4,22 +4,20 @@
Federated User Credential Deployment Portal
</h1>
<div class="header-bar">
<div *ngIf="(userService.subscribeLoggedIn() | async); else notLoggedIn">
<span *ngIf="(userService.subscribeUser() | async) as user">
<button mat-button mat-icon-button (click)="dialog.openAccount()">
<mat-icon>settings</mat-icon>
</button>
<button *ngIf="user.profile_name != undefined" mat-button (click)="dialog.openProfile(user)">
{{ user.profile_name }}
</button>
<button *ngIf="user.profile_name == undefined" mat-button (click)="dialog.openProfile(user)">
Profile
</button>
<button mat-raised-button color="accent" (click)="userService.logout()">
Logout
</button>
</span>
</div>
<span *ngIf="(userService.subscribeUser() | async) as user; else notLoggedIn">
<button mat-button mat-icon-button (click)="dialog.openAccount()">
<mat-icon>settings</mat-icon>
</button>
<button *ngIf="user.profile_name != undefined" mat-button (click)="dialog.openProfile(user)">
{{ user.profile_name }}
</button>
<button *ngIf="user.profile_name == undefined" mat-button (click)="dialog.openProfile(user)">
Profile
</button>
<button mat-raised-button color="accent" (click)="userService.logout()">
Logout
</button>
</span>
<ng-template #notLoggedIn>
<span>
<form (ngSubmit)="userService.login(selectedIdP)" #loginForm="ngForm">
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment