feat: refactor to cards
This commit is contained in:
1 parent
32a9fac9ed
commit
e51c4843c5
40 files changed
+2639
-3097
No files matched your search
@@ -76,7 +76,7 @@ class ParticipantFieldHandlerRegistry
|
||||
* automatically cleared.
|
||||
*
|
||||
* @param array<string, mixed> $submittedData The submitted form data containing participants array
|
||||
* @param BookingDto $bookingDto The booking DTO to update with processed field values
|
||||
* @param BookingDto $bookingDto The booking DTO to update with processed field values
|
||||
*
|
||||
* @return array<string, mixed> The synchronized submitted data reflecting DTO changes
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ class ParticipantFieldHandlerRegistry
|
||||
* family detection which needs all participants' ages to be processed first).
|
||||
*
|
||||
* @param array<string, mixed> $submittedData The submitted form data containing participants array
|
||||
* @param BookingDto $bookingDto The booking DTO to update with processed field values (create or edit)
|
||||
* @param BookingDto $bookingDto The booking DTO to update with processed field values (create or edit)
|
||||
*/
|
||||
public function processFields(array $submittedData, BookingDto $bookingDto): void
|
||||
{
|
||||
@@ -133,7 +133,7 @@ class ParticipantFieldHandlerRegistry
|
||||
}
|
||||
|
||||
// Let each handler decide if it should process this participant's data
|
||||
if ($handler->shouldProcess($participantData, $bookingDto->mode, (int) $participantIndex)) {
|
||||
if ($handler->shouldProcess($participantData, $bookingDto->getMode(), (int) $participantIndex)) {
|
||||
$handler->processField($participantData, $bookingDto, (int) $participantIndex);
|
||||
}
|
||||
}
|
||||
@@ -149,9 +149,9 @@ class ParticipantFieldHandlerRegistry
|
||||
*
|
||||
* Handlers are executed in dependency order to ensure proper data consistency.
|
||||
*
|
||||
* @param array<string, mixed> $participantData Submitted data for one participant
|
||||
* @param BookingDto $bookingDto The booking DTO to update
|
||||
* @param int $participantIndex Index of participant to process
|
||||
* @param array<string, mixed> $participantData Submitted data for one participant
|
||||
* @param BookingDto $bookingDto The booking DTO to update
|
||||
* @param int $participantIndex Index of participant to process
|
||||
*/
|
||||
public function processFieldsForParticipant(array $participantData, BookingDto $bookingDto, int $participantIndex): void
|
||||
{
|
||||
@@ -163,7 +163,7 @@ class ParticipantFieldHandlerRegistry
|
||||
$handler = $this->handlers[$handlerName];
|
||||
|
||||
// Let each handler decide if it should process this participant's data
|
||||
if ($handler->shouldProcess($participantData, $bookingDto->mode, $participantIndex)) {
|
||||
if ($handler->shouldProcess($participantData, $bookingDto->getMode(), $participantIndex)) {
|
||||
$handler->processField($participantData, $bookingDto, $participantIndex);
|
||||
}
|
||||
}
|
||||
@@ -284,7 +284,7 @@ class ParticipantFieldHandlerRegistry
|
||||
* the current DTO state and updating the corresponding submitted data fields.
|
||||
*
|
||||
* @param array<string, mixed> $submittedData The original submitted form data
|
||||
* @param BookingDto $bookingDto The DTO with cleaned data from field handlers
|
||||
* @param BookingDto $bookingDto The DTO with cleaned data from field handlers
|
||||
*
|
||||
* @return array<string, mixed> Updated submitted data reflecting DTO state
|
||||
*/
|
||||
@@ -326,7 +326,7 @@ class ParticipantFieldHandlerRegistry
|
||||
* @param array<string, mixed> $participantData The submitted participant data
|
||||
* @param ParticipantDto $participant The cleaned participant DTO
|
||||
* @param int $index The participant index
|
||||
* @param BookingDto $bookingDto The booking DTO for mode detection
|
||||
* @param BookingDto $bookingDto The booking DTO for mode detection
|
||||
*
|
||||
* @return array<string, mixed> Updated participant data with synchronized field values
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user