On continue à bosser sur l'inventaire, ça va être epique

master
pasquizzat 2 years ago
parent 967379d750
commit 39baebe343

@ -57,7 +57,7 @@ steps:
dockerfile: Sources/Dockerfile
context: .
registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/git/paul.squizzato/MonAppliBlazorCool
repo: hub.codefirst.iut.uca.fr/my-group/my-application-client
username:
from_secret: SECRET_REGISTRY_USERNAME
password:
@ -65,7 +65,6 @@ steps:
when:
branch:
- master
# The volumes declaration appear at the end of the file, after all steps
volumes:
- name: docs

@ -1,10 +1,9 @@
@page "/inventory"
@using CetteAppliVaMarcher.Components
<h3>Inventory</h3>
<grid class="Inventory">
@foreach (var item in Items)
{
@item()
<CraftingItem Item="item"/>
}
</grid>

@ -1,6 +1,32 @@
namespace CetteAppliVaMarcher.Pages
using CetteAppliVaMarcher.Components;
using CetteAppliVaMarcher.Models;
using CetteAppliVaMarcher.Services;
using Microsoft.AspNetCore.Components;
namespace CetteAppliVaMarcher.Pages
{
public partial class Inventory
{
[Inject]
public IDataService DataService { get; set; }
public List<Item> Items { get; set; } = new List<Item>();
private List<CraftingRecipe> Recipes { get; set; } = new List<CraftingRecipe>();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
base.OnAfterRenderAsync(firstRender);
if (!firstRender)
{
return;
}
Items = await DataService.List(0, await DataService.Count());
Recipes = await DataService.GetRecipes();
StateHasChanged();
}
}
}

@ -1,5 +1,5 @@
@page "/layout"
@layout PtitLayoutTranquilou
@layout PtitLayoutTranquilax
<PageTitle>layout</PageTitle>

@ -34,6 +34,11 @@
<span class="oi oi-warning" aria-hidden="true"></span> NE CLIQUEZ PAS
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="inventory">
<span class="oi oi-warning" aria-hidden="true"></span> Inventory
</NavLink>
</div>
</nav>
</div>

@ -0,0 +1,6 @@
namespace CetteAppliVaMarcher
{
public class nuget
{
}
}
Loading…
Cancel
Save