Wire admin studio SSR and search infrastructure

This commit is contained in:
2026-05-01 11:46:06 +02:00
parent 257b0dbef6
commit 18cea8b0f0
329 changed files with 197465 additions and 2741 deletions

View File

@@ -129,9 +129,12 @@ final class CreatorStudioCalendarService
$days[] = [
'date' => $key,
'day' => $date->day,
'label' => $date->format('D, M j'),
'is_current_month' => $date->month === $focusDate->month,
'count' => $items->count(),
'items' => $items->take(3)->all(),
'overflow_count' => max(0, $items->count() - 4),
'detail_items' => $items->all(),
'items' => $items->take(4)->all(),
];
}

View File

@@ -73,7 +73,8 @@ final class StudioArtworkQueryService
// Category filter
if (!empty($filters['category'])) {
$filterParts[] = 'category = "' . addslashes((string) $filters['category']) . '"';
$quoted = addslashes((string) $filters['category']);
$filterParts[] = '(category = "' . $quoted . '" OR categories = "' . $quoted . '")';
}
// Tag filter

View File

@@ -6,6 +6,7 @@ namespace App\Services\Studio;
use App\Models\Artwork;
use App\Models\Tag;
use App\Jobs\IndexArtworkJob;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
@@ -156,12 +157,8 @@ final class StudioBulkActionService
*/
private function reindexArtworks(\Illuminate\Database\Eloquent\Collection $artworks): void
{
try {
$artworks->each->searchable();
} catch (\Throwable $e) {
Log::warning('Studio: Failed to reindex artworks after bulk action', [
'error' => $e->getMessage(),
]);
foreach ($artworks as $artwork) {
IndexArtworkJob::dispatch((int) $artwork->id);
}
}
}