Skip to content

Commit

Permalink
fix(forms): rebase site and tags form on top of BaseForm
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Aug 13, 2021
1 parent 72deb7b commit 38bcbbd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/BioEngine.Admin/Pages/Sites/Edit.razor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using BioEngine.Admin.Shared;
using BioEngine.Core.Data.Entities;
using BioEngine.Core.Data.Repositories;
using Microsoft.AspNetCore.Components;
Expand All @@ -12,7 +13,7 @@ public partial class Edit
protected override string Title => Form.IsNew ? "Новый сайт" : Form.Entity.Title;
}

public class SiteForm : BaseAntRepositoryForm<Site, Guid, SitesRepository>
public class SiteForm : BaseForm<Site, Guid, SitesRepository>
{
[Parameter] public RenderFragment<SiteForm> ChildContent { get; set; } = null!;
protected override RenderFragment ChildContentFragment => ChildContent(this);
Expand Down
3 changes: 2 additions & 1 deletion src/BioEngine.Admin/Pages/Tags/Edit.razor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using BioEngine.Admin.Shared;
using BioEngine.Core.Data.Entities;
using BioEngine.Core.Data.Repositories;
using Microsoft.AspNetCore.Components;
Expand All @@ -12,7 +13,7 @@ public partial class Edit
protected override string Title => Form.IsNew ? "Новый тэг" : Form.Entity.Title;
}

public class TagForm : BaseAntRepositoryForm<Tag, Guid, TagsRepository>
public class TagForm : BaseForm<Tag, Guid, TagsRepository>
{
[Parameter] public RenderFragment<TagForm> ChildContent { get; set; } = null!;

Expand Down
6 changes: 2 additions & 4 deletions src/BioEngine.Admin/Shared/BaseForm.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Threading.Tasks;
using BioEngine.Core.Data.Entities.Abstractions;
using BioEngine.Core.Data.Repositories;
using BioEngine.Core.Users;
using KellermanSoftware.CompareNetObjects;
using Sitko.Blockly.Blazor.Extensions;
Expand All @@ -11,8 +9,8 @@ namespace BioEngine.Admin.Shared
{
public abstract class BaseForm<TEntity, TEntityPk, TRepository> : BaseAntRepositoryForm<TEntity, TEntityPk,
TRepository>
where TEntity : class, IEntity<TEntityPk>, IPublishable, new()
where TRepository : class, IRepository<TEntity, TEntityPk>, IPublishableEntityRepository<TEntity>
where TEntity : class, IEntity<TEntityPk>, new()
where TRepository : class, IRepository<TEntity, TEntityPk>
{
protected override void ConfigureComparer(ComparisonConfig comparisonConfig)
{
Expand Down

0 comments on commit 38bcbbd

Please sign in to comment.