Реализован функционал просмотра заявок покупателей на возврат от Wildberries API в фулфилмент-складе. Добавлена интеграция с WB API /api/v1/claims для получения заявок от всех партнеров-селлеров. Создан полнофункциональный интерфейс с поиском, фильтрацией по статусам, детальным просмотром заявок и отображением медиафайлов от покупателей.
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -78,9 +78,11 @@ export function SuppliesDashboard() {
|
||||
useEffect(() => {
|
||||
const tab = searchParams.get("tab");
|
||||
if (tab === "consumables") {
|
||||
setActiveTab("supplies");
|
||||
setActiveTab("fulfillment");
|
||||
setActiveSubTab("consumables");
|
||||
} else if (tab === "goods") {
|
||||
setActiveTab("goods");
|
||||
setActiveTab("fulfillment");
|
||||
setActiveSubTab("goods");
|
||||
}
|
||||
}, [searchParams]);
|
||||
|
||||
@ -194,36 +196,38 @@ export function SuppliesDashboard() {
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setActiveSubTab("consumables")}
|
||||
className={`flex items-center gap-1 text-xs font-medium transition-all duration-150 rounded-md px-2 relative ${
|
||||
className={`flex items-center justify-between text-xs font-medium transition-all duration-150 rounded-md px-2 relative ${
|
||||
activeSubTab === "consumables"
|
||||
? "bg-white/15 text-white border-white/20"
|
||||
: "text-white/60 hover:text-white/80"
|
||||
}`}
|
||||
>
|
||||
<Wrench className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">
|
||||
Расходники селлера
|
||||
</span>
|
||||
<span className="sm:hidden">Р</span>
|
||||
<NotificationBadge
|
||||
count={pendingCount?.supplyOrders || 0}
|
||||
/>
|
||||
<div className="flex items-center gap-1">
|
||||
<Wrench className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">
|
||||
Расходники селлера
|
||||
</span>
|
||||
<span className="sm:hidden">Р</span>
|
||||
<NotificationBadge
|
||||
count={pendingCount?.supplyOrders || 0}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Кнопка создания внутри таба расходников */}
|
||||
{activeSubTab === "consumables" && (
|
||||
<div
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
window.location.href = "/supplies/create-consumables";
|
||||
}}
|
||||
className="h-6 px-2 py-1 bg-white/10 border border-white/20 hover:bg-white/20 text-xs font-medium text-white/80 hover:text-white rounded-md transition-all duration-150 flex items-center gap-1 cursor-pointer"
|
||||
>
|
||||
<Plus className="h-2.5 w-2.5" />
|
||||
<span className="hidden lg:inline">Создать</span>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Кнопка создания для расходников селлера */}
|
||||
{activeSubTab === "consumables" && (
|
||||
<button
|
||||
onClick={() => {
|
||||
window.location.href = "/supplies/create-consumables";
|
||||
}}
|
||||
className="h-7 px-3 py-1 ml-2 bg-white/8 border border-white/20 hover:bg-white/12 text-xs font-medium text-white/80 hover:text-white rounded-lg transition-all duration-150 flex items-center gap-1"
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Создать поставку</span>
|
||||
<span className="sm:hidden">Создать</span>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@ -236,57 +240,61 @@ export function SuppliesDashboard() {
|
||||
<div className="grid grid-cols-2 flex-1">
|
||||
<button
|
||||
onClick={() => setActiveSubTab("wildberries")}
|
||||
className={`flex items-center gap-1 text-xs font-medium transition-all duration-150 rounded-md px-2 ${
|
||||
className={`flex items-center justify-between text-xs font-medium transition-all duration-150 rounded-md px-2 ${
|
||||
activeSubTab === "wildberries"
|
||||
? "bg-white/15 text-white border-white/20"
|
||||
: "text-white/60 hover:text-white/80"
|
||||
}`}
|
||||
>
|
||||
<ShoppingCart className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Wildberries</span>
|
||||
<span className="sm:hidden">W</span>
|
||||
<div className="flex items-center gap-1">
|
||||
<ShoppingCart className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Wildberries</span>
|
||||
<span className="sm:hidden">W</span>
|
||||
</div>
|
||||
|
||||
{/* Кнопка создания внутри таба Wildberries */}
|
||||
{activeSubTab === "wildberries" && (
|
||||
<div
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
window.location.href = "/supplies/create-wildberries";
|
||||
}}
|
||||
className="h-6 px-2 py-1 bg-white/10 border border-white/20 hover:bg-white/20 text-xs font-medium text-white/80 hover:text-white rounded-md transition-all duration-150 flex items-center gap-1 cursor-pointer"
|
||||
>
|
||||
<Plus className="h-2.5 w-2.5" />
|
||||
<span className="hidden lg:inline">Создать</span>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setActiveSubTab("ozon")}
|
||||
className={`flex items-center gap-1 text-xs font-medium transition-all duration-150 rounded-md px-2 ${
|
||||
className={`flex items-center justify-between text-xs font-medium transition-all duration-150 rounded-md px-2 ${
|
||||
activeSubTab === "ozon"
|
||||
? "bg-white/15 text-white border-white/20"
|
||||
: "text-white/60 hover:text-white/80"
|
||||
}`}
|
||||
>
|
||||
<ShoppingCart className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Ozon</span>
|
||||
<span className="sm:hidden">O</span>
|
||||
<div className="flex items-center gap-1">
|
||||
<ShoppingCart className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Ozon</span>
|
||||
<span className="sm:hidden">O</span>
|
||||
</div>
|
||||
|
||||
{/* Кнопка создания внутри таба Ozon */}
|
||||
{activeSubTab === "ozon" && (
|
||||
<div
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
window.location.href = "/supplies/create-ozon";
|
||||
}}
|
||||
className="h-6 px-2 py-1 bg-white/10 border border-white/20 hover:bg-white/20 text-xs font-medium text-white/80 hover:text-white rounded-md transition-all duration-150 flex items-center gap-1 cursor-pointer"
|
||||
>
|
||||
<Plus className="h-2.5 w-2.5" />
|
||||
<span className="hidden lg:inline">Создать</span>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Кнопка создания для Wildberries */}
|
||||
{activeSubTab === "wildberries" && (
|
||||
<button
|
||||
onClick={() => {
|
||||
window.location.href = "/supplies/create-wildberries";
|
||||
}}
|
||||
className="h-7 px-3 py-1 ml-2 bg-white/8 border border-white/20 hover:bg-white/12 text-xs font-medium text-white/80 hover:text-white rounded-lg transition-all duration-150 flex items-center gap-1"
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Создать поставку</span>
|
||||
<span className="sm:hidden">Создать</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* Кнопка создания для Ozon */}
|
||||
{activeSubTab === "ozon" && (
|
||||
<button
|
||||
onClick={() => {
|
||||
window.location.href = "/supplies/create-ozon";
|
||||
}}
|
||||
className="h-7 px-3 py-1 ml-2 bg-white/8 border border-white/20 hover:bg-white/12 text-xs font-medium text-white/80 hover:text-white rounded-lg transition-all duration-150 flex items-center gap-1"
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Создать поставку</span>
|
||||
<span className="sm:hidden">Создать</span>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@ -299,57 +307,61 @@ export function SuppliesDashboard() {
|
||||
<div className="grid grid-cols-2 flex-1">
|
||||
<button
|
||||
onClick={() => setActiveThirdTab("cards")}
|
||||
className={`flex items-center gap-1 text-xs font-normal transition-all duration-150 rounded-sm px-2 ${
|
||||
className={`flex items-center justify-between text-xs font-normal transition-all duration-150 rounded-sm px-2 ${
|
||||
activeThirdTab === "cards"
|
||||
? "bg-white/10 text-white"
|
||||
: "text-white/50 hover:text-white/70"
|
||||
}`}
|
||||
>
|
||||
<FileText className="h-2.5 w-2.5" />
|
||||
<span className="hidden sm:inline">Карточки</span>
|
||||
<span className="sm:hidden">К</span>
|
||||
<div className="flex items-center gap-1">
|
||||
<FileText className="h-2.5 w-2.5" />
|
||||
<span className="hidden sm:inline">Карточки</span>
|
||||
<span className="sm:hidden">К</span>
|
||||
</div>
|
||||
|
||||
{/* Кнопка создания внутри таба карточек */}
|
||||
{activeThirdTab === "cards" && (
|
||||
<div
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
window.location.href = "/supplies/create-cards";
|
||||
}}
|
||||
className="h-5 px-1.5 py-0.5 bg-white/8 border border-white/15 hover:bg-white/15 text-xs font-normal text-white/60 hover:text-white/80 rounded-sm transition-all duration-150 flex items-center gap-0.5 cursor-pointer"
|
||||
>
|
||||
<Plus className="h-2 w-2" />
|
||||
<span className="hidden xl:inline text-xs">Создать</span>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setActiveThirdTab("suppliers")}
|
||||
className={`flex items-center gap-1 text-xs font-normal transition-all duration-150 rounded-sm px-2 ${
|
||||
className={`flex items-center justify-between text-xs font-normal transition-all duration-150 rounded-sm px-2 ${
|
||||
activeThirdTab === "suppliers"
|
||||
? "bg-white/10 text-white"
|
||||
: "text-white/50 hover:text-white/70"
|
||||
}`}
|
||||
>
|
||||
<Building2 className="h-2.5 w-2.5" />
|
||||
<span className="hidden sm:inline">Поставщики</span>
|
||||
<span className="sm:hidden">П</span>
|
||||
<div className="flex items-center gap-1">
|
||||
<Building2 className="h-2.5 w-2.5" />
|
||||
<span className="hidden sm:inline">Поставщики</span>
|
||||
<span className="sm:hidden">П</span>
|
||||
</div>
|
||||
|
||||
{/* Кнопка создания внутри таба поставщиков */}
|
||||
{activeThirdTab === "suppliers" && (
|
||||
<div
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
window.location.href = "/supplies/create-suppliers";
|
||||
}}
|
||||
className="h-5 px-1.5 py-0.5 bg-white/8 border border-white/15 hover:bg-white/15 text-xs font-normal text-white/60 hover:text-white/80 rounded-sm transition-all duration-150 flex items-center gap-0.5 cursor-pointer"
|
||||
>
|
||||
<Plus className="h-2 w-2" />
|
||||
<span className="hidden xl:inline text-xs">Создать</span>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Кнопка создания для карточек */}
|
||||
{activeThirdTab === "cards" && (
|
||||
<button
|
||||
onClick={() => {
|
||||
window.location.href = "/supplies/create-cards";
|
||||
}}
|
||||
className="h-6 px-2 py-1 ml-2 bg-white/5 border border-white/15 hover:bg-white/8 text-xs font-normal text-white/60 hover:text-white/80 rounded-md transition-all duration-150 flex items-center gap-1"
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Создать поставку</span>
|
||||
<span className="sm:hidden">Создать</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* Кнопка создания для поставщиков */}
|
||||
{activeThirdTab === "suppliers" && (
|
||||
<button
|
||||
onClick={() => {
|
||||
window.location.href = "/supplies/create-suppliers";
|
||||
}}
|
||||
className="h-6 px-2 py-1 ml-2 bg-white/5 border border-white/15 hover:bg-white/8 text-xs font-normal text-white/60 hover:text-white/80 rounded-md transition-all duration-150 flex items-center gap-1"
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
<span className="hidden sm:inline">Создать поставку</span>
|
||||
<span className="sm:hidden">Создать</span>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user