From e5a57058881bc7cb914d765f856dcdd9fb0e23ee Mon Sep 17 00:00:00 2001 From: herblinernexxbizz <125579511+herblinernexxbizz@users.noreply.github.com> Date: Mon, 12 Jun 2023 11:12:18 +0200 Subject: [PATCH] V3 make workflowdefinition have readonly (#4124) * fix broken build and add readonly to dapper migration --------- Co-authored-by: Sipke Schoorstra --- .../src/modules/flowchart/flowchart.tsx | 1 + src/modules/Elsa.Dapper.Migrations/Management/Initial.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/designer/designer_packages/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx b/src/designer/designer_packages/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx index a864855a5..c211c0149 100644 --- a/src/designer/designer_packages/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx +++ b/src/designer/designer_packages/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx @@ -44,6 +44,7 @@ export class FlowchartComponent { @Prop() rootActivity: Activity; @Prop() interactiveMode: boolean = true; @Prop() silent: boolean = false; + @Prop() isReadonly: boolean; @Element() el: HTMLElement; container: HTMLElement; diff --git a/src/modules/Elsa.Dapper.Migrations/Management/Initial.cs b/src/modules/Elsa.Dapper.Migrations/Management/Initial.cs index 9c395f0d1..ee2f68bf6 100644 --- a/src/modules/Elsa.Dapper.Migrations/Management/Initial.cs +++ b/src/modules/Elsa.Dapper.Migrations/Management/Initial.cs @@ -28,7 +28,9 @@ public class Initial : Migration .WithColumn("CreatedAt").AsDateTimeOffset().NotNullable() .WithColumn("Version").AsInt32().NotNullable() .WithColumn("IsLatest").AsBoolean().NotNullable() + .WithColumn("IsReadonly").AsBoolean().NotNullable() .WithColumn("IsPublished").AsBoolean().NotNullable(); + IfDatabase("Sqlite") .Create @@ -47,6 +49,7 @@ public class Initial : Migration .WithColumn("CreatedAt").AsDateTime2().NotNullable() .WithColumn("Version").AsInt32().NotNullable() .WithColumn("IsLatest").AsBoolean().NotNullable() + .WithColumn("IsReadonly").AsBoolean().NotNullable() .WithColumn("IsPublished").AsBoolean().NotNullable(); IfDatabase("SqlServer", "Oracle", "MySql", "Postgres")