forked from eecs330-budgeting/budgeting-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.html
548 lines (449 loc) · 21.2 KB
/
report.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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" href="css/index.css" />
<link rel="stylesheet" href="css/report.css"/>
<!--<link rel="stylesheet" href="css/html.css" />-->
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet">
<title>Report</title>
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">BudgetForNow</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="index.html"
>Home <span class="sr-only">(current)</span></a
>
</li>
<li class="nav-item">
<a class="nav-link" href="budget.html">Budget</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="report.html">Report</a>
</li>
<li class="nav-item">
<a class="nav-link" href="account.html">Account</a>
</li>
</ul>
</div>
</nav>
<div id="wrapper">
<div class="container home-section">
<div class="row">
<div class="col-md-4">
<div class="budget-card-view">
<header class="card-header transparent">Report</header>
<div class="card-content" id="account-balance">
<ul>
<li class="card-balance">
<div class="balance-header">
<h3>
<div>
<span>Generated Reports</span>
</div>
</h3>
</div>
</li>
<li class="card-balance">
<ul class="bank-list bank-list1">
<!-- <li>
<button type="button" id = "button1" class=" btn btn-block budget-list-btn" onclick="activate(this.id)">
<h4>
<span>Budget 1</span>
<span id = "button1a" class="active deactivated"><span><i class="fa fa-check-square " aria-hidden="true"></i></span> Activated</span>
</h4>
<h6>
<span class="nickname left">Period: 14 days</span>
</h6>
</button>
</li>
<li>
<button id = "button2" type="button" class=" btn btn-block budget-list-btn" onclick="activate(this.id)">
<h4>
<span>Budget 2</span>
<span id = "button2a" class="deactivated"><span><i class="fa fa-check-square " aria-hidden="true"></i></span> Activated</span>
</h4>
<h6>
<span class="nickname left">Period: 30 days</span>
</h6>
</button>
</li> -->
<li>
<button type="button" id = "button3" class=" btn btn-block budget-list-btn" onclick="activate(this.id)">
<h4>
<span>Report</span>
<span id = "button3a" class="deactivated"><span><i class="fa fa-check-square " aria-hidden="true"></i></span> Activated</span>
</h4>
<h6>
<!-- <span class="nickname left">Period: 30 days</span> -->
</h6>
</button>
</li>
</ul>
<li class="card-balance">
<button type="button"
class="btn btn-lg budget-btn btn-block"
data-toggle="modal"
data-target="#addModal">
Edit Report Options
</button>
</li>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-8 add-new">
<div class="budget-card-view block-deactivated" id="button1b">
<header class="card-header transparent">Budget 1</header>
<div class="card-content budget-block">
<div class="budget-left-text"><span >Budget Exceeded</span>
<button type="button" class="btn btn-lg budget-btn right" data-toggle="tooltip" data-placement="top" title="We are working on it" data-toggle="modal" data-target="#addModal">
Generate Report
</button>
</div>
<div class="budget-left-number"><span >$300.00</span>
</div>
<ul>
<li class="card-balance">
<ul class="bank-list">
<div class="row">
<div class="col-md-4">
<div class="budget-left-second-text"><span >Total Spending</span></div>
<div class="budget-left-second-number"><span >$600.00</span></div>
</div>
<div class="col-md-4">
<div class="budget-left-second-text"><span >Budget Amount</span></div>
<div class="budget-left-second-number"><span >$600.00</span></div>
</div>
<div class="col-md-4">
<div class="budget-left-second-text"><span >Days Left</span></div>
<div class="budget-left-second-number"><span >7</span></div>
</div>
</div>
</ul>
</li>
<div class="card-content">
Budget by Categories
</div>
</ul>
<ul>
<li class="card-purchases">
<div class="purchases-header">
<h3>
<div class="purchase-content">
<span class="icon">
<i class="fas fa-utensils"></i>
</span>
<div class="purchase-title">
<span>Food</span>
<span>$ 150</span>
</div>
</div>
<span>
<a href="#" class="btn" data-toggle="modal"
data-target="#editModal"><i class="far fa-edit"></i></a>
</span>
</h3>
</div>
</li>
<li class="card-purchases">
<div class="purchases-header">
<h3>
<div class="purchase-content">
<span class="icon">
<i class="fas fa-home"></i>
</span>
<div class="purchase-title">
<span>Rent</span>
<span>$ 300</span>
</div>
</div>
<span>
<a href="#" class="btn" data-toggle="modal"
data-target="#editModal"><i class="far fa-edit"></i></a>
</span>
</h3>
</div>
</li>
<li class="card-purchases">
<div class="purchases-header">
<h3>
<div class="purchase-content">
<span class="icon">
<i class="fas fa-shopping-cart"></i>
</span>
<div class="purchase-title">
<span>Online Shopping</span>
<span>$ 50</span>
</div>
</div>
<span>
<a href="#" class="btn" data-toggle="modal"
data-target="#editModal"><i class="far fa-edit"></i></a>
</span>
</h3>
</div>
</li>
<li class="card-purchases">
<div class="purchases-header">
<h3>
<div class="purchase-content">
<span class="icon">
<i class="fas fa-glass-cheers"></i>
</span>
<div class="purchase-title">
<span>Entertainment</span>
<span>$ 50</span>
</div>
</div>
<span>
<a href="#" class="btn" data-toggle="modal"
data-target="#editModal"><i class="far fa-edit"></i></a>
</span>
</h3>
</div>
</li>
<li class="card-purchases">
<div class="purchases-header">
<h3>
<div class="purchase-content">
<span class="icon">
<i class="fas fa-question-circle"></i>
</span>
<div class="purchase-title">
<span>Others</span>
<span>$ 50</span>
</div>
</div>
<span>
<a href="#" class="btn" data-toggle="modal"
data-target="#editModal"><i class="far fa-edit"></i></a>
</span>
</h3>
</div>
</li>
</ul>
</div>
</div>
<div class="budget-card-view block-activated" id="button3b">
<header class="card-header transparent s3">Report</header>
<div class="card-content budget-block">
<div class="budget-left-text"><span >Report Graph</span>
</div>
<!--Div that will hold the pie chart-->
<div id="chart_div"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--model-->
<div class="modal modal-wrap" tabindex="-1" role="dialog" id="addModal">
<div class="modal-dialog bugdet-modal border-0" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Select Report Options</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" height>
<div class="form-group row">
<div class="col-sm-3">Categories</div>
<div class="col-sm-9">
<p>
<button id="foodButton"class="reportCategoriesButtons">Food</button>
</p>
<p>
<button id="entertainmentButton"class="reportCategoriesButtons">Entertainment</button>
</p>
<p>
<button id="rentButton"class="reportCategoriesButtons">Rent</button>
</p>
<p>
<button id="onlineShoppingButton"class="reportCategoriesButtons">Online Shoppping</button>
</p>
<p>
<button id="othersButton"class="reportCategoriesButtons">Others</button>
</p>
</div>
</div>
<div class="form-group row">
<div class="col-sm-3">Period</div>
<div class="col-sm-9">
<select class="custom-select" id="period">
<option selected>Choose...</option>
<option value="1">7 Days</option>
<option value="2">14 Days</option>
<option value="3">30 Days</option>
</select>
</div>
</div>
<div class="form-group row">
<div class="col-sm-3">Email</div>
<div class="col-sm-9">
<input
type="text"
class="form-control buget-radius"
id="memo"
name="memo"
value=""
required
/>
</div>
</div>
</div>
<div class="modal-footer bugdet-modal-footer">
<button
type="button"
class="btn btn-secondary budget-radius transparent"
data-dismiss="modal"
>
Close
</button>
<button
type="button"
id="generateReport"
class="btn btn-primary budget-radius primary-color border-0"
>
Generate Report
</button>
</div>
</div>
</div>
</div>
<!--end model-->
</div>
<script>
function changeFood(){
console.log('in change food');
foodCheckBox = !foodCheckBox;
// print("did this work")
}
</script>
<script src="js/report.js"></script>
<script
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"
></script>
<script>
$(document).ready(function() {
$(function() {
$('[data-toggle="popover"]').popover();
});
});
</script>
<script>
$(document).ready(function() {
$(function() {
$('[data-toggle="popover"]').popover();
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1; //January is 0!
var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
var mS = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"June",
"July",
"Aug",
"Sept",
"Oct",
"Nov",
"Dec"
];
var d = today.getDay();
var yyyy = today.getFullYear();
if (dd < 10) {
dd = "0" + dd;
}
today = days[d] + ", " + mS[mm - 1] + " " + dd + " " + yyyy;
$("#now-date").text(today);
if (mm < 10) {
mm = "0" + mm;
}
var date_val = yyyy + "-" + mm + "-" + dd;
console.log(date_val);
$("#date").val(date_val);
});
});
</script>
<script>
cg = function (obj) {
var o = document.getElementById("it" + obj.id.toString().substr(1));
var i = document.getElementById("ta");
if (o.childNodes[0].value) {
o.innerHTML = o.childNodes[0].value;
var i1 = document.getElementById("it1").innerText
var i2 = document.getElementById("it2").innerText
var i3 = document.getElementById("it3").innerText
var i4 = document.getElementById("it4").innerText
var i5 = document.getElementById("it5").innerText
i.innerHTML = Number(i1) + Number(i2) + Number(i3) + Number(i4) + Number(i5);
if( i.innerHTML != '0' && !Number(i.innerHTML)){
alert("Budget amount should be number only, reenter your amount!");
return
}
} else {
o.innerHTML = "<input type='text' class='add-budget-input' value='" + document.getElementById("it" + obj.id.toString().substr(
1)).innerHTML + "' />";
}
}
</script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script src="js/budget.js"></script>
</body>
</html>