Widerruf: Gesetzliche Online-Widerrufsfunktion (Formular, Bestätigungsmail, Admin-Verwaltung)

- Öffentliches Widerrufsformular /widerruf mit Bestell-Lookup (throttled)
- Bestätigungsmail an Kunde + Weiterleitung an bestellungen@ (config app.withdrawal_mail)
- Admin-Übersicht/-Detail unter /admin/withdrawals inkl. Sidenav-Eintrag
- Widerruf-Button in Portal-Bestellansicht und Footer-Links
- Model OrderWithdrawal + Migration + Factory + Tests

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin 2026-07-08 15:56:02 +00:00
parent eac923968d
commit 63c36555a5
24 changed files with 1607 additions and 92 deletions

View file

@ -0,0 +1,36 @@
<?php
namespace App\Http\Requests\Withdrawal;
use Illuminate\Foundation\Http\FormRequest;
class WithdrawalLookupRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, array<int, mixed>>
*/
public function rules(): array
{
return [
'order_number' => ['required', 'string', 'max:50'],
'email' => ['required', 'email', 'max:255'],
];
}
/**
* @return array<string, string>
*/
public function messages(): array
{
return [
'order_number.required' => __('validation.required', ['attribute' => __('withdrawal.order_number')]),
'email.required' => __('validation.required', ['attribute' => __('withdrawal.email')]),
'email.email' => __('validation.email', ['attribute' => __('withdrawal.email')]),
];
}
}