cleaups and content page refresh (in progress)
[outofuni/tavern2.git] / lib / product_component.html
1
2 <div class="products full-width">
3         <button type="button"
4                 class="mdl-button mdl-js-button mdl-button--raised
5                        product_button"
6                 *ngFor="let prod of products"
7                 (click)="choose(prod)">
8                         {{prod.name}}<br>
9                         {{prod.price | currency : '€ ' : true: '1.2-2'}}
10         </button>
11 </div>
12
13 <div class="mdl-card mdl-shadow--2dp admin_edit">
14 <div class="mdl-card__title">
15         Create product in this category
16 </div>
17 <div class="mdl-card__actions mdl-card--border">
18         <form>
19         <div class="mdl-textfield mdl-js-textfield
20                     mdl-textfield--floating-label ain">
21                 <input class="mdl-textfield__input" type="text" id="pn"
22                        [(ngModel)]="prod_name">
23                 <label class="mdl-textfield__label" for="pn">Name</label>
24         </div>
25         <div class="mdl-textfield mdl-js-textfield
26                     mdl-textfield--floating-label ain">
27                 <input class="mdl-textfield__input" type="text" id="pp"
28                        pattern="-?[0-9]*(\.[0-9]+)?" [(ngModel)]="prod_price">
29                 <label class="mdl-textfield__label" for="pp">Price</label>
30         </div>
31         <button class="mdl-button mdl-js-button mdl-button--raised abtn"
32                 (click)="createProduct()">
33                 Create
34         </button>
35         </form>
36 </div>
37 </div>
38
39 <div class="mdl-card mdl-shadow--2dp admin_edit">
40 <div class="mdl-card__title">
41         Update/delete product category
42 </div>
43 <div class="mdl-card__actions mdl-card--border">
44         <div class="mdl-textfield mdl-js-textfield
45                     mdl-textfield--floating-label ain">
46                 <input class="mdl-textfield__input" type="text" id="ptn"
47                        [(ngModel)]="prod_category_name">
48                 <label class="mdl-textfield__label" for="ptn">Name</label>
49         </div>
50         <button class="mdl-button mdl-js-button mdl-button--raised abtn"
51                 (click)="updateProductCategory()"
52                 [disabled]="prod_category_name==''">
53                 Update
54         </button>
55         <button class="mdl-button mdl-js-button mdl-button--raised abtn"
56                 (click)="deleteProductCategory()"
57                 [disabled]="prodcnt!=0">
58                 Delete
59         </button>
60 </div>
61 </div>
62