aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/funding-basket/funding-basket.component.html
diff options
context:
space:
mode:
authorHayden Hartman <haydenhartman10@gmail.com>2025-03-18 17:17:23 -0400
committerGitHub <noreply@github.com>2025-03-18 17:17:23 -0400
commitdb9e4a8c26dc5252cfe0974843bc391c57edd07d (patch)
tree0c8aba41ae378fe04e8312ab9eff48656732c9c8 /ufund-ui/src/app/components/funding-basket/funding-basket.component.html
parentc7c4e037d655762cc6b394a460effbcd8816d175 (diff)
parent7a5396b65fcde8153c8eeae565bfecb7de37b23f (diff)
downloadJellySolutions-db9e4a8c26dc5252cfe0974843bc391c57edd07d.tar.gz
JellySolutions-db9e4a8c26dc5252cfe0974843bc391c57edd07d.tar.bz2
JellySolutions-db9e4a8c26dc5252cfe0974843bc391c57edd07d.zip
Merge pull request #14 from RIT-SWEN-261-02/funding_basketv2.1
funding-basket merge
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.html28
1 files changed, 13 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 0a880af..504e694 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
@@ -2,33 +2,30 @@
<div id="needCount">
<label for="needCount">Needs in Basket:</label>
- <span>{{ needCount }}</span>
+ <span>{{ this.usersService.getBasket().getValue().length }}</span>
</div>
-<div *ngIf="isBasketEmpty">
+<div *ngIf="this.usersService.getBasket().getValue().length == 0">
<h2>There are no needs in the basket</h2>
</div>
-<table class="needs" *ngIf="!isBasketEmpty">
+<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 basket">
+ <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>
+ <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)="removeNeed(need)">Remove Need</button>
+ <button type="button" class="removeNeed" title="delete need"
+ (click)="this.usersService.removeNeed(need.id)">Remove Need</button>
</div>
</td>
</tr>
@@ -36,6 +33,7 @@
</table>
<br>
<div>
- <button type="submit" class="checkout" title="checkout"
- (click)="checkout()">Checkout</button>
+ <p *ngIf="!isValid">Invalid input in funding basket!</p>
+ <button type="submit" class="checkout" title="checkout" (click)="checkout()">Checkout</button>
+ <span *ngIf="statusText">{{statusText | async}}</span>
</div> \ No newline at end of file