feat: implement screendesign
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Form\Model;
|
||||
|
||||
use App\BusProNet\Model\BankAccount;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
@@ -11,11 +12,11 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
*/
|
||||
class BankAccountDto
|
||||
{
|
||||
#[Assert\NotBlank(message: 'Bitte geben Sie Ihre IBAN ein.')]
|
||||
#[Assert\NotBlank(message: 'Bitte gib deine IBAN ein.')]
|
||||
#[Assert\Iban(message: 'Die eingegebene IBAN ist ungültig.')]
|
||||
public ?string $iban = null;
|
||||
|
||||
#[Assert\NotBlank(message: 'Bitte geben Sie den Kontoinhaber ein.')]
|
||||
#[Assert\NotBlank(message: 'Bitte gib den Kontoinhaber ein.')]
|
||||
#[Assert\Length(
|
||||
min: 2,
|
||||
max: 70,
|
||||
@@ -30,10 +31,10 @@ class BankAccountDto
|
||||
)]
|
||||
public ?string $bankName = null;
|
||||
|
||||
#[Assert\IsTrue(message: 'Bitte akzeptieren Sie das SEPA-Mandat.')]
|
||||
#[Assert\IsTrue(message: 'Bitte akzeptiere das SEPA-Mandat.')]
|
||||
public bool $sepaMandateAccepted = false;
|
||||
|
||||
public static function fromBankAccount(\App\BusProNet\Model\BankAccount $bankAccount): static
|
||||
public static function fromBankAccount(BankAccount $bankAccount): static
|
||||
{
|
||||
$instance = new static();
|
||||
$instance->iban = $bankAccount->iban;
|
||||
|
||||
@@ -41,7 +41,7 @@ class BookingDto
|
||||
|
||||
#[Assert\Choice(
|
||||
choices: [Constants::PAYMENT_METHOD_TRANSFER, Constants::PAYMENT_METHOD_DEBIT],
|
||||
message: 'Bitte wählen Sie eine gültige Zahlungsart.'
|
||||
message: 'Bitte wähle eine gültige Zahlungsart.'
|
||||
)]
|
||||
public ?string $paymentMethod = Constants::PAYMENT_METHOD_TRANSFER;
|
||||
|
||||
@@ -255,7 +255,7 @@ class BookingDto
|
||||
}
|
||||
|
||||
if (null === $this->bankAccount) {
|
||||
$context->buildViolation('Bitte geben Sie Ihre Bankverbindung an.')
|
||||
$context->buildViolation('Bitte gib deine Bankverbindung an.')
|
||||
->atPath('bankAccount')
|
||||
->addViolation();
|
||||
|
||||
@@ -263,19 +263,19 @@ class BookingDto
|
||||
}
|
||||
|
||||
if (null === $this->bankAccount->iban || '' === trim($this->bankAccount->iban)) {
|
||||
$context->buildViolation('Bitte geben Sie Ihre IBAN ein.')
|
||||
$context->buildViolation('Bitte gib deine IBAN ein.')
|
||||
->atPath('bankAccount.iban')
|
||||
->addViolation();
|
||||
}
|
||||
|
||||
if (null === $this->bankAccount->accountHolder || '' === trim($this->bankAccount->accountHolder)) {
|
||||
$context->buildViolation('Bitte geben Sie den Kontoinhaber ein.')
|
||||
$context->buildViolation('Bitte gib den Kontoinhaber ein.')
|
||||
->atPath('bankAccount.accountHolder')
|
||||
->addViolation();
|
||||
}
|
||||
|
||||
if (false === $this->bankAccount->sepaMandateAccepted) {
|
||||
$context->buildViolation('Bitte akzeptieren Sie das SEPA-Mandat.')
|
||||
$context->buildViolation('Bitte akzeptiere das SEPA-Mandat.')
|
||||
->atPath('bankAccount.sepaMandateAccepted')
|
||||
->addViolation();
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ class BookingSummaryDto
|
||||
/**
|
||||
* @param array<int, RoomSelectionDto> $selectedRooms Selected room DTOs from booking
|
||||
* @param int $participantCount Total participant count from room capacity
|
||||
* @param string $totalPrice Formatted total price (e.g., "1.234,56 €")
|
||||
* @param float $totalPrice Total price before voucher deductions
|
||||
* @param float $payableAmount Amount after voucher deductions
|
||||
* @param array<array{room: mixed, count: int}> $groupedSelectedRooms Rooms grouped by participant assignments
|
||||
* @param array<int, int> $assignmentCounts Room ID to participant count mapping
|
||||
* @param array $pricingData Detailed pricing breakdown
|
||||
@@ -24,7 +25,8 @@ class BookingSummaryDto
|
||||
public function __construct(
|
||||
public readonly array $selectedRooms,
|
||||
public readonly int $participantCount,
|
||||
public readonly string $totalPrice,
|
||||
public readonly float $totalPrice,
|
||||
public readonly float $payableAmount,
|
||||
public readonly array $groupedSelectedRooms,
|
||||
public readonly array $assignmentCounts,
|
||||
public readonly array $pricingData,
|
||||
|
||||
Reference in New Issue
Block a user