Skip to content

Commit

Permalink
Fixed issue affecting people with multiple workingHours in single sch…
Browse files Browse the repository at this point in the history
…edule (#3077)
  • Loading branch information
emrysal committed Jun 16, 2022
1 parent f824043 commit e65116d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/web/server/routers/viewer/slots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const checkForAvailability = ({
currentSeats?: CurrentSeats;
}) => {
if (
!workingHours.every((workingHour) => {
!workingHours.some((workingHour) => {
if (!workingHour.days.includes(time.day())) {
return false;
}
Expand Down Expand Up @@ -193,6 +193,7 @@ export const slotsRouter = createRouter().query("getSchedule", {
};
})
);

const workingHours = userSchedules.flatMap((s) => s.workingHours);
const slots: Record<string, Slot[]> = {};
const availabilityCheckProps = {
Expand Down

0 comments on commit e65116d

Please sign in to comment.