From bf6aa495ae58c20088b1ad1d1224ebfc07400742 Mon Sep 17 00:00:00 2001 From: mvvasilev Date: Sat, 13 Jan 2024 00:10:03 +0200 Subject: [PATCH] Fix naming --- .../src/components/AvailabilityPickerDay.tsx | 4 ++-- .../src/components/AvailabilityPickerHour.tsx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/AvailabilityPickerDay.tsx b/frontend/src/components/AvailabilityPickerDay.tsx index 18a1db4..dd9cd2c 100644 --- a/frontend/src/components/AvailabilityPickerDay.tsx +++ b/frontend/src/components/AvailabilityPickerDay.tsx @@ -38,8 +38,8 @@ const AvailabilityPickerDay = (props: { dateTime={fullHourTime} halfHourDisplayHeight={props.halfHourDisplayHeight} currentTotalRespondents={props.availabilityHeatmap.maxNumberOfRespondents} - namesMarkedFullHourAsAvailable={props.availabilityHeatmap.getNamesAt(fullHourTime.unix())} - namesMarkedHalfHourAsAvailable={props.availabilityHeatmap.getNamesAt(halfHourTime.unix())} + fullHourAvailableNames={props.availabilityHeatmap.getNamesAt(fullHourTime.unix())} + halfHourAvailableNames={props.availabilityHeatmap.getNamesAt(halfHourTime.unix())} isFullHourSelected={props.day.availableTimes.some(a => utils.dayjsIsBetweenUnixExclusive(a.fromTime, fullHourTime, a.toTime))} isHalfHourSelected={props.day.availableTimes.some(a => utils.dayjsIsBetweenUnixExclusive(a.fromTime, halfHourTime, a.toTime))} onMouseEnterHalfhour={(e: React.MouseEvent, time: dayjs.Dayjs): void => { diff --git a/frontend/src/components/AvailabilityPickerHour.tsx b/frontend/src/components/AvailabilityPickerHour.tsx index ce0a3ca..2584e9a 100644 --- a/frontend/src/components/AvailabilityPickerHour.tsx +++ b/frontend/src/components/AvailabilityPickerHour.tsx @@ -19,8 +19,8 @@ const AvailabilityPickerHour = (props: { isHalfHourSelected: boolean, halfHourDisplayHeight: number, currentTotalRespondents: number, - namesMarkedFullHourAsAvailable: String[], - namesMarkedHalfHourAsAvailable: String[], + fullHourAvailableNames: String[], + halfHourAvailableNames: String[], onMouseEnterHalfhour: (e: React.MouseEvent, time: Dayjs) => void, onMouseClickOnHalfhour: (time: Dayjs, isDelete: boolean) => void }) => { @@ -47,8 +47,8 @@ const AvailabilityPickerHour = (props: { className={"hour-light"} > 0 ? heatMapColorforValue(props.namesMarkedFullHourAsAvailable.length) : 'inherit' + bgcolor: props.fullHourAvailableNames.length > 0 ? heatMapColorforValue(props.fullHourAvailableNames.length) : 'inherit' }} className={classNames("full-hour", { "selected-availability": props.isFullHourSelected, "hour-disabled": props.disabled })} height={props.halfHourDisplayHeight} @@ -76,8 +76,8 @@ const AvailabilityPickerHour = (props: { 0 ? heatMapColorforValue(props.namesMarkedHalfHourAsAvailable.length) : 'inherit' + bgcolor: props.halfHourAvailableNames.length > 0 ? heatMapColorforValue(props.halfHourAvailableNames.length) : 'inherit' }} className={classNames("half-hour", { "selected-availability": props.isHalfHourSelected, "hour-disabled": props.disabled })} height={props.halfHourDisplayHeight}