From 9c12cbf759c10789d1e2e3c84e2794a5d72f35a7 Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Mon, 23 Jan 2023 23:28:59 +0100 Subject: [PATCH] chore: added new calendars --- .gitignore | 2 ++ src/main.jsx | 27 +++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c82b61e..1af9387 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ node_modules/ .env .env.production + +.vscode/ diff --git a/src/main.jsx b/src/main.jsx index 0597af7..5206d2c 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -19,15 +19,34 @@ const CALENDAR_IDS = { 'anno-1': ['6308cfcb1df5cb026699ce32'], 'anno-2': ['6308e2dc09352a0208fefdd9'], 'anno-3': ['6308e42a1df5cb026699ced4'], - 'magistrale': ['6308e8ea0c34e703bb1f7e85'], + 'magistrale': ['63ce74397a9aee064ee01ad7'], 'tutti': [ '6308cfcb1df5cb026699ce32', '6308e2dc09352a0208fefdd9', '6308e42a1df5cb026699ced4', - '6308e8ea0c34e703bb1f7e85', + '63ce74397a9aee064ee01ad7', ], } +const DATE_RANGES = { + '6308cfcb1df5cb026699ce32': { + from: '2022-10-02T22:00:00.000Z', + to: '2022-10-07T22:00:00.000Z', + }, + '6308e2dc09352a0208fefdd9': { + from: '2022-10-02T22:00:00.000Z', + to: '2022-10-07T22:00:00.000Z', + }, + '6308e42a1df5cb026699ced4': { + from: '2022-10-02T22:00:00.000Z', + to: '2022-10-07T22:00:00.000Z', + }, + '63ce74397a9aee064ee01ad7': { + from: '2023-02-27T22:00:00.000Z', + to: '2023-03-05T22:00:00.000Z', + }, +} + function specialEventPatches(eventi) { // Il laboratorio del primo anno in realtà è in due canali separati let i = 1 @@ -60,8 +79,8 @@ async function loadEventi(ids) { linkCalendarioId: id, clienteId: '628de8b9b63679f193b87046', pianificazioneTemplate: false, - dataInizio: '2022-10-02T22:00:00.000Z', - dataFine: '2022-10-07T22:00:00.000Z', + dataInizio: DATE_RANGES[id].from, + dataFine: DATE_RANGES[id].to, }), method: 'POST', mode: 'cors',