refactor(app): move account razor inline code to partial classes
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using Duempelkas.App.Services.Models;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Duempelkas.App.Components.Accounts;
|
||||
|
||||
public partial class EntryRow
|
||||
{
|
||||
#region Parameters
|
||||
|
||||
[Parameter]
|
||||
public EntryDto Entry { get; set; } = default!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> OnDelete { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> OnRestore { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> OnEdit { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
||||
private string GetRowClass()
|
||||
{
|
||||
var classes = new List<string>();
|
||||
if (Entry.IsTransfer)
|
||||
{
|
||||
classes.Add("entry-row-transfer");
|
||||
}
|
||||
|
||||
if (Entry.IsDeleted)
|
||||
{
|
||||
classes.Add("entry-deleted");
|
||||
}
|
||||
|
||||
return string.Join(" ", classes);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user