feat(ui): добавить UI элементы для V2 системы поставок
- Добавить кнопку "Создать поставку V2" в dashboard фулфилмента - Добавить кнопку "Принять на склад" для статуса SHIPPED - Интегрировать с новой V2 архитектурой поставок 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -384,7 +384,22 @@ export function FulfillmentSuppliesDashboard() {
|
||||
{/* КОНТЕНТ ДЛЯ НОВОЙ СИСТЕМЫ ПОСТАВОК V2 */}
|
||||
{activeTab === 'fulfillment' && activeSubTab === 'consumables-v2' && (
|
||||
<div className="h-full overflow-hidden">
|
||||
<div className="text-white/80">Контент V2 системы (удален)</div>
|
||||
<div className="text-center py-12">
|
||||
<Building2 className="h-16 w-16 text-white/40 mx-auto mb-6" />
|
||||
<h3 className="text-xl font-semibold text-white mb-4">
|
||||
Система поставок расходников V2
|
||||
</h3>
|
||||
<p className="text-white/60 mb-6 max-w-md mx-auto">
|
||||
Создавайте заявки на расходники для фулфилмент-центра через новую систему V2
|
||||
</p>
|
||||
<a
|
||||
href="/supplies/create-fulfillment-consumables-v2"
|
||||
className="inline-flex items-center gap-2 bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-200 shadow-lg hover:shadow-xl"
|
||||
>
|
||||
<Package className="h-5 w-5" />
|
||||
Создать поставку V2
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
@ -614,6 +614,21 @@ export function MultiLevelSuppliesTable({
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
if (status === 'SHIPPED') {
|
||||
return (
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onSupplyAction?.(id, 'receive')
|
||||
}}
|
||||
className="bg-green-500/20 hover:bg-green-500/30 text-green-300 border border-green-500/30"
|
||||
>
|
||||
<Package className="h-3 w-3 mr-1" />
|
||||
Принять на склад
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
break
|
||||
|
||||
case 'LOGIST': // Логист
|
||||
@ -958,15 +973,14 @@ export function MultiLevelSuppliesTable({
|
||||
</TableCell>
|
||||
)}
|
||||
<TableCell>
|
||||
{/* 🔒 УСЛОВНЫЙ РЕНДЕРИНГ: Кнопки для WHOLESALE во вкладке "Новые" */}
|
||||
{userRole === 'WHOLESALE' && activeTab === 'new' && supply.status === 'PENDING' ? (
|
||||
<ActionButtons
|
||||
supplyId={supply.id}
|
||||
onSupplyAction={onSupplyAction}
|
||||
/>
|
||||
) : (
|
||||
<StatusBadge status={supply.status} />
|
||||
)}
|
||||
{/* 🔒 УСЛОВНЫЙ РЕНДЕРИНГ: Кнопки действий или статус */}
|
||||
{(() => {
|
||||
const actionButtons = _renderActionButtons(supply)
|
||||
if (actionButtons) {
|
||||
return actionButtons
|
||||
}
|
||||
return <StatusBadge status={supply.status} />
|
||||
})()}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
|
Reference in New Issue
Block a user