diff --git a/src/y4f/Shared/Bestellabschluss.razor b/src/y4f/Shared/Bestellabschluss.razor index ba08311..9fa480e 100644 --- a/src/y4f/Shared/Bestellabschluss.razor +++ b/src/y4f/Shared/Bestellabschluss.razor @@ -179,8 +179,8 @@ rabatte = await Http.GetFromJsonAsync>("https://localhost:7076/api/Rabatte"); bestellungspositionHasMenuitems = await Http.GetFromJsonAsync>("https://localhost:7076/api/BestellungspositionHasMenuitems"); - // test use the first kunde - kunde = kunden[1]; + // get kunde from local storage + kunde = localStorage.GetItem("kunde"); // get the most recent rabatt, that are still valid (GueltigkeitBis) // if there is no rabatt, set the rabatt to null diff --git a/src/y4f/Shared/Bestellbestätigung.razor b/src/y4f/Shared/Bestellbestätigung.razor index b36aaf3..7253e2c 100644 --- a/src/y4f/Shared/Bestellbestätigung.razor +++ b/src/y4f/Shared/Bestellbestätigung.razor @@ -97,7 +97,8 @@ rabatte = await Http.GetFromJsonAsync>("https://localhost:7076/api/Rabatte"); // test use the first kunde - kunde = kunden[1]; + // get kunde from local storage + kunde = localStorage.GetItem("kunde"); // get the most recent rabatt, that are still valid (GueltigkeitBis) // if there is no rabatt, set the rabatt to null diff --git a/src/y4f/Shared/Kontoverwaltung.razor b/src/y4f/Shared/Kontoverwaltung.razor index 6d0d0b9..df894fd 100644 --- a/src/y4f/Shared/Kontoverwaltung.razor +++ b/src/y4f/Shared/Kontoverwaltung.razor @@ -190,12 +190,8 @@ rabatte = await Http.GetFromJsonAsync>("https://localhost:7076/api/Rabatte"); bestellungspositionHasMenuitems = await Http.GetFromJsonAsync>("https://localhost:7076/api/BestellungspositionHasMenuitems"); - - // use kudnde with id 2 - kunde = kunden[1]; - - - + // get kunde from local storage + kunde = localStorage.GetItem("kunde"); // get all menuitemIds from bestellungspositions with the last date foreach (Bestellungsposition bestellungsposition in bestellungspositions) diff --git a/src/y4f/Shared/Yummy-Punkte.razor b/src/y4f/Shared/Yummy-Punkte.razor index 87b8396..a725641 100644 --- a/src/y4f/Shared/Yummy-Punkte.razor +++ b/src/y4f/Shared/Yummy-Punkte.razor @@ -75,7 +75,8 @@ kunden = await Http.GetFromJsonAsync>("https://localhost:7076/api/kunden"); rabatte = await Http.GetFromJsonAsync>("https://localhost:7076/api/Rabatte"); - kunde = kunden[1]; + // get kunde from local storage + kunde = localStorage.GetItem("kunde"); // get the most recent rabatt, that are still valid (GueltigkeitBis) // if there is no rabatt, set the rabatt to null