KI-Kennzeichnung (Art. 50 KI-VO): Pflicht-Deklaration für Text & Bilder
Selbstdeklaration des KI-Einsatzes je PM (Text) und je Bild inkl. Submit-Gate im PressReleaseService, versioniertem Audit-Trail (press_release_ai_declarations) und öffentlichem KI-Label in Einreicher-Stimme. Bestätigung im Submit-Modal ist Pflicht. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
1822dcbcd1
commit
c387048d7e
16 changed files with 833 additions and 3 deletions
52
app/Livewire/Concerns/InteractsWithAiDeclaration.php
Normal file
52
app/Livewire/Concerns/InteractsWithAiDeclaration.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Concerns;
|
||||
|
||||
use App\Enums\AiTextDeclaration;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
/**
|
||||
* KI-Kennzeichnung im Submit-Flow (Art. 50 KI-VO, Decision-Update 08.07.2026).
|
||||
*
|
||||
* Gemeinsame Properties + Validierung der vier Customer-Submit-Pfade
|
||||
* (Erstellen, Bearbeiten, Detailansicht, Liste). Die Selbst-Deklaration ist
|
||||
* Pflicht bei JEDEM Einreichen: ohne KI-Grad des Textes und verbindliche
|
||||
* Bestätigung kein Submit. Die Bestätigung wird nicht vorbelegt — sie muss
|
||||
* bei jedem Submit erneut gesetzt werden (Audit-Trail pro Einreichung).
|
||||
*/
|
||||
trait InteractsWithAiDeclaration
|
||||
{
|
||||
public ?string $aiTextDeclaration = null;
|
||||
|
||||
public bool $aiDeclarationConfirmed = false;
|
||||
|
||||
/**
|
||||
* Pflichtprüfung vor dem Einreichen — Fehler erscheinen direkt im
|
||||
* Submit-Modal. Entwurf-Speichern bleibt frei von dieser Pflicht.
|
||||
*/
|
||||
protected function validateAiDeclaration(): void
|
||||
{
|
||||
$this->validate([
|
||||
'aiTextDeclaration' => ['required', Rule::in(AiTextDeclaration::values())],
|
||||
'aiDeclarationConfirmed' => ['accepted'],
|
||||
], [
|
||||
'aiTextDeclaration.required' => __('Bitte angeben, ob und wie generative KI beim Text eingesetzt wurde.'),
|
||||
'aiDeclarationConfirmed.accepted' => __('Bitte bestätigen, dass die Angaben zum KI-Einsatz vollständig und wahrheitsgemäß sind.'),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Spaltenwerte für die PM-Persistenz. Der Bestätigungszeitpunkt wird nur
|
||||
* gestempelt, wenn die Checkbox tatsächlich gesetzt wurde.
|
||||
*
|
||||
* @return array{ai_text_declaration: ?string, ai_declaration_confirmed_at: ?Carbon}
|
||||
*/
|
||||
protected function aiDeclarationAttributes(): array
|
||||
{
|
||||
return [
|
||||
'ai_text_declaration' => $this->aiTextDeclaration,
|
||||
'ai_declaration_confirmed_at' => $this->aiDeclarationConfirmed ? now() : null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue