Add full CRUD interface for Showcase management
Implemented complete web interface for managing showcases (display areas for ready-made bouquets) with: **Backend:** - ShowcaseForm with validation (unique name per warehouse) - ShowcaseListView with filtering by warehouse and status - ShowcaseCreateView, ShowcaseUpdateView with success messages - ShowcaseDeleteView with active reservation validation - URL routes: list, create, edit, delete **Frontend:** - List page with warehouse grouping, active reservations count - Responsive table with filters (warehouse, status) - Create/edit form with Bootstrap styling - Delete confirmation with active reservations check - Breadcrumb navigation **Features:** ✅ One warehouse can have multiple showcases (ForeignKey relationship) ✅ Unique showcase names within each warehouse ✅ Display active reservation counts for each showcase ✅ Prevent deletion if showcase has active reservations ✅ Auto-select default warehouse when creating showcase ✅ Navigation link added to main navbar between "Касса" and "Склад" ✅ Active state highlighting in navigation **Files created:** - inventory/forms_showcase.py (ShowcaseForm) - inventory/views/showcase.py (4 CBV views) - inventory/templates/inventory/showcase/ (list, form, delete templates) **Files modified:** - inventory/urls.py (added showcase routes) - inventory/forms.py (added Showcase import) - templates/navbar.html (added "Витрины" link) URL structure: /inventory/showcases/ - list /inventory/showcases/create/ - create /inventory/showcases/<id>/edit/ - edit /inventory/showcases/<id>/delete/ - delete 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ from decimal import Decimal
|
||||
|
||||
from .models import (
|
||||
Warehouse, Incoming, Sale, WriteOff, Transfer, Reservation, Inventory, InventoryLine, StockBatch,
|
||||
TransferBatch, TransferItem
|
||||
TransferBatch, TransferItem, Showcase
|
||||
)
|
||||
from products.models import Product
|
||||
|
||||
@@ -460,3 +460,4 @@ class TransferBulkForm(forms.Form):
|
||||
raise ValidationError('Склад-источник и склад-назначение должны быть разными')
|
||||
|
||||
return cleaned_data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user