Files
sfera-new/src/components/supplies/multilevel-supplies-table/GoodsSuppliesV2Container.tsx
2025-08-30 15:51:41 +03:00

49 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client'
import React from 'react'
import { MultiLevelSuppliesTableV2 } from './v2-index'
// Контейнерный компонент для V2 товарных поставок с автоматическим GraphQL
// Используется как простая замена для существующих компонентов
export interface GoodsSuppliesV2ContainerProps {
userRole?: 'SELLER' | 'WHOLESALE' | 'FULFILLMENT' | 'LOGIST'
activeTab?: string
className?: string
}
export function GoodsSuppliesV2Container({
userRole = 'SELLER',
activeTab,
className = '',
}: GoodsSuppliesV2ContainerProps) {
return (
<div className={`goods-supplies-v2-container ${className}`}>
{/* Заголовок секции */}
<div className="mb-6">
<h2 className="text-xl font-semibold text-white">
{userRole === 'SELLER' && 'Мои товарные поставки'}
{userRole === 'WHOLESALE' && 'Заявки на поставку товаров'}
{userRole === 'FULFILLMENT' && 'Входящие товарные поставки'}
{userRole === 'LOGIST' && 'Логистика товарных поставок'}
</h2>
<p className="text-white/60 text-sm mt-1">
{userRole === 'SELLER' && 'Управление заказами товаров для фулфилмент-центров'}
{userRole === 'WHOLESALE' && 'Одобрение и обработка заявок на поставку товаров'}
{userRole === 'FULFILLMENT' && 'Приемка и обработка товаров от селлеров'}
{userRole === 'LOGIST' && 'Координация доставки товарных поставок'}
</p>
</div>
{/* V2 таблица с автоматическим GraphQL */}
<MultiLevelSuppliesTableV2
userRole={userRole}
activeTab={activeTab}
// Все данные загружаются автоматически через GraphQL
/>
</div>
)
}
// Экспорт для простого использования
export default GoodsSuppliesV2Container