aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/funding-basket/funding-basket.component.html
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-ui/src/app/components/funding-basket/funding-basket.component.html')
-rw-r--r--ufund-ui/src/app/components/funding-basket/funding-basket.component.html35
1 files changed, 20 insertions, 15 deletions
diff --git a/ufund-ui/src/app/components/funding-basket/funding-basket.component.html b/ufund-ui/src/app/components/funding-basket/funding-basket.component.html
index edc9609..fcd5437 100644
--- a/ufund-ui/src/app/components/funding-basket/funding-basket.component.html
+++ b/ufund-ui/src/app/components/funding-basket/funding-basket.component.html
@@ -1,19 +1,24 @@
<div id="box">
- <h1>Funding Basket</h1>
- <ng-template [ngIf]="(usersService.getBasket() | async)?.length">
- <ng-template let-need #NLActions>
- <input type="number" placeholder="Quantity" min="1" [id]="need?.id" class="contribution">
- <button class="removeNeed" (click)="this.usersService.removeNeed(need.id)">
- <span class="icon">delete</span>Remove from Basket
- </button>
+ @if ((authService.getCurrentUserSubject() | async)?.type === userType.HELPER) {
+ <h1>Funding Basket</h1>
+ <ng-template [ngIf]="(usersService.getBasket() | async)?.length">
+ <ng-template let-need #NLActions>
+ <input type="number" placeholder="Quantity" min="1" [id]="need?.id" class="contribution">
+ <button class="removeNeed" (click)="this.usersService.removeNeed(need.id)">
+ <span class="icon">delete</span>Remove from Basket
+ </button>
+ </ng-template>
+ <app-need-list [actionArea]="NLActions" [needs]="(usersService.getBasket() | async)!"/>
+ <br>
+ <div id="footer">
+ <button class="button2" title="checkout" (click)="checkout()">Checkout</button>
+ </div>
</ng-template>
- <app-need-list [actionArea]="NLActions" [needs]="(usersService.getBasket() | async)!"/>
- <br>
- <div id="footer">
- <button class="button2" title="checkout" (click)="checkout()">Checkout</button>
+ <div *ngIf="!usersService.getBasket().getValue().length">
+ <span>There are no needs in your basket! </span><a routerLink="/cupboard">Browse the cupboard</a>
</div>
- </ng-template>
- <div *ngIf="!usersService.getBasket().getValue().length">
- <span>There are no needs in your basket! </span><a routerLink="/cupboard">Browse the cupboard</a>
- </div>
+ } @else {
+ <h1>Unauthorized</h1>
+ <span>This page requires you to be logged in as a user! <a routerLink="/login">Log In</a></span>
+ }
</div>