Files
fewo-stommer/app/Mail/NewReservation.php
LarsandClaude Sonnet 5.5 eafab8a2cb
Deploy FeWo mit PipelineManager / deploy (push) Failing after 3m38s
Buchungsprozess: Angebots-Snapshot, atomare Annahme, Auto-Angebot, Kanalfreigabe
- Angebotsbedingungen und Zahlungsdaten werden je Version eingefroren (offer_terms, offer_hash)
- Annahme in einer gesperrten Transaktion, idempotent, mit Nachweis; Mail- und Portalfehler
  machen eine gespeicherte Buchung nicht ungueltig (Postfach, Nachversand)
- Je Wohnung: manuelle/automatische Angebote, optionale Vorreservierung
- Automatische Freigabe abhaengig von aktuellen Importen und Feed-Abruf bei Sofortbuchungsportalen
- Deutsche Fehlerseiten, Buchungsseite zeigt Angebots- und Zustellstatus
- Dokumentation: BOOKING-E2E-*.md, BOOKING-COMPLIANCE-HANDOVER.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:01:02 +01:00

41 lines
1.3 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Mail;
use App\Models\Booking;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
/**
* Notifies the landlord about a new request.
*/
class NewReservation extends Mailable
{
use Queueable, SerializesModels;
/**
* @param bool $offerSent the offer already went to the guest automatically
* @param list<string> $blockers why the automatic offer was not sent (automatic mode only)
*/
public function __construct(public Booking $booking, public bool $offerSent = false, public array $blockers = []) {}
public function envelope(): Envelope
{
return new Envelope(
subject: ($this->offerSent ? 'Angebot automatisch versendet' : 'Neue Anfrage').' '.$this->booking->reference.': '.$this->booking->guest->full_name.', '.$this->booking->arrival->format('d.m.').'–'.$this->booking->departure->format('d.m.Y'),
replyTo: [new Address($this->booking->guest->email, $this->booking->guest->full_name)],
);
}
public function content(): Content
{
return new Content(
markdown: 'mail.new-reservation',
);
}
}