blob: 50d6abeabd191c34a988e222dfcfaa18b57e3a9e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<div id="box">
@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" (input)="onInput($event)">
<button class="removeNeed" (click)="this.usersService.removeNeed(need.id)">
<span class="icon">delete</span>Remove from Basket
</button>
</ng-template>
<app-need-list [uid]="1" [actionArea]="NLActions" [needs]="(usersService.getBasket() | async)!"/>
<br>
<div id="footer">
<button class="button2" title="checkout" (click)="checkout()">Checkout</button>
<div id="totals">
<ul>
<li id="running-total">Your current running total is: ${{runningTotal | async}}</li>
<li id="physicalNeeds" *ngFor="let need of physicalTotal">{{need}}</li>
</ul>
</div>
</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>
|