|
|
|
@ -59,37 +59,20 @@ async function loadEventi(ids) {
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
if (ids.length === 1) {
|
|
|
|
|
return calendari[0]
|
|
|
|
|
}
|
|
|
|
|
=======
|
|
|
|
|
// console.log(calendari)
|
|
|
|
|
|
|
|
|
|
if (ids.length === 1) {
|
|
|
|
|
return calendari[0]
|
|
|
|
|
}
|
|
|
|
|
>>>>>>> 41195462f176b27e142a78d7a63c072144135c5a
|
|
|
|
|
|
|
|
|
|
return _.uniqBy(_.concat(...calendari), 'id')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const App = ({}) => {
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
// Data Sources
|
|
|
|
|
const [source, setSource] = useState('magistrale')
|
|
|
|
|
const [eventi, setEventi] = useState([])
|
|
|
|
|
|
|
|
|
|
// View Modes
|
|
|
|
|
const [mode, setMode] = useState(MODE_COURSE)
|
|
|
|
|
=======
|
|
|
|
|
// Data Sources
|
|
|
|
|
const [source, setSource] = useState('anno-1')
|
|
|
|
|
const [eventi, setEventi] = useState([])
|
|
|
|
|
|
|
|
|
|
// View Modes
|
|
|
|
|
const [mode, setMode] = useState(MODE_WORKWEEK_GRID)
|
|
|
|
|
>>>>>>> 41195462f176b27e142a78d7a63c072144135c5a
|
|
|
|
|
|
|
|
|
|
// Selection
|
|
|
|
|
const [selectedCourses, setSelectedCourses] = useState([])
|
|
|
|
@ -99,14 +82,8 @@ const App = ({}) => {
|
|
|
|
|
const [helpVisible, setHelpVisible] = useState(false)
|
|
|
|
|
const [showMobileMenu, setShowMobileMenu] = useState(false)
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
useEffect(async () => {
|
|
|
|
|
const eventi = await loadEventi(CALENDAR_IDS[source])
|
|
|
|
|
=======
|
|
|
|
|
useEffect(async () => {
|
|
|
|
|
console.log('source changed')
|
|
|
|
|
const eventi = await loadEventi(CALENDAR_IDS[source])
|
|
|
|
|
>>>>>>> 41195462f176b27e142a78d7a63c072144135c5a
|
|
|
|
|
|
|
|
|
|
window.dataBuffer[source] = eventi
|
|
|
|
|
|
|
|
|
@ -117,14 +94,8 @@ const App = ({}) => {
|
|
|
|
|
const toolOverlayVisible =
|
|
|
|
|
selectedCourses.length > 0 && selectedCourses.filter(id => groupIds.has(id)).length > 0
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const groupIds = new Set(eventi.map(e => e.nome))
|
|
|
|
|
=======
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
console.log('course length changed')
|
|
|
|
|
const groupIds = new Set(eventi.map(e => e.nome))
|
|
|
|
|
>>>>>>> 41195462f176b27e142a78d7a63c072144135c5a
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
selectedCourses.length === 0 ||
|
|
|
|
|