chore: added new calendars

main
Antonio De Lucreziis 2 years ago
parent 4bf696ea75
commit 9c12cbf759

2
.gitignore vendored

@ -6,3 +6,5 @@ node_modules/
.env .env
.env.production .env.production
.vscode/

@ -19,15 +19,34 @@ const CALENDAR_IDS = {
'anno-1': ['6308cfcb1df5cb026699ce32'], 'anno-1': ['6308cfcb1df5cb026699ce32'],
'anno-2': ['6308e2dc09352a0208fefdd9'], 'anno-2': ['6308e2dc09352a0208fefdd9'],
'anno-3': ['6308e42a1df5cb026699ced4'], 'anno-3': ['6308e42a1df5cb026699ced4'],
'magistrale': ['6308e8ea0c34e703bb1f7e85'], 'magistrale': ['63ce74397a9aee064ee01ad7'],
'tutti': [ 'tutti': [
'6308cfcb1df5cb026699ce32', '6308cfcb1df5cb026699ce32',
'6308e2dc09352a0208fefdd9', '6308e2dc09352a0208fefdd9',
'6308e42a1df5cb026699ced4', '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) { function specialEventPatches(eventi) {
// Il laboratorio del primo anno in realtà è in due canali separati // Il laboratorio del primo anno in realtà è in due canali separati
let i = 1 let i = 1
@ -60,8 +79,8 @@ async function loadEventi(ids) {
linkCalendarioId: id, linkCalendarioId: id,
clienteId: '628de8b9b63679f193b87046', clienteId: '628de8b9b63679f193b87046',
pianificazioneTemplate: false, pianificazioneTemplate: false,
dataInizio: '2022-10-02T22:00:00.000Z', dataInizio: DATE_RANGES[id].from,
dataFine: '2022-10-07T22:00:00.000Z', dataFine: DATE_RANGES[id].to,
}), }),
method: 'POST', method: 'POST',
mode: 'cors', mode: 'cors',

Loading…
Cancel
Save