Compare commits

..

1 Commits

Author SHA1 Message Date
Francesco Minnocci 75af3ccd56 chore: update semester 4 months ago

Binary file not shown.

@ -11,15 +11,20 @@ import semesterData from './semester-data.json'
// MODE_SCHEDULE,
// } from './components/EventsView.jsx'
import { Courses } from './components/view/Courses.jsx'
import { Schedule } from './components/view/Schedule.jsx'
import { HamburgerMenu } from './components/HamburgerMenu.jsx'
import { Help } from './components/Help.jsx'
import { Icon } from './components/Icon.jsx'
import { OptionBar } from './components/OptionBar.jsx'
import { Popup } from './components/Popup.jsx'
import { Toolbar } from './components/Toolbar.jsx'
import { Courses } from './components/view/Courses.jsx'
import { Schedule } from './components/view/Schedule.jsx'
import { prettyAulaName, prettyProfName, usePersistentState } from './utils.jsx'
import { OptionBar } from './components/OptionBar.jsx'
import {
prettyAulaName,
prettyProfName,
clearOldPersistentStates,
usePersistentState,
} from './utils.jsx'
import { SettingsBar } from './components/SettingsBar.jsx'
@ -45,8 +50,6 @@ const TIMETABLE_IDS = semesterData.timetableIds
function specialEventPatches(eventi) {
// Il laboratorio del primo anno in realtà è in due gruppi separati
eventi.forEach(evento => {
console.log(evento.id, evento.nome, evento.dataInizio, evento.dataFine)
if (
evento.nome === 'LABORATORIO DI INTRODUZIONE ALLA MATEMATICA COMPUTAZIONALE'
) {
@ -110,7 +113,7 @@ async function loadCalendari(date) {
method: 'POST',
mode: 'cors',
credentials: 'omit',
},
}
)
return await req.json()
@ -124,9 +127,9 @@ async function loadCalendari(date) {
]
const results = await Promise.all(requests)
const timetablesRaw = results.map(timetable =>
specialEventPatches(_.uniqBy(timetable, 'id')),
specialEventPatches(_.uniqBy(timetable, 'id'))
)
const allRaw = _.uniqBy(specialEventPatches(_.concat(...results)), 'id')
const allRaw = specialEventPatches(_.concat(...results), 'id')
return {
'anno-1': formatEvents(timetablesRaw[0]),
@ -173,7 +176,7 @@ const App = ({}) => {
const [date, setDate] = useState(new Date().toISOString())
// Data Sources
const [view, setView] = usePersistentState('view', 'tutti')
const [view, setView] = usePersistentState('view', 'magistrale')
const [timetables, setTimetables] = useState(null)
useEffect(async () => {
setTimetables(await loadCalendari(new Date(date)))
@ -191,7 +194,7 @@ const App = ({}) => {
const [theme, setTheme] = usePersistentState(
'theme',
'light',
'light'
// window.matchMedia('(prefers-color-scheme: dark)').matches
// ? 'dark'
// : 'light'

@ -75,7 +75,7 @@ async function parseSemesterStartDate() {
try {
const { startYear, endYear } = getCurrentAcademicYear();
const currentMonth = new Date().getMonth();
const currentSemester = currentMonth >= 0 && currentMonth <= 5 ? 2 : 1;
const currentSemester = currentMonth >= 0 && currentMonth <= 6 ? 2 : 1;
const url = `https://www.dm.unipi.it/didattica/lezioni-esami/calendario-delle-attivita-didattiche/calendario-delle-attivita-didattiche-a-a-${startYear}-${endYear.toString().slice(-2)}/`;

@ -8,7 +8,7 @@
"semesterStartDateStr": "25 febbraio 2026",
"firstMondayDate": "2026-03-02T00:00:00.000Z",
"buttonText": "Vai al 2 marzo! 🚀",
"lastUpdated": "2026-01-23T15:15:31.641Z",
"lastUpdated": "2026-01-23T15:08:14.943Z",
"academicYear": {
"startYear": 2025,
"endYear": 2026

Loading…
Cancel
Save