a6c03a091e
Moved from gov-agreg/src/pages/achizitii/* to root (drop prefix). - 22 pages migrated, 127 files total - All internal links: /achizitii/X → /X (176 occurrences fixed) - AchizitiiLayout subnav rewritten: /X paths, top-right link to vreaudigital.ro hub - BaseLayout new (vreau.digital branding, OG tags, site URL) - astro.config.mjs: site https://vreau.digital, server output (was static) - docker-compose: port 5096 (vreaudigital is 5095), container vreau-digital - deploy.sh: paths /opt/vreau-digital, log /var/log/vreau-digital-deploy.log Backend shared with gov-agreg: - PostgreSQL satra (same schemas: seap, firms, anaf, anre, ...) - Photon, Martin tiles - Infisical /vreaudigital path (DATABASE_URL etc. shared) build: PASS (npx astro check 0 errors, npm run build 5s vite + 10s server)
20 lines
751 B
Python
20 lines
751 B
Python
"""Catalog_ListItems — Beletage product catalog."""
|
|
from __future__ import annotations
|
|
|
|
from ..xml_utils import text_under, decimal_under, datetime_under, sysitem_name, to_jsonable, int_under
|
|
|
|
|
|
def parse(el) -> dict | None:
|
|
item_code = text_under(el, 'ItemCode') or text_under(el, 'CatalogItemCode')
|
|
if not item_code:
|
|
return None
|
|
return {
|
|
'item_code': item_code,
|
|
'item_name': text_under(el, 'Name') or text_under(el, 'ItemName'),
|
|
'cpv_code': sysitem_name(el, 'CpvCode'),
|
|
'unit_price': decimal_under(el, 'UnitPrice') or decimal_under(el, 'Price'),
|
|
'currency': sysitem_name(el, 'Currency'),
|
|
'last_updated': datetime_under(el, 'LastUpdate'),
|
|
'details': to_jsonable(el),
|
|
}
|