mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
rdv: fullcalendar: add current user by default
This commit is contained in:
parent
b40c25595a
commit
ca9738b55a
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
import { fetchCalendarRanges } from './js/api'
|
import { fetchCalendarRanges } from './js/api'
|
||||||
import VueMultiselect from 'vue-multiselect';
|
import VueMultiselect from 'vue-multiselect';
|
||||||
|
import { whoami } from 'ChillPersonAssets/vuejs/AccompanyingCourse/api';
|
||||||
|
|
||||||
const COLORS = ['red', 'green', 'yellow', 'blue', 'orange', 'white', 'grey'];
|
const COLORS = ['red', 'green', 'yellow', 'blue', 'orange', 'white', 'grey'];
|
||||||
|
|
||||||
@ -78,6 +79,13 @@ export default {
|
|||||||
|
|
||||||
console.log(calendarEvents)
|
console.log(calendarEvents)
|
||||||
this.calendarEvents.loaded = calendarEvents;
|
this.calendarEvents.loaded = calendarEvents;
|
||||||
|
whoami().then(me => new Promise((resolve, reject) => {
|
||||||
|
let currentUser = users.find(u => u.id === me.id);
|
||||||
|
this.value = currentUser;
|
||||||
|
this.selectUsers(currentUser);
|
||||||
|
resolve();
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
resolve()
|
resolve()
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user