Skip to content

Commit

Permalink
ch[#162022528] Connect attendantdashboard to api
Browse files Browse the repository at this point in the history
  • Loading branch information
ebenezerdon committed Nov 16, 2018
1 parent f2c479c commit 26b1b90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions UI/assets/js/admindashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const getUsers = () => {
let output;
for (let i = 0; i < 4; i++) {
output = `
<li><a href="attendantdashboard.html">${data[i].fullname}</a></li>
`;
<li><a href="attendantdashboard.html">${data[i].fullname}</a></li>
`;
document.getElementById('userlist').innerHTML += output;
}
});
Expand Down
5 changes: 1 addition & 4 deletions UI/assets/js/attendantdashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ const getSales = () => {
.then((data) => {
console.log(data);
let output;
console.log('Yo', output);
for (let i = 0; i < 4; i += 1) {
output += `
<h1>Yo!</h1>
output = `
<li><a href="product-item.html">${data[i].productname}</a></li>
`;
console.log('Yo!!!', output);
document.getElementById('sale-list').innerHTML += output;
}
});
Expand Down
2 changes: 1 addition & 1 deletion server/tests/sales.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,4 @@ describe('Delete sale record', () => {
});
});
});
});
});

0 comments on commit 26b1b90

Please sign in to comment.