feat(irpc): prepare scoped cost limits provisions and timing in QA
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-26 08:29:28 +02:00
parent f400e56a5b
commit 043dd35d8e
14 changed files with 1156 additions and 15 deletions
@@ -1,3 +1,4 @@
import {SimulationIrpcCosts} from '@/components/simulation-irpc-costs';
import {SimulationIrpcSchedules} from '@/components/simulation-irpc-schedules';
import {SimulationIrpcAssessment} from '@/components/simulation-irpc-assessment';
import {useState} from 'react';
@@ -30,6 +31,7 @@ export function SimulationIrpcNormal({draft,onChange}:{draft:Record<string,unkno
{profitTopics.map(([k,label])=>{const t=b.profit!.topics[k];const change=(p:Partial<ProfitEvidence>)=>profit({topics:{...b.profit!.topics,[k]:{...t,...p}}});return<fieldset key={k} className="rounded border p-2"><legend>{label}</legend><label className="block">Estado — {label}<select aria-label={'Estado — '+label} value={t.state} onChange={e=>change({state:e.target.value as ProfitEvidence['state']})}><option value="">Informação em falta</option><option value="known">Valor conhecido</option><option value="absent">Ausência declarada com suporte</option></select></label>{(t.state==='known'||t.amount!=='')&&<label className="block">Montante conhecido — {label}<input value={t.amount} onChange={e=>change({amount:e.target.value})}/></label>}<label className="block">Suporte — {label}<input value={t.reference} onChange={e=>change({reference:e.target.value})}/></label></fieldset>;})}
</fieldset>}
<SimulationIrpcSchedules book={b} save={save}/>
<SimulationIrpcCosts draft={draft} book={b} save={save}/>
<SimulationIrpcTaxableBase draft={draft} book={b} save={save}/>
<SimulationIrpcAssessment book={b} save={save}/>
<button type="button" onClick={()=>{try{save(recordNormal(draft,b));}catch(e){setError(String(e));}}}>Calcular e guardar ajustamentos L6</button>