Commit Graph

43 Commits

Author SHA1 Message Date
GitHub Copilot
d8678e68ed Refactor transaction components and styles
- Updated imports to use absolute paths for types and utilities.
- Enhanced TransactionTable component with mobile responsiveness and card-based layout.
- Improved loading and error handling in transaction fetching logic.
- Refactored transaction update API to streamline validation and data preparation.
- Added new styles for Radix UI components and improved global styles for better mobile experience.
- Implemented collapsible sections and improved button interactions in the UI.
- Updated tests to reflect changes in component structure and imports.
2025-05-07 17:10:21 -04:00
GitHub Copilot
9a43842513 Update types.ts to support Prisma database integration
- Add support for Prisma Decimal type in numeric fields
- Update interfaces to handle both number and Decimal types
- Add proper handling for null values in optional fields
- Define explicit enum types for transaction and account statuses
- Ensure type compatibility between TypeScript interfaces and Prisma models
- Improve type safety throughout database interactions
2025-05-06 12:03:54 +00:00
GitHub Copilot
069faac7bc Update import statements to use path aliases throughout codebase 2025-05-06 11:53:33 +00:00
GitHub Copilot
984cd42f27 Fix TypeScript errors in API endpoints 2025-05-06 11:38:37 +00:00
GitHub Copilot
bfa57a9655 Refactor test configuration and update type definitions for better compatibility with Prisma 2025-05-06 11:17:58 +00:00
GitHub Copilot
4bf29c70eb Add TypeScript path aliases and update import paths 2025-05-06 11:16:49 +00:00
GitHub Copilot
3f2f8522a4 Merge branch 'main' into feature/database-integration 2025-05-06 10:08:15 +00:00
GitHub Copilot
bac13b30c9 Add account creation endpoint and dynamic REST client environment config 2025-05-06 09:13:03 +00:00
GitHub Copilot
a5dcad1486 Replace in-memory store with database persistence
- Remove in-memory store and related tests
- Add Decimal to number conversion in API responses
- Update integration tests to handle Prisma Decimal type
- Fix test configuration to only run db-integration tests
2025-05-06 08:31:15 +00:00
GitHub Copilot
07fbb82385 Fix: Update button remaining disabled in transaction edit mode
This commit resolves an issue where the Update button in the transaction form
would remain disabled when attempting to edit a transaction. The problem was
in how the transactionStore was managing state updates during transaction editing.

Key changes:
- Enhanced startEditingTransaction function in transactionStore.ts to ensure proper reactivity
- Added clean copy creation of transaction objects to avoid reference issues
- Implemented a state update cycle with null value first to force reactivity
- Added a small timeout to ensure state changes are properly detected by components

The Transaction form now correctly enables the Update button when in edit mode,
regardless of account selection state.
2025-05-05 21:29:36 +00:00
GitHub Copilot
7e5ed585f7 feat: add testing infrastructure and improve component feedback
- Added React testing setup with JSDOM
- Added component tests for AddTransactionForm and TransactionTable
- Improved error handling and success messages in components
- Updated test configuration and dependencies
- Added CSS for error and success states
2025-05-05 17:41:39 +00:00
GitHub Copilot
d3855aa7e4 Merge branch 'main' of github.com:acedanger/finance 2025-05-05 07:05:00 -04:00
GitHub Copilot
ad6693d1d7 refactor: Reorganize imports and improve code consistency across components and API routes 2025-05-05 06:59:13 -04:00
Peter Wood
1d540d1731 style: apply Biome formatting to Astro templates and CSS (#27)
- Standardize HTML/CSS formatting
- Fix template indentation
- Apply consistent style to Astro components
- Update component attributes formatting

Part of #27
2025-05-04 10:00:14 -04:00
Peter Wood
58d8ebdfa1 style: apply Biome formatting to TypeScript files (#27)
- Fix import sorting
- Standardize code formatting
- Apply consistent TypeScript style
- Update code to match Biome configuration

Part of #27
2025-05-04 09:55:01 -04:00
Peter Wood
8e12184cc8 Merge branch 'backup-branch' 2025-05-03 08:34:08 -04:00
GitHub Copilot
b51fe35a16 Add VSCode task for automatic build on project open and update dependencies
Remove .vscode from .gitignore to allow for project-specific settings. Introduce a VSCode task to run `npm run dev` automatically when the project is opened. Update environment configuration files and dependencies to enhance support for the Node adapter.

Fixes #13
2025-05-01 21:05:24 +00:00
GitHub Copilot
c9cdd83a58 fix: Update API fetch calls to use absolute URLs for consistency 2025-04-24 17:55:53 -04:00
GitHub Copilot
5fc5320500 fix: Update API fetch calls to use relative paths for consistency 2025-04-24 17:51:08 -04:00
GitHub Copilot
4991290699 fix: Update API fetch calls to use absolute URLs for improved reliability 2025-04-24 17:47:29 -04:00
GitHub Copilot
ee559e57f1 fix: Update fetch calls to use relative paths for API requests 2025-04-24 17:15:30 -04:00
GitHub Copilot
124b97a397 feat: Enhance AccountSummary and TransactionTable components with refresh functionality and improve loading/empty states 2025-04-24 16:45:46 -04:00
GitHub Copilot
892ea684f4 feat: Refactor transaction management with nanostores and convert components to React
- Added @nanostores/react for state management.
- Created AccountSummary component to display account balance.
- Replaced AddTransactionForm.astro with AddTransactionForm.tsx for better state handling.
- Introduced TransactionTable.tsx for displaying transactions with edit/delete functionality.
- Updated Sidebar.astro and MainContent.astro to use React components.
- Implemented transactionStore.ts for managing current account ID and transaction editing state.
- Removed obsolete AddTransactionForm.astro and related scripts.
- Enhanced error handling and loading states in transaction forms.
This fixes issues #7, #8, #9, #10, #11
2025-04-24 15:49:19 -04:00
GitHub Copilot
d0a9af3dfd chore: update dependencies and add Cloudflare support
- Updated dependencies in package.json for Astro, React, and testing libraries.
- Added .assetsignore to exclude specific files from asset uploads.
- Refactored AccountSummary, MainContent, and Sidebar components for clarity and maintainability.
- Enhanced tsconfig.json to support React JSX syntax.
- Created wrangler.jsonc for Cloudflare Workers configuration.
2025-04-24 14:44:50 -04:00
GitHub Copilot
0c3ad59809 feat: Update sidebar header text and remove margin from account summary 2025-04-24 12:58:16 -04:00
GitHub Copilot
e7934a5a9c feat: enhance form validation in AddTransactionForm and improve error handling in transactions API 2025-04-24 12:11:23 -04:00
GitHub Copilot
f67980a35e chore: update TODOs for various components and files to enhance validation, UI/UX, security, state management, performance, and testing improvements 2025-04-24 11:36:59 -04:00
GitHub Copilot
c424691658 refactor: improve account validation in transaction updates and enhance test setup with mock API context 2025-04-24 11:23:14 -04:00
GitHub Copilot
96093200f5 fix: account balance calculation when moving transactions between accounts
- Fixed balance calculation logic in transaction update endpoint
- Added comprehensive test coverage for all error paths
- Added coverage/ directory to .gitignore
- Achieved 100% test coverage across all files
2025-04-24 09:24:00 -04:00
GitHub Copilot
99b70b519b feat(tests): add unit tests for accounts and transactions APIs
- Updated package.json to include Vitest for testing and added necessary devDependencies.
- Created accounts.test.ts to test the accounts API endpoints for listing and retrieving accounts.
- Implemented setup.ts to reset test data before each test run.
- Developed transactions.test.ts to cover creating, updating, and deleting transactions through the API.
- Added vitest.config.ts for configuring Vitest with appropriate settings and coverage options.
2025-04-24 08:52:48 -04:00
GitHub Copilot
bb6bd75434 Refactor index.astro to improve type safety, enhance UI update functions, and streamline event handling for transactions 2025-04-24 08:37:47 -04:00
GitHub Copilot
b76a24edba #1 Enhance transaction management UI with form validation, loading states, and improved error handling 2025-04-24 08:19:41 -04:00
GitHub Copilot
7c9bc51a9c Refactor transaction API to improve ID handling and error responses 2025-04-24 07:38:00 -04:00
GitHub Copilot
78ebf1ae32 Remove unused files and implement API routes for account and transaction management 2025-04-24 07:27:05 -04:00
GitHub Copilot
ae6886bf92 Refactor code style for consistency in store and API route files 2025-04-23 21:39:50 -04:00
GitHub Copilot
98b29ff58b #1 Update index.astro to fetch accounts from API endpoint 2025-04-23 21:33:53 -04:00
GitHub Copilot
c0ac85ee7c #1 Implement GET /api/accounts endpoint 2025-04-23 21:29:41 -04:00
GitHub Copilot
070f472546 #1 Add temporary data store for development 2025-04-23 21:29:09 -04:00
GitHub Copilot
bac8047dc7 #1 Add initial API route structure for accounts and transactions 2025-04-23 21:28:41 -04:00
Peter Wood
20f3ec4acc Remove accounts and transactions data files 2025-04-23 20:58:33 -04:00
Peter Wood
0060013561 Initial commit - Basic bank transactions dashboard structure with Astro and TypeScript 2025-04-23 20:57:42 -04:00
houston[bot]
b2dae7e868 Initial commit from Astro 2025-04-23 20:18:17 -04:00
Peter Wood
d150757025 feat: initialize finance project with Fastify, Prisma, and Zod
- Added package.json with necessary dependencies and scripts for development and production.
- Created Prisma schema for BankAccount model with fields: id, name, bankName, accountNumber, createdAt, and updatedAt.
- Implemented Fastify server with CRUD operations for bank accounts, including validation using Zod.
- Added graceful shutdown handling for server and Prisma client.
2025-04-05 17:52:40 -04:00