Tell scheduling apart from unpublishing in the history

Giving a record a future date was recorded as "unpublished", and announced
to webhooks as such. The history now compares before and after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 10:09:03 +02:00
parent 1fe1e67773
commit 70521d4bc9
7 changed files with 35 additions and 15 deletions

View File

@@ -51,6 +51,7 @@ class RevisionsRelationManager extends RelationManager
->color(fn (string $state) => match ($state) {
'published' => 'success',
'unpublished' => 'warning',
'scheduled' => 'info',
'created' => 'info',
'deleted', 'erased' => 'danger',
default => 'gray',
@@ -77,7 +78,7 @@ class RevisionsRelationManager extends RelationManager
->filters([
SelectFilter::make('event')
->label(__('panel.revisions.fields.event'))
->options(fn () => collect(['created', 'updated', 'published', 'unpublished', 'deleted', 'restored', 'erased'])
->options(fn () => collect(['created', 'updated', 'published', 'scheduled', 'unpublished', 'deleted', 'restored', 'erased'])
->mapWithKeys(fn (string $e) => [$e => __("panel.revisions.events.{$e}")])
->all()),
])