summaryrefslogtreecommitdiff
path: root/recipeBuddy/src/app/shopping-cart/shopping-cart.component.html
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-12-11 16:55:58 -0500
committerGitHub <noreply@github.com>2019-12-11 16:55:58 -0500
commite5abeda08c77e7051f24601dab315c0839c05416 (patch)
tree3ec5b16d410aa81a05a9e400061939a75076fb20 /recipeBuddy/src/app/shopping-cart/shopping-cart.component.html
parent77f57229c02521f00be16fe27e8e672f06809dbc (diff)
parented1c7d95398c90263db74937a780e71f43475012 (diff)
Merge pull request #23 from tuckerevans/shoppingcart
Shopping Cart base functionality added.
Diffstat (limited to 'recipeBuddy/src/app/shopping-cart/shopping-cart.component.html')
-rw-r--r--recipeBuddy/src/app/shopping-cart/shopping-cart.component.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/recipeBuddy/src/app/shopping-cart/shopping-cart.component.html b/recipeBuddy/src/app/shopping-cart/shopping-cart.component.html
new file mode 100644
index 0000000..a4e87ab
--- /dev/null
+++ b/recipeBuddy/src/app/shopping-cart/shopping-cart.component.html
@@ -0,0 +1,28 @@
+<div class="row">
+ <div class="column">
+ <h1> Recipes </h1>
+ <mat-selection-list #rlist>
+ <mat-list-option *ngFor="let recipe of recipes" [value]="recipe">
+ {{recipe.name}}
+ </mat-list-option>
+ </mat-selection-list>
+ </div>
+ <div class="column">
+ <h1> Ingredients </h1>
+ <div *ngFor="let selectedRecipe of rlist.selectedOptions.selected">
+ <h3>{{selectedRecipe.value.name}}</h3>
+ <mat-selection-list #ilist>
+ <mat-list-option *ngFor="let ing of selectedRecipe.value.ingredients" [value]="ing" (click)="addIngredient(ing)">
+ {{ing.name}} {{ing.amount}} {{ing.unit}}
+ </mat-list-option>
+ </mat-selection-list>
+ </div>
+ </div>
+ <div class="column">
+ <h1> Shopping List </h1>
+ <mat-list #clist *ngFor="let cartItem of ingredients">
+ <mat-list-item>{{cartItem.name}} {{cartItem.amount}} {{cartItem.unit}}</mat-list-item>
+ <mat-divider></mat-divider>
+ </mat-list>
+ </div>
+</div> \ No newline at end of file