Files
Investidor-V2/outputs/investmoz-parques-integral-QA-20261018/finish-ui.py
T
nala cf003c8623
tests / ci (push) Canceled after 0s
versao nrgocios 4
2026-10-18 15:57:06 +02:00

8 lines
2.1 KiB
Python

from pathlib import Path
qa=Path('C:/Users/macbook/.config/investmoz/parques-integral-QA-20261018/source')
p=qa/'resources/js/components/investment-zone-integral-details.tsx';s=p.read_text('utf-8');s=s.replace("...(e.target.value === 'unknown' ? {value:null,area:null} : {})","...(e.target.value === 'unknown' && g === 'observations' ? {value:null} : e.target.value === 'unknown' && g === 'plots' ? {area:null} : {})");p.write_text(s,'utf-8')
p=qa/'resources/js/components/investment-zone-operational-details.tsx';s=p.read_text('utf-8');s=s.replace('value, onChange, organizations, documents }:','value, onChange, organizations, documents, geometries, links }:');s=s.replace('documents: { id: string; title: string }[] })','documents: { id: string; title: string }[]; geometries?: {id:string;name:string}[]; links?: {id:string;name:string}[] })');s=s.replace('organizations={organizations} documents={documents} />','organizations={organizations} documents={documents} geometries={geometries} links={links} />');p.write_text(s,'utf-8')
p=qa/'resources/js/pages/investment/zone.tsx';s=p.read_text('utf-8');s=s.replace(' geometries: {\n id: string;',' geometries: {\n geometry_id: string;\n id: string;',1);needle=' <ParkDetailsEditor\n';assert needle in s;s=s.replace(needle,needle+' key={z.version_no}\n geometries={geometries.map((g, i) => ({id:g.geometry_id,name:`Geometria ${i+1} — ${g.purpose} · ${g.validation_status} · v${g.version_no}`}))}\n links={links.map((l, i) => ({id:l.id,name:`Relação ${i+1} — ${l.association_type} · ${l.validation_status} · v${l.version_no}`}))}\n');p.write_text(s,'utf-8')
old=Path('C:/laragon/www/portal-investidor/outputs/investmoz-parques-L1-QA-20261016/http_common.py');out=Path(__file__).resolve().parent;s=old.read_text('utf-8').replace('parques-L1-QA-20261016','parques-integral-QA-20261018');(out/'http_common.py').write_text(s,'utf-8')
print('Integral editor wired to existing geometry/economic associations with labels; private support retained')