diff --git a/Dockerfile b/Dockerfile index d1f291f..870dd65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/src/components/EventsView.jsx b/src/components/EventsView.jsx index 2329eb3..4f53bb0 100644 --- a/src/components/EventsView.jsx +++ b/src/components/EventsView.jsx @@ -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 - {Object.values(dayIntervalLayout).map((layout, index) => ( -