Improve boursecu transactions filters and list display.
Align withdrawal status options with deposit, limit product filter to trades and physical delivery tabs, and hide gold amount in transaction rows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -85,7 +85,7 @@ const TRADE_TYPE_BY_SIDE: Record<BoursecuTradeSide, number> = {
|
||||
}
|
||||
|
||||
export function getBoursecuStatusFilterGroup(tab: BoursecuTransactionTab): BoursecuStatusFilterGroup {
|
||||
return tab.id === 'withdrawal' || tab.id === 'physical' ? 'fulfillment' : 'trade'
|
||||
return tab.id === 'physical' ? 'fulfillment' : 'trade'
|
||||
}
|
||||
|
||||
export function getBoursecuStatusOptionsForTab(
|
||||
@@ -96,6 +96,10 @@ export function getBoursecuStatusOptionsForTab(
|
||||
: BOURSECU_TRADE_STATUS_OPTIONS
|
||||
}
|
||||
|
||||
export function boursecuTabSupportsProductFilter(tab: BoursecuTransactionTab): boolean {
|
||||
return tab.id === 'trades' || tab.id === 'physical'
|
||||
}
|
||||
|
||||
function getBoursecuStatusFilterField(tab: BoursecuTransactionTab): string {
|
||||
if (tab.fetchMode === 'deposit') {
|
||||
return 'sts'
|
||||
@@ -172,7 +176,7 @@ export function buildBoursecuTransactionPagination(
|
||||
})
|
||||
}
|
||||
|
||||
if (productId != null && tab.id !== 'deposit') {
|
||||
if (productId != null && boursecuTabSupportsProductFilter(tab)) {
|
||||
filters.push({
|
||||
field: 'wallet.product_id',
|
||||
cr: 'and',
|
||||
|
||||
Reference in New Issue
Block a user