Обновления системы после анализа и оптимизации архитектуры

- Обновлена схема Prisma с новыми полями и связями
- Актуализированы правила системы в rules-complete.md
- Оптимизированы GraphQL типы, запросы и мутации
- Улучшены компоненты интерфейса и валидация данных
- Исправлены критические ESLint ошибки: удалены неиспользуемые импорты и переменные
- Добавлены тестовые файлы для проверки функционала

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Veronika Smirnova
2025-08-06 23:44:49 +03:00
parent c2b342a527
commit 10af6f08cc
33 changed files with 3259 additions and 1319 deletions

View File

@ -6,7 +6,7 @@ import React, { useState } from 'react'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { Card } from '@/components/ui/card'
import { SelectedCard, WildberriesCard } from '@/types/supplies'
import { SelectedCard } from '@/types/supplies'
import { WBProductCards } from './wb-product-cards'
@ -74,7 +74,6 @@ const mockWholesalers: Wholesaler[] = [
export function CreateSupplyForm({ onClose, onSupplyCreated }: CreateSupplyFormProps) {
const [selectedVariant, setSelectedVariant] = useState<'cards' | 'wholesaler' | null>(null)
const [selectedWholesaler, setSelectedWholesaler] = useState<Wholesaler | null>(null)
const [selectedCards, setSelectedCards] = useState<SelectedCard[]>([])
const renderStars = (rating: number) => {
return Array.from({ length: 5 }, (_, i) => (
@ -86,7 +85,6 @@ export function CreateSupplyForm({ onClose, onSupplyCreated }: CreateSupplyFormP
}
const handleCardsComplete = (cards: SelectedCard[]) => {
setSelectedCards(cards)
console.warn('Карточки товаров выбраны:', cards)
// TODO: Здесь будет создание поставки с данными карточек
onSupplyCreated()
@ -164,7 +162,7 @@ export function CreateSupplyForm({ onClose, onSupplyCreated }: CreateSupplyFormP
{mockWholesalers.map((wholesaler) => (
<Card
key={wholesaler.id}
className="bg-white/10 backdrop-blur border-white/20 p-6 cursor-pointer transition-all hover:bg-white/15 hover:border-white/30 hover:scale-105"
className="bg-white/10 backdrop-blur border-white/20 p-6 cursor-pointer transition-all hover:bg-white/15 hover:border-white/30"
onClick={() => setSelectedWholesaler(wholesaler)}
>
<div className="space-y-4">