Fix admin AI nav bug, add rescan feature
- Fix Blade parse error in admin AI settings (Blade was interpreting
JSON braces in DEFAULT_PROMPT as template tags, breaking the navbar)
— pass defaultPrompt from controller instead
- Add rescan: POST /nail-polishes/{id}/rescan creates a new import for
an existing nail polish and updates its fields after AI analysis
- Add KI-Rescan button on collection cards (only if image exists)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f60221d0ef
commit
9861a74e1e
@@ -93,8 +93,9 @@
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
const defaultPrompt = @json($defaultPrompt);
|
||||
function resetPrompt() {
|
||||
document.getElementById('prompt').value = @json(\App\Models\AiSetting::DEFAULT_PROMPT);
|
||||
document.getElementById('prompt').value = defaultPrompt;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -65,7 +65,15 @@
|
||||
<span class="np-brand">{{ $nailPolish->manufacturer->name }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<div class="mt-3 d-flex flex-column gap-2">
|
||||
@if($nailPolish->image_path)
|
||||
<form method="POST" action="{{ route('nail-polishes.rescan', $nailPolish) }}">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-outline-secondary btn-sm w-100">
|
||||
<i class="fas fa-sync-alt me-1"></i>KI-Rescan
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
<form method="POST" action="{{ route('user-nail-polishes.remove', $nailPolish) }}"
|
||||
onsubmit="return confirm('Lack aus der Sammlung entfernen?')">
|
||||
@csrf
|
||||
|
||||
Reference in New Issue
Block a user