feat: add LOT creation, auto-save mappings, disable auto warehouse pricelist
- Add LOT creation functionality in pricing admin - New API endpoint POST /api/admin/pricing/lots - Modal form for creating new LOT with auto-category detection - Creates entries in both lot and qt_lot_metadata tables - Implement auto-save for stock mappings - Auto-save on change for partnumber → LOT mappings - Visual feedback (orange during save, green on success, red on error) - Works in both main mappings table and import suggestions - Improve stock import suggestions UI - Remove "Причина" column from suggestions table - Increase LOT and Partnumber column widths to 33% each - Better visual balance in the table layout - Disable automatic warehouse pricelist creation on stock_log import - Import now completes at 100% after stock_log update - Manual pricelist creation available via UI when needed - Faster import process without auto-generation overhead Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,6 @@ import (
|
||||
type Config struct {
|
||||
Server ServerConfig `yaml:"server"`
|
||||
Database DatabaseConfig `yaml:"database"`
|
||||
Auth AuthConfig `yaml:"auth"`
|
||||
Pricing PricingConfig `yaml:"pricing"`
|
||||
Export ExportConfig `yaml:"export"`
|
||||
Alerts AlertsConfig `yaml:"alerts"`
|
||||
@@ -56,12 +55,6 @@ func (d *DatabaseConfig) DSN() string {
|
||||
return cfg.FormatDSN()
|
||||
}
|
||||
|
||||
type AuthConfig struct {
|
||||
JWTSecret string `yaml:"jwt_secret"`
|
||||
TokenExpiry time.Duration `yaml:"token_expiry"`
|
||||
RefreshExpiry time.Duration `yaml:"refresh_expiry"`
|
||||
}
|
||||
|
||||
type PricingConfig struct {
|
||||
DefaultMethod string `yaml:"default_method"`
|
||||
DefaultPeriodDays int `yaml:"default_period_days"`
|
||||
@@ -147,13 +140,6 @@ func (c *Config) setDefaults() {
|
||||
c.Database.ConnMaxLifetime = 5 * time.Minute
|
||||
}
|
||||
|
||||
if c.Auth.TokenExpiry == 0 {
|
||||
c.Auth.TokenExpiry = 24 * time.Hour
|
||||
}
|
||||
if c.Auth.RefreshExpiry == 0 {
|
||||
c.Auth.RefreshExpiry = 7 * 24 * time.Hour
|
||||
}
|
||||
|
||||
if c.Pricing.DefaultMethod == "" {
|
||||
c.Pricing.DefaultMethod = "weighted_median"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user