15 Commits

Author SHA1 Message Date
eeb14ead3c Yum04 registrierung kunde (#49)
Annis aktueller Stand
2023-06-26 20:11:36 +02:00
3c765ff57d Fix unused code 2023-06-26 20:10:40 +02:00
3a4064198d Fix Error CS0102 The type 'Speisekarte' already contains a definition for 'kunden' e 2023-06-26 19:42:53 +02:00
6c627add92 Merge branch 'dev' into YUM04-RegistrierungKunde 2023-06-26 19:04:20 +02:00
901d533cd1 Update README.md (#41)
Spelling mistakes
2023-06-26 18:57:01 +02:00
28327710f8 Warenkorb bestellungsabschluss + Login (Kunde/Chefin) (#48)
* Add Bestellabschluss link

* Add vorbestllungsdata into Table Bestellungsposition

* Add vorbestllungsdata into Table BestellungspositionHasMenuitem

* Add complete vorbestellungsfunktion

* Add kontaktverwaltung Bestellübersicht

* Update Bestelluebersicht BestelluebersichtD-Chefin

* Update Bestelluebersicht

* Fix kunde.Idkunde access

* Add page acees only on valid kunde login

* Add current kunde usage

* Add admin login

* Fix frontend speisekarte1

* Fix treuepunkte vergabe

* Fix chefin bestellungseinsicht
2023-06-26 18:55:12 +02:00
b2dc8402f2 Abandon QRCode scanning idea 2023-06-24 20:29:06 +02:00
35345e455c Remove unused razor page 2023-06-24 19:39:06 +02:00
c85415e740 Check if user is logged in
If the user is not logged in they will be redireted to the login page
Removed old razor Page that is not needed anymore
2023-06-24 18:42:11 +02:00
7cd20602b6 Add .vscode to gitignore 2023-06-24 17:41:41 +02:00
d45fa68fe0 Add visibility if valid kunde on speisekarte 2023-06-24 17:23:41 +02:00
a9418aea33 Add kunden login index 2023-06-24 17:11:52 +02:00
7b8db08d99 Merge branch 'dev' into YUM04-RegistrierungKunde 2023-06-24 16:46:59 +02:00
ba6266579d New Kundenregistrierung 2023-06-24 15:17:45 +02:00
9781d94d6e Update README.md
Spelling mistakes
2023-06-24 14:37:57 +02:00
10 changed files with 34 additions and 32 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
## files generated by popular Visual Studio add-ons.
# User-specific files
.vscode
.vs
*/.vs
*.suo

View File

@ -6,7 +6,7 @@ Yummy4Friends ist eine benutzerfreundliche und visuell ansprechende Webapp zur O
## Description (English)
Yummy4Friends is a user friendly and visually appealing WebApp for ordering food or other things online. Food or other stuff get dynamically fetched from a customer and food database while also taking into account special requests. To attract customers one can also offer limeted time sales/coupons, ordering in advance as well as being able to choosing their preferred pickup time.
Yummy4Friends is a user-friendly and visually appealing WebApp for ordering food or other things online. Food or other stuff gets dynamically fetched from a customer and food database while also taking into account special requests. To attract customers, one can also offer limited-time sales and coupons, order in advance, and have the option to choose the preferred pickup time.
## Tech Stack

View File

@ -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 @@
}

View File

@ -135,3 +135,4 @@
public int Treuepunkte { get; set; }
}
}

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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; }
}

View File

@ -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;
}