Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add day of the week to room booking details #5743

Merged
merged 8 commits into from
Apr 26, 2023
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,7 @@ class BookingDetails extends React.Component {
rejections: rejections[day] || [],
other: other[day] || [],
},
label: moment(day).format('L'),
label: moment(day).format('ddd. L'),
GovernmentPlates marked this conversation as resolved.
Show resolved Hide resolved
key: day,
room,
});
Expand Down
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.')}
GovernmentPlates marked this conversation as resolved.
Show resolved Hide resolved
/>{' '}
<Param name="startDate" wrapper={<strong />} value={mStartDate.format('L')} />
{' — '}
<Param
name="endDateDay"
wrapper={<span styleName="booking-times-weekday" />}
value={mEndDate.format('ddd.')}
GovernmentPlates marked this conversation as resolved.
Show resolved Hide resolved
/>{' '}
<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>{' '}
GovernmentPlates marked this conversation as resolved.
Show resolved Hide resolved
{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;
}