Skip to content

Commit

Permalink
Merge branch 'release/summer-2024' into fix/fix-duplicate-booking-dur…
Browse files Browse the repository at this point in the history
…ation-display

# Conflicts:
#	frontend/src/components/RoomCard/RoomCard.tsx
  • Loading branch information
JBergVincit committed Jul 24, 2024
2 parents f123635 + 19c1330 commit baf12c7
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 48 deletions.
96 changes: 50 additions & 46 deletions frontend/src/components/RoomCard/RoomCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,45 +245,59 @@ class RoomCardCapacityBox extends React.Component<{
}
}

const BusyRoomStatusContent = styled('div')(({ theme }) => ({
alignSelf: 'stretch',
justifyContent: 'flex-start',
alignItems: 'center',
gap: 5,
display: 'inline-flex'
}));

const BusyRoomStatusIcon = styled('div')(({ theme }) => ({
textAlign: 'center',
color: '#E83520',
fontSize: 16,
fontFamily: 'Material Icons',
fontWeight: '400',
wordWrap: 'break-word'
}));

type BusyRoomStatusTextContentProps = {
props?: {
flex?: string;
width?: number;
fontSize?: number;
fontWeight?: string | number;
};
};
const BusyRoomStatusTextContent = styled('div')<BusyRoomStatusTextContentProps>(
({ theme, props }) => ({
color: '#1D1D1D',
fontSize: 12,
fontFamily: 'Studio Feixen Sans',
fontWeight: '4',
textTransform: 'uppercase',
wordWrap: 'break-word',
...props
})
);
export const BusyRoomCardReservationStatusIndicator = (props: {
room: Room;
}) => {
return (
<div
style={{
alignSelf: 'stretch',
justifyContent: 'flex-start',
alignItems: 'center',
gap: 5,
display: 'inline-flex'
}}
>
<div
style={{
textAlign: 'center',
color: '#E83520',
fontSize: 16,
fontFamily: 'Material Icons',
fontWeight: '400',
wordWrap: 'break-word'
}}
>
<BusyRoomStatusContent>
<BusyRoomStatusIcon>
<DoNotDisturb />
</div>
<div
style={{
</BusyRoomStatusIcon>
<BusyRoomStatusTextContent
props={{
flex: '1 1 0',
color: '#1D1D1D',
fontSize: 12,
fontFamily: 'Studio Feixen Sans',
fontWeight: '4',
textTransform: 'uppercase',
wordWrap: 'break-word'
fontSize: 12
}}
>
Occupied for {roomFreeIn(props.room)} minutes
</div>
</div>
</BusyRoomStatusTextContent>
</BusyRoomStatusContent>
);
};

Expand Down Expand Up @@ -351,28 +365,18 @@ const ReservationStatusText = (props: {
<>
<BusyRoomCardReservationStatusIndicator room={props.room} />

<div
style={{
alignSelf: 'stretch',
justifyContent: 'space-between',
alignItems: 'flex-start',
display: 'inline-flex'
}}
>
<div
style={{
<BusyRoomStatusTextContent>
<BusyRoomStatusTextContent
props={{
width: 283,
color: '#1D1D1D',
fontSize: 16,
fontFamily: 'Studio Feixen Sans',
fontWeight: '2',
wordWrap: 'break-word'
fontWeight: '2'
}}
>
Next available slot:{' '}
{getNextCalendarEventTimeString(props.room)}
</div>
</div>
</BusyRoomStatusTextContent>
</BusyRoomStatusTextContent>
</>
) : (
<>
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/util/TimeLeft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ const TimeLeft = (props: TimeLeftProps) => {

return (
<Box>
<TimeLeftTypography variant={'h3'} data-testid="TimeLeftTest">
<TimeLeftTypography
variant={'h3'}
data-testid="TimeLeftTest"
aria-label={'Time left text'}
>
{timeLeftText} {getTimeLeft(endTime)}
</TimeLeftTypography>
</Box>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/theme_2024.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export const DoNotDisturb = styled(DoNotDisturbOn)(({ theme }) => ({
fontSize: 16
}));
export const CheckCircle = styled(CheckCircleIcon)(({ theme }) => ({
color: COLORS.ACCENT_GREEN
color: COLORS.ACCENT_GREEN,
ariaLabel: 'Check circle'
}));

export const CenterAlignedStack = styled(Stack)(({ theme }) => ({
Expand Down

0 comments on commit baf12c7

Please sign in to comment.