diff --git a/src/App.svelte b/src/App.svelte index 7f8a24f..0cff600 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -63,23 +63,15 @@ locale: frLocale, allDayContent: '', headerToolbar: headers, - resourceAreaWidth: '40%', - resourceAreaColumns: [ - { - group: true, - field: 'building', - headerContent: 'Bâtiment' - }, - { - field: 'room', - headerContent: 'Salle' - } - ], + buttonText: { resourceTimelineDay: 'Salles' }, + scrollTime: "08:00:00", + resourceGroupField: 'building', + resourceAreaWidth: '27%', resources: Object.entries(ENSLocations).flatMap(([building, rooms]) => rooms.map(room => ({ id: `${building}-${room}`, building, - room + title: room })) ), height: '100%', diff --git a/src/calendar.js b/src/calendar.js index d46907e..c386ad9 100644 --- a/src/calendar.js +++ b/src/calendar.js @@ -234,17 +234,23 @@ class Calendar { } function findLocationId(location) { - // TODO: Perform ad-hoc patches of location so it can be better associated. - // Strip '(Jourdan)' - // Relocate room number + const adhocMap = { + 'Amphi Jourdan': 'Amphithéâtre Jourdan', + 'R2-21 (Jourdan)': 'R2-21', + '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 Marcel Roncayolo (Jourdan, R2-05)': 'Salle Marcel Roncayolo (R2-05)' + }; + + const correctedLocation = adhocMap[location] || location; const result = Object.entries(STATIC_LOCATIONS).find(([building, rooms]) => - rooms.includes(location) + rooms.includes(correctedLocation) ) if (result === undefined) return undefined const [building, _] = result - return `${building}-${location}` + return `${building}-${correctedLocation}` } function fcEventFromjCalEvent(cal) { diff --git a/src/static-ens-locations.json b/src/static-ens-locations.json index 831defb..7357054 100644 --- a/src/static-ens-locations.json +++ b/src/static-ens-locations.json @@ -21,6 +21,7 @@ "Cave d'hackENS", "Gymnase" ], + "24 rue d'Ulm": ["Salle CONF IV"], "29 rue d'Ulm": ["Bibliothèque des sciences expérimentales", "Salle Jaurès"], "Jourdan": [ "Bibliothèque de Jourdan",