Skip to content

Commit

Permalink
First pass at adding FullCalendar.io plugin to show availbale slots. …
Browse files Browse the repository at this point in the history
…Part of #9
  • Loading branch information
Adrian McEwen committed Dec 1, 2020
1 parent 9c46331 commit b864a4d
Show file tree
Hide file tree
Showing 7 changed files with 15,895 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/routes/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ router.get('/:startDate/:endDate/:resourceId', function (req, res) {
slots.forEach((s) => {

responseSlot = {
starts: s.starts,
ends: s.ends,
starts: moment(currentDate).add(s.starts),
ends: moment(currentDate).add(s.ends),
status: 'available'
};

Expand Down Expand Up @@ -126,4 +126,4 @@ function checkDay(date, slot) {
isoDay = date.isoWeekday();

return true;
}
}
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"axios": "^0.20.0",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"fullcalendar": "^5.3.2",
"knex": "^0.21.3",
"moment": "^2.27.0",
"mustache-express": "^1.3.0",
Expand Down
Loading

0 comments on commit b864a4d

Please sign in to comment.