feat: show inquiry status with rooms in step 1
This commit is contained in:
@@ -15,6 +15,8 @@ class RoomSelectionDto
|
||||
|
||||
public ?float $price = null;
|
||||
|
||||
public ?string $status = null;
|
||||
|
||||
public ?int $quantity = null;
|
||||
|
||||
public int $maxQuantity = 100;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use App\BusProNet\Constants;
|
||||
use App\Form\Model\RoomSelectionDto;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||
@@ -38,6 +39,7 @@ class RoomSelectType extends AbstractType
|
||||
|
||||
$view->vars['label_room'] = $data->label;
|
||||
$view->vars['label_price'] = null;
|
||||
$view->vars['is_inquiry'] = Constants::STATUS_ON_REQUEST === $data->status;
|
||||
|
||||
if (null !== $data->price) {
|
||||
$formattedPrice = number_format((float) $data->price, 2, ',', '.');
|
||||
|
||||
@@ -258,6 +258,7 @@ class BookingService
|
||||
$selection->id = $room->id;
|
||||
$selection->label = $room->label;
|
||||
$selection->price = $room->price;
|
||||
$selection->status = $room->status;
|
||||
$selection->maxQuantity = $room->available;
|
||||
$selection->capacity = $room->minPax;
|
||||
$selection->quantity = $roomsIdsAndQuantities[$room->id] ?? 0;
|
||||
|
||||
Reference in New Issue
Block a user