Skip to content

Conversation

@labmecanicatec
Copy link
Contributor

…view

Introduces a new configuration option 'tablet.view.allow.reservations' to control whether reservations can be made from the tablet view. Updates backend logic, templates, and tests to respect this setting, conditionally rendering reservation UI and blocking reservation actions when disabled. Removes unnecessary code related to previous UI handling due to the Bootstrap 5 update.

…view

Introduces a new configuration option 'tablet.view.allow.reservations' to control
whether reservations can be made from the tablet view. Updates backend logic,
templates, and tests to respect this setting, conditionally rendering reservation
UI and blocking reservation actions when disabled. Removes unnecessary code
related to previous UI handling due to the Bootstrap 5 update.
Copy link
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 pull request introduces a new configuration option tablet.view.allow.reservations that enables administrators to control whether users can make reservations from the tablet view. The feature provides a way to disable the reservation functionality while still allowing users to view resource availability.

Changes:

  • Added new configuration key TABLET_VIEW_ALLOW_RESERVATIONS with default value true
  • Updated backend logic to check the configuration and block reservation attempts when disabled
  • Modified templates to conditionally render the reservation UI based on the configuration
  • Cleaned up deprecated JavaScript code related to Bootstrap 5 migration

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/Config/ConfigKeys.php Defines the new TABLET_VIEW_ALLOW_RESERVATIONS configuration constant
config/config.dist.php Adds the configuration option to the distribution config file
.env.example Adds the environment variable for the new configuration
Presenters/ResourceDisplayPresenter.php Implements backend validation to block reservations when disabled; includes code style improvements
Pages/ResourceDisplayPage.php Passes the configuration value to the template for UI rendering
tpl/ResourceDisplay/resource-display-shell.tpl Updates modal ID and adds min/default date parameters to DatePicker
tpl/ResourceDisplay/resource-display-resource.tpl Wraps reservation UI in conditional block based on configuration; adjusts spacing
Web/scripts/resourceDisplay.js Removes commented-out code related to deprecated popup handling; updates date picker reference
tests/TestBase.php Sets the new configuration to true by default in test setup

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@JohnVillalovos JohnVillalovos left a comment

Choose a reason for hiding this comment

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

Thanks @labmecanicatec for the improvements!

LGTM.

@JohnVillalovos JohnVillalovos merged commit d941886 into LibreBooking:develop Jan 19, 2026
11 checks passed
@labmecanicatec labmecanicatec deleted the feature/reservations-toggle-in-resource-display branch January 19, 2026 21:13
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.

2 participants