fix bugs
This commit is contained in:
@@ -8,7 +8,7 @@ export type BoursecuTransactionTabId =
|
||||
|
||||
export type BoursecuTradeSide = 'buy' | 'sell'
|
||||
|
||||
export type BoursecuTransactionFetchMode = 'transaction' | 'deposit'
|
||||
export type BoursecuTransactionFetchMode = 'transaction' | 'deposit' | 'physical'
|
||||
|
||||
export type BoursecuTradeStatusFilter = 'completed' | 'pending' | 'cancelled'
|
||||
export type BoursecuFulfillmentStatusFilter = 'delivered' | 'registered' | 'cancelled'
|
||||
@@ -38,10 +38,11 @@ export const BOURSECU_TRADE_STATUS_OPTIONS: BoursecuTransactionStatusOption[] =
|
||||
{ value: 'cancelled', label: 'لغو شده', sts: 3 },
|
||||
]
|
||||
|
||||
/** وضعیتهای سند برداشت فیزیکی (Withdraw::$STS) */
|
||||
export const BOURSECU_FULFILLMENT_STATUS_OPTIONS: BoursecuTransactionStatusOption[] = [
|
||||
{ value: 'delivered', label: 'تحویل شده', sts: 2 },
|
||||
{ value: 'registered', label: 'ثبت درخواست', sts: 1 },
|
||||
{ value: 'cancelled', label: 'لغو شده', sts: 3 },
|
||||
{ value: 'registered', label: 'در انتظار ارسال', sts: 50 },
|
||||
{ value: 'delivered', label: 'ارسال شده', sts: 51 },
|
||||
{ value: 'cancelled', label: 'لغو شده', sts: 52 },
|
||||
]
|
||||
|
||||
/** @deprecated Use getBoursecuStatusOptionsForTab instead */
|
||||
@@ -74,8 +75,8 @@ export const BOURSECU_TRANSACTION_TABS: BoursecuTransactionTab[] = [
|
||||
id: 'physical',
|
||||
label: 'تحویل فیزیکی',
|
||||
emptyText: 'درخواست تحویل فیزیکی برای شما ثبت نشده است',
|
||||
fetchMode: 'physical',
|
||||
showAdvancedFilters: true,
|
||||
typeFilters: [9],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -97,11 +98,12 @@ export function getBoursecuStatusOptionsForTab(
|
||||
}
|
||||
|
||||
export function boursecuTabSupportsProductFilter(tab: BoursecuTransactionTab): boolean {
|
||||
return tab.id === 'trades' || tab.id === 'physical'
|
||||
// فیلتر محصول روی جدول سند برداشت فیزیکی (hasMany Transaction) قابلاعتماد نیست
|
||||
return tab.id === 'trades'
|
||||
}
|
||||
|
||||
function getBoursecuStatusFilterField(tab: BoursecuTransactionTab): string {
|
||||
if (tab.fetchMode === 'deposit') {
|
||||
if (tab.fetchMode === 'deposit' || tab.fetchMode === 'physical') {
|
||||
return 'sts'
|
||||
}
|
||||
|
||||
@@ -129,7 +131,7 @@ export function buildBoursecuTransactionPagination(
|
||||
): TableEngineInput {
|
||||
const filters: TableEngineInput['filters'] = []
|
||||
|
||||
if (tab.fetchMode !== 'deposit' && tab.typeFilters?.length) {
|
||||
if (tab.fetchMode !== 'deposit' && tab.fetchMode !== 'physical' && tab.typeFilters?.length) {
|
||||
const typeValue =
|
||||
tab.showTradeToggle && tab.typeFilters.includes(TRADE_TYPE_BY_SIDE[tradeSide])
|
||||
? TRADE_TYPE_BY_SIDE[tradeSide]
|
||||
|
||||
Reference in New Issue
Block a user