mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-11 10:06:13 +01:00
* Update expense-form.tsx to handle shares as strings Proposing fix to #424 The issue is in the data flow between the form and the schema transform function: When editing existing expenses: Form loads shares by dividing database values by 100 (e.g., 200 / 100 = 2), but loads them as numbers When users change values: Input fields return strings via enforceCurrencyPattern Schema transform: Only multiplies by 100 for string values, not number values Result: Modified shares (strings) get multiplied by 100, unmodified shares (numbers) stay as-is Proposed fix: handle all shares consistently as strings throughout the form * Add type assertions to fix TypeScript errors in expense form Fix formatting. --------- Co-authored-by: yllar <yllar.pajus@gmail.com>