Phase 9 Block 1: Gelb-Routing Direkt-Live, Slot-Verbrauch bei Veroeffentlichung, Submit-Gate
9A — Gelb geht direkt live (Entscheidung 12.06.2026): - routeByClassification(): Gelb durchlaeuft denselben Auto-Publish-Pfad wie Gruen (autoPublishApproved); nur Rot wird abgelehnt - Scheduler publiziert faellige gelbe + gruene PMs; unklassifizierte bleiben als Fallback in der manuellen Queue 9B — Slot-Verbrauch bei Veroeffentlichung (Decision-Update 3.2): - Increment aus submitForReview() entfernt; publish() und changeStatusFromAdmin() zaehlen idempotent beim ersten published-Uebergang (Pruefung ueber Status-Logs); Rot kostet nichts - Submit-Guard: Einreichen erfordert freien Slot (QuotaExceededException, API 422) 9C — Submit-Gate vorbereitet (Decision-Update 5.1): - User::hasActiveBooking()-Stub hinter config/billing.php (enforce_booking, Default aus); Tarif-Modul ersetzt nur den Rumpf - Einreichungs-Modal zeigt ohne Buchung einen Buchungs-Hinweis; Server-Guard (BookingRequiredException), API antwortet 402 - Fix: Customer-Create legte PMs bei "Zur Pruefung senden" direkt mit Status review an (vorbei an Blacklist/Quota/KI/Status-Log) — laeuft jetzt immer ueber submitForReview() Suite: 451 passed, 4 skipped (9 neue Tests). Pint clean. Plan: docs/PHASE-9-FLOW-UND-TARIFE-PLAN.md (Block 2 nach Review-Stopp). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
8d8d957884
commit
4419d9ff43
21 changed files with 551 additions and 114 deletions
|
|
@ -12,66 +12,99 @@
|
|||
`action`-Prop bestimmt die Livewire-Methode der Eltern-Komponente, die beim
|
||||
Bestätigen ausgeführt wird (z. B. `submitForReview`, `saveAndSubmit`,
|
||||
`save('review')`). Quota-Block wird nur angezeigt, wenn Werte übergeben sind.
|
||||
|
||||
Submit-Gate (Decision-Update §5.1): Ohne aktive Buchung zeigt das Modal
|
||||
statt des Prüf-Flows einen Buchungs-Hinweis — der Button konvertiert,
|
||||
er verschwindet nicht. Serverseitig sichert submitForReview() das Gate ab.
|
||||
--}}
|
||||
@php($bookingRequired = ! (auth()->user()?->hasActiveBooking() ?? true))
|
||||
|
||||
<flux:modal :name="$name" class="w-full max-w-xl">
|
||||
<div class="space-y-5" x-data="{ agb: false, images: false, contact: false }">
|
||||
<div>
|
||||
<flux:text class="eyebrow muted">{{ __('Veröffentlichung') }}</flux:text>
|
||||
<flux:heading size="lg">{{ __('Pressemitteilung zur Prüfung einreichen') }}</flux:heading>
|
||||
</div>
|
||||
|
||||
{{-- Rechtliche Hinweise (Platzhalter — vor Go-Live anwaltlich prüfen) --}}
|
||||
<div class="rounded-[6px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-4 text-[12.5px] leading-[1.6] text-[color:var(--color-ink-2)]">
|
||||
<p class="m-0 mb-2 font-semibold text-[color:var(--color-ink)]">{{ __('Mit dem Einreichen versichern Sie:') }}</p>
|
||||
<ul class="m-0 list-disc space-y-1 ps-5">
|
||||
<li>{{ __('Sie sind befugt, den Inhalt zu veröffentlichen.') }}</li>
|
||||
<li>{{ __('Alle verwendeten Bilder, Logos und Zitate liegen in Ihrer Nutzungsbefugnis.') }}</li>
|
||||
<li>{{ __('Personenbezogene Daten sind nur im zwingend erforderlichen Umfang enthalten.') }}</li>
|
||||
<li>{{ __('Aussagen entsprechen Ihrem Wissensstand und sind sachlich richtig.') }}</li>
|
||||
</ul>
|
||||
<p class="m-0 mt-2 text-[11.5px] text-[color:var(--color-ink-3)]">
|
||||
{{ __('Sie stellen die Plattform von Ansprüchen Dritter frei, die aus einer unberechtigten Nutzung von Inhalten resultieren. Die endgültige Veröffentlichung erfolgt nach redaktioneller Prüfung.') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{-- Kontingent (optional) --}}
|
||||
@if (! is_null($quotaRemaining) && ! is_null($quotaTotal))
|
||||
<div class="flex items-center justify-between rounded-[6px] border border-[color:var(--color-bg-rule)] px-4 py-3">
|
||||
<div class="text-[12.5px] text-[color:var(--color-ink-2)]">
|
||||
<div class="font-semibold text-[color:var(--color-ink)]">{{ __('PM-Kontingent diesen Monat') }}</div>
|
||||
<div class="text-[color:var(--color-ink-3)]">{{ __('Verbleibend nach diesem Versand wird angerechnet.') }}</div>
|
||||
</div>
|
||||
<span @class(['badge', $quotaRemaining > 0 ? 'ok' : 'warn'])>
|
||||
{{ $quotaRemaining }} / {{ $quotaTotal }}
|
||||
</span>
|
||||
@if ($bookingRequired)
|
||||
<div class="space-y-5">
|
||||
<div>
|
||||
<flux:text class="eyebrow muted">{{ __('Veröffentlichung') }}</flux:text>
|
||||
<flux:heading size="lg">{{ __('Buchung erforderlich') }}</flux:heading>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Bestätigungen --}}
|
||||
<div class="space-y-2">
|
||||
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
|
||||
<input type="checkbox" x-model="agb" class="mt-0.5" />
|
||||
<span>{{ __('Der Inhalt entspricht den AGB und gesetzlichen Vorgaben.') }}</span>
|
||||
</label>
|
||||
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
|
||||
<input type="checkbox" x-model="images" class="mt-0.5" />
|
||||
<span>{{ __('Alle Bildrechte sind geklärt.') }}</span>
|
||||
</label>
|
||||
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
|
||||
<input type="checkbox" x-model="contact" class="mt-0.5" />
|
||||
<span>{{ __('Die Angaben zum Pressekontakt sind korrekt.') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="rounded-[6px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-4 text-[12.5px] leading-[1.6] text-[color:var(--color-ink-2)]">
|
||||
<p class="m-0 mb-2">
|
||||
{{ __('Zum Einreichen einer Pressemitteilung wird eine aktive Buchung benötigt. Ihre Entwürfe bleiben gespeichert und können jederzeit weiter bearbeitet werden.') }}
|
||||
</p>
|
||||
<p class="m-0 text-[11.5px] text-[color:var(--color-ink-3)]">
|
||||
{{ __('Nach der Buchung reichen Sie die Pressemitteilung mit einem Klick zur Prüfung ein.') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-2">
|
||||
<flux:modal.close>
|
||||
<flux:button variant="filled">{{ __('Abbrechen') }}</flux:button>
|
||||
</flux:modal.close>
|
||||
<flux:button variant="primary" wire:click="{{ $action }}"
|
||||
wire:loading.attr="disabled"
|
||||
x-bind:disabled="! (agb && images && contact)">
|
||||
{{ $confirmLabel ?? __('Veröffentlichung anfordern') }}
|
||||
</flux:button>
|
||||
<div class="flex justify-end gap-2">
|
||||
<flux:modal.close>
|
||||
<flux:button variant="filled">{{ __('Später') }}</flux:button>
|
||||
</flux:modal.close>
|
||||
<flux:button variant="primary" :href="route('me.bookings.index')" wire:navigate>
|
||||
{{ __('Buchung auswählen') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="space-y-5" x-data="{ agb: false, images: false, contact: false }">
|
||||
<div>
|
||||
<flux:text class="eyebrow muted">{{ __('Veröffentlichung') }}</flux:text>
|
||||
<flux:heading size="lg">{{ __('Pressemitteilung zur Prüfung einreichen') }}</flux:heading>
|
||||
</div>
|
||||
|
||||
{{-- Rechtliche Hinweise (Platzhalter — vor Go-Live anwaltlich prüfen) --}}
|
||||
<div class="rounded-[6px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-4 text-[12.5px] leading-[1.6] text-[color:var(--color-ink-2)]">
|
||||
<p class="m-0 mb-2 font-semibold text-[color:var(--color-ink)]">{{ __('Mit dem Einreichen versichern Sie:') }}</p>
|
||||
<ul class="m-0 list-disc space-y-1 ps-5">
|
||||
<li>{{ __('Sie sind befugt, den Inhalt zu veröffentlichen.') }}</li>
|
||||
<li>{{ __('Alle verwendeten Bilder, Logos und Zitate liegen in Ihrer Nutzungsbefugnis.') }}</li>
|
||||
<li>{{ __('Personenbezogene Daten sind nur im zwingend erforderlichen Umfang enthalten.') }}</li>
|
||||
<li>{{ __('Aussagen entsprechen Ihrem Wissensstand und sind sachlich richtig.') }}</li>
|
||||
</ul>
|
||||
<p class="m-0 mt-2 text-[11.5px] text-[color:var(--color-ink-3)]">
|
||||
{{ __('Sie stellen die Plattform von Ansprüchen Dritter frei, die aus einer unberechtigten Nutzung von Inhalten resultieren. Die endgültige Veröffentlichung erfolgt nach redaktioneller Prüfung.') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{-- Kontingent (optional) --}}
|
||||
@if (! is_null($quotaRemaining) && ! is_null($quotaTotal))
|
||||
<div class="flex items-center justify-between rounded-[6px] border border-[color:var(--color-bg-rule)] px-4 py-3">
|
||||
<div class="text-[12.5px] text-[color:var(--color-ink-2)]">
|
||||
<div class="font-semibold text-[color:var(--color-ink)]">{{ __('PM-Kontingent diesen Monat') }}</div>
|
||||
<div class="text-[color:var(--color-ink-3)]">{{ __('Wird erst bei Veröffentlichung verbraucht — abgelehnte Pressemitteilungen kosten keinen Slot.') }}</div>
|
||||
</div>
|
||||
<span @class(['badge', $quotaRemaining > 0 ? 'ok' : 'warn'])>
|
||||
{{ $quotaRemaining }} / {{ $quotaTotal }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Bestätigungen --}}
|
||||
<div class="space-y-2">
|
||||
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
|
||||
<input type="checkbox" x-model="agb" class="mt-0.5" />
|
||||
<span>{{ __('Der Inhalt entspricht den AGB und gesetzlichen Vorgaben.') }}</span>
|
||||
</label>
|
||||
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
|
||||
<input type="checkbox" x-model="images" class="mt-0.5" />
|
||||
<span>{{ __('Alle Bildrechte sind geklärt.') }}</span>
|
||||
</label>
|
||||
<label class="flex items-start gap-2 text-[12.5px] text-[color:var(--color-ink-2)]">
|
||||
<input type="checkbox" x-model="contact" class="mt-0.5" />
|
||||
<span>{{ __('Die Angaben zum Pressekontakt sind korrekt.') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-2">
|
||||
<flux:modal.close>
|
||||
<flux:button variant="filled">{{ __('Abbrechen') }}</flux:button>
|
||||
</flux:modal.close>
|
||||
<flux:button variant="primary" wire:click="{{ $action }}"
|
||||
wire:loading.attr="disabled"
|
||||
x-bind:disabled="! (agb && images && contact)">
|
||||
{{ $confirmLabel ?? __('Veröffentlichung anfordern') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</flux:modal>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue