IO-1979 Resolve various employee vacation bugs.

This commit is contained in:
Patrick Fic
2022-07-19 13:41:14 -07:00
parent 179147dc4e
commit d5f55c5873
8 changed files with 100 additions and 71 deletions

View File

@@ -37,9 +37,12 @@ export function ScheduleCalendarHeaderComponent({
...otherProps
}) {
const ATSToday = useMemo(() => {
console.log("eeee", events);
if (!events) return [];
return _.groupBy(
events.filter((e) => moment(date).isSame(moment(e.start), "day")),
events.filter(
(e) => !e.vacation && moment(date).isSame(moment(e.start), "day")
),
"job.alt_transport"
);
}, [events, date]);