mirror of
https://github.com/yummy4friends/y4f.git
synced 2024-11-10 06:37:21 +01:00
commit
eeb14ead3c
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
.vscode
|
||||
.vs
|
||||
*/.vs
|
||||
*.suo
|
||||
|
@ -6,6 +6,7 @@
|
||||
@inject NavigationManager _navigationManager
|
||||
@inject IJSRuntime JSRuntime;
|
||||
|
||||
|
||||
<PageTitle>Yummy4Friends</PageTitle>
|
||||
|
||||
<body style='--blazor-load-percentage: 100%; --blazor-load-percentage-text: "100%"; background-color:#C7FFD5;'>
|
||||
@ -33,6 +34,7 @@
|
||||
{
|
||||
localStorage.SetItem("kunde", kunde);
|
||||
_navigationManager.NavigateTo("/speisekarte");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -42,6 +44,7 @@
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
kunden = await Http.GetFromJsonAsync<List<Kunde>>("https://localhost:7076/api/kunden");
|
||||
|
||||
// if already logged in navigate to speisekarte
|
||||
if (localStorage.ContainKey("kunde"))
|
||||
{
|
||||
@ -49,6 +52,7 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class Kunde
|
||||
@ -60,6 +64,3 @@
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -135,3 +135,4 @@
|
||||
public int Treuepunkte { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,6 @@
|
||||
|
||||
allergien = await Http.GetFromJsonAsync<List<Allergie>>("https://localhost:7076/api/allergien");
|
||||
bestellungspositions = await Http.GetFromJsonAsync<List<Bestellungsposition>>("https://localhost:7076/api/bestellungspositionen");
|
||||
kunden = await Http.GetFromJsonAsync<List<Kunde>>("https://localhost:7076/api/kunden");
|
||||
menuitems = await Http.GetFromJsonAsync<List<Menuitem>>("https://localhost:7076/api/Menuitems");
|
||||
menuitemkategories = await Http.GetFromJsonAsync<List<Menuitemkategorie>>("https://localhost:7076/api/Menuitemkategories");
|
||||
menuitemueberkategories = await Http.GetFromJsonAsync<List<Menuitemueberkategorie>>("https://localhost:7076/api/Menuitemueberkategories");
|
||||
|
@ -143,7 +143,6 @@
|
||||
|
||||
allergien = await Http.GetFromJsonAsync<List<Allergie>>("https://localhost:7076/api/allergien");
|
||||
bestellungspositions = await Http.GetFromJsonAsync<List<Bestellungsposition>>("https://localhost:7076/api/bestellungspositionen");
|
||||
kunden = await Http.GetFromJsonAsync<List<Kunde>>("https://localhost:7076/api/kunden");
|
||||
menuitems = await Http.GetFromJsonAsync<List<Menuitem>>("https://localhost:7076/api/Menuitems");
|
||||
menuitemkategories = await Http.GetFromJsonAsync<List<Menuitemkategorie>>("https://localhost:7076/api/Menuitemkategories");
|
||||
menuitemueberkategories = await Http.GetFromJsonAsync<List<Menuitemueberkategorie>>("https://localhost:7076/api/Menuitemueberkategories");
|
||||
|
@ -93,11 +93,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
private List<Kunde> kunden = new List<Kunde>();
|
||||
private Kunde kunde = new Kunde();
|
||||
@ -142,9 +137,9 @@
|
||||
{
|
||||
menuitemIds = localStorage.GetItem<Dictionary<int, int>>("MenuItemIds");
|
||||
}
|
||||
|
||||
allergien = await Http.GetFromJsonAsync<List<Allergie>>("https://localhost:7076/api/allergien");
|
||||
bestellungspositions = await Http.GetFromJsonAsync<List<Bestellungsposition>>("https://localhost:7076/api/bestellungspositionen");
|
||||
kunden = await Http.GetFromJsonAsync<List<Kunde>>("https://localhost:7076/api/kunden");
|
||||
menuitems = await Http.GetFromJsonAsync<List<Menuitem>>("https://localhost:7076/api/Menuitems");
|
||||
menuitemkategories = await Http.GetFromJsonAsync<List<Menuitemkategorie>>("https://localhost:7076/api/Menuitemkategories");
|
||||
menuitemueberkategories = await Http.GetFromJsonAsync<List<Menuitemueberkategorie>>("https://localhost:7076/api/Menuitemueberkategories");
|
||||
|
@ -132,14 +132,13 @@
|
||||
if (kunde != null && !kunden.Any(k => k.Code == kunde.Code))
|
||||
_navigationManager.NavigateTo("/");
|
||||
// kunde login end
|
||||
|
||||
if (localStorage.GetItem<Dictionary<int, int>>("MenuItemIds") != null)
|
||||
{
|
||||
menuitemIds = localStorage.GetItem<Dictionary<int, int>>("MenuItemIds");
|
||||
}
|
||||
|
||||
allergien = await Http.GetFromJsonAsync<List<Allergie>>("https://localhost:7076/api/allergien");
|
||||
bestellungspositions = await Http.GetFromJsonAsync<List<Bestellungsposition>>("https://localhost:7076/api/bestellungspositionen");
|
||||
kunden = await Http.GetFromJsonAsync<List<Kunde>>("https://localhost:7076/api/kunden");
|
||||
menuitems = await Http.GetFromJsonAsync<List<Menuitem>>("https://localhost:7076/api/Menuitems");
|
||||
menuitemkategories = await Http.GetFromJsonAsync<List<Menuitemkategorie>>("https://localhost:7076/api/Menuitemkategories");
|
||||
menuitemueberkategories = await Http.GetFromJsonAsync<List<Menuitemueberkategorie>>("https://localhost:7076/api/Menuitemueberkategories");
|
||||
|
@ -1,16 +0,0 @@
|
||||
<div class="alert alert-secondary mt-4">
|
||||
<span class="oi oi-pencil me-2" aria-hidden="true"></span>
|
||||
<strong>@Title</strong>
|
||||
|
||||
<span class="text-nowrap">
|
||||
Please take our
|
||||
<a target="_blank" class="font-weight-bold link-dark" href="https://go.microsoft.com/fwlink/?linkid=2186157">brief survey</a>
|
||||
</span>
|
||||
and tell us what you think.
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// Demonstrates how a parent component can supply parameters
|
||||
[Parameter]
|
||||
public string? Title { get; set; }
|
||||
}
|
@ -3,20 +3,29 @@
|
||||
html, body {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color: #C7FFD1;
|
||||
padding: 5%;
|
||||
margin-top: 1%;
|
||||
border-radius: 10px;
|
||||
position: center;
|
||||
}
|
||||
#button1 {
|
||||
background-color: #89F9A5;
|
||||
border-radius: 50px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
h1 {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.img {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
margin: 10%;
|
||||
margin: 5%;
|
||||
}
|
||||
|
||||
form {
|
||||
@ -26,3 +35,17 @@ form {
|
||||
|
||||
}
|
||||
|
||||
p {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
border-radius: 50px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user