67 Commits

Author SHA1 Message Date
a51fe08db8 Add db integration show menuitems 2023-06-23 14:52:39 +02:00
9cd1376cfd Frontend "Speisekarte2"
Frontend according to figma design "Speisekarte2"
2023-05-26 21:58:56 +02:00
70541c1b4d DB integration
The categories are taken from the api and output according to the design template.
2023-05-26 21:57:31 +02:00
b008d87ec8 WebAPI for database integrity added
Restructure the solution
* The project has been split into the database integration "src/webapi" and the Blazor wasm project "src/y4f".

WebAPI
* API with CRUD capabilities

* The main task of the "WebAPI" project is to access the database data and make it available to the Blazor-WASM project via an API.

* GET example of the allergy table via the file "TestFetchAllergienData.razor", which can be tested via the browser "/TestFetchAllergienData".
2023-05-21 00:50:08 +02:00
4d9bc7d7b5 Yum04 67 bestellbestaetigung fertigestellt (#18)
* Start

* Finish Yummy-Punkte

* Finish Bestellbestätigung

* Bestellbestätigung Loadingbar aktualisiert
2023-05-19 15:21:14 +02:00
05f95d8085 Add Yum04 21 yummy punkte (#17)
* Fix: Use razor syntax to comment in old comment

* Fix: Made comment actually work

* Feat: Add Yummy-Punkte page

* Feat: Start working on page
2023-05-19 11:03:30 +02:00
e181c13ac2 App.razor changed (#15)
Navbar und Footer wird wieder angezeigt.
2023-05-09 16:48:03 +02:00
7f45436118 Yum04 20 speisekarte (#14)
* Speisekarte angefangen, Links zu Pages

* Tabellen erstellt

* Dropdown getestet, index.html script inkludiert

* Speisekarte fertiggestellt

* Speisekarte fertig (diesmal auch responsive)

* YUM4-20 index.html

---------

Co-authored-by: zha19115 <105790331+zha19115@users.noreply.github.com>
2023-05-09 13:01:19 +02:00
818fe95ca1 Yum04-60 bestellabschluss (#13)
* Kontoverwaltung

* Kontoverwaltung Finish

* Kontoverwaltung Button not finished

* Kontoverwaltung Button not finished

* Kontoverwaltung fertig.

* Kontoverwaltung final finish

* Erster Entwurf fertig

* Finish Bestellabschluss

* Final Final FInisch
2023-05-08 19:36:12 +02:00
3b6896b630 Yum04-54 kontoverwaltung (#11)
* Kontoverwaltung

* Kontoverwaltung Finish

* Kontoverwaltung Button not finished

* Kontoverwaltung Button not finished

* Kontoverwaltung fertig.

* Kontoverwaltung final finish
2023-05-08 19:16:57 +02:00
2d23f8a022 YUM04-15 Update Navbar (#12)
Added navigation link "Yummy-Punkte"
2023-05-08 19:08:06 +02:00
bfa440ac5e Yum04 27 warenkorb (#9)
* Page: "Warenkorb" created

* Fixed: Spacing between border rows

* Update ShoppingCart.razor
2023-04-20 17:29:50 +02:00
901ec9f39a Merge YUM04-19-allergene into dev
#7
2023-03-07 12:03:43 +01:00
409f425656 Merged dev into YUM04-19-allergene 2023-03-07 12:01:59 +01:00
53038f403a Merge pull request #5 from yummy4friends/YUM04-33-footer
Footer merged into dev
2023-03-07 11:42:46 +01:00
9a138b44eb Merge branch 'dev' into YUM04-33-footer 2023-03-07 11:42:08 +01:00
797eec085c YUM04: Changed counter page to Allergene && Navbar link now points to new page 2023-03-07 11:38:43 +01:00
e6a5ad5270 Startpage Changes 2023-03-07 11:38:23 +01:00
5e30e0af12 Finish Startpage 2023-03-07 11:37:48 +01:00
742ee5c6c8 Startpage added 2023-03-07 11:36:46 +01:00
32f935af08 Update Index.razor 2023-03-07 11:32:54 +01:00
526105a802 new startpage 2023-03-07 11:31:46 +01:00
56255c2655 Startpage added 2023-03-07 11:31:46 +01:00
d28880e4f6 Update Index.razor 2023-03-07 11:31:46 +01:00
abaeafde33 Update Index.razor 2023-03-07 11:31:46 +01:00
07e0e6e0c0 Update Index.razor 2023-03-07 11:31:46 +01:00
fb705d074b Update Index.razor 2023-03-07 11:31:46 +01:00
a8d0225f92 NavBar Fix 2023-03-07 11:31:44 +01:00
4d73dae8bb Logo Added 2023-03-07 11:30:33 +01:00
5ea452c653 Navbar Added 2023-03-07 11:30:26 +01:00
2581c2842f Working Blazor app
* New Blazor Project created

* gitignore added

* Removed unneeded files
2023-03-07 11:28:45 +01:00
42281147cd YUM04: Fix merge conflicts in local branch 2023-03-07 11:07:27 +01:00
d0df8c3fd6 YUM04: Added TODO 2023-03-07 11:05:44 +01:00
b4f74320e0 YUM04: Added icons to allergene 2023-03-07 10:58:42 +01:00
b2fecb868e Merge pull request #4 from yummy4friends/YUM04-18-startseite
Yum04 18 startseite
2023-03-06 20:01:05 +01:00
c067221529 Index geleert 2023-03-06 20:00:39 +01:00
133e50f24a Added icons to allergene 2023-03-06 19:58:18 +01:00
11759b2745 Startseite Finish 2023-03-06 19:56:19 +01:00
7fe91cbdec Startpage Changes 2023-03-01 15:32:08 +01:00
524134a75f Footer style fertiggestellt 2023-03-01 15:17:27 +01:00
9f505ca6ab Footer hinzugefügt (unfertig) 2023-02-27 20:03:29 +01:00
450388e933 Finish Startpage 2023-02-27 19:31:01 +01:00
57042af156 new startpage 2023-02-27 17:29:31 +01:00
bf8776a4f9 new startpage 2023-02-27 17:24:25 +01:00
1969432980 Startpage added 2023-02-20 20:02:01 +01:00
b77e5c474e Update Index.razor 2023-02-20 20:02:01 +01:00
6aa1593f76 Update Index.razor 2023-02-20 20:00:59 +01:00
6a9927b8fc Update Index.razor 2023-02-20 19:59:53 +01:00
e61ff76dfb Update Index.razor 2023-02-20 19:59:53 +01:00
82fd0173e9 Startpage added 2023-02-20 19:16:41 +01:00
55c5b47978 YUM04: Hotfix
Fixed error that occurred while operating git
2023-02-20 18:15:56 +01:00
a8f606ec54 YUM04: Add third column
Third column will be used for pictures
2023-02-20 18:12:12 +01:00
b4627caddb Merge branch 'YUM04-18-startseite' of https://github.com/yummy4friends/y4f into YUM04-18-startseite 2023-02-20 17:32:59 +01:00
e6eab604e5 NavBar Fix 2023-02-20 17:32:07 +01:00
47c0d268b2 Update Index.razor 2023-02-20 17:24:25 +01:00
f6345777dd Update Index.razor 2023-02-20 17:24:25 +01:00
88acdefc7f Update Index.razor 2023-02-20 17:21:47 +01:00
e946c01e23 Merge branch 'YUM04-15-navbar' into dev 2023-02-20 17:04:42 +01:00
10eed12b67 Merge branch 'dev' into YUM04-15-navbar 2023-02-20 17:01:34 +01:00
a987dbeea5 Logo Added 2023-02-20 16:49:18 +01:00
23d3743be3 Update Index.razor 2023-02-20 16:48:12 +01:00
70eb2e53d7 Navbar Added 2023-02-14 16:41:59 +01:00
662b143307 YUM04: Add allergy information in a basic table 2023-02-14 15:42:41 +01:00
6a9404cb5f YUM04: Changed counter page to Allergene && Navbar link now points to new page 2023-01-31 16:55:02 +01:00
233f41a1fc Removed unneeded files 2023-01-17 16:29:16 +01:00
2093696253 gitignore added 2023-01-17 16:25:38 +01:00
b1fdecbc7e New Blazor Project created 2023-01-17 16:16:46 +01:00
108 changed files with 3839 additions and 299 deletions

2
.gitignore vendored
View File

@ -136,3 +136,5 @@ $RECYCLE.BIN/
.DS_Store .DS_Store
_NCrunch* _NCrunch*
/src/WebApi/appsettings.json
/src/WebApi/appsettings.json

143
LICENSE
View File

@ -1,5 +1,5 @@
GNU AFFERO GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 19 November 2007 Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
@ -7,15 +7,17 @@
Preamble Preamble
The GNU Affero General Public License is a free, copyleft license for The GNU General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure software and other kinds of works.
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast, to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free share and change all versions of a program--to make sure it remains free
software for all its users. software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
@ -24,34 +26,44 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things. free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights To protect your rights, we need to prevent others from denying you
with two steps: (1) assert copyright on the software, and (2) offer these rights or asking you to surrender the rights. Therefore, you have
you this License which gives you legal permission to copy, distribute certain responsibilities if you distribute copies of the software, or if
and/or modify the software. you modify it: responsibilities to respect the freedom of others.
A secondary benefit of defending all users' freedom is that For example, if you distribute copies of such a program, whether
improvements made in alternate versions of the program, if they gratis or for a fee, you must pass on to the recipients the same
receive widespread use, become available for other developers to freedoms that you received. You must make sure that they, too, receive
incorporate. Many developers of free software are heartened and or can get the source code. And you must show them these terms so they
encouraged by the resulting cooperation. However, in the case of know their rights.
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to Developers that use the GNU GPL protect your rights with two steps:
ensure that, in such cases, the modified source code becomes available (1) assert copyright on the software, and (2) offer you this License
to the community. It requires the operator of a network server to giving you legal permission to copy, distribute and/or modify it.
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and For the developers' and authors' protection, the GPL clearly explains
published by Affero, was designed to accomplish similar goals. This is that there is no warranty for this free software. For both users' and
a different license, not a version of the Affero GPL, but Affero has authors' sake, the GPL requires that modified versions be marked as
released a new version of the Affero GPL which permits relicensing under changed, so that their problems will not be attributed erroneously to
this license. authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
@ -60,7 +72,7 @@ modification follow.
0. Definitions. 0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License. "This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks. works, such as semiconductor masks.
@ -537,45 +549,35 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program. License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License. 13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work, License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version but the special requirements of the GNU Affero General Public License,
3 of the GNU General Public License. section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License. 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions the GNU General Public License from time to time. Such new versions will
will be similar in spirit to the present version, but may differ in detail to be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published GNU General Public License, you may choose any version ever published
by the Free Software Foundation. by the Free Software Foundation.
If the Program specifies that a proxy can decide which future If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you public statement of acceptance of a version permanently authorizes you
to choose that version for the Program. to choose that version for the Program.
@ -633,29 +635,40 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author> Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published it under the terms of the GNU General Public License as published by
by the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer If the program does terminal interaction, make it output a short
network, you should also make sure that it provides a way for users to notice like this when it starts in an interactive mode:
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive <program> Copyright (C) <year> <name of author>
of the code. There are many ways you could offer source, and different This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
solutions will be better for different programs; see section 13 for the This is free software, and you are welcome to redistribute it
specific requirements. under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>. <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,18 +0,0 @@
@page "/counter"
<PageTitle>Counter</PageTitle>
<h1>Counter</h1>
<p role="status">Current count: @currentCount</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
@code {
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
}

View File

@ -1,9 +0,0 @@
@page "/"
<PageTitle>Index</PageTitle>
<h1>Hello, world!</h1>
Welcome to your new app.
<SurveyPrompt Title="How is Blazor working for you?" />

View File

@ -1,17 +0,0 @@
@inherits LayoutComponentBase
<div class="page">
<div class="sidebar">
<NavMenu />
</div>
<main>
<div class="top-row px-4">
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
</div>
<article class="content px-4">
@Body
</article>
</main>
</div>

View File

@ -1,81 +0,0 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}
main {
flex: 1;
}
.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}
.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}
.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row:not(.auth) {
display: none;
}
.top-row.auth {
justify-content: space-between;
}
.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}
.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}

View File

@ -1,39 +0,0 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">y4f</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="oi oi-plus" aria-hidden="true"></span> Counter
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
</NavLink>
</div>
</nav>
</div>
@code {
private bool collapseNavMenu = true;
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}

View File

@ -1,68 +0,0 @@
.navbar-toggler {
background-color: rgba(255, 255, 255, 0.1);
}
.top-row {
height: 3.5rem;
background-color: rgba(0,0,0,0.4);
}
.navbar-brand {
font-size: 1.1rem;
}
.oi {
width: 2rem;
font-size: 1.1rem;
vertical-align: text-top;
top: -2px;
}
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
}
.nav-item:first-of-type {
padding-top: 1rem;
}
.nav-item:last-of-type {
padding-bottom: 1rem;
}
.nav-item ::deep a {
color: #d7d7d7;
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
}
.nav-item ::deep a.active {
background-color: rgba(255,255,255,0.25);
color: white;
}
.nav-item ::deep a:hover {
background-color: rgba(255,255,255,0.1);
color: white;
}
@media (min-width: 641px) {
.navbar-toggler {
display: none;
}
.collapse {
/* Never collapse the sidebar for wide screens */
display: block;
}
.nav-scrollable {
/* Allow sidebar to scroll for tall menus */
height: calc(100vh - 3.5rem);
overflow-y: auto;
}
}

View File

@ -0,0 +1,140 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi.Models;
using WebApi.Data;
namespace WebApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class AllergienController : ControllerBase
{
private readonly WebApiContext _context;
public AllergienController(WebApiContext context)
{
_context = context;
}
// GET: api/Allergien
[HttpGet]
public async Task<ActionResult<IEnumerable<Allergie>>> GetAllergies()
{
if (_context.Allergies == null)
{
return NotFound();
}
return await _context.Allergies.ToListAsync();
}
// GET: api/Allergien/5
[HttpGet("{id}")]
public async Task<ActionResult<Allergie>> GetAllergie(int id)
{
if (_context.Allergies == null)
{
return NotFound();
}
var allergie = await _context.Allergies.FindAsync(id);
if (allergie == null)
{
return NotFound();
}
return allergie;
}
// PUT: api/Allergien/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutAllergie(int id, Allergie allergie)
{
if (id != allergie.Idallergie)
{
return BadRequest();
}
_context.Entry(allergie).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!AllergieExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}
// POST: api/Allergien
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPost]
public async Task<ActionResult<Allergie>> PostAllergie(Allergie allergie)
{
if (_context.Allergies == null)
{
return Problem("Entity set 'WebApiContext.Allergies' is null.");
}
_context.Allergies.Add(allergie);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (AllergieExists(allergie.Idallergie))
{
return Conflict();
}
else
{
throw;
}
}
return CreatedAtAction("GetAllergie", new { id = allergie.Idallergie }, allergie);
}
// DELETE: api/Allergien/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteAllergie(int id)
{
if (_context.Allergies == null)
{
return NotFound();
}
var allergie = await _context.Allergies.FindAsync(id);
if (allergie == null)
{
return NotFound();
}
_context.Allergies.Remove(allergie);
await _context.SaveChangesAsync();
return NoContent();
}
private bool AllergieExists(int id)
{
return (_context.Allergies?.Any(e => e.Idallergie == id)).GetValueOrDefault();
}
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi.Data;
using WebApi.Models;
namespace WebApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class BestellungspositionenController : ControllerBase
{
private readonly WebApiContext _context;
public BestellungspositionenController(WebApiContext context)
{
_context = context;
}
// GET: api/Bestellungspositionen
[HttpGet]
public async Task<ActionResult<IEnumerable<Bestellungsposition>>> GetBestellungspositions()
{
if (_context.Bestellungspositions == null)
{
return NotFound();
}
return await _context.Bestellungspositions.ToListAsync();
}
// GET: api/Bestellungspositionen/5
[HttpGet("{id}")]
public async Task<ActionResult<Bestellungsposition>> GetBestellungsposition(int id)
{
if (_context.Bestellungspositions == null)
{
return NotFound();
}
var bestellungsposition = await _context.Bestellungspositions.FindAsync(id);
if (bestellungsposition == null)
{
return NotFound();
}
return bestellungsposition;
}
// PUT: api/Bestellungspositionen/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutBestellungsposition(int id, Bestellungsposition bestellungsposition)
{
if (id != bestellungsposition.Idbestellung)
{
return BadRequest();
}
_context.Entry(bestellungsposition).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!BestellungspositionExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}
// POST: api/Bestellungspositionen
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPost]
public async Task<ActionResult<Bestellungsposition>> PostBestellungsposition(Bestellungsposition bestellungsposition)
{
if (_context.Bestellungspositions == null)
{
return Problem("Entity set 'WebApiContext.Bestellungspositions' is null.");
}
_context.Bestellungspositions.Add(bestellungsposition);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (BestellungspositionExists(bestellungsposition.Idbestellung))
{
return Conflict();
}
else
{
throw;
}
}
return CreatedAtAction("GetBestellungsposition", new { id = bestellungsposition.Idbestellung }, bestellungsposition);
}
// DELETE: api/Bestellungspositionen/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteBestellungsposition(int id)
{
if (_context.Bestellungspositions == null)
{
return NotFound();
}
var bestellungsposition = await _context.Bestellungspositions.FindAsync(id);
if (bestellungsposition == null)
{
return NotFound();
}
_context.Bestellungspositions.Remove(bestellungsposition);
await _context.SaveChangesAsync();
return NoContent();
}
private bool BestellungspositionExists(int id)
{
return (_context.Bestellungspositions?.Any(e => e.Idbestellung == id)).GetValueOrDefault();
}
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi.Data;
using WebApi.Models;
namespace WebApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class KundenController : ControllerBase
{
private readonly WebApiContext _context;
public KundenController(WebApiContext context)
{
_context = context;
}
// GET: api/Kunden
[HttpGet]
public async Task<ActionResult<IEnumerable<Kunde>>> GetKundes()
{
if (_context.Kundes == null)
{
return NotFound();
}
return await _context.Kundes.ToListAsync();
}
// GET: api/Kunden/5
[HttpGet("{id}")]
public async Task<ActionResult<Kunde>> GetKunde(int id)
{
if (_context.Kundes == null)
{
return NotFound();
}
var kunde = await _context.Kundes.FindAsync(id);
if (kunde == null)
{
return NotFound();
}
return kunde;
}
// PUT: api/Kunden/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutKunde(int id, Kunde kunde)
{
if (id != kunde.Idkunde)
{
return BadRequest();
}
_context.Entry(kunde).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!KundeExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}
// POST: api/Kunden
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPost]
public async Task<ActionResult<Kunde>> PostKunde(Kunde kunde)
{
if (_context.Kundes == null)
{
return Problem("Entity set 'WebApiContext.Kundes' is null.");
}
_context.Kundes.Add(kunde);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (KundeExists(kunde.Idkunde))
{
return Conflict();
}
else
{
throw;
}
}
return CreatedAtAction("GetKunde", new { id = kunde.Idkunde }, kunde);
}
// DELETE: api/Kunden/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteKunde(int id)
{
if (_context.Kundes == null)
{
return NotFound();
}
var kunde = await _context.Kundes.FindAsync(id);
if (kunde == null)
{
return NotFound();
}
_context.Kundes.Remove(kunde);
await _context.SaveChangesAsync();
return NoContent();
}
private bool KundeExists(int id)
{
return (_context.Kundes?.Any(e => e.Idkunde == id)).GetValueOrDefault();
}
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi.Data;
using WebApi.Models;
namespace WebApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class MenuitemHasAllergiesController : ControllerBase
{
private readonly WebApiContext _context;
public MenuitemHasAllergiesController(WebApiContext context)
{
_context = context;
}
// GET: api/MenuitemHasAllergies
[HttpGet]
public async Task<ActionResult<IEnumerable<MenuitemHasAllergie>>> GetMenuitemHasAllergie()
{
if (_context.MenuitemHasAllergie == null)
{
return NotFound();
}
return await _context.MenuitemHasAllergie.ToListAsync();
}
// GET: api/MenuitemHasAllergies/5
[HttpGet("{id}")]
public async Task<ActionResult<MenuitemHasAllergie>> GetMenuitemHasAllergie(int? id)
{
if (_context.MenuitemHasAllergie == null)
{
return NotFound();
}
var menuitemHasAllergie = await _context.MenuitemHasAllergie.FindAsync(id);
if (menuitemHasAllergie == null)
{
return NotFound();
}
return menuitemHasAllergie;
}
// PUT: api/MenuitemHasAllergies/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutMenuitemHasAllergie(int? id, MenuitemHasAllergie menuitemHasAllergie)
{
if (id != menuitemHasAllergie.MenuItem_IDMenuItem)
{
return BadRequest();
}
_context.Entry(menuitemHasAllergie).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!MenuitemHasAllergieExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}
// POST: api/MenuitemHasAllergies
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPost]
public async Task<ActionResult<MenuitemHasAllergie>> PostMenuitemHasAllergie(MenuitemHasAllergie menuitemHasAllergie)
{
if (_context.MenuitemHasAllergie == null)
{
return Problem("Entity set 'WebApiContext.MenuitemHasAllergie' is null.");
}
_context.MenuitemHasAllergie.Add(menuitemHasAllergie);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (MenuitemHasAllergieExists(menuitemHasAllergie.MenuItem_IDMenuItem))
{
return Conflict();
}
else
{
throw;
}
}
return CreatedAtAction("GetMenuitemHasAllergie", new { id = menuitemHasAllergie.MenuItem_IDMenuItem }, menuitemHasAllergie);
}
// DELETE: api/MenuitemHasAllergies/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteMenuitemHasAllergie(int? id)
{
if (_context.MenuitemHasAllergie == null)
{
return NotFound();
}
var menuitemHasAllergie = await _context.MenuitemHasAllergie.FindAsync(id);
if (menuitemHasAllergie == null)
{
return NotFound();
}
_context.MenuitemHasAllergie.Remove(menuitemHasAllergie);
await _context.SaveChangesAsync();
return NoContent();
}
private bool MenuitemHasAllergieExists(int? id)
{
return (_context.MenuitemHasAllergie?.Any(e => e.MenuItem_IDMenuItem == id)).GetValueOrDefault();
}
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi.Data;
using WebApi.Models;
namespace WebApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class MenuitemkategoriesController : ControllerBase
{
private readonly WebApiContext _context;
public MenuitemkategoriesController(WebApiContext context)
{
_context = context;
}
// GET: api/Menuitemkategories
[HttpGet]
public async Task<ActionResult<IEnumerable<Menuitemkategorie>>> GetMenuitemkategories()
{
if (_context.Menuitemkategories == null)
{
return NotFound();
}
return await _context.Menuitemkategories.ToListAsync();
}
// GET: api/Menuitemkategories/5
[HttpGet("{id}")]
public async Task<ActionResult<Menuitemkategorie>> GetMenuitemkategorie(int id)
{
if (_context.Menuitemkategories == null)
{
return NotFound();
}
var menuitemkategorie = await _context.Menuitemkategories.FindAsync(id);
if (menuitemkategorie == null)
{
return NotFound();
}
return menuitemkategorie;
}
// PUT: api/Menuitemkategories/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutMenuitemkategorie(int id, Menuitemkategorie menuitemkategorie)
{
if (id != menuitemkategorie.IdmenuItemKategorie)
{
return BadRequest();
}
_context.Entry(menuitemkategorie).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!MenuitemkategorieExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}
// POST: api/Menuitemkategories
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPost]
public async Task<ActionResult<Menuitemkategorie>> PostMenuitemkategorie(Menuitemkategorie menuitemkategorie)
{
if (_context.Menuitemkategories == null)
{
return Problem("Entity set 'WebApiContext.Menuitemkategories' is null.");
}
_context.Menuitemkategories.Add(menuitemkategorie);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (MenuitemkategorieExists(menuitemkategorie.IdmenuItemKategorie))
{
return Conflict();
}
else
{
throw;
}
}
return CreatedAtAction("GetMenuitemkategorie", new { id = menuitemkategorie.IdmenuItemKategorie }, menuitemkategorie);
}
// DELETE: api/Menuitemkategories/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteMenuitemkategorie(int id)
{
if (_context.Menuitemkategories == null)
{
return NotFound();
}
var menuitemkategorie = await _context.Menuitemkategories.FindAsync(id);
if (menuitemkategorie == null)
{
return NotFound();
}
_context.Menuitemkategories.Remove(menuitemkategorie);
await _context.SaveChangesAsync();
return NoContent();
}
private bool MenuitemkategorieExists(int id)
{
return (_context.Menuitemkategories?.Any(e => e.IdmenuItemKategorie == id)).GetValueOrDefault();
}
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi.Data;
using WebApi.Models;
namespace WebApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class MenuitemsController : ControllerBase
{
private readonly WebApiContext _context;
public MenuitemsController(WebApiContext context)
{
_context = context;
}
// GET: api/Menuitems
[HttpGet]
public async Task<ActionResult<IEnumerable<Menuitem>>> GetMenuitems()
{
if (_context.Menuitems == null)
{
return NotFound();
}
return await _context.Menuitems.ToListAsync();
}
// GET: api/Menuitems/5
[HttpGet("{id}")]
public async Task<ActionResult<Menuitem>> GetMenuitem(int id)
{
if (_context.Menuitems == null)
{
return NotFound();
}
var menuitem = await _context.Menuitems.FindAsync(id);
if (menuitem == null)
{
return NotFound();
}
return menuitem;
}
// PUT: api/Menuitems/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutMenuitem(int id, Menuitem menuitem)
{
if (id != menuitem.IdmenuItem)
{
return BadRequest();
}
_context.Entry(menuitem).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!MenuitemExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}
// POST: api/Menuitems
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPost]
public async Task<ActionResult<Menuitem>> PostMenuitem(Menuitem menuitem)
{
if (_context.Menuitems == null)
{
return Problem("Entity set 'WebApiContext.Menuitems' is null.");
}
_context.Menuitems.Add(menuitem);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (MenuitemExists(menuitem.IdmenuItem))
{
return Conflict();
}
else
{
throw;
}
}
return CreatedAtAction("GetMenuitem", new { id = menuitem.IdmenuItem }, menuitem);
}
// DELETE: api/Menuitems/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteMenuitem(int id)
{
if (_context.Menuitems == null)
{
return NotFound();
}
var menuitem = await _context.Menuitems.FindAsync(id);
if (menuitem == null)
{
return NotFound();
}
_context.Menuitems.Remove(menuitem);
await _context.SaveChangesAsync();
return NoContent();
}
private bool MenuitemExists(int id)
{
return (_context.Menuitems?.Any(e => e.IdmenuItem == id)).GetValueOrDefault();
}
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi.Data;
using WebApi.Models;
namespace WebApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class MenuitemueberkategoriesController : ControllerBase
{
private readonly WebApiContext _context;
public MenuitemueberkategoriesController(WebApiContext context)
{
_context = context;
}
// GET: api/Menuitemueberkategories
[HttpGet]
public async Task<ActionResult<IEnumerable<Menuitemueberkategorie>>> GetMenuitemueberkategories()
{
if (_context.Menuitemueberkategories == null)
{
return NotFound();
}
return await _context.Menuitemueberkategories.ToListAsync();
}
// GET: api/Menuitemueberkategories/5
[HttpGet("{id}")]
public async Task<ActionResult<Menuitemueberkategorie>> GetMenuitemueberkategorie(int id)
{
if (_context.Menuitemueberkategories == null)
{
return NotFound();
}
var menuitemueberkategorie = await _context.Menuitemueberkategories.FindAsync(id);
if (menuitemueberkategorie == null)
{
return NotFound();
}
return menuitemueberkategorie;
}
// PUT: api/Menuitemueberkategories/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutMenuitemueberkategorie(int id, Menuitemueberkategorie menuitemueberkategorie)
{
if (id != menuitemueberkategorie.IdmenuItemUeberkategorie)
{
return BadRequest();
}
_context.Entry(menuitemueberkategorie).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!MenuitemueberkategorieExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}
// POST: api/Menuitemueberkategories
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPost]
public async Task<ActionResult<Menuitemueberkategorie>> PostMenuitemueberkategorie(Menuitemueberkategorie menuitemueberkategorie)
{
if (_context.Menuitemueberkategories == null)
{
return Problem("Entity set 'WebApiContext.Menuitemueberkategories' is null.");
}
_context.Menuitemueberkategories.Add(menuitemueberkategorie);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (MenuitemueberkategorieExists(menuitemueberkategorie.IdmenuItemUeberkategorie))
{
return Conflict();
}
else
{
throw;
}
}
return CreatedAtAction("GetMenuitemueberkategorie", new { id = menuitemueberkategorie.IdmenuItemUeberkategorie }, menuitemueberkategorie);
}
// DELETE: api/Menuitemueberkategories/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteMenuitemueberkategorie(int id)
{
if (_context.Menuitemueberkategories == null)
{
return NotFound();
}
var menuitemueberkategorie = await _context.Menuitemueberkategories.FindAsync(id);
if (menuitemueberkategorie == null)
{
return NotFound();
}
_context.Menuitemueberkategories.Remove(menuitemueberkategorie);
await _context.SaveChangesAsync();
return NoContent();
}
private bool MenuitemueberkategorieExists(int id)
{
return (_context.Menuitemueberkategories?.Any(e => e.IdmenuItemUeberkategorie == id)).GetValueOrDefault();
}
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi.Data;
using WebApi.Models;
namespace WebApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class RabatteController : ControllerBase
{
private readonly WebApiContext _context;
public RabatteController(WebApiContext context)
{
_context = context;
}
// GET: api/Rabatte
[HttpGet]
public async Task<ActionResult<IEnumerable<Rabatt>>> GetRabatts()
{
if (_context.Rabatts == null)
{
return NotFound();
}
return await _context.Rabatts.ToListAsync();
}
// GET: api/Rabatte/5
[HttpGet("{id}")]
public async Task<ActionResult<Rabatt>> GetRabatt(int id)
{
if (_context.Rabatts == null)
{
return NotFound();
}
var rabatt = await _context.Rabatts.FindAsync(id);
if (rabatt == null)
{
return NotFound();
}
return rabatt;
}
// PUT: api/Rabatte/5
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPut("{id}")]
public async Task<IActionResult> PutRabatt(int id, Rabatt rabatt)
{
if (id != rabatt.Idrabatt)
{
return BadRequest();
}
_context.Entry(rabatt).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!RabattExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return NoContent();
}
// POST: api/Rabatte
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
[HttpPost]
public async Task<ActionResult<Rabatt>> PostRabatt(Rabatt rabatt)
{
if (_context.Rabatts == null)
{
return Problem("Entity set 'WebApiContext.Rabatts' is null.");
}
_context.Rabatts.Add(rabatt);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (RabattExists(rabatt.Idrabatt))
{
return Conflict();
}
else
{
throw;
}
}
return CreatedAtAction("GetRabatt", new { id = rabatt.Idrabatt }, rabatt);
}
// DELETE: api/Rabatte/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteRabatt(int id)
{
if (_context.Rabatts == null)
{
return NotFound();
}
var rabatt = await _context.Rabatts.FindAsync(id);
if (rabatt == null)
{
return NotFound();
}
_context.Rabatts.Remove(rabatt);
await _context.SaveChangesAsync();
return NoContent();
}
private bool RabattExists(int id)
{
return (_context.Rabatts?.Any(e => e.Idrabatt == id)).GetValueOrDefault();
}
}
}

View File

@ -0,0 +1,266 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using WebApi.Models;
namespace WebApi.Data;
public partial class WebApiContext : DbContext
{
public WebApiContext(DbContextOptions<WebApiContext> options)
: base(options)
{
}
public virtual DbSet<Allergie> Allergies { get; set; }
public virtual DbSet<Bestellungsposition> Bestellungspositions { get; set; }
public virtual DbSet<Kunde> Kundes { get; set; }
public virtual DbSet<Menuitem> Menuitems { get; set; }
public virtual DbSet<Menuitemkategorie> Menuitemkategories { get; set; }
public virtual DbSet<Menuitemueberkategorie> Menuitemueberkategories { get; set; }
public virtual DbSet<Rabatt> Rabatts { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder
.UseCollation("utf8_general_ci")
.HasCharSet("utf8");
modelBuilder.Entity<Allergie>(entity =>
{
entity.HasKey(e => e.Idallergie).HasName("PRIMARY");
entity.ToTable("allergie");
entity.Property(e => e.Idallergie)
.ValueGeneratedNever()
.HasColumnType("int(11)")
.HasColumnName("IDAllergie");
entity.Property(e => e.Beschreibung).HasMaxLength(45);
});
modelBuilder.Entity<Bestellungsposition>(entity =>
{
entity.HasKey(e => e.Idbestellung).HasName("PRIMARY");
entity.ToTable("bestellungsposition");
entity.HasIndex(e => e.KundeIdkunde, "fk_Bestellung_Kunde");
entity.HasIndex(e => e.RabattIdrabatt, "fk_Bestellungsposition_Rabatt1");
entity.Property(e => e.Idbestellung)
.ValueGeneratedNever()
.HasColumnType("int(11)")
.HasColumnName("IDBestellung");
entity.Property(e => e.Datum).HasColumnType("datetime");
entity.Property(e => e.KundeIdkunde)
.HasColumnType("int(11)")
.HasColumnName("Kunde_IDKunde");
entity.Property(e => e.Menge).HasColumnType("int(11)");
entity.Property(e => e.RabattIdrabatt)
.HasColumnType("int(11)")
.HasColumnName("Rabatt_IDRabatt");
entity.HasOne(d => d.KundeIdkundeNavigation).WithMany(p => p.Bestellungspositions)
.HasForeignKey(d => d.KundeIdkunde)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_Bestellung_Kunde");
entity.HasOne(d => d.RabattIdrabattNavigation).WithMany(p => p.Bestellungspositions)
.HasForeignKey(d => d.RabattIdrabatt)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_Bestellungsposition_Rabatt1");
entity.HasMany(d => d.MenuItemIdmenuItems).WithMany(p => p.BestellungspositionIdbestellungs)
.UsingEntity<Dictionary<string, object>>(
"BestellungspositionHasMenuitem",
r => r.HasOne<Menuitem>().WithMany()
.HasForeignKey("MenuItemIdmenuItem")
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_Bestellungsposition_has_MenuItem_MenuItem1"),
l => l.HasOne<Bestellungsposition>().WithMany()
.HasForeignKey("BestellungspositionIdbestellung")
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_Bestellungsposition_has_MenuItem_Bestellungsposition1"),
j =>
{
j.HasKey("BestellungspositionIdbestellung", "MenuItemIdmenuItem")
.HasName("PRIMARY")
.HasAnnotation("MySql:IndexPrefixLength", new[] { 0, 0 });
j.ToTable("bestellungsposition_has_menuitem");
j.HasIndex(new[] { "MenuItemIdmenuItem" }, "fk_Bestellungsposition_has_MenuItem_MenuItem1");
j.IndexerProperty<int>("BestellungspositionIdbestellung")
.HasColumnType("int(11)")
.HasColumnName("Bestellungsposition_IDBestellung");
j.IndexerProperty<int>("MenuItemIdmenuItem")
.HasColumnType("int(11)")
.HasColumnName("MenuItem_IDMenuItem");
});
});
modelBuilder.Entity<Kunde>(entity =>
{
entity.HasKey(e => e.Idkunde).HasName("PRIMARY");
entity.ToTable("kunde");
entity.Property(e => e.Idkunde)
.ValueGeneratedNever()
.HasColumnType("int(11)")
.HasColumnName("IDKunde");
entity.Property(e => e.Code)
.HasMaxLength(45)
.HasColumnName("code");
entity.Property(e => e.Treuepunkte).HasColumnType("int(11)");
});
modelBuilder.Entity<Menuitem>(entity =>
{
entity.HasKey(e => e.IdmenuItem).HasName("PRIMARY");
entity.ToTable("menuitem");
entity.HasIndex(e => e.MenuItemKategorieIdmenuItemKategorie, "fk_MenuItem_MenuItemKategorie1");
entity.Property(e => e.IdmenuItem)
.ValueGeneratedNever()
.HasColumnType("int(11)")
.HasColumnName("IDMenuItem");
entity.Property(e => e.Bezeichnung).HasMaxLength(45);
entity.Property(e => e.MenuItemKategorieIdmenuItemKategorie)
.HasColumnType("int(11)")
.HasColumnName("MenuItemKategorie_IDMenuItemKategorie");
entity.Property(e => e.Preis).HasPrecision(8, 2);
entity.Property(e => e.Zusatzinformation).HasMaxLength(45);
entity.HasOne(d => d.MenuItemKategorieIdmenuItemKategorieNavigation).WithMany(p => p.Menuitems)
.HasForeignKey(d => d.MenuItemKategorieIdmenuItemKategorie)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_MenuItem_MenuItemKategorie1");
//entity.HasMany(d => d.AllergieIdallergies).WithMany(p => p.MenuItemIdmenuItems)
// .UsingEntity<Dictionary<string, object>>(
// "MenuitemHasAllergie",
// r => r.HasOne<Allergie>().WithMany()
// .HasForeignKey("AllergieIdallergie")
// .OnDelete(DeleteBehavior.ClientSetNull)
// .HasConstraintName("fk_MenuItem_has_Allergie_Allergie1"),
// l => l.HasOne<Menuitem>().WithMany()
// .HasForeignKey("MenuItemIdmenuItem")
// .OnDelete(DeleteBehavior.ClientSetNull)
// .HasConstraintName("fk_MenuItem_has_Allergie_MenuItem1"),
// j =>
// {
// j.HasKey("MenuItemIdmenuItem", "AllergieIdallergie")
// .HasName("PRIMARY")
// .HasAnnotation("MySql:IndexPrefixLength", new[] { 0, 0 });
// j.ToTable("menuitem_has_allergie");
// j.HasIndex(new[] { "AllergieIdallergie" }, "fk_MenuItem_has_Allergie_Allergie1");
// j.IndexerProperty<int>("MenuItemIdmenuItem")
// .HasColumnType("int(11)")
// .HasColumnName("MenuItem_IDMenuItem");
// j.IndexerProperty<int>("AllergieIdallergie")
// .HasColumnType("int(11)")
// .HasColumnName("Allergie_IDAllergie");
// });
});
modelBuilder.Entity<Menuitemkategorie>(entity =>
{
entity.HasKey(e => e.IdmenuItemKategorie).HasName("PRIMARY");
entity.ToTable("menuitemkategorie");
entity.HasIndex(e => e.MenuItemUeberkategorieIdmenuItemUeberkategorie, "fk_MenuItemKategorie_MenuItemUeberkategorie1");
entity.Property(e => e.IdmenuItemKategorie)
.ValueGeneratedNever()
.HasColumnType("int(11)")
.HasColumnName("IDMenuItemKategorie");
entity.Property(e => e.Bezeichnung).HasMaxLength(45);
entity.Property(e => e.MenuItemUeberkategorieIdmenuItemUeberkategorie)
.HasColumnType("int(11)")
.HasColumnName("MenuItemUeberkategorie_IDMenuItemUeberkategorie");
entity.HasOne(d => d.MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation).WithMany(p => p.Menuitemkategories)
.HasForeignKey(d => d.MenuItemUeberkategorieIdmenuItemUeberkategorie)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_MenuItemKategorie_MenuItemUeberkategorie1");
});
modelBuilder.Entity<Menuitemueberkategorie>(entity =>
{
entity.HasKey(e => e.IdmenuItemUeberkategorie).HasName("PRIMARY");
entity.ToTable("menuitemueberkategorie");
entity.Property(e => e.IdmenuItemUeberkategorie)
.ValueGeneratedNever()
.HasColumnType("int(11)")
.HasColumnName("IDMenuItemUeberkategorie");
entity.Property(e => e.Bezeichnung).HasMaxLength(45);
});
modelBuilder.Entity<Rabatt>(entity =>
{
entity.HasKey(e => e.Idrabatt).HasName("PRIMARY");
entity.ToTable("rabatt");
entity.Property(e => e.Idrabatt)
.ValueGeneratedNever()
.HasColumnType("int(11)")
.HasColumnName("IDRabatt");
entity.Property(e => e.GueltigkeitBis).HasColumnType("datetime");
entity.Property(e => e.GueltigkeitVon).HasColumnType("datetime");
entity.Property(e => e.Prozent).HasPrecision(8, 2);
});
//modelBuilder.Entity<Admin>(entity =>
//{
// entity.HasKey(e => e.Id).HasName("PRIMARY");
// entity.ToTable("admin");
// entity.Property(e => e.Id)
// .ValueGeneratedNever()
// .HasColumnType("int(11)")
// .HasColumnName("Id");
// entity.Property(e => e.Username).HasMaxLength(100);
// entity.Property(e => e.Password).HasMaxLength(100);
//});
//modelBuilder.Entity<BestellungspositionHasMenuitem>(entity =>
//{
// entity.HasKey(e => new { e.BestellungspositionId, e.MenuitemId })
// .HasName("PRIMARY");
// entity.ToTable("bestellungsposition_has_menuitem");
// entity.Property(e => e.BestellungspositionId).HasColumnType("int(11)");
// entity.Property(e => e.MenuitemId).HasColumnType("int(11)");
//});
modelBuilder.Entity<MenuitemHasAllergie>(entity =>
{
entity.HasKey(e => new { e.MenuItem_IDMenuItem, e.Allergie_IDAllergie })
.HasName("PRIMARY");
entity.ToTable("menuitem_has_allergie");
entity.Property(e => e.MenuItem_IDMenuItem).HasColumnType("int(11)");
entity.Property(e => e.Allergie_IDAllergie).HasColumnType("int(11)");
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
public DbSet<WebApi.Models.MenuitemHasAllergie> MenuitemHasAllergie { get; set; } = default!;
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace WebApi.Models;
public partial class Allergie
{
public int Idallergie { get; set; }
public string? Beschreibung { get; set; }
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
namespace WebApi.Models;
public partial class Bestellungsposition
{
public int Idbestellung { get; set; }
public int? Menge { get; set; }
public DateTime? Datum { get; set; }
public int KundeIdkunde { get; set; }
public int RabattIdrabatt { get; set; }
public virtual Kunde KundeIdkundeNavigation { get; set; } = null!;
public virtual Rabatt RabattIdrabattNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace WebApi.Models;
public partial class Kunde
{
public int Idkunde { get; set; }
public string? Code { get; set; }
public int? Treuepunkte { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
namespace WebApi.Models;
public partial class Menuitem
{
public int IdmenuItem { get; set; }
public string? Bezeichnung { get; set; }
public string? Zusatzinformation { get; set; }
public decimal? Preis { get; set; }
public int MenuItemKategorieIdmenuItemKategorie { get; set; }
public virtual Menuitemkategorie MenuItemKategorieIdmenuItemKategorieNavigation { get; set; } = null!;
public virtual ICollection<Allergie> AllergieIdallergies { get; set; } = new List<Allergie>();
public virtual ICollection<Bestellungsposition> BestellungspositionIdbestellungs { get; set; } = new List<Bestellungsposition>();
}

View File

@ -0,0 +1,11 @@
namespace WebApi.Models
{
public class MenuitemHasAllergie
{
// navigation references Menuitem
public int? MenuItem_IDMenuItem { get; set; }
// navigation references Allergie
public int? Allergie_IDAllergie { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace WebApi.Models;
public partial class Menuitemkategorie
{
public int IdmenuItemKategorie { get; set; }
public string? Bezeichnung { get; set; }
public int MenuItemUeberkategorieIdmenuItemUeberkategorie { get; set; }
public virtual Menuitemueberkategorie MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> Menuitems { get; set; } = new List<Menuitem>();
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace WebApi.Models;
public partial class Menuitemueberkategorie
{
public int IdmenuItemUeberkategorie { get; set; }
public string? Bezeichnung { get; set; }
public virtual ICollection<Menuitemkategorie> Menuitemkategories { get; set; } = new List<Menuitemkategorie>();
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace WebApi.Models;
public partial class Rabatt
{
public int Idrabatt { get; set; }
public decimal? Prozent { get; set; }
public DateTime? GueltigkeitVon { get; set; }
public DateTime? GueltigkeitBis { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}

44
src/WebApi/Program.cs Normal file
View File

@ -0,0 +1,44 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Net.Http.Headers;
using WebApi.Data;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddDbContext<WebApiContext>(options =>
{
options.UseMySql(builder.Configuration.GetConnectionString("Y4FDB"),
Microsoft.EntityFrameworkCore.ServerVersion.Parse("8.0.23-mysql"));
});
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
//ip:port from y4f
app.UseCors(policy =>
policy.WithOrigins("http://localhost:5248", "https://localhost:7138")
.AllowAnyMethod()
.WithHeaders(HeaderNames.ContentType)
);
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();

View File

@ -0,0 +1,41 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:38447",
"sslPort": 44303
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5226",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7076;http://localhost:5226",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

0
src/WebApi/README.md Normal file
View File

24
src/WebApi/WebApi.csproj Normal file
View File

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.7" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -0,0 +1,90 @@
@page "/allergene"
<PageTitle>Allergene</PageTitle>
<table class="tg">
<thead>
<tr>
<th class="tg-c3ow" colspan="3">Allergeninformation<br>gemäß Codex-Empfehlung </th>
</tr>
</thead>
<tbody>
<tr>
<td class="tg-0pky">Visuelles</td>
<td class="tg-0pky">Kurzbezeichnung</td>
<td class="tg-0pky">Buchstabencode</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/getreide.png" alt="Getreide"></td>
<td class="tg-0pky">glutenhaltiges Getreide</td>
<td class="tg-c3ow">A</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/krebstiere.png" alt="Krebstiere"></td>
<td class="tg-0pky">Krebstiere</td>
<td class="tg-c3ow">B</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/ei.png" alt="Ei"></td>
<td class="tg-0pky">Ei</td>
<td class="tg-c3ow">C</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/fisch.png" alt="Fisch"></td>
<td class="tg-0pky">Fisch</td>
<td class="tg-c3ow">D</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/erdnuss.png" alt="Erdnuss"></td>
<td class="tg-0pky">Erdnuss</td>
<td class="tg-c3ow">E</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/soja.png" alt="Soja"></td>
<td class="tg-0pky">Soja</td>
<td class="tg-c3ow">F</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/milch.png" alt="Milch oder Laktose"></td>
<td class="tg-0pky">Milch oder Laktose</td>
<td class="tg-c3ow">G</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/schalenfruechte.png" alt="Schalenfrüchte"></td>
<td class="tg-0pky">Schalenfrüchte</td>
<td class="tg-c3ow">H</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/sellerie.png" alt="Sellerie"></td>
<td class="tg-0pky">Sellerie</td>
<td class="tg-c3ow">L</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/senf.png" alt="Senf"></td>
<td class="tg-0pky">Senf</td>
<td class="tg-c3ow">M</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/sesam.png" alt="Sesam"></td>
<td class="tg-0pky">Sesam</td>
<td class="tg-c3ow">N</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/sulfite.png" alt="Sulfite"></td>
<td class="tg-0pky">Sulfite</td>
<td class="tg-c3ow">O</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/lupinen.png" alt="Lupinen"></td>
<td class="tg-0pky">Lupinen</td>
<td class="tg-c3ow">P</td>
</tr>
<tr>
<td class="tg-0pky"><img class="icon" src="assets/weichtiere.png" alt="Weichtiere"></td>
<td class="tg-0pky">Weichtiere</td>
<td class="tg-c3ow">R</td>
</tr>
</tbody>
</table>
<br><br><br><br>

View File

@ -0,0 +1,49 @@

.tg {
border-collapse: collapse;
border-spacing: 0;
margin-left: auto;
margin-right: auto;
}
.tg td {
border-color: black;
border-style: solid;
border-width: 1px;
font-family: Arial, sans-serif;
font-size: 18px;
overflow: hidden;
padding: 10px 5px;
word-break: normal;
}
.tg th {
border-color: black;
border-style: solid;
border-width: 1px;
font-family: Arial, sans-serif;
font-size: 18px;
font-weight: normal;
overflow: hidden;
padding: 10px 5px;
word-break: normal;
}
.tg .tg-c3ow {
border-color: inherit;
text-align: center;
vertical-align: center;
}
.tg .tg-0pky {
border-color: inherit;
text-align: center;
vertical-align: center;
}
.icon {
width: 100%;
max-width: 100px;
height: auto;
}

20
src/y4f/Pages/Index.razor Normal file
View File

@ -0,0 +1,20 @@
 @page "/"
@layout Startseite
<PageTitle>Yummy4Friends</PageTitle>
<body style='--blazor-load-percentage: 100%; --blazor-load-percentage-text: "100%"; background-color:#C7FFD5;'>
<div class="container col-lg-6 col-md-9 col-sm-12 d-flex flex-column " id="content">
<center><h1>Herzlich Willkommen!</h1></center>
<img src="assets/Logo_new.png" class="img" title="logo image">
<form action="Speisekarte">
<input type="submit" value="Zur Speisekarte" class="btn" />
</form>
</div>
</body>

View File

@ -0,0 +1,129 @@
@page "/shopping_cart"
<PageTitle>Warenkorb</PageTitle>
<h1>Warenkorb</h1>
<div class="container">
<div class="row">
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-12 col-lg-6">
@*Tabelle Ihre Bestellung*@
<div class="tbl-container">
<table class="table bdr">
<thead class="bg_green">
<tr>
<td>Ihre Bestellung</td>
<th></th>
</tr>
</thead>
<tbody class="bg_lightgreen">
<tr>
<td class="br" style="padding-top:20px; padding-bottom:0px; border-bottom-width: 0px;">
1 Nudel mit Hühnerfleisch (groß)
<div style="font-size:0.7rem;padding-left:15px;">mit Knoblauchsoße</div>
</td>
<td class="d-flex justify-content-center align-items-center" style="padding-top:20px; padding-bottom:0px;">9,10€</td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;">1 Coca Cola</td>
<td class="d-flex justify-content-center align-items-center" style="padding-top:0px;">2,50€</td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;"></td>
<td class="d-flex justify-content-center align-items-center"></td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;"></td>
<td class="d-flex justify-content-center align-items-center"></td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;"></td>
<td class="d-flex justify-content-center align-items-center"></td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;"></td>
<td class="d-flex justify-content-center align-items-center"></td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;"></td>
<td class="d-flex justify-content-center align-items-center"></td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;"></td>
<td class="d-flex justify-content-center align-items-center"></td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;"></td>
<td class="d-flex justify-content-center align-items-center"></td>
</tr>
<tr>
<td class="br" style=" padding-top:0px; border-bottom-width: 0px;"></td>
<td class="d-flex justify-content-center align-items-center" style="border-bottom-width: 0px;"></td>
</tr>
</tbody>
<tfoot class="bg_lightgreen">
<tr style="border-top:solid 1px black;">
<th class="" style="text-align:right;">Summe</th>
<td class="d-flex justify-content-center align-items-center">11,60€</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="col-sm-12 col-lg-6">
<div class="h-100">
@*Essen Abholen?*@
<div class="row h-25 w-100">
<div class="col">
<div class="d-flex flex-column align-items-center ">
<div class="tbl-container bdr w-100">
<!-- <== overflow: hidden applied to parent -->
<table class="table bdr" cellspacing="0" cellpadding="0">
<thead class="bg_green">
<tr>
<td class="d-flex justify-content-center align-items-center" style="border-bottom:0px;">
Wann wollen Sie Ihr Essen abholen?
</td>
</tr>
</thead>
<tbody class="bg_lightgreen">
<tr>
<td class="d-flex justify-content-center align-items-center" style="padding-top:0px;">
<div style="margin:20px;">
<div class="d-flex justify-content-center align-items-center">
<input type="number" style="width:80px" min="10" max="20" />
<input type="number" style="width:80px" min="0" max="59" />
&nbsp;
Uhr
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
@*Buttons*@
<div class="row h-75 w-100">
<div class="col mt-auto">
<div class="d-flex flex-column align-items-center ">
<button class="btn_back w-75">Zurück</button>
<button class="btn_forward w-75">Weiter</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,100 @@
@page "/Speisekarte"
@inject HttpClient Http
<h1>Speisekarte</h1>
<div class="row justify-content-center">
@foreach (var item in menuitemueberkategories)
{
<div class="col-lg-2 col-md-4 col-sm-12 tablecolumn">
<table class="table table-light overflow-hidden">
<thead>
<tr>
<th scope="col">@item.Bezeichnung</th>
</tr>
</thead>
<tbody>
@foreach (var item2 in menuitemkategories)
{
if (item.IdmenuItemUeberkategorie == item2.MenuItemUeberkategorieIdmenuItemUeberkategorie)
{
if (@item.Bezeichnung == "Chinesisch")
{
<tr>
<td><a href="/SpeisekarteChinesich">@item2.Bezeichnung</a></td>
</tr>
}
else if (@item.Bezeichnung == "Japanisch")
{
<tr>
<td><a href="/SpeisekarteJapanisch">@item2.Bezeichnung</a></td>
</tr>
}
else if (@item.Bezeichnung == "Getränke")
{
<tr>
<td><a href="/SpeisekarteGetraenke">@item2.Bezeichnung</a></td>
</tr>
}
else if (@item.Bezeichnung == "Sonstiges")
{
<tr>
<td><a href="/SpeisekarteSonstiges">@item2.Bezeichnung</a></td>
</tr>
}
else
{
<tr>
<td><a href="/">@item2.Bezeichnung</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>
@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; }
}
}

View File

@ -0,0 +1,33 @@
.table {
text-align: center;
border-radius: 30px;
}
a {
color: black;
text-decoration: none;
}
a:hover, a:focus {
color: #2A6496;
text-decoration: underline;
}
th {
background-color: #89f9a5;
border: 0px;
}
td {
border-color: black;
padding: 30px 0;
}
.lowest {
border: 0px;
}
.tablecolumn {
margin-left: 3%;
margin-right: 3%;
}

View File

@ -0,0 +1,197 @@
@page "/SpeisekarteChinesich"
@inject HttpClient Http
<h1>Speisekarte Chinesisch</h1>
<div class="container">
<div class="row">
<div class="col-8">
<div class="btn-group d-flex" role="group">
<button type="button" class="btn">Chinesisch</button>
<button type="button" class="btn">Nudel</button>
<button type="button" class="btn">Reis</button>
<button type="button" class="btn">Nachspeise</button>
</div>
@foreach (var item in menuitemueberkategories)
{
@if (item.Bezeichnung == "Chinesisch")
{
@foreach (var item2 in menuitemkategories)
{
if (item2.MenuItemUeberkategorieIdmenuItemUeberkategorie == item.IdmenuItemUeberkategorie)
{
@foreach (var item3 in menuitems)
{
if (item2.IdmenuItemKategorie == item3.MenuItemKategorieIdmenuItemKategorie)
{
<div class="card mt-3 ">
<div class="card-body">
@*create two divs columns*@
<div class="row">
<div class="col-8">
<h5 class="card-title">@item3.Bezeichnung</h5>
<p class="card-text">@item3.Zusatzinformation</p>
</div>
@*div text center*@
<div class="col-4 d-flex justify-content-center align-items-center">
<div style="font-size:15pt;">@item3.Preis</div>
</div>
</div>
</div>
</div>
}
}
}
}
}
}
</div>
<div class="col-4">
@* warenkorb anzeige als bootstrap card*@
<div class="card">
<div class="card-header">
Warenkorb
</div>
<div class="card-body">
<h5 class="card-title" style="font-size:10pt; margin-bottom:0px;">1 Nudeln mit Hühnerfleisch</h5>
<p class="card-text" style="font-size:8pt;margin-bottom:0px;">mit Knoblauchsoße</p>
<p class="card-text" id="preis" style="text-align:right; "><span style="background-color:#c7ffd5; border-radius:20px; font-size:10pt; padding:5px">9.10€</span></p>
</div>
<div class="card-body">
<h5 class="card-title" style="font-size:10pt; margin-bottom:0px;">1 Coca Cola</h5>
@*<p class="card-text" style="font-size:8pt;margin-bottom:0px;">mit Knoblauchsoße</p>*@
<p class="card-text" id="preis" style="text-align:right; "><span style="background-color:#c7ffd5; border-radius:20px; font-size:10pt; padding:5px">3.10€</span></p>
</div>
</div>
<div class="d-flex flex-column">
<a href="#" class="btn btn-primary mx-2 mt-5">Zurück</a>
<a href="#" class="btn btn-primary mx-2 mt-1">Weiter</a>
</div>
</div>
</div>
</div>
@code {
// allergien, bestellungsposition, kunde, menuitem, menuitemkategorie, menuitemueberkategorie, rabatt
private List<Allergie> allergien = new List<Allergie>();
private List<Bestellungsposition> bestellungspositions = new List<Bestellungsposition>();
private List<Kunde> kunden = new List<Kunde>();
private List<Menuitem> menuitems = new List<Menuitem>();
private List<Menuitemkategorie> menuitemkategories = new List<Menuitemkategorie>();
private List<Menuitemueberkategorie> menuitemueberkategories = new List<Menuitemueberkategorie>();
private List<Rabatt> rabatte = new List<Rabatt>();
protected override async Task OnInitializedAsync()
{
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");
rabatte = await Http.GetFromJsonAsync<List<Rabatt>>("https://localhost:7076/api/Rabatte");
}
public class Allergie
{
public int Idallergie { get; set; }
public string? Beschreibung { get; set; }
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}
public class Bestellungsposition
{
public int Idbestellung { get; set; }
public int? Menge { get; set; }
public DateTime? Datum { get; set; }
public int KundeIdkunde { get; set; }
public int RabattIdrabatt { get; set; }
public virtual Kunde KundeIdkundeNavigation { get; set; } = null!;
public virtual Rabatt RabattIdrabattNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}
public class Kunde
{
public int Idkunde { get; set; }
public string? Code { get; set; }
public int? Treuepunkte { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}
public class Menuitem
{
public int IdmenuItem { get; set; }
public string? Bezeichnung { get; set; }
public string? Zusatzinformation { get; set; }
public decimal? Preis { get; set; }
public int MenuItemKategorieIdmenuItemKategorie { get; set; }
public virtual Menuitemkategorie MenuItemKategorieIdmenuItemKategorieNavigation { get; set; } = null!;
public virtual ICollection<Allergie> AllergieIdallergies { get; set; } = new List<Allergie>();
public virtual ICollection<Bestellungsposition> BestellungspositionIdbestellungs { get; set; } = new List<Bestellungsposition>();
}
public class Menuitemkategorie
{
public int IdmenuItemKategorie { get; set; }
public string? Bezeichnung { get; set; }
public int MenuItemUeberkategorieIdmenuItemUeberkategorie { get; set; }
public virtual Menuitemueberkategorie MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> Menuitems { get; set; } = new List<Menuitem>();
}
public class Menuitemueberkategorie
{
public int IdmenuItemUeberkategorie { get; set; }
public string? Bezeichnung { get; set; }
public virtual ICollection<Menuitemkategorie> Menuitemkategories { get; set; } = new List<Menuitemkategorie>();
}
public class Rabatt
{
public int Idrabatt { get; set; }
public decimal? Prozent { get; set; }
public DateTime? GueltigkeitVon { get; set; }
public DateTime? GueltigkeitBis { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}
}

View File

@ -0,0 +1,81 @@
/**{
background-color: red;
}*/
/*navigation*/
button.btn:first-child {
background-color: #8bfaa4;
/*not click able*/
pointer-events: none;
cursor: default;
border-width: 0px;
}
button.btn {
/* Verwirrung: Figma-Design: background-color: #c7ffd5;
wurde jetzt aber fuer den Hintergrund verwendet*/
background-color: #8dffb5;
border-right: 1px solid black;
border-left: 1px solid black;
border-radius:20px;
}
button.btn:nth-child(2) {
/*border-right: 2px solid black;*/
border-left-width: 0px;
}
button.btn:last-child {
border-right-width: 0px;
}
/*menuitems*/
.card.mt-3 {
/* background-color: rebeccapurple; */
border-radius: 30px;
border: 1px solid black;
}
/*warenkorb*/
.card-header {
font-size:16pt;
text-align: center;
padding-bottom: 15px;
/* background-color: white; */
border-top-right-radius: 20px;
}
.card-header {
background-color:transparent;
border-bottom-width:0px;
}
.card {
border-radius: 32px;
border: 1px solid black;
}
p.card-text {
margin-left: 20px;
}
/*buttons*/
a.btn.btn-primary.mx-2.mt-5 {
background-color: #facca3;
color: black;
border: none;
border-radius: 20px;
}
a.btn.btn-primary.mx-2.mt-1 {
background-color: #89f9a5;
color: black;
border: none;
border-radius: 20px;
}

View File

@ -0,0 +1,204 @@
@page "/SpeisekarteGetraenke"
@inject HttpClient Http
<h1>Speisekarte Getränke</h1>
@* create an container bootstrap 5*@
<div class="container">
<div class="row">
<div class="col-8">
@* Navigation button group, stretch on the width size of the col-8 *@
<div class="btn-group d-flex" role="group">
<button type="button" class="btn">Getränke</button>
<button type="button" class="btn">Alkoholfreie Getränke</button>
<button type="button" class="btn">Bier</button>
</div>
@foreach (var item in menuitemueberkategories)
{
@if (item.Bezeichnung == "Getränke")
{
@foreach (var item2 in menuitemkategories)
{
if (item2.MenuItemUeberkategorieIdmenuItemUeberkategorie == item.IdmenuItemUeberkategorie)
{
@foreach (var item3 in menuitems)
{
if (item2.IdmenuItemKategorie == item3.MenuItemKategorieIdmenuItemKategorie)
{
<div class="card mt-3 ">
<div class="card-body">
@*create two divs columns*@
<div class="row">
<div class="col-8">
<h5 class="card-title">@item3.Bezeichnung</h5>
<p class="card-text">@item3.Zusatzinformation</p>
</div>
@*div text center*@
<div class="col-4 d-flex justify-content-center align-items-center">
<div style="font-size:15pt;">@item3.Preis</div>
</div>
</div>
</div>
</div>
}
}
}
}
}
}
</div>
<div class="col-4">
@* warenkorb anzeige als bootstrap card*@
<div class="card">
<div class="card-header">
Warenkorb
</div>
<div class="card-body">
<h5 class="card-title" style="font-size:10pt; margin-bottom:0px;">1 Nudeln mit Hühnerfleisch</h5>
<p class="card-text" style="font-size:8pt;margin-bottom:0px;">mit Knoblauchsoße</p>
<p class="card-text" id="preis" style="text-align:right; "><span style="background-color:#c7ffd5; border-radius:20px; font-size:10pt; padding:5px">9.10€</span></p>
</div>
<div class="card-body">
<h5 class="card-title" style="font-size:10pt; margin-bottom:0px;">1 Coca Cola</h5>
@*<p class="card-text" style="font-size:8pt;margin-bottom:0px;">mit Knoblauchsoße</p>*@
<p class="card-text" id="preis" style="text-align:right; "><span style="background-color:#c7ffd5; border-radius:20px; font-size:10pt; padding:5px">3.10€</span></p>
</div>
</div>
<div class="d-flex flex-column">
<a href="#" class="btn btn-primary mx-2 mt-5">Zurück</a>
<a href="#" class="btn btn-primary mx-2 mt-1">Weiter</a>
</div>
</div>
</div>
</div>
@code {
// allergien, bestellungsposition, kunde, menuitem, menuitemkategorie, menuitemueberkategorie, rabatt
private List<Allergie> allergien = new List<Allergie>();
private List<Bestellungsposition> bestellungspositions = new List<Bestellungsposition>();
private List<Kunde> kunden = new List<Kunde>();
private List<Menuitem> menuitems = new List<Menuitem>();
private List<Menuitemkategorie> menuitemkategories = new List<Menuitemkategorie>();
private List<Menuitemueberkategorie> menuitemueberkategories = new List<Menuitemueberkategorie>();
private List<Rabatt> rabatte = new List<Rabatt>();
protected override async Task OnInitializedAsync()
{
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");
rabatte = await Http.GetFromJsonAsync<List<Rabatt>>("https://localhost:7076/api/Rabatte");
}
public class Allergie
{
public int Idallergie { get; set; }
public string? Beschreibung { get; set; }
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}
public class Bestellungsposition
{
public int Idbestellung { get; set; }
public int? Menge { get; set; }
public DateTime? Datum { get; set; }
public int KundeIdkunde { get; set; }
public int RabattIdrabatt { get; set; }
public virtual Kunde KundeIdkundeNavigation { get; set; } = null!;
public virtual Rabatt RabattIdrabattNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}
public class Kunde
{
public int Idkunde { get; set; }
public string? Code { get; set; }
public int? Treuepunkte { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}
public class Menuitem
{
public int IdmenuItem { get; set; }
public string? Bezeichnung { get; set; }
public string? Zusatzinformation { get; set; }
public decimal? Preis { get; set; }
public int MenuItemKategorieIdmenuItemKategorie { get; set; }
public virtual Menuitemkategorie MenuItemKategorieIdmenuItemKategorieNavigation { get; set; } = null!;
public virtual ICollection<Allergie> AllergieIdallergies { get; set; } = new List<Allergie>();
public virtual ICollection<Bestellungsposition> BestellungspositionIdbestellungs { get; set; } = new List<Bestellungsposition>();
}
public class Menuitemkategorie
{
public int IdmenuItemKategorie { get; set; }
public string? Bezeichnung { get; set; }
public int MenuItemUeberkategorieIdmenuItemUeberkategorie { get; set; }
public virtual Menuitemueberkategorie MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> Menuitems { get; set; } = new List<Menuitem>();
}
public class Menuitemueberkategorie
{
public int IdmenuItemUeberkategorie { get; set; }
public string? Bezeichnung { get; set; }
public virtual ICollection<Menuitemkategorie> Menuitemkategories { get; set; } = new List<Menuitemkategorie>();
}
public class Rabatt
{
public int Idrabatt { get; set; }
public decimal? Prozent { get; set; }
public DateTime? GueltigkeitVon { get; set; }
public DateTime? GueltigkeitBis { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}
}

View File

@ -0,0 +1,81 @@
/**{
background-color: red;
}*/
/*navigation*/
button.btn:first-child {
background-color: #8bfaa4;
/*not click able*/
pointer-events: none;
cursor: default;
border-width: 0px;
}
button.btn {
/* Verwirrung: Figma-Design: background-color: #c7ffd5;
wurde jetzt aber fuer den Hintergrund verwendet*/
background-color: #8dffb5;
border-right: 1px solid black;
border-left: 1px solid black;
border-radius: 20px;
}
button.btn:nth-child(2) {
/*border-right: 2px solid black;*/
border-left-width: 0px;
}
button.btn:last-child {
border-right-width: 0px;
}
/*menuitems*/
.card.mt-3 {
/* background-color: rebeccapurple; */
border-radius: 30px;
border: 1px solid black;
}
/*warenkorb*/
.card-header {
font-size: 16pt;
text-align: center;
padding-bottom: 15px;
/* background-color: white; */
border-top-right-radius: 20px;
}
.card-header {
background-color: transparent;
border-bottom-width: 0px;
}
.card {
border-radius: 32px;
border: 1px solid black;
}
p.card-text {
margin-left: 20px;
}
/*buttons*/
a.btn.btn-primary.mx-2.mt-5 {
background-color: #facca3;
color: black;
border: none;
border-radius: 20px;
}
a.btn.btn-primary.mx-2.mt-1 {
background-color: #89f9a5;
color: black;
border: none;
border-radius: 20px;
}

View File

@ -0,0 +1,199 @@
@page "/SpeisekarteSonstiges"
@inject HttpClient Http
<h1>Speisekarte Sonstiges</h1>
@* create an container bootstrap 5*@
<div class="container">
<div class="row">
<div class="col-8">
@* Navigation button group, stretch on the width size of the col-8 *@
<div class="btn-group d-flex" role="group">
<button type="button" class="btn">Sonstiges</button>
<button type="button" class="btn">Schnitzel</button>
<button type="button" class="btn">Pommes</button>
<button type="button" class="btn">Bowl</button>
<button type="button" class="btn">Vorspeisen</button>
</div>
@foreach (var item in menuitemueberkategories)
{
@if (item.Bezeichnung == "Japanisch")
{
@foreach (var item2 in menuitemkategories)
{
if (item2.MenuItemUeberkategorieIdmenuItemUeberkategorie == item.IdmenuItemUeberkategorie)
{
@foreach (var item3 in menuitems)
{
if (item2.IdmenuItemKategorie == item3.MenuItemKategorieIdmenuItemKategorie)
{
<div class="card mt-3 ">
<div class="card-body">
@*create two divs columns*@
<div class="row">
<div class="col-8">
<h5 class="card-title">@item3.Bezeichnung</h5>
<p class="card-text">@item3.Zusatzinformation</p>
</div>
@*div text center*@
<div class="col-4 d-flex justify-content-center align-items-center">
<div style="font-size:15pt;">@item3.Preis</div>
</div>
</div>
</div>
</div>
}
}
}
}
}
}
</div>
<div class="col-4">
@* warenkorb anzeige als bootstrap card*@
<div class="card">
<div class="card-header">
Warenkorb
</div>
<div class="card-body">
<h5 class="card-title" style="font-size:10pt; margin-bottom:0px;">1 Nudeln mit Hühnerfleisch</h5>
<p class="card-text" style="font-size:8pt;margin-bottom:0px;">mit Knoblauchsoße</p>
<p class="card-text" id="preis" style="text-align:right; "><span style="background-color:#c7ffd5; border-radius:20px; font-size:10pt; padding:5px">9.10€</span></p>
</div>
<div class="card-body">
<h5 class="card-title" style="font-size:10pt; margin-bottom:0px;">1 Coca Cola</h5>
@*<p class="card-text" style="font-size:8pt;margin-bottom:0px;">mit Knoblauchsoße</p>*@
<p class="card-text" id="preis" style="text-align:right; "><span style="background-color:#c7ffd5; border-radius:20px; font-size:10pt; padding:5px">3.10€</span></p>
</div>
</div>
<div class="d-flex flex-column">
<a href="#" class="btn btn-primary mx-2 mt-5">Zurück</a>
<a href="#" class="btn btn-primary mx-2 mt-1">Weiter</a>
</div>
</div>
</div>
</div>
@code {
// allergien, bestellungsposition, kunde, menuitem, menuitemkategorie, menuitemueberkategorie, rabatt
private List<Allergie> allergien = new List<Allergie>();
private List<Bestellungsposition> bestellungspositions = new List<Bestellungsposition>();
private List<Kunde> kunden = new List<Kunde>();
private List<Menuitem> menuitems = new List<Menuitem>();
private List<Menuitemkategorie> menuitemkategories = new List<Menuitemkategorie>();
private List<Menuitemueberkategorie> menuitemueberkategories = new List<Menuitemueberkategorie>();
private List<Rabatt> rabatte = new List<Rabatt>();
protected override async Task OnInitializedAsync()
{
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");
rabatte = await Http.GetFromJsonAsync<List<Rabatt>>("https://localhost:7076/api/Rabatte");
}
public class Allergie
{
public int Idallergie { get; set; }
public string? Beschreibung { get; set; }
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}
public class Bestellungsposition
{
public int Idbestellung { get; set; }
public int? Menge { get; set; }
public DateTime? Datum { get; set; }
public int KundeIdkunde { get; set; }
public int RabattIdrabatt { get; set; }
public virtual Kunde KundeIdkundeNavigation { get; set; } = null!;
public virtual Rabatt RabattIdrabattNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}
public class Kunde
{
public int Idkunde { get; set; }
public string? Code { get; set; }
public int? Treuepunkte { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}
public class Menuitem
{
public int IdmenuItem { get; set; }
public string? Bezeichnung { get; set; }
public string? Zusatzinformation { get; set; }
public decimal? Preis { get; set; }
public int MenuItemKategorieIdmenuItemKategorie { get; set; }
public virtual Menuitemkategorie MenuItemKategorieIdmenuItemKategorieNavigation { get; set; } = null!;
public virtual ICollection<Allergie> AllergieIdallergies { get; set; } = new List<Allergie>();
public virtual ICollection<Bestellungsposition> BestellungspositionIdbestellungs { get; set; } = new List<Bestellungsposition>();
}
public class Menuitemkategorie
{
public int IdmenuItemKategorie { get; set; }
public string? Bezeichnung { get; set; }
public int MenuItemUeberkategorieIdmenuItemUeberkategorie { get; set; }
public virtual Menuitemueberkategorie MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> Menuitems { get; set; } = new List<Menuitem>();
}
public class Menuitemueberkategorie
{
public int IdmenuItemUeberkategorie { get; set; }
public string? Bezeichnung { get; set; }
public virtual ICollection<Menuitemkategorie> Menuitemkategories { get; set; } = new List<Menuitemkategorie>();
}
public class Rabatt
{
public int Idrabatt { get; set; }
public decimal? Prozent { get; set; }
public DateTime? GueltigkeitVon { get; set; }
public DateTime? GueltigkeitBis { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}
}

View File

@ -0,0 +1,81 @@
/**{
background-color: red;
}*/
/*navigation*/
button.btn:first-child {
background-color: #8bfaa4;
/*not click able*/
pointer-events: none;
cursor: default;
border-width: 0px;
}
button.btn {
/* Verwirrung: Figma-Design: background-color: #c7ffd5;
wurde jetzt aber fuer den Hintergrund verwendet*/
background-color: #8dffb5;
border-right: 1px solid black;
border-left: 1px solid black;
border-radius: 20px;
}
button.btn:nth-child(2) {
/*border-right: 2px solid black;*/
border-left-width: 0px;
}
button.btn:last-child {
border-right-width: 0px;
}
/*menuitems*/
.card.mt-3 {
/* background-color: rebeccapurple; */
border-radius: 30px;
border: 1px solid black;
}
/*warenkorb*/
.card-header {
font-size: 16pt;
text-align: center;
padding-bottom: 15px;
/* background-color: white; */
border-top-right-radius: 20px;
}
.card-header {
background-color: transparent;
border-bottom-width: 0px;
}
.card {
border-radius: 32px;
border: 1px solid black;
}
p.card-text {
margin-left: 20px;
}
/*buttons*/
a.btn.btn-primary.mx-2.mt-5 {
background-color: #facca3;
color: black;
border: none;
border-radius: 20px;
}
a.btn.btn-primary.mx-2.mt-1 {
background-color: #89f9a5;
color: black;
border: none;
border-radius: 20px;
}

View File

@ -0,0 +1,206 @@
@page "/SpeisekarteJapanisch"
@inject HttpClient Http
<h1>Speisekarte Japanisch</h1>
@* create an container bootstrap 5*@
<div class="container">
<div class="row">
<div class="col-8">
@* Navigation button group, stretch on the width size of the col-8 *@
<div class="btn-group d-flex" role="group">
<button type="button" class="btn">Japanisch</button>
<button type="button" class="btn">SushiMaki</button>
<button type="button" class="btn">Bento</button>
<button type="button" class="btn">Nachspeise</button>
</div>
@foreach (var item in menuitemueberkategories)
{
@if (item.Bezeichnung == "Japanisch")
{
@foreach (var item2 in menuitemkategories)
{
if (item2.MenuItemUeberkategorieIdmenuItemUeberkategorie == item.IdmenuItemUeberkategorie)
{
@foreach (var item3 in menuitems)
{
if (item2.IdmenuItemKategorie == item3.MenuItemKategorieIdmenuItemKategorie)
{
<div class="card mt-3 ">
<div class="card-body">
@*create two divs columns*@
<div class="row">
<div class="col-8">
<h5 class="card-title">@item3.Bezeichnung</h5>
<p class="card-text">@item3.Zusatzinformation</p>
</div>
@*div text center*@
<div class="col-4 d-flex justify-content-center align-items-center">
<div style="font-size:15pt;">@item3.Preis</div>
</div>
</div>
</div>
</div>
}
}
}
}
}
}
</div>
<div class="col-4">
@* warenkorb anzeige als bootstrap card*@
<div class="card">
<div class="card-header">
Warenkorb
</div>
<div class="card-body">
<h5 class="card-title" style="font-size:10pt; margin-bottom:0px;">1 Nudeln mit Hühnerfleisch</h5>
<p class="card-text" style="font-size:8pt;margin-bottom:0px;">mit Knoblauchsoße</p>
<p class="card-text" id="preis" style="text-align:right; "><span style="background-color:#c7ffd5; border-radius:20px; font-size:10pt; padding:5px">9.10€</span></p>
</div>
<div class="card-body">
<h5 class="card-title" style="font-size:10pt; margin-bottom:0px;">1 Coca Cola</h5>
@*<p class="card-text" style="font-size:8pt;margin-bottom:0px;">mit Knoblauchsoße</p>*@
<p class="card-text" id="preis" style="text-align:right; "><span style="background-color:#c7ffd5; border-radius:20px; font-size:10pt; padding:5px">3.10€</span></p>
</div>
</div>
<div class="d-flex flex-column">
<a href="#" class="btn btn-primary mx-2 mt-5">Zurück</a>
<a href="#" class="btn btn-primary mx-2 mt-1">Weiter</a>
</div>
</div>
</div>
</div>
@code {
// allergien, bestellungsposition, kunde, menuitem, menuitemkategorie, menuitemueberkategorie, rabatt
private List<Allergie> allergien = new List<Allergie>();
private List<Bestellungsposition> bestellungspositions = new List<Bestellungsposition>();
private List<Kunde> kunden = new List<Kunde>();
private List<Menuitem> menuitems = new List<Menuitem>();
private List<Menuitemkategorie> menuitemkategories = new List<Menuitemkategorie>();
private List<Menuitemueberkategorie> menuitemueberkategories = new List<Menuitemueberkategorie>();
private List<Rabatt> rabatte = new List<Rabatt>();
protected override async Task OnInitializedAsync()
{
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");
rabatte = await Http.GetFromJsonAsync<List<Rabatt>>("https://localhost:7076/api/Rabatte");
}
public class Allergie
{
public int Idallergie { get; set; }
public string? Beschreibung { get; set; }
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}
public class Bestellungsposition
{
public int Idbestellung { get; set; }
public int? Menge { get; set; }
public DateTime? Datum { get; set; }
public int KundeIdkunde { get; set; }
public int RabattIdrabatt { get; set; }
public virtual Kunde KundeIdkundeNavigation { get; set; } = null!;
public virtual Rabatt RabattIdrabattNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> MenuItemIdmenuItems { get; set; } = new List<Menuitem>();
}
public class Kunde
{
public int Idkunde { get; set; }
public string? Code { get; set; }
public int? Treuepunkte { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}
public class Menuitem
{
public int IdmenuItem { get; set; }
public string? Bezeichnung { get; set; }
public string? Zusatzinformation { get; set; }
public decimal? Preis { get; set; }
public int MenuItemKategorieIdmenuItemKategorie { get; set; }
public virtual Menuitemkategorie MenuItemKategorieIdmenuItemKategorieNavigation { get; set; } = null!;
public virtual ICollection<Allergie> AllergieIdallergies { get; set; } = new List<Allergie>();
public virtual ICollection<Bestellungsposition> BestellungspositionIdbestellungs { get; set; } = new List<Bestellungsposition>();
}
public class Menuitemkategorie
{
public int IdmenuItemKategorie { get; set; }
public string? Bezeichnung { get; set; }
public int MenuItemUeberkategorieIdmenuItemUeberkategorie { get; set; }
public virtual Menuitemueberkategorie MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation { get; set; } = null!;
public virtual ICollection<Menuitem> Menuitems { get; set; } = new List<Menuitem>();
}
public class Menuitemueberkategorie
{
public int IdmenuItemUeberkategorie { get; set; }
public string? Bezeichnung { get; set; }
public virtual ICollection<Menuitemkategorie> Menuitemkategories { get; set; } = new List<Menuitemkategorie>();
}
public class Rabatt
{
public int Idrabatt { get; set; }
public decimal? Prozent { get; set; }
public DateTime? GueltigkeitVon { get; set; }
public DateTime? GueltigkeitBis { get; set; }
public virtual ICollection<Bestellungsposition> Bestellungspositions { get; set; } = new List<Bestellungsposition>();
}
}

View File

@ -0,0 +1,81 @@
/**{
background-color: red;
}*/
/*navigation*/
button.btn:first-child {
background-color: #8bfaa4;
/*not click able*/
pointer-events: none;
cursor: default;
border-width: 0px;
}
button.btn {
/* Verwirrung: Figma-Design: background-color: #c7ffd5;
wurde jetzt aber fuer den Hintergrund verwendet*/
background-color: #8dffb5;
border-right: 1px solid black;
border-left: 1px solid black;
border-radius: 20px;
}
button.btn:nth-child(2) {
/*border-right: 2px solid black;*/
border-left-width: 0px;
}
button.btn:last-child {
border-right-width: 0px;
}
/*menuitems*/
.card.mt-3 {
/* background-color: rebeccapurple; */
border-radius: 30px;
border: 1px solid black;
}
/*warenkorb*/
.card-header {
font-size: 16pt;
text-align: center;
padding-bottom: 15px;
/* background-color: white; */
border-top-right-radius: 20px;
}
.card-header {
background-color: transparent;
border-bottom-width: 0px;
}
.card {
border-radius: 32px;
border: 1px solid black;
}
p.card-text {
margin-left: 20px;
}
/*buttons*/
a.btn.btn-primary.mx-2.mt-5 {
background-color: #facca3;
color: black;
border: none;
border-radius: 20px;
}
a.btn.btn-primary.mx-2.mt-1 {
background-color: #89f9a5;
color: black;
border: none;
border-radius: 20px;
}

View File

@ -0,0 +1,51 @@
@page "/TestFetchAllergienData"
@inject HttpClient Http
<PageTitle>Allergien</PageTitle>
<h1>Allergien</h1>
<p>This component demonstrates fetching data from the mysql server.</p>
@if (allergien == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Beschreibung</th>
</tr>
</thead>
<tbody>
@foreach (var allergie in allergien)
{
<tr>
<td>@allergie.Idallergie</td>
<td>@allergie.Beschreibung</td>
</tr>
}
</tbody>
</table>
}
@code {
private const string ServiceEndpoint = "https://localhost:7076/api/Allergien";
private Allergie[]? allergien;
protected override async Task OnInitializedAsync()
{
allergien = await Http.GetFromJsonAsync<Allergie[]>(ServiceEndpoint);
}
public partial class Allergie
{
public int Idallergie { get; set; }
public string? Beschreibung { get; set; }
}
}

View File

@ -0,0 +1,7 @@
@page "/yummypoints"
<body style='--blazor-load-percentage: 100%; --blazor-load-percentage-text: "100%";'>
<div class="d-flex justify-content-center">
</div>
</body>

View File

@ -6,6 +6,8 @@ var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app"); builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after"); builder.RootComponents.Add<HeadOutlet>("head::after");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
await builder.Build().RunAsync(); await builder.Build().RunAsync();

1
src/y4f/README.md Normal file
View File

@ -0,0 +1 @@
# y4f

View File

@ -0,0 +1,36 @@
@page "/Bestellabschluss"
<body>
<div class="container col-lg-5 col-md-9 col-sm-12 d-flex flex-column " id="content">
<p>Sie haben derzeit <b>1 Yummy-Punkt(e)</b></p>
<p class="text">Bei einem Mindestbestellwert von 8€ erhalten Sie ein Yummy-Punkt.
Ab der 10ten Bestellung gibt es einen Rabatt zu Ihrer nächsten Bestellung.</p>
<div class="img" >
@for(int i = 0; i < 10; i++)
{
<img src="assets/White-Circle.png ">
}
<br>
</div>
<p class="text">Achtung: Bitte beachten Sie, dass keine online Bezahlung zur Verfügung steht.
Diese dient nur zur Vorbestellung und muss selbst abgeholt werden.</p>
<div class="button">
<form id="button1" action="Warenkorb">
<input type="submit" value="Zurück" class="btn">
</form>
<form id="button2" action="Confirm">
<input type="submit" value="Vorbestellen" class="btn">
</form>
</div>
</div>
</body>
@code {
}

View File

@ -0,0 +1,40 @@
body, html {
padding: 0px;
margin: 0px;
margin-bottom: 15px;
}
p {
text-align:center;
}
img {
width: 20%;
height: auto;
padding: 5px;
}
.text {
color: grey;
font-size: 13px;
}
.button {
text-align: center;
}
#button1, #button2 {
margin: 10px;
display: inline-block;
border-radius: 50px;
}
#button1 {
background-color: #F9BE89;
}
#button2 {
background-color: #89F9A5;
}

View File

@ -0,0 +1,37 @@
@page "/Bestellbestätigung"
<body>
<div class="container col-lg-5 col-md-9 col-sm-12 d-flex flex-column " id="content">
<h5>Vielen Dank für Ihre Bestellung</h5><br>
<p class="text">
Ihr Essen ist in <b>30 Minuten</b> abholbereit.
Sie erhalten eine Benachrichtigung sobald das Essen fertig ist. Wir würden uns freuen, wenn Sie uns ein <a href="Feedback">Feedback</a> geben.
<br><br><br><br>
</p>
<div class="progress">
<div class="progress-bar bg-warning progress-bar-striped progress-bar-animated" style="width:50%"></div>
</div>
<table>
<tr class="loadtext">
<td>Bestellung eingegangen</td>
<td class="load2">Bestellung wird zubereitet</td>
<td class="load3">Essen abholbereit</td>
</tr>
</table>
<div class="button">
<br><br><br><br>
<form id="button1" action="/">
<input type="submit" value="Zur Startseite" class="btn">
</form>
</div>
</div>
</body>
@code {
}

View File

@ -0,0 +1,50 @@
body, html {
padding: 0px;
margin: 0px;
margin-bottom: 15px;
}
p {
text-align:center;
}
img {
width: 20%;
height: auto;
padding: 5px;
}
.text {
color: grey;
font-size: 13px;
}
.button {
padding-left: 25%;
padding-right: 25%;
text-align: center;
}
#button1 {
background-color: #89F9A5;
padding-left: 25%;
padding-right: 25%;
display: inline-block;
border-radius: 50px;
}
h5 {
text-align: center;
}
.load2 {
text-align: center;
}
.load3 {
text-align: right;
}
.loadtext {
font-size: 14px;
}

View File

@ -0,0 +1,27 @@
@*<footer class="text-center text-lg-start bg-light text-muted">
<section class="d-flex justify-content-center justify-content-lg-between p-4 border-bottom"></section>
<section class="">
<div class="container text-center text-md-start mt-5">
<div class="col-md-3 col-lg-6 col-xl-12 mx-auto mb-4">
<center>
<h6 class="text-uppercase fw-bold mb-4">
<a href="">Kontakt</a> | <a href="">Impressum</a> | <a href="">Datenschutzerklärung</a> | <a href="">Cookies</a>
</h6>
</center>
</div>
</div>
</section>
</footer>*@
<footer>
<div class="container">
<a href="">Kontakt</a> |
<a href="">Impressum</a> |
<a href="">Datenschutzerklärung</a> |
<a href="">Cookies</a>
</div>
</footer>
@code {
}

View File

@ -0,0 +1,27 @@
a {
color: black;
text-decoration: none;
}
a:hover, a:focus {
color: #2A6496;
text-decoration: underline;
}
h6 {
color: grey;
}
footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: #89f9a5;
color: black;
text-align: center;
padding-top: 15px;
padding-bottom: 15px;
margin-top: 100px;
}

View File

@ -0,0 +1,30 @@
@page "/Kontoverwaltung"
<h3>Wichtige Informationen</h3> <br>
<div class="container mt-auto">
<h4>AccountID: #1234</h4>
<h4>Ihr QR-Code: </h4>
<img src="assets/K-QR.png" class="img" title="logo image">
<p>Ihr Konto wird 30 Tage nach der Deaktivierung unwiderruflich gelöscht.</p>
<button class="btn" type="button" onclick="@ChangeButton" id="button1">@button1</button>
</div>
<br><br>
@code {
bool changeButtonBool { get; set; } = true;
string button1 => changeButtonBool ? "Konto deaktivieren" : "Konto aktivieren";
void ChangeButton()
{
//TODO Datenbankaktualisierung
changeButtonBool = !changeButtonBool;
}
}

View File

@ -0,0 +1,22 @@
body {
background-color: white;
}
img {
width: 150px;
height: 150px;
padding: 0px;
margin: 0px;
}
button {
background-color: #89f9a5;
}

View File

@ -0,0 +1,14 @@
@inherits LayoutComponentBase
<div >
<NavMenu />
<main class="container">
@Body
</main>
<Footer />
</div>

View File

@ -0,0 +1,61 @@
<nav class="navbar navbar-expand-md navbar-light mb-4 me-5 ms-5 ">
<div class="container-fluid">
@*<a class="navbar-brand" href="">Yummy4Friends</a>*@
<a class="navbar-brand" href="">
<img src="assets/Logo_new.png" alt="Yummy4Friends" width="60px" height="auto">
</a>
<button class="navbar-toggler @NavButtonCssClass" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse"
aria-controls="navbarCollapse" aria-label="Toggle navigation" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end @NavBarCssClass" id="navbarCollapse" @onclick="ToggleNavMenu">
<ul class="navbar-nav">
<li class="nav-item">
</li>
<li class="nav-item">
<NavLink class="nav-link" href="allergene">
Allergene
</NavLink>
</li>
<li class="nav-item">
<NavLink class="nav-link" href="speisekarte">
Speisekarte
</NavLink>
</li>
<li class="nav-item">
<NavLink class="nav-link" href="yummy-punkte">
Yummy-Punkte
</NavLink>
</li>
<li class="nav-item">
<NavLink class="nav-link" href="shopping_cart">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-cart3" viewBox="0 0 16 16">
<path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .49.598l-1 5a.5.5 0 0 1-.465.401l-9.397.472L4.415 11H13a.5.5 0 0 1 0 1H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5zM3.102 4l.84 4.479 9.144-.459L13.89 4H3.102zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" />
</svg>
</NavLink>
</li>
<li class="nav-item">
<NavLink class="nav-link" href="Kontoverwaltung">
#12345
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" />
</svg>
</NavLink>
</li>
</ul>
</div>
</div>
</nav>
@code {
private bool collapseNavMenu = true;
private string? NavBarCssClass => collapseNavMenu ? null : "show";
private string? NavButtonCssClass => collapseNavMenu ? "collapsed" : null;
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}

View File

@ -0,0 +1,12 @@
@inherits LayoutComponentBase
<div>
<main class="container">
@Body
</main>
</div>

View File

@ -0,0 +1,5 @@
html, body {
/*background-color: #C7FFD5;*/
padding: 0px;
margin: 0px;
}

View File

@ -0,0 +1,29 @@
@page "/Yummy-Punkte"
<body>
<div class="container col-lg-5 col-md-9 col-sm-12 d-flex flex-column " id="content">
<h4><b>Ihre Yummy-Punkte</b></h4>
<div class="img" >
@for(int i = 0; i < 10; i++)
{
<img src="assets/White-Circle.png ">
}
<br>
</div>
<p class="text">Bei einem Mindestbestellwert von 8€ erhalten Sie ein Yummy-Punkt. Ab der 10ten Bestellung gibt es einen Rabatt zu Ihrer nächsten Bestellung.</p>
<div class="button">
<form id="button1" action="/">
<input type="submit" value="Zurück" class="btn">
</form>
</div>
</div>
</body>
@code {
}

View File

@ -0,0 +1,37 @@
body, html {
padding: 0px;
margin: 0px;
margin-bottom: 15px;
}
p {
text-align:center;
}
img {
width: 20%;
height: auto;
padding: 5px;
}
.text {
color: grey;
font-size: 13px;
}
.button {
padding-left: 25%;
padding-right: 25%;
text-align: center;
}
#button1 {
background-color: #F9BE89;
padding-left: 25%;
padding-right: 25%;
display: inline-block;
border-radius: 50px;
}
h4 {
text-align: center;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

View File

@ -0,0 +1,28 @@
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
html, body {
margin: 0px;
padding: 0px;
}
#content {
background-color: #C7FFD1;
padding: 5%;
margin-top: 1%;
border-radius: 10px;
position: center;
}
.img {
height: auto;
max-width: 100%;
margin: 10%;
}
form {
text-align: center;
background-color: #89F9A5;
border-radius: 50px;
}

View File

@ -2,6 +2,7 @@
html, body { html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
background-color: #C7FFD1;
} }
h1:focus { h1:focus {

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -0,0 +1,41 @@
.tbl-container {
margin-top: 10px;
margin-left: 10px;
}
.bg_green {
background-color: #89F9A5;
}
.bdr {
border-radius: 17px;
overflow: hidden;
border-color: #C7FFD5;
}
.bg_lightgreen {
background-color: #C7FFD5;
}
.br {
border-right: solid 1px black;
border-collapse: collapse;
border-bottom-width: 0;
}
.btn_back {
background-color: #F9BE89;
/*width: 60%;*/
margin-bottom: 13px;
border-radius: 30px;
height: 50px;
border: 0px;
}
.btn_forward {
background-color: #89F9A5;
/*width: 60%;*/
border-radius: 30px;
height: 50px;
border: 0px;
}

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Some files were not shown because too many files have changed in this diff Show More