Files
PriceForge/MEMORY.md
2026-02-18 10:32:51 +03:00

32 lines
1.4 KiB
Markdown

# PriceForge Memory
## LOT Page Refactoring (2026-02-10)
**What was done:**
- Created new dedicated `/lot` page with two tabs:
1. **LOT tab**: Component/article management (table with search, sort, create LOT)
2. **Сопоставления tab**: partnumber ↔ LOT mappings management
- Removed LOT tab from "Администратор цен" (Pricing Admin)
- Removed "Сопоставление partnumber → LOT" section from Warehouse tab
- Updated main menu navigation:
- LOT link → /lot (new page)
- Администратор цен → /admin/pricing (Estimate, Склад, Конкуренты)
- Настройки (unchanged)
**Files changed:**
- `web/templates/lot.html` (NEW) - Complete page with LOT and stock mappings tabs
- `web/templates/base.html` - Updated menu to link LOT to /lot
- `web/templates/admin_pricing.html` - Removed LOT tab, changed default to Estimate
- `internal/handlers/web.go` - Added lot.html to template list, added Lot() handler
- `cmd/pfs/main.go` - Added /lot route
**Technical notes:**
- lot.html uses same API endpoints as admin_pricing for data loading
- Stock mappings functions copied from admin_pricing.html but adapted for new page
- Default tab for Pricing Admin is now 'estimate' instead of 'lots'
## Data Rules (2026-02-18)
- Never derive category from item name (lot name). Always use category from `PricelistItem` (`lot_category` / JSON `category`).