Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
#3 remove dummy for available seats
Browse files Browse the repository at this point in the history
  • Loading branch information
steffchep committed Feb 19, 2018
1 parent 5b6c611 commit 2536e2e
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/main/webapp/js/utils/dataHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,14 @@ define(['moment'], function(moment) {
}

function getSeats(roomId, rooms) {
// --------- Testing
var min = 0, max = 1900;
return Math.floor(Math.random()*(max - min + 1) + min); // until we have actual data

// --------- Production
// var i;
// for (i = 0; i < rooms.length; i++) {
// if (rooms[i].id === roomId) {
// console.log(rooms[i]);
// return rooms[i].capacity;
// }
// }
// return 0;
var i;
for (i = 0; i < rooms.length; i++) {
if (rooms[i].id === roomId) {
console.log(rooms[i]);
return rooms[i].capacity;
}
}
return 0;
}

function findByEventId(events, eventId) {
Expand Down

0 comments on commit 2536e2e

Please sign in to comment.