feat(purchase): add per-purchase participant splits

This commit is contained in:
2026-03-11 14:34:27 +04:00
parent 98988159eb
commit 8401688032
26 changed files with 5050 additions and 114 deletions

View File

@@ -120,6 +120,12 @@ export interface MiniAppDashboard {
fxEffectiveDate: string | null
actorDisplayName: string | null
occurredAt: string | null
purchaseSplitMode?: 'equal' | 'custom_amounts'
purchaseParticipants?: readonly {
memberId: string
included: boolean
shareAmountMajor: string | null
}[]
}[]
}
@@ -820,6 +826,14 @@ export async function updateMiniAppPurchase(
description: string
amountMajor: string
currency: 'USD' | 'GEL'
split?: {
mode: 'equal' | 'custom_amounts'
participants: readonly {
memberId: string
included?: boolean
shareAmountMajor?: string
}[]
}
}
): Promise<void> {
const response = await fetch(`${apiBaseUrl()}/api/miniapp/admin/purchases/update`, {