mirror of
https://github.com/spliit-app/spliit.git
synced 2026-03-07 12:56:12 +01:00
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:
@@ -114,7 +114,10 @@ export function ExpenseForm({
|
|||||||
paidBy: searchParams.get('from') ?? undefined,
|
paidBy: searchParams.get('from') ?? undefined,
|
||||||
paidFor: [
|
paidFor: [
|
||||||
searchParams.get('to')
|
searchParams.get('to')
|
||||||
? { participant: searchParams.get('to')!, shares: 1 }
|
? {
|
||||||
|
participant: searchParams.get('to')!,
|
||||||
|
shares: '1' as unknown as number,
|
||||||
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
],
|
],
|
||||||
isReimbursement: true,
|
isReimbursement: true,
|
||||||
@@ -133,7 +136,7 @@ export function ExpenseForm({
|
|||||||
// paid for all, split evenly
|
// paid for all, split evenly
|
||||||
paidFor: group.participants.map(({ id }) => ({
|
paidFor: group.participants.map(({ id }) => ({
|
||||||
participant: id,
|
participant: id,
|
||||||
shares: 1,
|
shares: '1' as unknown as number,
|
||||||
})),
|
})),
|
||||||
paidBy: getSelectedPayer(),
|
paidBy: getSelectedPayer(),
|
||||||
isReimbursement: false,
|
isReimbursement: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user