feat: add payer control for purchases

- Add explicit payerMemberId field to purchase ledger entries
- Add 'Paid by' selector in mini app purchase add/edit forms
- Default payer to current user when creating new purchases
- Allow admins to change who made existing purchases
- Update backend handlers to accept and persist payerMemberId
- Add i18n translations for 'Paid by' label (EN/RU)

All quality gates pass: build, typecheck, lint, format, test

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-03-16 17:44:20 +04:00
parent 64dc3a3813
commit 02c79ae629
8 changed files with 95 additions and 5 deletions

View File

@@ -152,6 +152,7 @@ export interface MiniAppDashboard {
included: boolean
shareAmountMajor: string | null
}[]
payerMemberId?: string
}[]
}
@@ -996,6 +997,7 @@ export async function addMiniAppPurchase(
description: string
amountMajor: string
currency: 'USD' | 'GEL'
payerMemberId?: string
split?: {
mode: 'equal' | 'custom_amounts'
participants: readonly {
@@ -1030,6 +1032,7 @@ export async function updateMiniAppPurchase(
description: string
amountMajor: string
currency: 'USD' | 'GEL'
payerMemberId?: string
split?: {
mode: 'equal' | 'custom_amounts'
participants: readonly {