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 dockerfile: Sources/Dockerfile
context: . context: .
registry: hub.codefirst.iut.uca.fr 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: username:
from_secret: SECRET_REGISTRY_USERNAME from_secret: SECRET_REGISTRY_USERNAME
password: password:
@ -65,7 +65,6 @@ steps:
when: when:
branch: branch:
- master - master
# The volumes declaration appear at the end of the file, after all steps # The volumes declaration appear at the end of the file, after all steps
volumes: volumes:
- name: docs - name: docs

@ -1,10 +1,9 @@
@page "/inventory" @page "/inventory"
@using CetteAppliVaMarcher.Components
<h3>Inventory</h3> <h3>Inventory</h3>
<grid class="Inventory">
@foreach (var item in Items) @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 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" @page "/layout"
@layout PtitLayoutTranquilou @layout PtitLayoutTranquilax
<PageTitle>layout</PageTitle> <PageTitle>layout</PageTitle>

@ -34,6 +34,11 @@
<span class="oi oi-warning" aria-hidden="true"></span> NE CLIQUEZ PAS <span class="oi oi-warning" aria-hidden="true"></span> NE CLIQUEZ PAS
</NavLink> </NavLink>
</div> </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> </nav>
</div> </div>

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