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 ?float $price = null;
|
||||||
|
|
||||||
|
public ?string $status = null;
|
||||||
|
|
||||||
public ?int $quantity = null;
|
public ?int $quantity = null;
|
||||||
|
|
||||||
public int $maxQuantity = 100;
|
public int $maxQuantity = 100;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Form;
|
namespace App\Form;
|
||||||
|
|
||||||
|
use App\BusProNet\Constants;
|
||||||
use App\Form\Model\RoomSelectionDto;
|
use App\Form\Model\RoomSelectionDto;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
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_room'] = $data->label;
|
||||||
$view->vars['label_price'] = null;
|
$view->vars['label_price'] = null;
|
||||||
|
$view->vars['is_inquiry'] = Constants::STATUS_ON_REQUEST === $data->status;
|
||||||
|
|
||||||
if (null !== $data->price) {
|
if (null !== $data->price) {
|
||||||
$formattedPrice = number_format((float) $data->price, 2, ',', '.');
|
$formattedPrice = number_format((float) $data->price, 2, ',', '.');
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ class BookingService
|
|||||||
$selection->id = $room->id;
|
$selection->id = $room->id;
|
||||||
$selection->label = $room->label;
|
$selection->label = $room->label;
|
||||||
$selection->price = $room->price;
|
$selection->price = $room->price;
|
||||||
|
$selection->status = $room->status;
|
||||||
$selection->maxQuantity = $room->available;
|
$selection->maxQuantity = $room->available;
|
||||||
$selection->capacity = $room->minPax;
|
$selection->capacity = $room->minPax;
|
||||||
$selection->quantity = $roomsIdsAndQuantities[$room->id] ?? 0;
|
$selection->quantity = $roomsIdsAndQuantities[$room->id] ?? 0;
|
||||||
|
|||||||
@@ -61,13 +61,6 @@
|
|||||||
|
|
||||||
{% include 'booking/_summary_hotel.html.twig' %}
|
{% include 'booking/_summary_hotel.html.twig' %}
|
||||||
|
|
||||||
{# Inquiry booking notification #}
|
|
||||||
{% if bookingCreateDto is defined and bookingCreateDto.isInquiryBooking() %}
|
|
||||||
<div>
|
|
||||||
Deine Buchung wird als Anfrage verarbeitet.
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Mutability information (edit mode only) #}
|
{# Mutability information (edit mode only) #}
|
||||||
{% if bookingCreateDto.mode == constant('App\\Form\\Model\\BookingDto::MODE_EDIT') and mutableData %}
|
{% if bookingCreateDto.mode == constant('App\\Form\\Model\\BookingDto::MODE_EDIT') and mutableData %}
|
||||||
<div class="border border-primary-bg mb-4">
|
<div class="border border-primary-bg mb-4">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div class="grid grid-cols-3 pb-2">
|
<div class="grid grid-cols-3 pb-2">
|
||||||
<div class="col-span-2 pr-2">
|
<div class="col-span-2 pr-2">
|
||||||
<div class="font-semibold">
|
<div class="font-semibold">
|
||||||
{{ form.vars.label_room }}
|
{{ form.vars.label_room }} {% if form.vars.is_inquiry %}(nur auf Anfrage){% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-gray-500">
|
<div class="text-gray-500">
|
||||||
{{ form.vars.label_price }}
|
{{ form.vars.label_price }}
|
||||||
|
|||||||
Reference in New Issue
Block a user