Add services and controllers for games (#12)
Co-authored-by: Maxime Adler <madler@sqli.com> Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -21,7 +21,7 @@ public partial class GameFilter
|
||||
];
|
||||
|
||||
private readonly IEnumerable<SelectElement<Func<GameDto?, object?>>> GameProperties = [
|
||||
new() { Item = game => game?.Name, Label = "Nom", IsSelected = true },
|
||||
new() { Item = game => game?.Title, Label = "Nom", IsSelected = true },
|
||||
new() { Item = game => game?.ReleaseDate, Label = "Date de parution" }
|
||||
];
|
||||
|
||||
@@ -40,7 +40,7 @@ public partial class GameFilter
|
||||
];
|
||||
|
||||
private EditContext? EditContext;
|
||||
private SliderRangeParams SliderRangeParams =
|
||||
private readonly SliderRangeParams SliderRangeParams =
|
||||
new() { Min = 1, ValueMin = 1, ValueMax = 5, Max = 5 };
|
||||
|
||||
protected override void OnInitialized()
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
<PageTitle>@ResourcesKey.GamesIdeas</PageTitle>
|
||||
|
||||
<GamesHeader>
|
||||
<GameHeader>
|
||||
<GameFilter @bind-DisplayType=DisplayType
|
||||
@bind-GameFilterParams=GameFilterParams />
|
||||
</GamesHeader>
|
||||
</GameHeader>
|
||||
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
@@ -3,7 +3,7 @@ using GameIdeas.BlazorApp.Shared.Models;
|
||||
|
||||
namespace GameIdeas.BlazorApp.Pages.Games;
|
||||
|
||||
public partial class GamesBase ()
|
||||
public partial class GameBase ()
|
||||
{
|
||||
private DisplayType DisplayType = DisplayType.List;
|
||||
private GameFilterParams GameFilterParams = new();
|
||||
@@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace GameIdeas.BlazorApp.Pages.Games.Header;
|
||||
|
||||
public partial class GamesHeader : ComponentBase
|
||||
public partial class GameHeader : ComponentBase
|
||||
{
|
||||
[Parameter] public EventCallback<AddType> AddTypeChanged { get; set; }
|
||||
[Parameter] public RenderFragment? ChildContent { get; set; }
|
||||
Reference in New Issue
Block a user