initial checkin
[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         <div class="mdl-textfield mdl-js-textfield
51                     mdl-textfield--floating-label ain">
52                 <input class="mdl-textfield__input" type="text" id="pti"
53                        [(ngModel)]="prod_category_id">
54                 <label class="mdl-textfield__label" for="pti">
55                         Identifier (arbitrary but unique)
56                 </label>
57         </div>
58         <button class="mdl-button mdl-js-button mdl-button--raised abtn"
59                 (click)="updateProductCategory()">
60                 Update
61         </button>
62         <button class="mdl-button mdl-js-button mdl-button--raised abtn"
63                 (click)="deleteProductCategory()"
64                 [disabled]="prodcnt!=0">
65                 Delete
66         </button>
67 </div>
68 </div>
69