-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin_foodManagement.html
358 lines (340 loc) · 22.7 KB
/
admin_foodManagement.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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Order Status</title>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/adminmain.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="container-fluid">
<div class="row">
<div class="col-md-2">
<div class="sidebar" style="width: 350px; ">
<div class="row">
<div class="col">
<div class="d-flex flex-column flex-shrink-0 p-3 sidebar custom-bg">
<a href="/"
class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-body-emphasis text-decoration-none">
<svg class="bi pe-none me-2" width="40" height="32">
<use xlink:href="#bootstrap"/>
</svg>
<span class="fs-4">Big Bang Fried Chicken</span>
</a>
<hr>
<ul class="nav nav-pills flex-column mb-auto">
<<<<<<< HEAD
=======
>>>>>>> d4259d7f86848561e1c8b9cf861e4372f36da7ee
<li>
<a href="admin_PersonManagement.html" class="nav-link link-body-emphasis">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil" viewBox="0 0 16 16">
<path
d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325" />
</svg>
<svg class="bi pe-none me-2" width="16" height="16">
<use xlink:href="#speedometer2" />
</svg>
Person management
</a>
</li>
<li>
<a href="admin_MenuUpdate_Promotion.html"
class="nav-link link-body-emphasis">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
fill="currentColor"
class="bi bi-pencil" viewBox="0 0 16 16">
<path
d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"/>
</svg>
<svg class="bi pe-none me-2" width="16" height="16">
<use xlink:href="#speedometer2"/>
</svg>
Menu View
</a>
</li>
<li>
<a href="admin_foodManagement.html"
class="nav-link link-body-emphasis active">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
fill="currentColor"
class="bi bi-pencil" viewBox="0 0 16 16">
<path
d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"/>
</svg>
<svg class="bi pe-none me-2" width="16" height="16">
<use xlink:href="#speedometer2"/>
</svg>
Food Management
</a>
</li>
<li>
<a href="admin_orderHistory.html" class="nav-link link-body-emphasis">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
fill="currentColor"
class="bi bi-clock-history" viewBox="0 0 16 16">
<path
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022zm2.004.45a7 7 0 0 0-.985-.299l.219-.976q.576.129 1.126.342zm1.37.71a7 7 0 0 0-.439-.27l.493-.87a8 8 0 0 1 .979.654l-.615.789a7 7 0 0 0-.418-.302zm1.834 1.79a7 7 0 0 0-.653-.796l.724-.69q.406.429.747.91zm.744 1.352a7 7 0 0 0-.214-.468l.893-.45a8 8 0 0 1 .45 1.088l-.95.313a7 7 0 0 0-.179-.483m.53 2.507a7 7 0 0 0-.1-1.025l.985-.17q.1.58.116 1.17zm-.131 1.538q.05-.254.081-.51l.993.123a8 8 0 0 1-.23 1.155l-.964-.267q.069-.247.12-.501m-.952 2.379q.276-.436.486-.908l.914.405q-.24.54-.555 1.038zm-.964 1.205q.183-.183.35-.378l.758.653a8 8 0 0 1-.401.432z"/>
<path d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0z"/>
<path
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5"/>
</svg>
<svg class="bi pe-none me-2" width="16" height="16">
<use xlink:href="#table"/>
</svg>
Order History
</a>
</li>
<li>
<a href="admin_feedback.html" class="nav-link link-body-emphasis">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
fill="currentColor"
class="bi bi-clock-history" viewBox="0 0 16 16">
<path
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022zm2.004.45a7 7 0 0 0-.985-.299l.219-.976q.576.129 1.126.342zm1.37.71a7 7 0 0 0-.439-.27l.493-.87a8 8 0 0 1 .979.654l-.615.789a7 7 0 0 0-.418-.302zm1.834 1.79a7 7 0 0 0-.653-.796l.724-.69q.406.429.747.91zm.744 1.352a7 7 0 0 0-.214-.468l.893-.45a8 8 0 0 1 .45 1.088l-.95.313a7 7 0 0 0-.179-.483m.53 2.507a7 7 0 0 0-.1-1.025l.985-.17q.1.58.116 1.17zm-.131 1.538q.05-.254.081-.51l.993.123a8 8 0 0 1-.23 1.155l-.964-.267q.069-.247.12-.501m-.952 2.379q.276-.436.486-.908l.914.405q-.24.54-.555 1.038zm-.964 1.205q.183-.183.35-.378l.758.653a8 8 0 0 1-.401.432z"/>
<path d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0z"/>
<path
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5"/>
</svg>
<svg class="bi pe-none me-2" width="16" height="16">
<use xlink:href="#table"/>
</svg>
Feedback
</a>
</li>
<li>
<a href="#" id="logout"
class="nav-link link-body-emphasis">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
fill="currentColor"
class="bi bi-clock-history" viewBox="0 0 16 16">
<path
d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022zm2.004.45a7 7 0 0 0-.985-.299l.219-.976q.576.129 1.126.342zm1.37.71a7 7 0 0 0-.439-.27l.493-.87a8 8 0 0 1 .979.654l-.615.789a7 7 0 0 0-.418-.302zm1.834 1.79a7 7 0 0 0-.653-.796l.724-.69q.406.429.747.91zm.744 1.352a7 7 0 0 0-.214-.468l.893-.45a8 8 0 0 1 .45 1.088l-.95.313a7 7 0 0 0-.179-.483m.53 2.507a7 7 0 0 0-.1-1.025l.985-.17q.1.58.116 1.17zm-.131 1.538q.05-.254.081-.51l.993.123a8 8 0 0 1-.23 1.155l-.964-.267q.069-.247.12-.501m-.952 2.379q.276-.436.486-.908l.914.405q-.24.54-.555 1.038zm-.964 1.205q.183-.183.35-.378l.758.653a8 8 0 0 1-.401.432z"/>
<path d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0z"/>
<path
d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5"/>
</svg>
<svg class="bi pe-none me-2" width="16" height="16">
<use xlink:href="#table"/>
</svg>
Logout
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="mt-4">
<h2>Hi <span class ="user-name"></span> </h2>
</div>
<hr>
<!-- Search form -->
<div class="search-box">
<form id="searchForm">
<div class="form-row">
<div class="col">
<select class="form-control" id="foodType">
<option value="">Select Food Type</option>
</select>
</div>
<div class="col">
<input type="text" class="form-control" id="foodName" placeholder="Food Name">
</div>
<div class="col">
<button type="button" id="Search" class="btn btn-danger">Search</button>
<button type="button" id="Reset" class="btn btn-secondary">Reset</button>
<button type="button" id="Add" class="btn btn-success">Add</button>
</div>
</div>
</form>
</div>
<table class="table">
<caption>Foods</caption>
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">foodName</th>
<th scope="col">price</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody id="tableBody">
</tbody>
</table>
<nav aria-label="Page navigation example">
<ul class="pagination" id="pagination">
</ul>
</nav>
</div>
</div>
<!-- 模态框结构 -->
<div class="modal fade" id="foodAdd" tabindex="-1" role="dialog" aria-labelledby="feedbackModalLabel" aria-hidden="true">
<div class="toast toast-success" id="successToast" style="background-color: green" role="alert" aria-live="assertive"
aria-atomic="true" data-delay="2000">
<div class="toast-header">
<strong class="mr-auto">Success</strong>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="toast-body">
Operation completed successfully!
</div>
</div>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="feedbackModalLabel">Food Add</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="foodForm">
<div class="form-group">
<label for="foodName">Food Name:</label>
<input type="text" class="form-control" id="food_Name" name="foodName" placeholder="Enter food name">
</div>
<div class="form-group">
<label for="imageFile">Image Source:</label>
<input type="file" class="form-control-file" id="imageFile" name="imageFile">
</div>
<div class="form-group">
<label for="foodCategoryId">Food Category:</label>
<select class="form-control" id="foodCategoryId" name="foodCategoryId">
</select>
</div>
<div class="form-group">
<label for="price">Price:</label>
<input type="number" class="form-control" id="price" name="price" placeholder="Enter price">
</div>
<div class="form-group">
<label for="info">Info:</label>
<textarea class="form-control" id="info" name="info" rows="3" placeholder="Enter additional information"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" id="buttonToAddFood" class="btn btn-danger" data-dismiss="modal">Add</button>
</div>
</div>
</div>
</div>
<!-- 模态框结构 -->
<div class="modal fade" id="foodShow" tabindex="-1" role="dialog" aria-labelledby="feedbackModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="feedbackModalLabelShow">Food Info</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="foodFormShow">
<div class="form-group">
<label for="foodName">Food Name:</label>
<input type="text" class="form-control" id="food_NameShow" disabled name="foodName" placeholder="Enter food name">
</div>
<div class="form-group">
<img src="" id="CurrentImage" style="width: 254px; height: 254px">
</div>
<div class="form-group">
<label for="foodCategoryId">Food Category:</label>
<select disabled class="form-control" id="foodCategoryIdShow" name="foodCategoryId">
</select>
</div>
<div class="form-group">
<label for="price">Price:</label>
<input type="number" disabled class="form-control" id="price_Show" name="price" placeholder="Enter price">
</div>
<div class="form-group">
<label for="info">Info:</label>
<textarea disabled class="form-control" id="info_Show" name="info" rows="3" placeholder="Enter additional information"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" id="buttonToAddFood_Show" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- 模态框结构 -->
<div class="modal fade" id="foodUpdate" tabindex="-1" role="dialog" aria-labelledby="feedbackModalLabel" aria-hidden="true">
<div class="toast toast-success" id="successToast2" style="background-color: green" role="alert" aria-live="assertive"
aria-atomic="true" data-delay="2000">
<div class="toast-header">
<strong class="mr-auto">Success</strong>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="toast-body">
Operation completed successfully!
</div>
</div>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="feedbackModalLabel_update">Food Add</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="foodForm_update">
<div class="form-group">
<label for="foodName">Food Name:</label>
<input type="text" class="form-control" id="food_Name_update" name="foodName" placeholder="Enter food name">
</div>
<div class="form-group">
<img src="" id="CurrentImageUpdate" style="width: 254px; height: 254px">
</div>
<div class="form-group">
<label for="imageFile">Image Source:</label>
<input type="file" class="form-control-file" id="imageFile_update" name="imageFile">
</div>
<div class="form-group">
<label for="foodCategoryId">Food Category:</label>
<select class="form-control" id="foodCategoryId_update" name="foodCategoryId">
</select>
</div>
<div class="form-group">
<label for="price">Price:</label>
<input type="number" class="form-control" id="price_update" name="price" placeholder="Enter price">
</div>
<div class="form-group">
<label for="info">Info:</label>
<textarea class="form-control" id="info_update" name="info" rows="3" placeholder="Enter additional information"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" id="buttonToAddFood_update" class="btn btn-danger" data-dismiss="modal">Update</button>
</div>
</div>
</div>
</div>
</div>
<!--test-->
<script src="./js/jquery-3.7.1.js"></script>
<script src="./js/bootstrap.js"></script>
<script src="./js/axios.js"></script>
<script src="./js/AjaxHelper.js"></script>
<script src = "js/admin.js"></script>
<script src="./js/admin_foodManagement.js"></script>
</body>
</html>