diff --git a/assets/js/components/Calendar.vue b/assets/js/components/Calendar.vue
index 1225ed1..1fca272 100644
--- a/assets/js/components/Calendar.vue
+++ b/assets/js/components/Calendar.vue
@@ -11,12 +11,12 @@
@@ -26,7 +26,7 @@
@@ -34,18 +34,22 @@
+
+
-
-
+
@@ -80,6 +84,8 @@ export default {
},
data () {
return {
+ loading: true,
+ message: null,
projects: [],
speakers: [],
month: new Date().getMonth() + 1,
@@ -107,6 +113,28 @@ export default {
methods: {
refresh () {
const that = this
+ this.loading = true
+ this.message = null
+
+ if (!this.month) {
+ this.message = 'Il faut sélectionner le mois.'
+ return
+ }
+
+ if (!this.year) {
+ this.message = 'Il faut sélectionner l\'année.'
+ return
+ }
+
+ if (!this.selectedProjects.length) {
+ this.message = 'Il faut sélectionner au moins un projet.'
+ return
+ }
+
+ if (!this.selectedSpeakers.length) {
+ this.message = 'Il faut sélectionner au moins un⋅e intervenant⋅e.'
+ return
+ }
axios.get(Routing.generate('admin_calendar_month', {
month: this.month,
@@ -116,6 +144,7 @@ export default {
}))
.then((response) => {
that.weeks = chunk(response.data, 7)
+ that.loading = false
})
}
},
diff --git a/assets/js/components/Week.vue b/assets/js/components/Week.vue
index f93f92d..49a7c6d 100644
--- a/assets/js/components/Week.vue
+++ b/assets/js/components/Week.vue
@@ -2,8 +2,7 @@
-
- {{ item.day }}
+ |
|
@@ -14,9 +13,10 @@
- [{{ event.startAt }}]
+ []
- {{ event.summary }}
+
+
@@ -24,11 +24,11 @@
@@ -70,13 +70,12 @@ export default {
}
},
methods: {
+ getGlobalKey () {
+ return ++this.globalKey
+ },
route (route, params) {
return Routing.generate(route, params)
}
- },
- data () {
- return {
- }
}
}