refactor(price): remove price comparison UI and catalog sync
GoMag vs ROA price comparison generated too many false positives (kits, volume discounts, special prices). Removes comparison columns, dots, badges, catalog sync endpoints, and ~950 lines of dead code. Keeps WRITE path (sync_prices_from_order) for kit pricing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1026,23 +1026,6 @@ async def get_skipped_orders_with_sku(sku: str) -> list[str]:
|
||||
|
||||
# ── Price Sync Runs ───────────────────────────────
|
||||
|
||||
async def get_price_sync_runs(page: int = 1, per_page: int = 20):
|
||||
"""Get paginated price sync run history."""
|
||||
db = await get_sqlite()
|
||||
try:
|
||||
offset = (page - 1) * per_page
|
||||
cursor = await db.execute("SELECT COUNT(*) FROM price_sync_runs")
|
||||
total = (await cursor.fetchone())[0]
|
||||
cursor = await db.execute(
|
||||
"SELECT * FROM price_sync_runs ORDER BY started_at DESC LIMIT ? OFFSET ?",
|
||||
(per_page, offset)
|
||||
)
|
||||
runs = [dict(r) for r in await cursor.fetchall()]
|
||||
return {"runs": runs, "total": total, "page": page, "pages": (total + per_page - 1) // per_page}
|
||||
finally:
|
||||
await db.close()
|
||||
|
||||
|
||||
# ── ANAF Cache ───────────────────────────────────
|
||||
|
||||
async def get_anaf_cache(bare_cui: str) -> dict | None:
|
||||
|
||||
Reference in New Issue
Block a user