Merge branch 'main' of git.phc.dm.unipi.it:phc/orario

pull/1/head
Francesco Minnocci 2 years ago
commit d5dd2a7824
Signed by: BachoSeven
GPG Key ID: 2BE4AB7FDAD828A4

@ -1,15 +1,8 @@
FROM node:18
RUN npm install -g pnpm
WORKDIR /app
# pnpm fetch richiede solo il file lock
COPY pnpm-lock.yaml ./
RUN pnpm fetch --prod
COPY . ./
RUN pnpm install -r --offline --prod
RUN npm install
CMD ["pnpm", "run", "build"]
CMD ["npm", "run", "build"]

@ -140,11 +140,20 @@ const WorkWeekView = ({ events }) => {
const WorkWeekVerticalView = ({ events, selection, setSelection, hideOtherCourses }) => {
const selectionSet = new Set(selection)
// const base = {
// 1: [],
// 2: [],
// 3: [],
// 4: [],
// 5: [],
// }
const eventsByWeekday = _.groupBy(
!hideOtherCourses ? events : events.filter(e => selectionSet.has(e.name)),
event => event.start.getDay()
)
// const dayIntervalLayout = _.mapValues(Object.assign(base, eventsByWeekday), events =>
const dayIntervalLayout = _.mapValues(eventsByWeekday, events =>
layoutIntervals(
events.map(e => ({
@ -222,9 +231,9 @@ const WorkWeekVerticalView = ({ events, selection, setSelection, hideOtherCourse
</div>
</div>
</div>
{Object.values(dayIntervalLayout).map((layout, index) => (
<div class="day" style={{ '--size': layout.length }}>
<div class="top-header">{WEEK_DAYS[index + 1]}</div>
{Object.entries(dayIntervalLayout).map(([index, layout]) => (
<div class="day" style={{ '--size': Math.max(1, layout.length) }}>
<div class="top-header">{WEEK_DAYS[parseInt(index)]}</div>
<div class="events">
{layout.map((events, stackIndex) => (
<>

@ -10,8 +10,8 @@ import { Icon } from './components/Icon.jsx'
import { Popup } from './components/Popup.jsx'
import { Toolbar } from './components/Toolbar.jsx'
// window._ = _
// window.dataBuffer = {}
window._ = _
window.dataBuffer = {}
const CALENDAR_IDS = {
'anno-1': ['6308cfcb1df5cb026699ce32'],
@ -78,7 +78,9 @@ const App = ({}) => {
useEffect(async () => {
const eventi = await loadEventi(CALENDAR_IDS[source])
// window.dataBuffer[source] = eventi
window.dataBuffer[source] = eventi
setEventi(eventi)
}, [source])

@ -718,9 +718,9 @@ body {
border-bottom: 1px solid var(--border-500);
}
&:not(:last-child) {
border-right: 1px solid var(--border-500);
}
// &:not(:last-child) {
border-right: 1px solid var(--gray-500);
// }
.events {
position: relative;

Loading…
Cancel
Save