Pakete 8, 5 und 6: Beträge und Zahlungen, Ändern und Stornieren, A6 im Vorgang
Deploy FeWo mit PipelineManager / deploy (push) Successful in 4m44s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 4m44s
- Paket 8: Zahlungsarten (Gast an uns, laut Portal, Auszahlung, Erstattung), Portalbeträge als Angaben mit Quelle, Übersicht nach Zuständigkeit (R09). - Paket 5: Ändern mit Folgenvorschau, vereinbart oder dem Gast vorgeschlagen (signierter Link), ein Stornoweg mit Grund und Erstattung, Portalstorno erst nach Bestätigung. - Paket 6: eigene Nutzung, Besuch und Sperre als Vorgang mit Kurabgabe und Aufenthaltsbestätigung; Bestandsübernahme der Sperren mit identischem Export. - Wirksame Einstellungen (Expertenansicht), Abnahmekatalog T01–T14, Ergebnis-, Abnahme- und Konfigurationsdokument. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
33f8f899d6
commit
3bcfc09417
77 files changed
+3638
-122
No files matched your search
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Actions\ChangeBooking;
|
||||
use App\Enums\ChangeStatus;
|
||||
use App\Exceptions\ReservationException;
|
||||
use App\Mail\ChangeAnswered;
|
||||
use App\Models\BookingChange;
|
||||
use App\Support\Settings;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
/**
|
||||
* The guest's page for a proposed change of a booking (signed link): see it, accept it or decline it. Only the acceptance
|
||||
* here makes the change binding; it is recorded with time and (hashed) address.
|
||||
*/
|
||||
class ChangeController extends Controller
|
||||
{
|
||||
public function show(BookingChange $change): View
|
||||
{
|
||||
return view('change', ['change' => $change, 'booking' => $change->booking]);
|
||||
}
|
||||
|
||||
public function accept(Request $request, BookingChange $change, ChangeBooking $changes): RedirectResponse
|
||||
{
|
||||
$request->validate(['agree' => ['accepted']], ['agree.accepted' => 'Bitte bestätigen Sie, dass Sie mit der Änderung einverstanden sind.']);
|
||||
|
||||
try {
|
||||
$changes->accept($change, $request->ip());
|
||||
} catch (ReservationException $exception) {
|
||||
return back()->with('change.error', $exception->getMessage());
|
||||
}
|
||||
rescue(fn () => Mail::to(Settings::notificationRecipients())->send(new ChangeAnswered($change->fresh(), accepted: true)));
|
||||
|
||||
return back()->with('change.success', 'Vielen Dank – die Änderung ist jetzt verbindlich.');
|
||||
}
|
||||
|
||||
public function decline(BookingChange $change, ChangeBooking $changes): RedirectResponse
|
||||
{
|
||||
if ($change->status === ChangeStatus::Proposed) {
|
||||
$changes->decline($change, request()->ip());
|
||||
rescue(fn () => Mail::to(Settings::notificationRecipients())->send(new ChangeAnswered($change->fresh(), accepted: false)));
|
||||
}
|
||||
|
||||
return back()->with('change.success', 'Sie haben die Änderung abgelehnt. Ihre Buchung bleibt unverändert.');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user