refactor: separate LOT management to dedicated page

- Create new /lot page with two tabs:
  1. LOT: component management (formerly in /admin/pricing)
  2. Сопоставления: partnumber ↔ LOT mappings (formerly in Warehouse tab)
- Remove LOT tab from Pricing Admin page
- Remove stock mappings section from Warehouse tab
- Update main menu: LOT link now points to /lot
- Default tab in Pricing Admin changed to Estimate
- Add Lot() handler in web.go
- Add /lot route in main.go

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-02-10 16:13:04 +03:00
parent 9b07262514
commit c8ad43677d
5 changed files with 683 additions and 61 deletions

View File

@@ -67,7 +67,7 @@ func NewWebHandler(templatesPath string, componentService *services.ComponentSer
}
// Load each page template with base
simplePages := []string{"admin_pricing.html", "pricelists.html", "pricelist_detail.html"}
simplePages := []string{"admin_pricing.html", "pricelists.html", "pricelist_detail.html", "lot.html"}
for _, page := range simplePages {
pagePath := filepath.Join(templatesPath, page)
var tmpl *template.Template
@@ -130,6 +130,10 @@ func (h *WebHandler) Index(c *gin.Context) {
c.Redirect(302, "/admin/pricing")
}
func (h *WebHandler) Lot(c *gin.Context) {
h.render(c, "lot.html", gin.H{"ActivePage": "lot"})
}
func (h *WebHandler) AdminPricing(c *gin.Context) {
h.render(c, "admin_pricing.html", gin.H{"ActivePage": "admin"})
}