Skip to content

Commit

Permalink
Add weekday in room booking details (#5743)
Browse files Browse the repository at this point in the history
  • Loading branch information
GovernmentPlates committed Apr 26, 2023
1 parent 4e7d0c9 commit 93399dd
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Improvements
- Allow searching for contributions by author in the management area (:pr:`5742`)
- Include start/end dates of the whole booking in the timeline tooltip of recurring
room bookings (:issue:`5730`, :pr:`5740`)
- Add day of the week to room booking details modal and timeline (:issue:`5718`,
:pr:`5743`)

Bugfixes
^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,11 @@ class BookingDetails extends React.Component {
rejections: rejections[day] || [],
other: other[day] || [],
},
label: moment(day).format('L'),
label: (
<>
<span styleName="weekday">{moment(day).format('ddd')}</span> {moment(day).format('L')}
</>
),
key: day,
room,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@
overflow: auto;
min-height: 20px;
}

.weekday {
color: $dark-gray;
}
18 changes: 16 additions & 2 deletions indico/modules/rb/client/js/components/TimeInformation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,25 @@ function TimeInformation({
<Icon name="calendar outline" />
{mEndDate && !mStartDate.isSame(mEndDate, 'day') ? (
<Translate>
<Param name="startDate" wrapper={<strong />} value={mStartDate.format('L')} /> to{' '}
<Param
name="startDateDay"
wrapper={<span styleName="booking-times-weekday" />}
value={mStartDate.format('ddd')}
/>{' '}
<Param name="startDate" wrapper={<strong />} value={mStartDate.format('L')} />
{' — '}
<Param
name="endDateDay"
wrapper={<span styleName="booking-times-weekday" />}
value={mEndDate.format('ddd')}
/>{' '}
<Param name="endDate" wrapper={<strong />} value={mEndDate.format('L')} />
</Translate>
) : (
<strong>{mStartDate.format('L')}</strong>
<strong>
<span styleName="booking-times-weekday">{mStartDate.format('ddd')}</span>{' '}
{mStartDate.format('L')}
</strong>
)}
</div>
</Segment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.

@import 'rb:styles/palette';

.booking-time-info {
margin-top: 10px;
}
Expand All @@ -14,3 +16,8 @@
justify-content: space-between;
align-items: center;
}

.booking-times-weekday {
color: $dark-gray;
font-weight: bold;
}

0 comments on commit 93399dd

Please sign in to comment.