update 1902111418
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en" dir="ltr">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Local Payroll and Expenses Report</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table id="table"></table>
|
|
||||||
<script src="script.js" charset="utf-8"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
(function() {
|
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
|
|
||||||
xhr.onload = function() {
|
|
||||||
if (xhr.status >= 200 && xhr.status < 400) {
|
|
||||||
var repObj = JSON.parse(xhr.responseText),
|
|
||||||
repKeys = Object.keys(repObj);
|
|
||||||
var table = document.getElementById('table'),
|
|
||||||
content = '<tr><th>Week</th><th>Total Payroll</th><th>Total Expense</th></tr>';
|
|
||||||
for (var i = 0; i < repKeys.length; i++) {
|
|
||||||
content += '<tr><th>' + repKeys[i] + '</th>';
|
|
||||||
content += '<td>' + repObj[repKeys[i]].payroll.total + '</td>';
|
|
||||||
content += '<td>' + repObj[repKeys[i]].expense.total + '</td></tr>'
|
|
||||||
}
|
|
||||||
var rh = xhr.getAllResponseHeaders();
|
|
||||||
}
|
|
||||||
table.innerHTML = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
xhr.open('GET', 'Report.json', true);
|
|
||||||
xhr.send();
|
|
||||||
|
|
||||||
})();
|
|
||||||
Reference in New Issue
Block a user