-
Notifications
You must be signed in to change notification settings - Fork 2
/
manageItems.html
213 lines (207 loc) · 12 KB
/
manageItems.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html>
<head>
<title>Cospedia - Manage Items</title>
<link href="https://fonts.googleapis.com/css?family=Cinzel" rel="stylesheet">
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/manageItems.css" rel="stylesheet" type="text/css" media="all" />
<script src="js/jquery-3.3.1.js"></script>
<script src="js/bootstrap.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.4.1/firebase.js"></script>
<script src="js/auth.js"></script>
<script src="js/manageItems.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="navbar" id="private">
<button class="btn btn-success" type="button" id="backToHomePage">Home Page</button>
<button class="btn btn-primary" type="button" id="signOutButton">Sign Out</button>
</div>
<div class="icon-container">
<img src="img/lady.png" alt="Lady Profile" />
<h5>
<span id="email-display"></span><br>
Number of items: <span id="item-num-display"></span>
</h5>
</div>
<div class="modal-container">
<!--Modal for 'Add Items'-->
<div class="modal fade" id="addItemModal" tabindex="-1" role="dialog" aria-labelledby="addItemModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="addItemModalLabel">Add Item</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id="addItem">
<div class="form-group">
<label for="upc">UPC: </label>
<input type="number" id="upc" class="form-control upc_add">
</div>
<div class="form-group">
<label for="brand">
Brand:
</label>
<input type="text" id="brand" class="form-control brand_add">
</div>
<div class="form-group">
<label for="name">
Item Name:
</label>
<input type="text" id="name" class="form-control name_add">
</div>
<div class="form-group">
<label for="category">
Category:
</label>
<select class="form-control category_add" id="category">
<option id="skincare" seleted>Skincare</option>
<option id="makeup">Makeup</option>
<option id="bathAndBody">Bath and Body</option>
<option id="hair">Hair</option>
<option id="fragrance">Fragrance</option>
</select>
</div>
<div class="form-group">
<label for="product_type">
Product Type:
</label>
<select class="form-control product_type_add" id="product_type">
<option id="cleansers" value="cleansers" selected>Cleansers</option>
<option id="eyeCare" value="eyeCare">Eye Care</option>
<option id="lipTreatments" value="lipTreatments">Lip Treatments</option>
<option id="masks" value="masks">Masks</option>
<option id="moisturizers" value="moisturizers">Moisturizers</option>
<option id="selfTannersForFace" value="selfTannersForFace">Self Tanners For Face</option>
<option id="shaving" value="shaving">Shaving</option>
<option id="sunCareForFace" value="sunCareForFace">Sun Care For Face</option>
<option id="treatments" value="treatments">Treatments</option>
</select>
</div>
<div class="form-group">
<label for="openingDate">
Opened Date:
</label>
<input type="date" id="openingDate" class="form-control openingDate_add">
</div>
<div class="form-group">
<label for="shelfLife">
Shelf Life:
</label>
<input type="number" id="shelfLife" class="form-control shelfLife_add" min="0" max="120" placeholder="Shelf life in months">
<span>Example</span>
<img src="img/shelfLifeExample.jpg" id="shelfLifeExample" class="mt-3">
</div>
<!-- <button data-dismiss="modal" type="submit" class="btn btn-info">Submit</button> -->
<button type="submit" class="btn btn-info">Submit</button>
</form>
</div>
</div>
</div>
</div>
<!--Modal for 'Edit Items'-->
<div class="modal fade" id="editItemModal" tabindex="-1" role="dialog" aria-labelledby="editItemModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="editItemModalLabel">Edit Item</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id="editItem">
<div class="form-group">
<label for="upc">UPC: </label>
<input type="number" id="upc" class="form-control upc_edit" disabled>
</div>
<div class="form-group">
<label for="brand">
Brand:
</label>
<input type="text" id="brand" class="form-control brand_edit">
</div>
<div class="form-group">
<label for="name">
Item Name:
</label>
<input type="text" id="name" class="form-control name_edit">
</div>
<div class="form-group">
<label for="category">
Category:
</label>
<select class="form-control category_edit" id="category">
<option id="skincare">Skincare</option>
<option id="makeup">Makeup</option>
<option id="bathAndBody">Bath and Body</option>
<option id="hair">Hair</option>
<option id="fragrance">Fragrance</option>
</select>
</div>
<div class="form-group">
<label for="product_type">
Product Type:
</label>
<select class="form-control product_type_edit" id="product_type">
<option value="cleansers">Cleansers</option>
<option value="eyeCare">Eye Care</option>
<option value="lipTreatments">Lip Treatments</option>
<option value="masks">Masks</option>
<option value="moisturizers">Moisturizers</option>
<option value="selfTannersForFace">Self Tanners For Face</option>
<option value="shaving">Shaving</option>
<option value="sunCareForFace">Sun Care For Face</option>
<option value="treatments">Treatments</option>
</select>
</div>
<div class="form-group">
<label for="openingDate">
Opened Date:
</label>
<input type="date" id="openingDate" class="form-control openingDate_edit">
</div>
<div class="form-group">
<label for="shelfLife">
Shelf Life:
</label>
<input type="number" id="shelfLife" class="form-control shelfLife_edit" min="0" max="120" placeholder="Shelf life in months">
<span>Example</span>
<img src="img/shelfLifeExample.jpg" id="shelfLifeExample" class="mt-3">
</div>
<button type="submit" class="btn btn-info">Submit</button>
</form>
</div>
</div>
</div>
</div>
<!--End modal for 'Edit Items'-->
</div>
<div class="main-body">
<div id="menuBar">
<h1>Manage your items here:</h1>
<button class="btn btn-info" id="addItemButton" data-toggle="modal" data-target="#addItemModal">Add Item</button>
</div>
<div id="itemList">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">The day you opened this item</th>
<th scope="col">Expected expiration date</th>
<th scope="col">Edit</th>
<th scope="col">Delete</th>
</tr>
</thead>
<tbody id="itemListBody">
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>