diff options
| author | sowgro <tpoke.ferrari@gmail.com> | 2025-04-01 19:44:28 -0400 | 
|---|---|---|
| committer | sowgro <tpoke.ferrari@gmail.com> | 2025-04-01 19:44:28 -0400 | 
| commit | 734d3d380cd70e87474adebedec5e230959bcf81 (patch) | |
| tree | dde3f03696a977b300f2ed4be824fcbc909e203e /ufund-ui/src/app | |
| parent | 0b49430e3b0a5cc14521db58af19dafa5384c3c4 (diff) | |
| download | JellySolutions-734d3d380cd70e87474adebedec5e230959bcf81.tar.gz JellySolutions-734d3d380cd70e87474adebedec5e230959bcf81.tar.bz2 JellySolutions-734d3d380cd70e87474adebedec5e230959bcf81.zip  | |
Make nav bar buttons only show conditionally
Diffstat (limited to '')
| -rw-r--r-- | ufund-ui/src/app/app.component.html | 4 | ||||
| -rw-r--r-- | ufund-ui/src/app/models/User.ts | 4 | 
2 files changed, 4 insertions, 4 deletions
diff --git a/ufund-ui/src/app/app.component.html b/ufund-ui/src/app/app.component.html index 959eada..f697695 100644 --- a/ufund-ui/src/app/app.component.html +++ b/ufund-ui/src/app/app.component.html @@ -5,9 +5,9 @@          </a>      </div>      <div> -        <a routerLink="/dashboard">Dashboard</a> +        <a *ngIf="(currentUser | async)?.type === userType.MANAGER" routerLink="/dashboard">Dashboard</a>          <a routerLink="/cupboard">Cupboard</a> -        <a routerLink="/basket">Basket</a> +        <a *ngIf="(currentUser | async)?.type === userType.HELPER" routerLink="/basket">Basket</a>  <!--        <span>{{currentUser$ | async}}</span>-->          <button *ngIf="currentUser | async" (click)="logout()"> Log Out</button>          <button *ngIf="!(currentUser | async)" (click)="login()"> Log In</button> diff --git a/ufund-ui/src/app/models/User.ts b/ufund-ui/src/app/models/User.ts index e6848fa..d7d67b5 100644 --- a/ufund-ui/src/app/models/User.ts +++ b/ufund-ui/src/app/models/User.ts @@ -1,6 +1,6 @@  export enum userType { -    HELPER, -    MANAGER +    HELPER = "HELPER", +    MANAGER = "MANAGER"  }  export interface User {  | 
