diff --git a/src/App.vue b/src/App.vue index c230ac7..167a688 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,7 @@
- + @@ -19,7 +19,7 @@ import Datepicker from 'vuejs-datepicker'; import Group from './Group'; export default { - data () { + data() { return { date: null, // a Date object representing the selected date day: {}, @@ -27,6 +27,26 @@ export default { } }, + computed: { + highlightedDates() { + var ds = this.daysSummary.days || []; + var datesWithGroups = []; + for (var i=0; i < ds.length; i++) { + var [year, month, day] = ds[i].day.split('-'); + year = parseInt(year); + month = parseInt(month) - 1; + day = parseInt(day); + if (isNaN(year) || isNaN(month) || isNaN(day)) { + continue; + } + datesWithGroups.push(new Date(year, month, day)); + } + return { + dates: datesWithGroups + }; + } + }, + beforeCreate: function() { this.daysUrl = this.$resource('days{/day}'); this.attendeesUrl = this.$resource('attendees{/id}'); diff --git a/src/User.vue b/src/User.vue index 66b604e..4522cb3 100644 --- a/src/User.vue +++ b/src/User.vue @@ -33,7 +33,6 @@ export default { computed: { loggedInUser() { - console.log(this.$store.state.loggedInUser); return this.$store.state.loggedInUser; } }, diff --git a/src/Users.vue b/src/Users.vue index 3229ab8..b97afa5 100644 --- a/src/Users.vue +++ b/src/Users.vue @@ -73,7 +73,6 @@ export default { }, (response) => { alert('deleteUser: unable to get resource'); }).then((data) => { - console.log('AAAAAAAAAAAAAAAAAAAAAAAAAAAA'); }); } }