diff --git a/src/containers/ScheduleSlot/ScheduleSlot.tsx b/src/containers/ScheduleSlot/ScheduleSlot.tsx index af7e3ace15..ccaa01087f 100644 --- a/src/containers/ScheduleSlot/ScheduleSlot.tsx +++ b/src/containers/ScheduleSlot/ScheduleSlot.tsx @@ -77,22 +77,51 @@ const ScheduleSlot: FC = observer((props) => { )} ) : ( - users.map(({ pk: userPk }, userIndex) => { + users.map(({ display_name, pk: userPk }, userIndex) => { const storeUser = store.userStore.items[userPk]; - // TODO remove - if (!storeUser) { - store.userStore.updateItem(userPk); - } - const inactive = false; - const title = getTitle(storeUser); + const title = storeUser ? getTitle(storeUser) : display_name; const isOncall = Boolean( storeUser && onCallNow && onCallNow.some((onCallUser) => storeUser.pk === onCallUser.pk) ); + const scheduleSlotContent = ( +
setMouseX(0) : undefined} + > + {trackMouse && mouseX > 0 &&
} + {storeUser && ( + + )} +
+ {userIndex === 0 && label && ( +
+ {label} +
+ )} + {title} +
+
+ ); + + if (!storeUser) { + return scheduleSlotContent; + } // show without a tooltip as we're lacking user info + return ( = observer((props) => { /> } > -
setMouseX(0) : undefined} - > - {trackMouse && mouseX > 0 &&
} - {storeUser && ( - - )} -
- {userIndex === 0 && label && ( -
- {label} -
- )} - {title} -
-
+ {scheduleSlotContent} ); })