feat: expense settlement — track who paid, show who owes whom — closes #41
- Click member avatars on budget items to mark who paid (green = paid) - Multiple green chips = those people split the payment equally - Settlement dropdown in the total budget card shows optimized payment flows (who owes whom how much) and net balances per person - Info tooltip explains how the feature works - New server endpoint GET /budget/settlement calculates net balances and minimized payment flows using a greedy algorithm - Merged category legend: amount + percentage in one row - i18n keys added for DE and EN
This commit is contained in:
@@ -184,6 +184,7 @@ export const budgetApi = {
|
||||
setMembers: (tripId: number | string, id: number, userIds: number[]) => apiClient.put(`/trips/${tripId}/budget/${id}/members`, { user_ids: userIds }).then(r => r.data),
|
||||
togglePaid: (tripId: number | string, id: number, userId: number, paid: boolean) => apiClient.put(`/trips/${tripId}/budget/${id}/members/${userId}/paid`, { paid }).then(r => r.data),
|
||||
perPersonSummary: (tripId: number | string) => apiClient.get(`/trips/${tripId}/budget/summary/per-person`).then(r => r.data),
|
||||
settlement: (tripId: number | string) => apiClient.get(`/trips/${tripId}/budget/settlement`).then(r => r.data),
|
||||
}
|
||||
|
||||
export const filesApi = {
|
||||
|
||||
Reference in New Issue
Block a user