Skip to content

refactor(reservations): initialize reservation with rendered $StartDa…#1529

Merged
JohnVillalovos merged 1 commit into
LibreBooking:developfrom
labmecanicatec:refactor-reservation.init
Jul 8, 2026
Merged

refactor(reservations): initialize reservation with rendered $StartDa…#1529
JohnVillalovos merged 1 commit into
LibreBooking:developfrom
labmecanicatec:refactor-reservation.init

Conversation

@labmecanicatec

Copy link
Copy Markdown
Collaborator

…te and $EndDate

  • Replace the use of values ​​read from #BeginDate and #EndDate with dates rendered by Smarty, avoiding reliance on the DOM state during reservation initialization.
  • Maintains consistency with Reservation/create.tpl
  • Avoids the use of jQuery

…te and $EndDate

- Replace the use of values ​​read from #BeginDate and #EndDate with dates rendered by Smarty, avoiding reliance on the DOM state during reservation initialization.
- Maintains consistency with Reservation/create.tpl
- Avoids the use of jQuery

@JohnVillalovos JohnVillalovos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @labmecanicatec

Makes sense to me.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors reservation initialization in the reservation view template to use server-rendered $StartDate / $EndDate values (formatted via Smarty) instead of reading #BeginDate/#EndDate from the DOM at init time, aligning the approach with Reservation/create.tpl.

Changes:

  • Replace DOM-derived startStr/endStr construction with {format_date ... key=system_datetime} values passed directly into reservation.init(...).
  • Remove the two jQuery .val() reads for initialization-time date construction in tpl/Reservation/view.tpl.

@JohnVillalovos JohnVillalovos merged commit 2c79e5f into LibreBooking:develop Jul 8, 2026
16 checks passed
@labmecanicatec labmecanicatec deleted the refactor-reservation.init branch July 8, 2026 19:45
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.

3 participants