14-04-2026

This commit is contained in:
Kevin Adametz 2026-04-14 18:07:45 +02:00
parent f58c709945
commit 0f82fea88a
72 changed files with 7414 additions and 148 deletions

View file

@ -0,0 +1,31 @@
<?php
namespace App\Http\Requests\PaymentIncident;
use Illuminate\Foundation\Http\FormRequest;
class AddIncidentActivityRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'type' => ['required', 'in:note,email,call,ticket,status_change,provider_response'],
'title' => ['required', 'string', 'max:255'],
'content' => ['nullable', 'string'],
];
}
public function messages(): array
{
return [
'type.required' => 'Bitte einen Aktivitätstyp auswählen.',
'type.in' => 'Ungültiger Aktivitätstyp.',
'title.required' => 'Bitte einen Titel angeben.',
];
}
}

View file

@ -0,0 +1,44 @@
<?php
namespace App\Http\Requests\PaymentIncident;
use Illuminate\Foundation\Http\FormRequest;
class StorePaymentIncidentRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'title' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string'],
'notes' => ['nullable', 'string'],
'provider' => ['required', 'in:payone,paypal,other'], // stripe,mollie aktuell nicht aktiv
'type' => ['required', 'in:outage,ipn_error,payment_failure,slow_response,other'],
'severity' => ['required', 'in:low,medium,high,critical'],
'affected_orders' => ['nullable', 'integer', 'min:0'],
'affected_revenue' => ['nullable', 'numeric', 'min:0'],
'ticket_number' => ['nullable', 'string', 'max:100'],
'detected_at' => ['required', 'date'],
];
}
public function messages(): array
{
return [
'title.required' => 'Bitte einen Titel angeben.',
'provider.required' => 'Bitte einen Anbieter auswählen.',
'provider.in' => 'Ungültiger Anbieter.',
'type.required' => 'Bitte einen Incident-Typ auswählen.',
'type.in' => 'Ungültiger Incident-Typ.',
'severity.required' => 'Bitte eine Schwere angeben.',
'severity.in' => 'Ungültige Schwere.',
'detected_at.required' => 'Bitte ein Erkennungsdatum angeben.',
'detected_at.date' => 'Ungültiges Datum.',
];
}
}

View file

@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests\PaymentIncident;
use Illuminate\Foundation\Http\FormRequest;
class UpdateIncidentStatusRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'status' => ['required', 'in:open,in_progress,waiting_provider,resolved,closed'],
];
}
public function messages(): array
{
return [
'status.required' => 'Bitte einen Status auswählen.',
'status.in' => 'Ungültiger Status.',
];
}
}