fix(client): count only pending customs uploads
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import type { FirstLegOrder } from '../types/firstLegOrder'
|
||||
import type { MerchantCustomsContainer } from '../api/customs'
|
||||
|
||||
export function isCustomsOrderCandidate(order: Pick<FirstLegOrder, 'status' | 'taxMode'>): boolean {
|
||||
return order.taxMode === 'TAX_REFUND'
|
||||
&& (order.status === 'LOADED' || order.status === 'DELIVERED' || order.status === 'COMPLETED')
|
||||
}
|
||||
|
||||
export function needsCustomsUpload(detail: MerchantCustomsContainer | null | undefined): boolean {
|
||||
return detail?.status === 'WAITING_CUSTOMER_DOCUMENTS' && detail.merchantStatus === 'WAITING_UPLOAD'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user