Implement collection suggestions and bulk show addition features
ci / build-backend (push) Successful in 2m41s
ci / build-frontend (push) Successful in 44s
ci / tests (push) Successful in 2m33s
ci / sonar (push) Successful in 5m12s

Added new API endpoints for suggesting collections based on existing shows and for bulk adding shows to collections. Enhanced the backend with necessary logic and DTOs to support these features. Updated the frontend to include new components for displaying collection suggestions and managing bulk additions, improving the user experience for collection management. Localization updates were made to support these new features in both English and Russian.
This commit is contained in:
Leonid Pershin
2026-07-27 05:39:23 +03:00
parent 1a7f73a5bd
commit 5ad28b2966
39 changed files with 2710 additions and 10 deletions
@@ -9,6 +9,7 @@ import { Badge, type BadgeProps } from '@/shared/ui/badge'
import { Button } from '@/shared/ui/button'
import { Pager } from '@/shared/ui/pager'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/shared/ui/select'
import { toast } from '@/shared/ui/toast-store'
import { useTableSort } from '@/shared/lib/table-sort'
import { SortHeader } from '@/shared/ui/sortable'
import { deleteMedia, getMediaStats, listMedia } from './api'
@@ -89,9 +90,14 @@ export function MediaPanel() {
const lastActivity = useRef(activity)
useEffect(() => {
if (lastActivity.current === activity) return
// Очередь опустела — говорим об этом вслух: обработка идёт минутами, и следить за чипами,
// ожидая нуля, никто не должен. Сравниваем с прошлым состоянием, чтобы не поздравлять
// с пустой очередью при каждом заходе на экран.
const wasBusy = lastActivity.current !== '0:0'
lastActivity.current = activity
if (wasBusy && activity === '0:0') toast.success(t('admin.media.queueDrained'))
void refetch()
}, [activity, refetch])
}, [activity, refetch, t])
const invalidate = () => queryClient.invalidateQueries({ queryKey: qk.media.all })
const onError = useApiError()