finalization of my calendar ranges

This commit is contained in:
2022-06-30 17:40:43 +02:00
parent 9e93e2a3f9
commit 4aa8436399
6 changed files with 71 additions and 44 deletions

View File

@@ -241,8 +241,9 @@ export default <Module<CalendarRangesState, State>>{
start.setFullYear(to.getFullYear(), to.getMonth(), to.getDate())
let end = new Date(<Date>ISOToDatetime(r.end));
end.setFullYear(to.getFullYear(), to.getMonth(), to.getDate());
let location = ctx.rootGetters['locations/getLocationById'](r.locationId);
promises.push(ctx.dispatch('createRange', {start, end}));
promises.push(ctx.dispatch('createRange', {start, end, location}));
}
return Promise.all(promises).then(_ => Promise.resolve(null));