-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathadminPage.html
349 lines (299 loc) · 12.7 KB
/
adminPage.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- // automatic reload of page -->
<meta http-equiv="refresh" content="300">
<link rel="icon" type="image/x-icon" href="images\bfccc.jpg">
<link rel="stylesheet" href="/style/adminPage.css">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
let obj = JSON.parse(localStorage.getItem("compData"));
google.charts.load("current", { packages: ["corechart"] });
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['beverages', obj.beverage],
['desserts', obj.dessert],
['burgers', obj.burger],
['biryani bucket', obj["biryani bucket"]],
['box meals', obj["box meals"]],
['new launch', obj["new launch"]],
['chicken bucket', obj["chicken bucket"]]
]);
var options = {
title: 'My Daily Activities',
is3D: true,
};
var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
chart.draw(data, options);
}
</script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', { 'packages': ['corechart'] });
google.charts.setOnLoadCallback(drawVisualization);
function drawVisualization() {
// Some raw data (not necessarily accurate)
var data = google.visualization.arrayToDataTable([
['Month', 'Last Profit', 'Sales', 'Average'],
['October', 165, 938, 614.6],
['November', 157, 1167, 623],
['December', 139, 1110, 609.4],
['January', 136, 691, 569.6]
]);
var options = {
title: 'Profit graph',
vAxis: { title: 'Sales' },
hAxis: { title: 'duration' },
seriesType: 'bars',
series: { 5: { type: 'line' } }
};
var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawVisualization);
function drawVisualization() {
// Some raw data (not necessarily accurate)
let barArr = JSON.parse(localStorage.getItem("barChartData"))
var data = google.visualization.arrayToDataTable([
['Month', 'Last Max', 'Sales', 'Average'],
['October', barArr[0].lastmax, barArr[0].totalsale, barArr[0].monthAvg],
['November', barArr[1].lastmax, barArr[1].totalsale, barArr[1].monthAvg],
['December', barArr[2].lastmax, barArr[2].totalsale, barArr[2].monthAvg],
['January', barArr[3].lastmax, barArr[3].totalsale, barArr[3].monthAvg]
]);
var options = {
title : 'Profit graph',
vAxis: {title: 'Sales'},
hAxis: {title: 'duration'},
seriesType: 'bars',
series: {5: {type: 'line'}}
};
var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div class="container">
<div class="navigation">
<ul>
<li>
<a href="/index.html">
<span class="title"><img id="logoWebsite" src="/images/bfccc.jpg" alt=""></span>
</a>
</li>
<li>
<a href="./adminPage.html">
<span class="icon"><ion-icon name="home-outline"></ion-icon></span>
<span class="title">Dashboard</span>
</a>
</li>
<li>
<a href="./adminNavPages/customers.html">
<span class="icon"><ion-icon name="person-outline"></ion-icon></span>
<span class="title">Customers</span>
</a>
</li>
<li>
<a href="./adminNavPages/orders.html">
<span class="icon"><ion-icon name="cart-outline"></ion-icon></span>
<span class="title">Orders</span>
</a>
</li>
<li>
<a href="#">
<span class="icon"><ion-icon name="settings-outline"></ion-icon></span>
<span class="title">Settings</span>
</a>
</li>
</ul>
</div>
<!-- main -->
<div class="main">
<div class="topbar">
<div class="toggle">
<ion-icon name="menu-outline"></ion-icon>
</div>
<!-- search -->
<div class="search">
<label>
<input type="text" placeholder="Search here">
<ion-icon name="search-outline"></ion-icon>
</label>
</div>
<button id="signoutbutton">Sign out</button>
<!-- userImg -->
<div class="user">
<img src="PHT.jpg" alt="">
</div>
</div>
<!-- cards -->
<div class="cardBox">
<div class="card" id="del_boy">
<div>
<div class="numbers" id="Avail_del_boy"></div>
<div class="cardName">Delivery Assistant</div>
</div>
<div class="iconBx">
<ion-icon name="man-outline"></ion-icon>
</div>
</div>
<div class="card" id="sales">
<div>
<div class="numbers" id="totalsales"></div>
<div class="cardName">Sales</div>
</div>
<div class="iconBx">
<ion-icon name="cart-outline"></ion-icon>
</div>
</div>
<div class="card">
<div>
<div class="numbers">284</div>
<div class="cardName">Comments</div>
</div>
<div class="iconBx">
<ion-icon name="chatbubbles-outline"></ion-icon>
</div>
</div>
<div class="card" id="Earning">
<div>
<div class="numbers" id="totalEarning"></div>
<div class="cardName">Profit</div>
</div>
<div class="iconBx">
<ion-icon name="cash-outline"></ion-icon>
</div>
</div>
</div>
<!-- Add charts -->
<div class="graphBox">
<div class="box">
<div id="piechart_3d"></div>
</div>
<div class="box">
<div id="chart_div" class="barGraph"></div>
</div>
</div>
<div class="details" >
<!-- order details list -->
<div class="recentOrders" id="delBoyTable">
<div class="cardHeader">
<h2>Recent Orders</h2>
<a href="#" class="btn">View All</a>
</div>
<table>
<thead>
<tr>
<td>Name</td>
<td>Salary</td>
<td>Status</td>
</tr>
</thead>
<tbody>
<!-- add delivery boys status -->
</tbody>
</table>
</div>
<!-- New Customer -->
<div class="recentCustomers">
<div class="cardHeader">
<h2>Recent Customers</h2>
</div>
<table>
<tr>
<td width="60px">
<div class="imgBx"><img src="./profile_pic_images/profile_pic (2).jpg" alt=""></div>
</td>
<td>
<h4>Rahul Raman<br><span>Ranchi</span></h4>
</td>
</tr>
<tr>
<td width="60px">
<div class="imgBx"><img src="./profile_pic_images/profile_pic (7).jpg" alt=""></div>
</td>
<td>
<h4>Mayank<br><span>Ranchi</span></h4>
</td>
</tr>
<tr>
<td width="60px">
<div class="imgBx"><img src="./profile_pic_images/profile_pic (4).jpg" alt=""></div>
</td>
<td>
<h4>Devnandan<br><span>Ranchi</span></h4>
</td>
</tr>
<tr>
<td width="60px">
<div class="imgBx"><img src="./profile_pic_images/profile_pic (8).jpg" alt=""></div>
</td>
<td>
<h4>Nishant<br><span>Ranchi</span></h4>
</td>
</tr>
<tr>
<td width="60px">
<div class="imgBx"><img src="./profile_pic_images/profile_pic (10).jpg" alt=""></div>
</td>
<td>
<h4>Raj Arya<br><span>Ranchi</span></h4>
</td>
</tr>
<tr>
<td width="60px">
<div class="imgBx"><img src="./profile_pic_images/profile_pic (6).jpg" alt=""></div>
</td>
<td>
<h4>Muskan<br><span>Ranchi</span></h4>
</td>
</tr>
<tr>
<td width="60px">
<div class="imgBx"><img src="./profile_pic_images/profile_pic (9).jpg" alt=""></div>
</td>
<td>
<h4>John Wick<br><span>Ranchi</span></h4>
</td>
</tr>
</table>
<br>
<br>
<hr>
<div class="add"><button class="addBtn"><a href="/adminNavPages/addProduct.html">Add New Product</a></button></div>
</div>
</div>
</div>
</div>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script>
//menu Toggle
let toggle = document.querySelector(".toggle");
let navigation = document.querySelector(".navigation");
let main = document.querySelector(".main");
toggle.onclick = function () {
navigation.classList.toggle("active")
main.classList.toggle("active")
}
// add hovered class in selected list item
let list = document.querySelectorAll(".navigation li");
function activeLink() {
list.forEach((item) =>
item.classList.remove("hovered"));
this.classList.add("hovered");
}
list.forEach((item) =>
item.addEventListener("mouseover", activeLink));
</script>
</body>
</html>
<script src="/script/admin.js"></script>