Commit graph

10 commits

Author SHA1 Message Date
2a14dd2e62 Adds receivable entry functionality
Implements the ability to record receivables (user owes the castle).

Adds API endpoint for creating receivable entries, which includes currency conversion to satoshis if fiat currency is provided.

Integrates a UI component (receivable dialog) for superusers to record debts owed by users, enhancing financial tracking capabilities.
2025-10-22 16:16:36 +02:00
b7e4e05469 Adds super user balance overview
Implements functionality for super users to view a breakdown of outstanding balances for all users.

This includes:
- Adding an API endpoint to fetch all user balances.
- Updating the frontend to display these balances in a table, accessible only to super users.
- Modifying the balance calculation for the current user to reflect the total owed by or to the castle for super users.

This provides super users with a comprehensive view of the castle's financial position.
2025-10-22 15:24:50 +02:00
cb7e4ee555 Enhances super user experience with Castle wallet
Simplifies the user experience for super users by automatically using the Castle wallet for transactions, removing the need to configure a separate user wallet.

This change streamlines the workflow for super users by:
- Automatically assigning the Castle wallet to super users
- Hiding the user wallet configuration options in the UI
- Reloading user wallet settings to reflect the Castle wallet
2025-10-22 15:11:00 +02:00
bb1dbcccd8 Adds per-user wallet configuration
Allows users to configure their own wallet ID, enabling
the system to track expenses and receivables on a per-user basis.

Introduces new database table, models, API endpoints, and UI elements
to manage user-specific wallet settings.
2025-10-22 14:54:25 +02:00
31344607c6 Adds super user and config setup
Adds super user role to restrict settings changes.

Improves the settings screen to only allow super users to make modifications.

Adds a warning banner if the Castle wallet is not configured.

Changes admin key to inkey for fetching settings.
This fixes an issue where settings weren't accessible.

Adds a validation to require the Castle wallet ID when updating settings.
2025-10-22 14:45:18 +02:00
29983cedb7 Adds user settings for the Castle extension
Adds functionality to configure the Castle extension, including a wallet ID.

This allows administrators to customize the extension's behavior by specifying a dedicated wallet for castle operations.
2025-10-22 13:55:52 +02:00
15da11a606 Stores and retrieves entry line metadata as JSON
Updates journal entry creation to store entry line metadata as a JSON string in the database.

Updates entry line retrieval to parse the JSON string back into a metadata object.

This change allows storing more complex data structures in the metadata field.
2025-10-22 13:45:59 +02:00
e95230c0f4 Consolidates API route prefixes
Removes redundant "/api/v1" prefixes from API router definitions in the backend and updates the corresponding API calls in the frontend. This change streamlines the API structure and improves code maintainability. Additionally, adds console logs in the frontend to aid in debugging the API calls.
2025-10-22 13:38:26 +02:00
cd083114b4 Adds fiat currency support for expenses
Extends expense entry functionality to support fiat currencies.

Users can now specify a currency (e.g., EUR, USD) when creating expense entries. The specified amount is converted to satoshis using exchange rates. The converted amount and currency information are stored in the journal entry metadata. Also adds an API endpoint to retrieve allowed currencies and updates the UI to allow currency selection when creating expense entries.
2025-10-22 13:32:10 +02:00
95b8af2360 initial commit 2025-10-22 12:33:45 +02:00