mirror of
https://github.com/yummy4friends/y4f.git
synced 2025-01-30 15:44:45 +01:00
DB integration
The categories are taken from the api and output according to the design template.
This commit is contained in:
parent
b008d87ec8
commit
70541c1b4d
@ -1,124 +1,100 @@
|
|||||||
@page "/Speisekarte"
|
@page "/Speisekarte"
|
||||||
|
|
||||||
|
@inject HttpClient Http
|
||||||
|
|
||||||
|
<h1>Speisekarte</h1>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-lg-2 col-md-4 col-sm-12 tablecolumn">
|
@foreach (var item in menuitemueberkategories)
|
||||||
<table class="table table-light overflow-hidden">
|
{
|
||||||
<thead>
|
<div class="col-lg-2 col-md-4 col-sm-12 tablecolumn">
|
||||||
<tr>
|
<table class="table table-light overflow-hidden">
|
||||||
<th scope="col">Chinesisch</th>
|
<thead>
|
||||||
</tr>
|
<tr>
|
||||||
</thead>
|
<th scope="col">@item.Bezeichnung</th>
|
||||||
<tbody>
|
</tr>
|
||||||
<tr>
|
</thead>
|
||||||
<td><a href="">Nudeln</a></td>
|
<tbody>
|
||||||
</tr>
|
@foreach (var item2 in menuitemkategories)
|
||||||
<tr>
|
{
|
||||||
<td><a href="">Reis</a></td>
|
if (item.IdmenuItemUeberkategorie == item2.MenuItemUeberkategorieIdmenuItemUeberkategorie)
|
||||||
</tr>
|
{
|
||||||
<tr>
|
if (@item.Bezeichnung == "Chinesisch")
|
||||||
<td class="lowest"><a href="">Nachspeisen</a></td>
|
{
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td><a href="/SpeisekarteChinesich">@item2.Bezeichnung</a></td>
|
||||||
<td class="lowest"><br></td>
|
</tr>
|
||||||
</tr>
|
}
|
||||||
<tr>
|
else if (@item.Bezeichnung == "Japanisch")
|
||||||
<td class="lowest"><br></td>
|
{
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td><a href="/SpeisekarteJapanisch">@item2.Bezeichnung</a></td>
|
||||||
<td class="lowest"><br></td>
|
</tr>
|
||||||
</tr>
|
}
|
||||||
</tbody>
|
else if (@item.Bezeichnung == "Getränke")
|
||||||
</table>
|
{
|
||||||
</div>
|
<tr>
|
||||||
<div class="col-lg-2 col-md-4 col-sm-12 tablecolumn">
|
<td><a href="/SpeisekarteGetraenke">@item2.Bezeichnung</a></td>
|
||||||
<table class="table table-light overflow-hidden">
|
</tr>
|
||||||
<thead>
|
}
|
||||||
<tr>
|
else if (@item.Bezeichnung == "Sonstiges")
|
||||||
<th scope="col">Japanisch</th>
|
{
|
||||||
</tr>
|
<tr>
|
||||||
</thead>
|
<td><a href="/SpeisekarteSonstiges">@item2.Bezeichnung</a></td>
|
||||||
<tbody>
|
</tr>
|
||||||
<tr>
|
}
|
||||||
<td><a href="">Sushi & Maki</a></td>
|
else
|
||||||
</tr>
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="">Bento</a></td>
|
<td><a href="/">@item2.Bezeichnung</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
}
|
||||||
<td class="lowest"><a href="">Nachspeisen</a></td>
|
}
|
||||||
</tr>
|
}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="lowest"><br></td>
|
<td class="lowest"><br></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="lowest"><br></td>
|
<td class="lowest"><br></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
</tr>
|
||||||
<td class="lowest"><br></td>
|
<tr>
|
||||||
</tr>
|
<td class="lowest"><br></td>
|
||||||
</tbody>
|
</tr>
|
||||||
</table>
|
</tbody>
|
||||||
</div>
|
</table>
|
||||||
<div class="col-lg-2 col-md-4 col-sm-12 tablecolumn">
|
</div>
|
||||||
<table class="table table-light overflow-hidden">
|
}
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Getränke</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td><a href="">Alkoholfrei</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><a href="">Alkoholisch</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><br></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-2 col-md-4 col-sm-12 tablecolumn">
|
|
||||||
<table class="table table-light overflow-hidden">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Sonstiges</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td><a href="">Schnitzel</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="">Pommes</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><a href="">Bowl</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="lowest"><br></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private List<Menuitemkategorie> menuitemkategories = new List<Menuitemkategorie>();
|
||||||
|
private List<Menuitemueberkategorie> menuitemueberkategories = new List<Menuitemueberkategorie>();
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
menuitemkategories = await Http.GetFromJsonAsync<List<Menuitemkategorie>>("https://localhost:7076/api/MenuItemKategories");
|
||||||
|
menuitemueberkategories = await Http.GetFromJsonAsync<List<Menuitemueberkategorie>>("https://localhost:7076/api/MenuItemUeberkategories");
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Menuitemkategorie
|
||||||
|
{
|
||||||
|
public int IdmenuItemKategorie { get; set; }
|
||||||
|
public string Bezeichnung { get; set; }
|
||||||
|
public int MenuItemUeberkategorieIdmenuItemUeberkategorie { get; set; }
|
||||||
|
public object MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation { get; set; }
|
||||||
|
public List<object> MenuItemIdmenuItems { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Menuitemueberkategorie
|
||||||
|
{
|
||||||
|
public int IdmenuItemUeberkategorie { get; set; }
|
||||||
|
public string Bezeichnung { get; set; }
|
||||||
|
public List<object> MenuItemKategorieIdmenuItemKategories { get; set; }
|
||||||
|
public List<object> MenuItemIdmenuItems { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user