mirror of
https://github.com/whekin/household-bot.git
synced 2026-04-01 00:14:03 +00:00
feat(purchase): add per-purchase participant splits
This commit is contained in:
@@ -120,7 +120,18 @@ export function createMiniAppDashboardHandler(options: {
|
||||
fxRateMicros: entry.fxRateMicros?.toString() ?? null,
|
||||
fxEffectiveDate: entry.fxEffectiveDate,
|
||||
actorDisplayName: entry.actorDisplayName,
|
||||
occurredAt: entry.occurredAt
|
||||
occurredAt: entry.occurredAt,
|
||||
...(entry.kind === 'purchase'
|
||||
? {
|
||||
purchaseSplitMode: entry.purchaseSplitMode ?? 'equal',
|
||||
purchaseParticipants:
|
||||
entry.purchaseParticipants?.map((participant) => ({
|
||||
memberId: participant.memberId,
|
||||
included: participant.included,
|
||||
shareAmountMajor: participant.shareAmount?.toMajorString() ?? null
|
||||
})) ?? []
|
||||
}
|
||||
: {})
|
||||
}))
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user