Add refusals tab to the order dashboard
Orders whose Nova Poshta status is a refusal (102/103/105/108) now show only under «Отказы», whether or not they have a receipt. GET /orders takes tab=no_receipt|has_receipt|refused instead of has_receipt. NP statuses are also polled for orders that already have a receipt, until NP reports a final status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { apiFetch } from '@/api/client'
|
||||
import type { Order, OrderUpdate } from '@/features/orders/types'
|
||||
import type { Order, OrderTab, OrderUpdate } from '@/features/orders/types'
|
||||
|
||||
export function getOrders(hasReceipt: boolean): Promise<Order[]> {
|
||||
return apiFetch<Order[]>(`/orders?has_receipt=${hasReceipt}`)
|
||||
export function getOrders(tab: OrderTab): Promise<Order[]> {
|
||||
return apiFetch<Order[]>(`/orders?tab=${tab}`)
|
||||
}
|
||||
|
||||
export function deleteOrder(orderId: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user