blob: 52b35c1f3d7a737181092b14418086c9ace95f99 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
<!--<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" id="funding-basket" *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>-->
<!-- <p>Goal: {{need.maxGoal}}</p>-->
<!-- <p>Current: {{(need.current).toFixed(2)}}</p>-->
<!-- <p>How much to Contribute: <input type="number" placeholder="insert value" min="1" id={{need.id}} class="contribution"></p>-->
<!-- <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 id="box">
<h1>Funding Basket</h1>
<ng-template [ngIf]="usersService.getBasket().getValue().length">
<div id="needList">
<div *ngFor="let need of usersService.getBasket().getValue()" class="needEntry">
<div [routerLink]="'/need/' + need.id" class="clickable">
<div class="split">
<div class="left">
<span class="needName">{{need.name}}</span>
<span class="needType">{{need.type}}</span>
</div>
<div class="right">
<span *ngIf="need.urgent" class="urgent">URGENT</span>
<span *ngIf="need.location"><span class="icon">location_on</span>{{need.location}}</span>
</div>
</div>
<br>
<div class="prog">
<span id="hover-status-label-{{need.id}}"> </span>
<span>{{need.current}}/{{need.maxGoal}} ({{((need.current / need.maxGoal) * 100).toFixed(0)}}%)</span>
<progress [value]="need.current" [max]="need.maxGoal"></progress>
</div>
<!-- <div class="description">-->
<!-- {{need.description}}-->
<!-- </div>-->
</div>
<div class="actionArea">
<input type="number" placeholder="Quantity" min="1" id={{need.id}} class="contribution">
<button class="removeNeed" title="delete need" (click)="this.usersService.removeNeed(need.id)">
<span class="icon">delete</span> Remove from Basket
</button>
</div>
</div>
</div>
<br>
<div id="footer">
<button class="button2" title="checkout" (click)="checkout()">Checkout</button>
</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>
</div>
|