Files
Investidor-V2/docs/investmoz/simulations/l1-g8-services-readonly-rollback-20261024.patch
T
2026-10-24 23:40:32 +02:00

11 lines
1.4 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--- a/resources/js/lib/iva-service-location.ts
+++ b/resources/js/lib/iva-service-location.ts
@@ -56,6 +56,7 @@
function key(draft:Record<string,unknown>,book:ServiceLocationBook):string{return JSON.stringify({version:serviceLocationVersion,scope:acquisitionScope(draft),location:draft.selection_labels??{},rows:book.rows});}
export function serviceLocationCurrent(draft:Record<string,unknown>,book:ServiceLocationBook):boolean{return!!book.result&&book.result.sourceKey===key(draft,book);}
export function recordServiceLocations(draft:Record<string,unknown>,book:ServiceLocationBook):ServiceLocationBook{
+ throw new Error('Novas classificações P106–P110 temporariamente suspensas; dados, histórico, relatórios e restantes ramos preservados.');
if(!book.rows.length||new Set(book.rows.map(row=>row.id)).size!==book.rows.length)throw new Error('Indique operações com identificadores distintos;originais conservados.');
const result:ServiceLocationCalculation={version:serviceLocationVersion,revision:(book.result?.revision??0)+1,calculatedAt:new Date().toISOString(),opportunity:acquisitionScope(draft),location:JSON.stringify(draft.selection_labels??{}),sourceKey:key(draft,book),source:serviceLocationSource,inputs:structuredClone(book.rows),rows:book.rows.map(row=>evaluateServiceLocation(row))};
const next={...book,result,history:[...(book.history??[]),...(book.result?[book.result]:[])]};saveServiceLocationBook(draft,next);return next;