feat(elixir): add edit component functionality

This commit is contained in:
Schuwi
2025-09-14 12:20:04 +02:00
parent 5e49cb79a0
commit 48c9103058
2 changed files with 169 additions and 29 deletions

View File

@@ -38,6 +38,7 @@ A modern, idiomatic Elixir/Phoenix port of the original PHP-based component inve
- **Category Organization**: Hierarchical category system for better organization
- **Datasheet Links**: Direct links to component datasheets
- **Position Tracking**: Track component storage locations
- **Real-time Updates**: All changes are immediately reflected in the interface
## Setup
@@ -110,6 +111,7 @@ The application uses a simple password-based authentication system:
| `getItems.php` | `Inventory.list_components/1` | Type-safe, composable queries |
| `getCategories.php` | `Inventory.list_categories/0` | Proper associations, hierarchical support |
| `addItem.php` | `Inventory.create_component/1` | Built-in validation, changesets |
| Manual editing | `Inventory.update_component/2` | **NEW**: Full edit functionality with validation |
| `changeAmount.php` | `Inventory.update_component_count/2` | Atomic operations, constraints |
| `imageUpload.php` | (Future: Phoenix file uploads) | Planned improvement |
| Session management | Phoenix sessions + LiveView | Built-in CSRF protection |