This commit is contained in:
Tom Hubrecht 2022-07-27 21:48:31 +02:00
parent 978d8626b7
commit 950d690020
2 changed files with 3 additions and 6 deletions

View file

@ -1,5 +1,4 @@
<script> <script>
import { onMount } from 'svelte';
import { writable } from 'svelte/store'; import { writable } from 'svelte/store';
import FullCalendar from 'svelte-fullcalendar'; import FullCalendar from 'svelte-fullcalendar';
import { Circle2 } from 'svelte-loading-spinners'; import { Circle2 } from 'svelte-loading-spinners';
@ -22,8 +21,6 @@
import bootstrap5Plugin from '@fullcalendar/bootstrap5'; import bootstrap5Plugin from '@fullcalendar/bootstrap5';
import { Tooltip } from 'bootstrap'; import { Tooltip } from 'bootstrap';
import { createPopper } from '@popperjs/core';
import ENSLocations from './static-ens-locations.json'; import ENSLocations from './static-ens-locations.json';
const event = writable(null); const event = writable(null);
@ -158,7 +155,7 @@
const updateEvents = debounce(calendars => { const updateEvents = debounce(calendars => {
options.update(opts => ({ options.update(opts => ({
...opts, ...opts,
eventSources: selectedCalendars.map(mkSource).filter(x => !!x) eventSources: calendars.map(mkSource).filter(x => !!x)
})); }));
}, 300); }, 300);

View file

@ -240,9 +240,9 @@ function findLocationId(location) {
'Salle Jean Ibanes (Jourdan, R1-07)': 'Salle Jean Ibanes (R1-07)', 'Salle Jean Ibanes (Jourdan, R1-07)': 'Salle Jean Ibanes (R1-07)',
'Salle Madeleine Rebérioux (Jourdan, R2-02)': 'Salle Madeleine Rebérioux (R2-02)', 'Salle Madeleine Rebérioux (Jourdan, R2-02)': 'Salle Madeleine Rebérioux (R2-02)',
'Salle Marcel Roncayolo (Jourdan, R2-05)': 'Salle Marcel Roncayolo (R2-05)' 'Salle Marcel Roncayolo (Jourdan, R2-05)': 'Salle Marcel Roncayolo (R2-05)'
}; }
const correctedLocation = adhocMap[location] || location; const correctedLocation = adhocMap[location] || location
const result = Object.entries(STATIC_LOCATIONS).find(([building, rooms]) => const result = Object.entries(STATIC_LOCATIONS).find(([building, rooms]) =>
rooms.includes(correctedLocation) rooms.includes(correctedLocation)