Skip to content

Add Time Sensitive Request Warning Message#1144

Merged
rlho merged 3 commits intomainfrom
add-warning-message-new
Jan 16, 2026
Merged

Add Time Sensitive Request Warning Message#1144
rlho merged 3 commits intomainfrom
add-warning-message-new

Conversation

@yiyujin
Copy link
Copy Markdown
Contributor

@yiyujin yiyujin commented Dec 11, 2025

Fixes :
#879

@yiyujin yiyujin changed the title initial commit after cherry-pick Add Time Sensitive Request Warning Message Dec 11, 2025
@yiyujin yiyujin mentioned this pull request Dec 11, 2025
@yiyujin yiyujin requested a review from Copilot December 11, 2025 00:38
@yiyujin
Copy link
Copy Markdown
Contributor Author

yiyujin commented Dec 11, 2025

Screenshot

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a configurable time-sensitive warning message feature to the booking system. It allows administrators to display warnings to users when they attempt to book resources within a configurable time threshold (e.g., within 48 hours of the event start time).

Key changes:

  • Adds warningMessage configuration object to the schema with threshold, activation flag, message text, and optional policy link
  • Implements conditional warning display logic in BookingStatusBar that calculates time until booking start and shows warnings when appropriate
  • Displays the warning as an Alert component on the select room page when conditions are met

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
booking-app/components/src/client/routes/components/SchemaProvider.tsx Adds the warningMessage type definition and default configuration to the schema context
booking-app/components/src/client/routes/booking/components/BookingStatusBar.tsx Implements the warning display logic with time calculations and conditional rendering of the warning Alert component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread booking-app/components/src/client/routes/booking/components/BookingStatusBar.tsx Outdated
Comment thread booking-app/components/src/client/routes/components/SchemaProvider.tsx Outdated
Comment thread booking-app/components/src/client/routes/booking/components/BookingStatusBar.tsx Outdated
@yiyujin
Copy link
Copy Markdown
Contributor Author

yiyujin commented Dec 11, 2025

Also updated the naming for fields :

image

@yiyujin
Copy link
Copy Markdown
Contributor Author

yiyujin commented Dec 11, 2025

@rlho this one's ready for review!

Copy link
Copy Markdown
Collaborator

@rlho rlho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rlho rlho merged commit eacf75e into main Jan 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As a User I want a popup warning me about submitting a request within 48 hours of the start time.

3 participants