mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
reformat to indentation 2
This commit is contained in:
parent
17778ab346
commit
352b5b41b0
@ -24,12 +24,12 @@ import {datetimeToISO} from 'ChillMainAssets/chill/js/date';
|
||||
const fetchings = new Set();
|
||||
|
||||
export default {
|
||||
setCurrentDatesView({ commit, dispatch }, {start, end}) {
|
||||
setCurrentDatesView({commit, dispatch}, {start, end}) {
|
||||
commit('setCurrentDatesView', {start, end});
|
||||
|
||||
return dispatch('fetchCalendarEvents');
|
||||
},
|
||||
fetchCalendarEvents({ state, getters, dispatch }) {
|
||||
fetchCalendarEvents({state, getters, dispatch}) {
|
||||
if (state.currentView.start === null && state.currentView.end === null) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
@ -61,7 +61,7 @@ export default {
|
||||
|
||||
return Promise.all(promises);
|
||||
},
|
||||
fetchCalendarRangeForUser({ commit, getters }, { user, start, end }) {
|
||||
fetchCalendarRangeForUser({commit, getters}, {user, start, end}) {
|
||||
if (!getters.isCalendarRangeLoadedForUser({user, start, end})) {
|
||||
return fetchCalendarRangeForUser(user, start, end).then((ranges) => {
|
||||
commit('addCalendarRangesForUser', {user, ranges, start, end});
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
fetchCalendarRemotesForUser({ commit, getters }, { user, start, end }) {
|
||||
fetchCalendarRemotesForUser({commit, getters}, {user, start, end}) {
|
||||
if (!getters.isCalendarRemoteLoadedForUser({user, start, end})) {
|
||||
return fetchCalendarRemoteForUser(user, start, end).then((remotes) => {
|
||||
commit('addCalendarRemotesForUser', {user, remotes, start, end});
|
||||
@ -79,7 +79,7 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
addPersonsInvolved({ commit, dispatch }, payload) {
|
||||
addPersonsInvolved({commit, dispatch}, payload) {
|
||||
console.log('### action addPersonsInvolved', payload.result.type);
|
||||
switch (payload.result.type) {
|
||||
case 'person':
|
||||
@ -96,10 +96,11 @@ export default {
|
||||
commit('showUserOnCalendar', {user: payload.result, ranges: false, remotes: true});
|
||||
dispatch('fetchCalendarEvents');
|
||||
break;
|
||||
};
|
||||
}
|
||||
;
|
||||
commit('addPersonsInvolved', payload);
|
||||
},
|
||||
removePersonInvolved({ commit }, payload) {
|
||||
removePersonInvolved({commit}, payload) {
|
||||
//console.log('### action removePersonInvolved', payload);
|
||||
switch (payload.type) {
|
||||
case 'person':
|
||||
@ -114,7 +115,8 @@ export default {
|
||||
let aUsers = document.getElementById("chill_activitybundle_activity_users");
|
||||
aUsers.value = removeIdFromValue(aUsers.value, payload.id);
|
||||
break;
|
||||
};
|
||||
}
|
||||
;
|
||||
commit('removePersonInvolved', payload);
|
||||
},
|
||||
|
||||
@ -130,7 +132,7 @@ export default {
|
||||
* @param start
|
||||
* @param end
|
||||
*/
|
||||
setEventTimes({ commit, state, getters }, {start, end}) {
|
||||
setEventTimes({commit, state, getters}, {start, end}) {
|
||||
console.log('### action createEvent', {start, end});
|
||||
let startDateInput = document.getElementById("chill_activitybundle_activity_startDate");
|
||||
startDateInput.value = datetimeToISO(start);
|
||||
@ -147,7 +149,7 @@ export default {
|
||||
|
||||
commit('setEventTimes', {start, end});
|
||||
},
|
||||
associateCalendarToRange({ state, commit, dispatch }, {range}) {
|
||||
associateCalendarToRange({state, commit, dispatch}, {range}) {
|
||||
console.log('### action associateCAlendarToRange', range);
|
||||
let startDateInput = document.getElementById("chill_activitybundle_activity_startDate");
|
||||
startDateInput.value = datetimeToISO(range.start);
|
||||
@ -166,27 +168,17 @@ export default {
|
||||
commit('associateCalendarToRange', {range});
|
||||
return Promise.resolve();
|
||||
},
|
||||
setMainUser({ commit }, mainUser) {
|
||||
setMainUser({commit}, mainUser) {
|
||||
console.log('setMainUser', mainUser);
|
||||
let mainUserInput = document.getElementById("chill_activitybundle_activity_mainUser");
|
||||
mainUserInput.value = Number(mainUser.id);
|
||||
|
||||
commit('setMainUser', mainUser);
|
||||
|
||||
/*
|
||||
const event = new CustomEvent('pick-entity-type-action', {detail: {
|
||||
name: "chill_activitybundle_activity_mainUser",
|
||||
entity: toRaw(mainUser),
|
||||
action: 'add'
|
||||
}});
|
||||
document.dispatchEvent(event);
|
||||
commit('setMainUser', mainUser);
|
||||
|
||||
*/
|
||||
},
|
||||
|
||||
|
||||
// Location
|
||||
updateLocation({ commit }, value) {
|
||||
updateLocation({commit}, value) {
|
||||
console.log('### action: updateLocation', value);
|
||||
let hiddenLocation = document.getElementById("chill_activitybundle_activity_location");
|
||||
if (value.onthefly) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user