IO-1055 Blocked Day improvements.

This commit is contained in:
Patrick Fic
2021-05-10 15:55:33 -07:00
parent 5a40ce21ca
commit ef4d6de1fe
5 changed files with 56 additions and 24 deletions

View File

@@ -15,7 +15,13 @@ const mapStateToProps = createStructuredSelector({
const mapDispatchToProps = (dispatch) => ({});
export function ScheduleBlockDay({ date, children, refetch, bodyshop }) {
export function ScheduleBlockDay({
date,
children,
refetch,
bodyshop,
alreadyBlocked,
}) {
const { t } = useTranslation();
const [insertBlock] = useMutation(INSERT_APPOINTMENT_BLOCK);
@@ -56,7 +62,11 @@ export function ScheduleBlockDay({ date, children, refetch, bodyshop }) {
);
return (
<Dropdown overlay={menu} trigger={["contextMenu"]}>
<Dropdown
overlay={menu}
disabled={alreadyBlocked}
trigger={["contextMenu"]}
>
{children}
</Dropdown>
);