feat: protect owner-only supply aggregates and record target CAE blocker

This commit is contained in:
2026-11-15 23:10:17 +02:00
parent e0b18413ac
commit c8957ecb9d
15 changed files with 1255 additions and 49 deletions
+8 -1
View File
@@ -99,6 +99,8 @@ type Path = {
investment_context: DossierContext | null;
can_set_promoter?: boolean;
supply_aggregate_enabled?: boolean;
supply_aggregate_protected?: boolean;
supply_activity_options?: { id: string; code: string; label: string }[];
supply_aggregates?: SupplyAggregate[];
zone_contexts?: {
zone_id: string;
@@ -688,11 +690,16 @@ export default function InvestmentPath(path: Path) {
/>
{path.supply_aggregate_enabled && (
<InvestmentSupplyAggregate
key={path.case.id}
key={`supply:${path.case.id}`}
caseId={path.case.id}
version={path.case.version}
revision={path.investment_context?.revision ?? 0}
history={path.supply_aggregates ?? []}
protectedMode={path.supply_aggregate_protected ?? false}
activityOptions={path.supply_activity_options ?? []}
defaultActivityId={
path.investment_context?.fields.activity_id
}
disabled={!path.canWrite}
/>
)}