diff options
| author | Mert Demir <mertd@users.noreply.github.com> | 2024-01-27 00:26:58 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 10:26:58 -0500 |
| commit | 58ee685e22c705d5ad8b1a2da9e4ab7e6106ec3c (patch) | |
| tree | b37779b1af9976c77f6155700aec9c543c4a96b7 /src | |
| parent | 545cf75e9993f4dbc0653512d01b198f111998bf (diff) | |
paid for all, split evenly (#59)
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/expense-form.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/expense-form.tsx b/src/components/expense-form.tsx index 035d22c..92e24d0 100644 --- a/src/components/expense-form.tsx +++ b/src/components/expense-form.tsx @@ -106,7 +106,11 @@ export function ExpenseForm({ expenseDate: new Date(), amount: 0, category: 0, // category with Id 0 is General - paidFor: [], + // paid for all, split evenly + paidFor: group.participants.map(({ id }) => ({ + participant: id, + shares: 1, + })), paidBy: getSelectedPayer(), isReimbursement: false, splitMode: 'EVENLY', |
