You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
600 B
29 lines
600 B
@using Model.Entity |
|
@using Services.Website |
|
@using System.ComponentModel.DataAnnotations |
|
@using Model.Entity.Data |
|
@using Services |
|
|
|
@inject IEntityDialogService entityDialogService |
|
|
|
|
|
@if (EntityId == null) |
|
{ |
|
<div>Add a entity</div> |
|
} |
|
else |
|
{ |
|
<button class="entityLabel @Entity.Descriptive.ToLower()" @onclick="EntityLabelClicked">@Entity.Info().Name</button> |
|
} |
|
|
|
@code { |
|
|
|
[Parameter] public string EntityId { get; set; } = default!; |
|
|
|
private EntityModel Entity => DATA.Get()[EntityId]; |
|
|
|
void EntityLabelClicked() |
|
{ |
|
entityDialogService.AddDialog(EntityId); |
|
} |
|
} |