diff --git a/zero.Api/Models/Trees/TreeItem.cs b/zero.Api/Models/Trees/TreeItem.cs
index b8b0c652..0cd3ae65 100644
--- a/zero.Api/Models/Trees/TreeItem.cs
+++ b/zero.Api/Models/Trees/TreeItem.cs
@@ -3,7 +3,7 @@
///
/// Represents an item in a tree
///
-public struct TreeItem
+public class TreeItem
{
///
/// Id of the item
diff --git a/zero.Backoffice.UI/app/components/ui-tree-item.vue b/zero.Backoffice.UI/app/components/ui-tree-item.vue
index 16a598c1..99e7020c 100644
--- a/zero.Backoffice.UI/app/components/ui-tree-item.vue
+++ b/zero.Backoffice.UI/app/components/ui-tree-item.vue
@@ -283,7 +283,7 @@
.ui-tree-item-icon.is-dashed
{
- stroke-dasharray: 3.5px;
+ stroke-dasharray: 3px;
}
.ui-tree-item:hover .ui-tree-item-icon
diff --git a/zero.Backoffice.UI/app/editor/ui-editor-page.vue b/zero.Backoffice.UI/app/editor/ui-editor-page.vue
index 2c26fb3c..ac23353e 100644
--- a/zero.Backoffice.UI/app/editor/ui-editor-page.vue
+++ b/zero.Backoffice.UI/app/editor/ui-editor-page.vue
@@ -1,9 +1,9 @@
-
-
+
+
-
+
@@ -44,7 +44,11 @@
canDelete: {
type: Boolean,
default: true
- }
+ },
+ disabled: {
+ type: [Boolean, Function],
+ default: false
+ },
},
@@ -52,14 +56,17 @@
id()
{
return this.$route.params.id;
+ },
+ readonly()
+ {
+ return typeof this.disabled === 'function' ? this.disabled(this.model) : this.disabled;
}
},
data: () => ({
meta: {},
- model: {},
- disabled: false
+ model: {}
}),
methods: {
diff --git a/zero.Core/Architecture/Blueprints/BlueprintInterceptor.cs b/zero.Core/Architecture/Blueprints/BlueprintInterceptor.cs
index 98ce111b..ed912175 100644
--- a/zero.Core/Architecture/Blueprints/BlueprintInterceptor.cs
+++ b/zero.Core/Architecture/Blueprints/BlueprintInterceptor.cs
@@ -80,6 +80,7 @@ public class BlueprintInterceptor : Interceptor, IBlueprintIntercept
await interceptor.Start(args.Operations);
await session.StoreAsync(child);
+ await session.SaveChangesAsync();
await interceptor.Complete();
await session.SaveChangesAsync();
}
@@ -109,7 +110,8 @@ public class BlueprintInterceptor : Interceptor, IBlueprintIntercept
interceptor.Filter(x => x is not IBlueprintInterceptor);
await interceptor.Start(args.Operations);
- session.Delete(model.Id);
+ session.Delete(model.Id);
+ await session.SaveChangesAsync();
await interceptor.Complete();
await session.SaveChangesAsync();
}
diff --git a/zero.Core/Persistence/ZeroDocumentStore.cs b/zero.Core/Persistence/ZeroDocumentStore.cs
index 94a57434..63909451 100644
--- a/zero.Core/Persistence/ZeroDocumentStore.cs
+++ b/zero.Core/Persistence/ZeroDocumentStore.cs
@@ -53,7 +53,7 @@ public class ZeroDocumentStore : DocumentStore, IZeroDocumentStore
session.IsDisposed = true;
};
- session.Advanced.WaitForIndexesAfterSaveChanges();
+ session.Advanced.WaitForIndexesAfterSaveChanges(throwOnTimeout: false);
session.Advanced.DocumentStore.AggressivelyCacheFor(TimeSpan.FromHours(1), options.Database); // TODO I guess this will not work in backoffice when we want to see changes immediately
// maybe use caching for frontend but not for backoffice?
diff --git a/zero.Core/Routing/ZeroRoutingModule.cs b/zero.Core/Routing/ZeroRoutingModule.cs
index e324162b..28a3a598 100644
--- a/zero.Core/Routing/ZeroRoutingModule.cs
+++ b/zero.Core/Routing/ZeroRoutingModule.cs
@@ -20,7 +20,7 @@ internal class ZeroRoutingModule : ZeroModule
services.AddScoped();
services.AddTransient();
services.TryAddEnumerable(ServiceDescriptor.Singleton());
- services.AddScoped();
+ //services.AddScoped();
services.AddOptions().Bind(configuration.GetSection("Zero:Routing"));
diff --git a/zero.Core/Stores/StoreOperations.Delete.cs b/zero.Core/Stores/StoreOperations.Delete.cs
index 7b822b18..93af4ccf 100644
--- a/zero.Core/Stores/StoreOperations.Delete.cs
+++ b/zero.Core/Stores/StoreOperations.Delete.cs
@@ -18,6 +18,7 @@ public partial class StoreOperations : IStoreOperations
}
Session.Delete(model);
+ await Session.SaveChangesAsync();
await instruction.Complete();
await Session.SaveChangesAsync();
diff --git a/zero.Core/Stores/StoreOperations.Write.cs b/zero.Core/Stores/StoreOperations.Write.cs
index 5749448d..9db49304 100644
--- a/zero.Core/Stores/StoreOperations.Write.cs
+++ b/zero.Core/Stores/StoreOperations.Write.cs
@@ -71,6 +71,7 @@ public partial class StoreOperations : IStoreOperations
// store our model
await Session.StoreAsync(model);
+ await Session.SaveChangesAsync();
await instruction.Complete();
await Session.SaveChangesAsync();