Compare commits
2 Commits
1c88cc80af
...
9ab53c96e8
Author | SHA1 | Date |
---|---|---|
Florian Hartwich | 9ab53c96e8 | |
Florian Hartwich | 6c7088bc01 |
|
@ -54,7 +54,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="loginService.hasPermission(2) && loginService.hasSquad()" class="dropdown">
|
<li *ngIf="loginService.hasPermission(2) && loginService.hasSquad()" class="dropdown">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
[ngClass]="{'unprocessed': promotionService.hasUnprocessedPromotion || awardingService.hasUnprocessedAwards}"
|
[ngClass]="{'unprocessed': loginService.hasPermission(2) && loginService.hasSquad() && (promotionService.hasUnprocessedPromotion || awardingService.hasUnprocessedAwards)}"
|
||||||
class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
Anträge
|
Anträge
|
||||||
|
@ -62,11 +62,11 @@
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a [ngClass]="{'unprocessed-child': promotionService.hasUnprocessedPromotion}"
|
<a [ngClass]="{'unprocessed-child': loginService.hasPermission(2) && loginService.hasSquad() && promotionService.hasUnprocessedPromotion}"
|
||||||
routerLink="{{config.request}}/{{config.confirmPromotionPath}}">Beförderung</a>
|
routerLink="{{config.request}}/{{config.confirmPromotionPath}}">Beförderung</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a [ngClass]="{'unprocessed-child': awardingService.hasUnprocessedAwards}"
|
<a [ngClass]="{'unprocessed-child': loginService.hasPermission(2) && loginService.hasSquad() && awardingService.hasUnprocessedAwards}"
|
||||||
routerLink="{{config.request}}/{{config.confirmAwardPath}}">Orden/ Auszeichnung</a>
|
routerLink="{{config.request}}/{{config.confirmAwardPath}}">Orden/ Auszeichnung</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -35,7 +35,6 @@ export class LoginService {
|
||||||
signUp(username: string, password: string, secret: string) {
|
signUp(username: string, password: string, secret: string) {
|
||||||
return this.http.post(this.config.apiSignupPath, {username: username, password: password, secret: secret})
|
return this.http.post(this.config.apiSignupPath, {username: username, password: password, secret: secret})
|
||||||
.map((response: Response) => {
|
.map((response: Response) => {
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,10 +44,7 @@ export class LoginService {
|
||||||
}
|
}
|
||||||
|
|
||||||
isLoggedIn() {
|
isLoggedIn() {
|
||||||
if (localStorage.getItem('currentUser')) {
|
return !!localStorage.getItem('currentUser');
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hasPermission(level: number) {
|
hasPermission(level: number) {
|
||||||
|
|
Loading…
Reference in New Issue