* Fix#209: Correctly display loaded expense
- Don't load default split options after displaying an existing expense
- Re-validate form after changing the "paidFor" selection.
This fixes the error message "The expense must be paid for at least one
participant." after clicking "Select None" and the selecting one participant.
* Fix Paid For Field reset in Edit Expense Page for split Mode 'Unevenly - By amount'
---------
Co-authored-by: partho.kunda <partho.kunda@chaldal.net>
* add group information field to group and Information tab to display
* add breaks to info page
* Improve UX
---------
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
* feat: add auto-balancing for the amount edit
this implementation allocates the rest of the total
to participants, whose rows have yet not been edited.
* fix: reset already edited on total amount change
* Allow negative amount for expenses to be entered
- an expense becomes an income
- this does not affect calculations, i.e. an income can be split just like an expense
* Incomes should not be reimbursements
when entering a negative number
- deselect 'isReimbursement'
- hide reimbursement checkbox
* Change captions when entering a negative number
- "expense" becomes "income"
- "paid" becomes "received"
* Format incomes on expense list
- replace "paid by" with "received by"
* Format incomes on "Stats" tab
- a group's or participants balance might be negative
- in this case "spendings" will be "earnings" (display accordingly)
- always display positive numbers
- for active user: highlight spendings/earnings in red/green
* Fix typo
---------
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
* change onClick to onFocus, with a slight delay for safari
* typo
* fix variable name
* Fix style
---------
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
* Add devcontainer configuration for codespace support
* Show the impact of an expense on the active user's balance
* Run prettier
* Put the balance on a different line
---------
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
* feat: added a popup asking for confirmation to delete an expense
* fix: changed cancel option as a button and formatting issues
* fix: removed unnecessary tags and replaced generic tags with proper components
* Small fix to avoid warning in console
---------
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
* Move prisma to runtime dependencies
* Optimize Dockerfile and build script
* Fix: remove mention of generated next-env.d.ts in Dockerfile
* Add missing reset.d.ts file to Dockerfile
* Remove compression steps from Dockerfile and entrypoint script
* Add an env file with mocked env vars added for Docker production builds
* Use server actions to get runtime env vars
* Refactor types and names
* Rollback serverActions, use parsed Zod object for runtime env
* Reintroduce featureFlags object to avoid passing secret envs to the frontend
* Improve string to boolean coercion
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
* Run prettier autoformat
* Fix type issue, rename function to match behaviour better
---------
Co-authored-by: Lauri Vuorela <lauri.vuorela@gmail.com>
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
* environment variable
* random category draft
* get category from ai
* input limit and documentation
* use watch
* use field.name
* prettier
* presigned upload, readme warning, category to string util
* prettier
* check whether feature is enabled
* use process.env
* improved prompt to return id only
* remove console.debug
* show loader
* share class name
* prettier
* use template literals
* rename format util
* prettier
* add expense categories
* set category to Payment for reimbursements
* Insert categories as part of the migration
* Display category groups
---------
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
* Add activeUser for default payer per group
* Prettier, change labels, use useEffect
---------
Co-authored-by: Sebastien Castiel <sebastien@castiel.me>