feat: show room prices in room assignment form field
This commit is contained in:
@@ -130,7 +130,7 @@ class SingleRoomTypeConditionTest extends TestCase
|
||||
|
||||
foreach ($rooms as $roomData) {
|
||||
$roomSelection = new RoomSelectionDto();
|
||||
$roomSelection->roomId = $roomData['roomId'];
|
||||
$roomSelection->id = $roomData['roomId'];
|
||||
$roomSelection->quantity = $roomData['quantity'];
|
||||
$bookingDto->roomSelections[] = $roomSelection;
|
||||
}
|
||||
|
||||
@@ -331,8 +331,8 @@ class ParticipantAssignedRoomFieldHandlerTest extends TestCase
|
||||
private function createRoomSelection(int $roomId, string $label, int $capacity, int $quantity): RoomSelectionDto
|
||||
{
|
||||
$selection = new RoomSelectionDto();
|
||||
$selection->roomId = $roomId;
|
||||
$selection->roomLabel = $label;
|
||||
$selection->id = $roomId;
|
||||
$selection->label = $label;
|
||||
$selection->capacity = $capacity;
|
||||
$selection->quantity = $quantity;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class BookingPriceCalculatorServiceTest extends TestCase
|
||||
$travel->rooms = [$room];
|
||||
|
||||
$roomSelection = new RoomSelectionDto();
|
||||
$roomSelection->roomId = 1;
|
||||
$roomSelection->id = 1;
|
||||
$roomSelection->quantity = 2; // 2 rooms selected
|
||||
|
||||
$bookingDto = new BookingDto($travel, 1);
|
||||
@@ -94,7 +94,7 @@ class BookingPriceCalculatorServiceTest extends TestCase
|
||||
$travel->rooms = [$room];
|
||||
|
||||
$roomSelection = new RoomSelectionDto();
|
||||
$roomSelection->roomId = 2;
|
||||
$roomSelection->id = 2;
|
||||
$roomSelection->quantity = 1; // 1 room selected
|
||||
|
||||
$bookingDto = new BookingDto($travel, 1);
|
||||
@@ -132,11 +132,11 @@ class BookingPriceCalculatorServiceTest extends TestCase
|
||||
$travel->rooms = [$singleRoom, $doubleRoom];
|
||||
|
||||
$singleRoomSelection = new RoomSelectionDto();
|
||||
$singleRoomSelection->roomId = 1;
|
||||
$singleRoomSelection->id = 1;
|
||||
$singleRoomSelection->quantity = 1; // 1 single room
|
||||
|
||||
$doubleRoomSelection = new RoomSelectionDto();
|
||||
$doubleRoomSelection->roomId = 2;
|
||||
$doubleRoomSelection->id = 2;
|
||||
$doubleRoomSelection->quantity = 2; // 2 double rooms
|
||||
|
||||
$bookingDto = new BookingDto($travel, 1);
|
||||
@@ -179,7 +179,7 @@ class BookingPriceCalculatorServiceTest extends TestCase
|
||||
$travel->rooms = [$room];
|
||||
|
||||
$roomSelection = new RoomSelectionDto();
|
||||
$roomSelection->roomId = 1;
|
||||
$roomSelection->id = 1;
|
||||
$roomSelection->quantity = 1;
|
||||
|
||||
$bookingDto = new BookingDto($travel, 1);
|
||||
@@ -203,7 +203,7 @@ class BookingPriceCalculatorServiceTest extends TestCase
|
||||
$travel->rooms = [$room];
|
||||
|
||||
$roomSelection = new RoomSelectionDto();
|
||||
$roomSelection->roomId = 1;
|
||||
$roomSelection->id = 1;
|
||||
$roomSelection->quantity = 0; // Zero quantity - not selected
|
||||
|
||||
$bookingDto = new BookingDto($travel, 1);
|
||||
|
||||
@@ -200,7 +200,7 @@ class RoomAssignmentServiceTest extends TestCase
|
||||
|
||||
foreach ($selections as $selection) {
|
||||
$roomSelectionDto = new RoomSelectionDto();
|
||||
$roomSelectionDto->roomId = $selection['roomId'];
|
||||
$roomSelectionDto->id = $selection['roomId'];
|
||||
$roomSelectionDto->quantity = $selection['quantity'];
|
||||
if (isset($selection['capacity'])) {
|
||||
$roomSelectionDto->capacity = $selection['capacity'];
|
||||
|
||||
@@ -146,7 +146,7 @@ class RoomSelectionValidatorTest extends ConstraintValidatorTestCase
|
||||
$travel->rooms[] = $room;
|
||||
|
||||
$roomSelection = new RoomSelectionDto();
|
||||
$roomSelection->roomId = $data['id'];
|
||||
$roomSelection->id = $data['id'];
|
||||
$roomSelection->quantity = $data['quantity'];
|
||||
$roomSelections[] = $roomSelection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user