- Add /logs page with per-order sync run details, filters (Toate/Importate/Fara Mapare/Erori) - Add price pre-validation (validate_prices + ensure_prices) to prevent ORA-20000 on direct articles - Add find_new_orders() to detect orders not yet in Oracle COMENZI - Extend missing_skus table with order context (order_count, order_numbers, customers) - Add server-side pagination on /api/validate/missing-skus and /missing-skus page - Replace confusing "Skip"/"Err" with "Fara Mapare"/"Erori" terminology - Add inline mapping modal on dashboard (replaces navigation to /mappings) - Add 2-row stat cards: orders (Comenzi Noi/Ready/Importate/Fara Mapare/Erori) + articles - Add ID_POL/ID_GESTIUNE/ID_SECTIE to config.py and .env - Update .gitignore (venv, *.db, api/api/, logs/) - 33/33 unit tests pass, E2E verified with Playwright Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
949 B
Python
41 lines
949 B
Python
from pydantic_settings import BaseSettings
|
|
from pathlib import Path
|
|
import os
|
|
|
|
class Settings(BaseSettings):
|
|
# Oracle
|
|
ORACLE_USER: str = "MARIUSM_AUTO"
|
|
ORACLE_PASSWORD: str = "ROMFASTSOFT"
|
|
ORACLE_DSN: str = "ROA_CENTRAL"
|
|
INSTANTCLIENTPATH: str = ""
|
|
FORCE_THIN_MODE: bool = False
|
|
TNS_ADMIN: str = ""
|
|
|
|
# SQLite
|
|
SQLITE_DB_PATH: str = str(Path(__file__).parent.parent / "data" / "import.db")
|
|
|
|
# App
|
|
APP_PORT: int = 5003
|
|
LOG_LEVEL: str = "INFO"
|
|
JSON_OUTPUT_DIR: str = ""
|
|
|
|
# SMTP (optional)
|
|
SMTP_HOST: str = ""
|
|
SMTP_PORT: int = 587
|
|
SMTP_USER: str = ""
|
|
SMTP_PASSWORD: str = ""
|
|
SMTP_TO: str = ""
|
|
|
|
# Auth (optional)
|
|
API_USERNAME: str = ""
|
|
API_PASSWORD: str = ""
|
|
|
|
# ROA Import Settings
|
|
ID_POL: int = 0
|
|
ID_GESTIUNE: int = 0
|
|
ID_SECTIE: int = 0
|
|
|
|
model_config = {"env_file": ".env", "env_file_encoding": "utf-8", "extra": "ignore"}
|
|
|
|
settings = Settings()
|