Commit graph

5 commits

Author SHA1 Message Date
53c14044ef Filters accounts by user permissions
Ensures that the account selector only displays accounts
that the user has permissions for.

This change modifies the `ExpensesAPI` to include a
`filterByUser` parameter when fetching accounts, which is
then passed to the backend to retrieve only authorized
accounts. A log statement was added to confirm proper
filtering.
2025-11-07 22:18:56 +01:00
f6ecbc8faf Fetches and sets default currency for expenses
Ensures the expense form defaults to the LNbits instance's configured currency.

This change retrieves the default currency from the LNbits API and sets it as the initial value in the expense form. If no default is configured, it falls back to the first available currency or EUR.
2025-11-07 21:51:10 +01:00
8dad92f0e5 Enables currency selection for expenses
Allows users to select a currency when adding an expense.

Fetches available currencies from the backend and displays them
in a dropdown menu, defaulting to EUR if the fetch fails.
The expense submission process now includes the selected currency.
2025-11-07 21:39:16 +01:00
00a99995c9 Enhances expense submission with user wallet
Updates expense submission to require a user wallet.

Retrieves wallet information from the authentication context
and includes it in the expense submission request to the backend.
This ensures that expenses are correctly associated with the user's
wallet, enabling accurate tracking and management of expenses.
Also adds error handling and user feedback.
2025-11-07 16:29:50 +01:00
9ed674d0f3 Adds expense tracking module
Adds a new module for tracking user expenses.

The module includes:
- Configuration settings for the LNbits API endpoint and timeouts.
- An ExpensesAPI service for fetching accounts and submitting expense entries.
- A UI component for adding expenses, including account selection and form input.
- Dependency injection for the ExpensesAPI service.

This allows users to submit expense entries with account selection and reference data, which will be linked to their wallet.
2025-11-07 16:21:59 +01:00