Fix the default value for the expense shares field (#113)

* fix default shares value

* fix default shares value for reimbursements

* prettier
This commit is contained in:
sashkent3
2024-02-28 19:58:49 +04:00
committed by GitHub
parent 4c5f8a6aa5
commit 6a5efc5f3f

View File

@@ -114,7 +114,10 @@ export function ExpenseForm({
paidBy: searchParams.get('from') ?? undefined,
paidFor: [
searchParams.get('to')
? { participant: searchParams.get('to')!, shares: 1 }
? {
participant: searchParams.get('to')!,
shares: '1' as unknown as number,
}
: undefined,
],
isReimbursement: true,
@@ -133,7 +136,7 @@ export function ExpenseForm({
// paid for all, split evenly
paidFor: group.participants.map(({ id }) => ({
participant: id,
shares: 1,
shares: '1' as unknown as number,
})),
paidBy: getSelectedPayer(),
isReimbursement: false,