feat(clusters): persist versioned competitiveness and approved public analysis

This commit is contained in:
2026-10-29 13:29:08 +02:00
parent 3f7082a3e6
commit 4875c4beb9
13 changed files with 826 additions and 141 deletions
+4
View File
@@ -11,6 +11,7 @@ import { Management } from '../management/shared';
import { Layout, Field, control, button, labels, kind } from './shared';
import type { Dossier } from './shared';
import InvestmentComplements, { type ComplementOption } from '@/components/investment-complements';
import ClusterCompetitivenessPublic, { type ApprovedCompetitiveness } from '@/components/cluster-competitiveness-public';
export default function Show(props: Props) {
return (
<Editor
@@ -21,6 +22,7 @@ export default function Show(props: Props) {
}
type Props = {
competitiveness?: ApprovedCompetitiveness | null;
complements?: ComplementOption[];
geography: StructureGeography;
existingSubmissions?: { id: string; version: number; updated_at: string }[];
@@ -54,6 +56,7 @@ type Props = {
};
function Editor({
competitiveness,
complements = [],
record,
related,
@@ -94,6 +97,7 @@ function Editor({
{kind(record)} · {record.content.code}
</p>
<p className="text-sm">Fonte: {record.source}</p>
{competitiveness && <ClusterCompetitivenessPublic analysis={competitiveness} />}
{!management && (
<div className="space-y-2 rounded-xl border p-4">
<Link className="underline" href={portfolioPreparationHref(record.id, pageUrl)}>