diff --git a/frontend/src/features/admin/collections/CollectionSuggestions.tsx b/frontend/src/features/admin/collections/CollectionSuggestions.tsx index 8dd917b..a5d60f8 100644 --- a/frontend/src/features/admin/collections/CollectionSuggestions.tsx +++ b/frontend/src/features/admin/collections/CollectionSuggestions.tsx @@ -13,12 +13,16 @@ import { createCollectionFromSuggestion, suggestCollections } from './api' /** * Что стоит собрать во франшизу. Состав виден целиком до создания — по названиям иногда * промахивается, и проверить глазами должно быть проще, чем разбирать потом. + * + * Уже созданное по умолчанию скрыто: строка без кнопки — шум. Счётчик скрытого остаётся видимым, + * чтобы предложение не выглядело пропавшим бесследно. */ export function CollectionSuggestions() { const { t } = useTranslation() const queryClient = useQueryClient() const onError = useApiError() const [collapsed, setCollapsed] = useState(false) + const [showExisting, setShowExisting] = useState(false) const { data, isLoading } = useQuery({ queryKey: qk.collections.suggestions, @@ -38,6 +42,10 @@ export function CollectionSuggestions() { if (isLoading || !data || data.length === 0) return null + const fresh = data.filter((s) => !s.alreadyExists) + const existing = data.length - fresh.length + const visible = showExisting ? data : fresh + return (
{t('admin.collections.suggestions.hint')}
-+ {t('admin.collections.suggestions.allCreated')} +
+ )} +{t('admin.groups.suggestions.hint')}
-+ {t('admin.groups.suggestions.allCreated')} +
+ )} +