14 lines
1.5 KiB
Python
14 lines
1.5 KiB
Python
from pathlib import Path
|
|
p=Path('C:/Users/macbook/.config/investmoz/navegacao-consolidacao-QA-20261016/source')
|
|
def edit(f,a,b):
|
|
q=p/f;s=q.read_text('utf-8');assert a in s,(f,a[:100]);q.write_text(s.replace(a,b,1),'utf-8')
|
|
edit('resources/js/lib/portal-navigation.ts',"link('help', 'Apoio ao investidor', '/apoio'),", "link('help', 'Apoio ao investidor', access.context?.guidance || '/apoio'),")
|
|
edit('resources/js/components/dossier-navigation-context.tsx',"desk: string; land: string | null", "desk: string; land: string | null; guidance:string|null")
|
|
edit('resources/js/components/dossier-navigation-context.tsx'," if (!pref.installed)", " if(stopped)return;\n if (!pref.installed)")
|
|
edit('resources/js/components/dossier-navigation-context.tsx',"/^#S(0[1-9]|1[0-9])$/.test(hash)\n ? hash.slice(1)", "/^#S(0[1-9]|1[0-9])$/.test(window.location.hash)\n ? window.location.hash.slice(1)")
|
|
# The formatter split the expression; support the exact observed formatted variant below if needed.
|
|
q=p/'resources/js/components/dossier-navigation-context.tsx';s=q.read_text('utf-8');a=""" if (id !== active) router.visit(`/investimentos/${id}`);
|
|
else setReload((x) => x + 1);""";b=""" const target=`/investimentos/${id}${step?'#'+step:''}`;
|
|
if(url!==target)router.visit(target);else setReload((x)=>x+1);""";assert a in s;s=s.replace(a,b,1);q.write_text(s,'utf-8')
|
|
print('Explicit step selection persists without returning to an earlier URL hash')
|