diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-04-03 14:55:55 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-04-03 14:55:55 -0400 |
commit | 0652eb445728806d7fd6a50021a763051503ab36 (patch) | |
tree | 6036fd6901529ce217ec89456e2ee9a46655483a /ufund-ui/src/app/components/cupboard/cupboard.component.html | |
parent | 6b7c830eeefb6a6a28136a3faacf7713953a6138 (diff) | |
download | JellySolutions-0652eb445728806d7fd6a50021a763051503ab36.tar.gz JellySolutions-0652eb445728806d7fd6a50021a763051503ab36.tar.bz2 JellySolutions-0652eb445728806d7fd6a50021a763051503ab36.zip |
get checkout abstraction kinda working
Diffstat (limited to 'ufund-ui/src/app/components/cupboard/cupboard.component.html')
-rw-r--r-- | ufund-ui/src/app/components/cupboard/cupboard.component.html | 88 |
1 files changed, 58 insertions, 30 deletions
diff --git a/ufund-ui/src/app/components/cupboard/cupboard.component.html b/ufund-ui/src/app/components/cupboard/cupboard.component.html index 37954bb..5d6c93a 100644 --- a/ufund-ui/src/app/components/cupboard/cupboard.component.html +++ b/ufund-ui/src/app/components/cupboard/cupboard.component.html @@ -3,36 +3,64 @@ <h1> Cupboard </h1> <button *ngIf="isManager()" class="button2" (click)="this.selectForm('create')"><span class="icon">add</span>Create Need</button> </div> - <app-need-list (currentNeed) = populateForm($event) #needList></app-need-list> -</div> -<ng-template [ngIf]="isManager()" > -<div> - <app-need-edit *ngIf="selectedForm === 'update'" [selectedNeed]="selectedNeed" (refreshNeedList)="needList.refresh()"></app-need-edit> - <div> - <div id="create-form" *ngIf="selectedForm === 'create'"> - <h1> Create Need </h1> - <form #cupboardForm="ngForm" (ngSubmit)="submit(cupboardForm.value)"> - <label>Name:</label><br> - <input type="text" name="name" ngModel><br> - <label>Image:</label><br> - <input type="text" name="image" ngModel><br> - <label>Location:</label><br> - <input type="text" name="location" ngModel><br> - <label>Max Goal:</label><br> - <input type="number" name="maxGoal" ngModel><br> - <label>Type</label><br> - <input type="radio" name="type" value="MONETARY" ngModel> - <label>Monetary</label><br> - <input type="radio" name="type" value="PHYSICAL" ngModel> - <label>Physical</label><br> - <input type="checkbox" name="urgent" value="false" ngModel> - <label>Urgent</label><br> - <label>Description</label><br> - <textarea name="description"></textarea><br> - <input type="submit" value="Submit"> - </form> - </div> + <div id="header2"> + <div id="searchArea"> + <form id="search-form" #searchForm="ngForm"> + <input type="text" name="search" class="wide-input" placeholder="Search in {{needs.length}} needs..." (input)="search(searchForm.value)" ngModel> + <input type="reset" value="Clear" (click)="search(null)"> <br> + </form> + </div> + <div id="sortArea"> + <label for="sort">Sort by: </label> + <select id='sort' [(ngModel)] = "currentSortAlgo" class="wide-input" (change)="search(searchForm.value)" [value]="currentSortAlgo"> + <option *ngFor="let algorithm of Object.values(SortingAlgoArrays)" value="{{algorithm}}"> + {{algorithm.display[sortMode === 'Ascending' ? 0 : 1]}} + </option> + </select> + <button (click)="changeSortMode(searchForm.value)"> + <span class="icon">{{sortMode === 'Ascending' ? 'arrow_upward': 'arrow_downward'}}</span> + </button> + <label>Needs per page: </label> +<!-- <input type ="number" [(ngModel)]="itemsPerPage" min="1" max="{{searchResults.length}}">--> + </div> + <!--<button (click)="close()">Close</button>--> </div> + <h2 *ngIf="searchResults.length < needs.length && searchResults.length != 0"> Search Results({{needs.length - searchResults.length}} needs filtered): </h2> + <h2 *ngIf="searchResults.length == needs.length"> All Needs </h2> + <h2 *ngIf="searchResults.length == 0"> No Results Found </h2> + + <app-need-list [needs]="searchResults" #needList></app-need-list> </div> -</ng-template> + +<!--<ng-template [ngIf]="isManager()" >--> +<!--<div>--> +<!-- <app-need-edit *ngIf="selectedForm === 'update'" [selectedNeed]="selectedNeed" (refreshNeedList)="needList.refresh()"></app-need-edit>--> +<!-- <div>--> +<!-- <div id="create-form" *ngIf="selectedForm === 'create'">--> +<!-- <h1> Create Need </h1>--> +<!-- <form #cupboardForm="ngForm" (ngSubmit)="submit(cupboardForm.value)">--> +<!-- <label>Name:</label><br>--> +<!-- <input type="text" name="name" ngModel><br>--> +<!-- <label>Image:</label><br>--> +<!-- <input type="text" name="image" ngModel><br>--> +<!-- <label>Location:</label><br>--> +<!-- <input type="text" name="location" ngModel><br>--> +<!-- <label>Max Goal:</label><br>--> +<!-- <input type="number" name="maxGoal" ngModel><br>--> +<!-- <label>Type</label><br>--> +<!-- <input type="radio" name="type" value="MONETARY" ngModel>--> +<!-- <label>Monetary</label><br>--> +<!-- <input type="radio" name="type" value="PHYSICAL" ngModel>--> +<!-- <label>Physical</label><br>--> +<!-- <input type="checkbox" name="urgent" value="false" ngModel>--> +<!-- <label>Urgent</label><br>--> +<!-- <label>Description</label><br>--> +<!-- <textarea name="description"></textarea><br>--> +<!-- <input type="submit" value="Submit">--> + +<!-- </form>--> +<!-- </div>--> +<!-- </div>--> +<!--</div>--> +<!--</ng-template>--> |