aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/funding-basket/funding-basket.component.html
blob: dd02e981e459da6a3eca5f3e98f17e3792326da2 (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
31
32
33
34
35
36
37
38
39
40
<h1>Funding Basket</h1>

<div id="needCount">
    <label for="needCount">Needs in Basket:</label>
    <span>{{ this.usersService.getBasket().getValue().length }}</span>
</div>

<div *ngIf="this.usersService.getBasket().getValue().length == 0">
    <h2>There are no needs in the basket</h2>
</div>

<table class="needs" *ngIf="this.usersService.getBasket().getValue().length != 0">
    <thead>
        <tr>
            <th class="need"></th>
        </tr>
    </thead>
    <tbody>
        <tr *ngFor="let need of usersService.getBasket().getValue()">
            <td>
                <a routerLink="/need/{{need.id}}">
                    {{need.name}}
                </a>
                <div>
                <!-- <button type="button" class="addNeed" title="add need"
                (click)="addNeed(need)">Add Need</button> -->
                </div>
                <br>
                <div>
                <button type="button" class="removeNeed" title="delete need"
                (click)="this.usersService.removeNeed(need.id)">Remove Need</button>
                </div>
            </td>
        </tr>
    </tbody>
</table>
<br>
<div>
    <button type="submit" class="checkout" title="checkout">Checkout</button>
</div>