fix: show check/preview actions

This commit is contained in:
Ahmed Darrazi 2025-12-30 23:38:05 +01:00
parent a43fef535b
commit 5e16c25fca
2 changed files with 206 additions and 200 deletions

View File

@ -1,4 +1,6 @@
@php @php
$fieldWrapperView = $getFieldWrapperView();
$results = $getState() ?? []; $results = $getState() ?? [];
$results = is_array($results) ? $results : []; $results = is_array($results) ? $results : [];
@ -37,7 +39,8 @@
}; };
@endphp @endphp
<div class="space-y-4"> <x-dynamic-component :component="$fieldWrapperView" :field="$field">
<div class="space-y-4">
<x-filament::section <x-filament::section
heading="Safety checks" heading="Safety checks"
:description="$ranAtLabel ? ('Last run: ' . $ranAtLabel) : 'Run checks to evaluate risk before previewing.'" :description="$ranAtLabel ? ('Last run: ' . $ranAtLabel) : 'Run checks to evaluate risk before previewing.'"
@ -114,5 +117,5 @@
@endforeach @endforeach
</div> </div>
@endif @endif
</div> </div>
</x-dynamic-component>

View File

@ -1,4 +1,6 @@
@php @php
$fieldWrapperView = $getFieldWrapperView();
$diffs = $getState() ?? []; $diffs = $getState() ?? [];
$diffs = is_array($diffs) ? $diffs : []; $diffs = is_array($diffs) ? $diffs : [];
@ -33,7 +35,8 @@
}; };
@endphp @endphp
<div class="space-y-4"> <x-dynamic-component :component="$fieldWrapperView" :field="$field">
<div class="space-y-4">
<x-filament::section <x-filament::section
heading="Preview" heading="Preview"
:description="$ranAtLabel ? ('Generated: ' . $ranAtLabel) : 'Generate a preview to see what would change.'" :description="$ranAtLabel ? ('Generated: ' . $ranAtLabel) : 'Generate a preview to see what would change.'"
@ -173,5 +176,5 @@
@endforeach @endforeach
</div> </div>
@endif @endif
</div> </div>
</x-dynamic-component>