aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/need-list/need-list.component.html
diff options
context:
space:
mode:
authorbenal01 <bja4245@rit.edu>2025-03-17 18:25:19 -0400
committerbenal01 <bja4245@rit.edu>2025-03-17 18:25:19 -0400
commit88f6a4174d7fcc53028b78d0d9b3d91b6d17d2c6 (patch)
tree363e124e6770f35c211752cb473c0318d7810f0a /ufund-ui/src/app/components/need-list/need-list.component.html
parent59119fb799ea27d4bffcf793f768538ad202cd85 (diff)
downloadJellySolutions-88f6a4174d7fcc53028b78d0d9b3d91b6d17d2c6.tar.gz
JellySolutions-88f6a4174d7fcc53028b78d0d9b3d91b6d17d2c6.tar.bz2
JellySolutions-88f6a4174d7fcc53028b78d0d9b3d91b6d17d2c6.zip
search needs with timeout to throttle api calls
Diffstat (limited to 'ufund-ui/src/app/components/need-list/need-list.component.html')
-rw-r--r--ufund-ui/src/app/components/need-list/need-list.component.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/ufund-ui/src/app/components/need-list/need-list.component.html b/ufund-ui/src/app/components/need-list/need-list.component.html
index b8774f1..6dd6511 100644
--- a/ufund-ui/src/app/components/need-list/need-list.component.html
+++ b/ufund-ui/src/app/components/need-list/need-list.component.html
@@ -1,4 +1,23 @@
<h1>Needs List</h1>
+<input id="search-button" type="button" value="Search" (click)="open()">
+<div id="search-form">
+ <form #searchForm="ngForm">
+ <label>Search:</label><br>
+ <input type="text" name="search" (input)="search(searchForm.value)" ngModel>
+ <input type="button" value="Clear" (click)="searchForm.reset()"> <br>
+ </form>
+ <button (click)="close()">Close</button>
+ <div>
+ <h2 id="search-status">Search Results:</h2>
+ <div *ngFor="let need of searchResults">
+ <a routerLink="/need/{{need.id}}">
+ {{need.name}}
+ </a>
+ <button (click)="delete(need.id)">Delete</button>
+ </div>
+ </div>
+</div>
+
<li *ngFor="let need of needs">
<a routerLink="/need/{{need.id}}">
{{need.name}}