feat: always load fresh api data when starting to edit booking
This commit is contained in:
@@ -54,11 +54,14 @@ class BookingEditDataLoaderService
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads booking data from session or initializes from API on first load.
|
||||
* Loads booking data from session or initializes from API.
|
||||
*
|
||||
* Validates that any cached session data matches the requested booking ID.
|
||||
* If a different booking is in session, it is cleared and fresh data is loaded.
|
||||
* If a draft exists for this user and booking, it is automatically applied.
|
||||
* Uses session data if available and valid (same booking ID). This preserves
|
||||
* participant edits between form submissions within the same edit session.
|
||||
*
|
||||
* If no session data exists, loads fresh data from API. If a draft exists,
|
||||
* it is automatically applied on top of the fresh API data to restore
|
||||
* pending user edits.
|
||||
*
|
||||
* @param Request $request The HTTP request
|
||||
* @param int $bookingId The booking ID to load
|
||||
|
||||
Reference in New Issue
Block a user