upgrade-rio-version (#1)
Co-authored-by: David Rodenkirchen <drodenkirchen@linetco.com> Reviewed-on: Vereins-IT/ez-lan-manager#1
This commit is contained in:
parent
3c3fd878c5
commit
1a33ea69f2
BIN
requirements.txt
BIN
requirements.txt
Binary file not shown.
@ -5,7 +5,7 @@ import sys
|
|||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from rio import App, Theme, Color, Font, Page, Session
|
from rio import App, Theme, Color, Font, ComponentPage, Session
|
||||||
from from_root import from_root
|
from from_root import from_root
|
||||||
|
|
||||||
from src.ez_lan_manager import pages, init_services
|
from src.ez_lan_manager import pages, init_services
|
||||||
@ -45,94 +45,95 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
app = App(
|
app = App(
|
||||||
name="EZ LAN Manager",
|
name="EZ LAN Manager",
|
||||||
|
build=pages.BasePage,
|
||||||
pages=[
|
pages=[
|
||||||
Page(
|
ComponentPage(
|
||||||
name="News",
|
name="News",
|
||||||
page_url="",
|
url_segment="",
|
||||||
build=pages.NewsPage,
|
build=pages.NewsPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="News",
|
name="News",
|
||||||
page_url="news",
|
url_segment="news",
|
||||||
build=pages.NewsPage,
|
build=pages.NewsPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Overview",
|
name="Overview",
|
||||||
page_url="overview",
|
url_segment="overview",
|
||||||
build=lambda: pages.PlaceholderPage(placeholder_name="LAN Übersicht"),
|
build=lambda: pages.PlaceholderPage(placeholder_name="LAN Übersicht"),
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="BuyTicket",
|
name="BuyTicket",
|
||||||
page_url="buy_ticket",
|
url_segment="buy_ticket",
|
||||||
build=pages.BuyTicketPage,
|
build=pages.BuyTicketPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="SeatingPlan",
|
name="SeatingPlan",
|
||||||
page_url="seating",
|
url_segment="seating",
|
||||||
build=pages.SeatingPlanPage,
|
build=pages.SeatingPlanPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Catering",
|
name="Catering",
|
||||||
page_url="catering",
|
url_segment="catering",
|
||||||
build=pages.CateringPage,
|
build=pages.CateringPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Guests",
|
name="Guests",
|
||||||
page_url="guests",
|
url_segment="guests",
|
||||||
build=pages.GuestsPage,
|
build=pages.GuestsPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Tournaments",
|
name="Tournaments",
|
||||||
page_url="tournaments",
|
url_segment="tournaments",
|
||||||
build=pages.TournamentsPage,
|
build=pages.TournamentsPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="FAQ",
|
name="FAQ",
|
||||||
page_url="faq",
|
url_segment="faq",
|
||||||
build=pages.FaqPage,
|
build=pages.FaqPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="RulesGTC",
|
name="RulesGTC",
|
||||||
page_url="rules-gtc",
|
url_segment="rules-gtc",
|
||||||
build=pages.RulesPage
|
build=pages.RulesPage
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Contact",
|
name="Contact",
|
||||||
page_url="contact",
|
url_segment="contact",
|
||||||
build=pages.ContactPage,
|
build=pages.ContactPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Imprint",
|
name="Imprint",
|
||||||
page_url="imprint",
|
url_segment="imprint",
|
||||||
build=pages.ImprintPage,
|
build=pages.ImprintPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Register",
|
name="Register",
|
||||||
page_url="register",
|
url_segment="register",
|
||||||
build=pages.RegisterPage,
|
build=pages.RegisterPage,
|
||||||
guard=not_logged_in_guard
|
guard=not_logged_in_guard
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="ForgotPassword",
|
name="ForgotPassword",
|
||||||
page_url="forgot-password",
|
url_segment="forgot-password",
|
||||||
build=pages.ForgotPasswordPage,
|
build=pages.ForgotPasswordPage,
|
||||||
guard=not_logged_in_guard
|
guard=not_logged_in_guard
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="EditProfile",
|
name="EditProfile",
|
||||||
page_url="edit-profile",
|
url_segment="edit-profile",
|
||||||
build=pages.EditProfilePage,
|
build=pages.EditProfilePage,
|
||||||
guard=logged_in_guard
|
guard=logged_in_guard
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Account",
|
name="Account",
|
||||||
page_url="account",
|
url_segment="account",
|
||||||
build=pages.AccountPage,
|
build=pages.AccountPage,
|
||||||
guard=logged_in_guard
|
guard=logged_in_guard
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="DbErrorPage",
|
name="DbErrorPage",
|
||||||
page_url="db-error",
|
url_segment="db-error",
|
||||||
build=pages.DbErrorPage,
|
build=pages.DbErrorPage,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -23,8 +23,8 @@ class CateringCartItem(Component):
|
|||||||
|
|
||||||
def build(self) -> rio.Component:
|
def build(self) -> rio.Component:
|
||||||
return Row(
|
return Row(
|
||||||
Text(self.ellipsize_string(self.article_name), align_x=0, wrap=True, min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Text(self.ellipsize_string(self.article_name), align_x=0, overflow="wrap", min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
Text(AccountingService.make_euro_string_from_int(self.article_price), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Text(AccountingService.make_euro_string_from_int(self.article_price), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
IconButton(icon="material/close", size=2, color=self.session.theme.danger_color, style="plain", on_press=lambda: self.remove_item_cb(self.list_id)),
|
IconButton(icon="material/close", size=2, color=self.session.theme.danger_color, style="plain-text", on_press=lambda: self.remove_item_cb(self.list_id)),
|
||||||
proportions=(19, 5, 2)
|
proportions=(19, 5, 2)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class CateringOrderItem(Component):
|
|||||||
def build(self) -> rio.Component:
|
def build(self) -> rio.Component:
|
||||||
order_status, color = self.get_display_text_and_color_for_order_status(self.order_status)
|
order_status, color = self.get_display_text_and_color_for_order_status(self.order_status)
|
||||||
return Row(
|
return Row(
|
||||||
Text(f"ID: {str(self.order_id):0>6}", align_x=0, wrap=True, min_width=10, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), margin_right=1),
|
Text(f"ID: {str(self.order_id):0>6}", align_x=0, overflow="wrap", min_width=10, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), margin_right=1),
|
||||||
Text(order_status, wrap=True, min_width=10, style=TextStyle(fill=color, font_size=0.9), margin_right=1),
|
Text(order_status, overflow="wrap", min_width=10, style=TextStyle(fill=color, font_size=0.9), margin_right=1),
|
||||||
Text(self.order_datetime.strftime("%d.%m. %H:%M"), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), align_x=1)
|
Text(self.order_datetime.strftime("%d.%m. %H:%M"), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), align_x=1)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -40,25 +40,25 @@ class CateringSelectionItem(Component):
|
|||||||
return Card(
|
return Card(
|
||||||
content=Column(
|
content=Column(
|
||||||
Row(
|
Row(
|
||||||
Text(article_name_top, align_x=0, wrap=True, min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Text(article_name_top, align_x=0, overflow="wrap", min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
Text(AccountingService.make_euro_string_from_int(self.article_price), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Text(AccountingService.make_euro_string_from_int(self.article_price), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon="material/add",
|
icon="material/add",
|
||||||
size=2,
|
size=2,
|
||||||
color=self.session.theme.success_color,
|
color=self.session.theme.success_color,
|
||||||
style="plain",
|
style="plain-text",
|
||||||
on_press=lambda: self.on_add_callback(self.article_id),
|
on_press=lambda: self.on_add_callback(self.article_id),
|
||||||
is_sensitive=self.is_sensitive
|
is_sensitive=self.is_sensitive
|
||||||
),
|
),
|
||||||
proportions=(19, 5, 2),
|
proportions=(19, 5, 2),
|
||||||
margin_bottom=0
|
margin_bottom=0
|
||||||
),
|
),
|
||||||
Spacer() if not article_name_bottom else Text(article_name_bottom, align_x=0, wrap=True, min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Spacer() if not article_name_bottom else Text(article_name_bottom, align_x=0, overflow="wrap", min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
Row(
|
Row(
|
||||||
Text(
|
Text(
|
||||||
self.additional_info,
|
self.additional_info,
|
||||||
align_x=0,
|
align_x=0,
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
min_width=19,
|
min_width=19,
|
||||||
style=TextStyle(fill=self.session.theme.background_color, font_size=0.6)
|
style=TextStyle(fill=self.session.theme.background_color, font_size=0.6)
|
||||||
),
|
),
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class NewsPost(Component):
|
|||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=1.3
|
font_size=1.3
|
||||||
),
|
),
|
||||||
wrap="ellipsize"
|
overflow="ellipsize"
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
self.date,
|
self.date,
|
||||||
@ -31,7 +31,7 @@ class NewsPost(Component):
|
|||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=0.6
|
font_size=0.6
|
||||||
),
|
),
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
@ -44,7 +44,7 @@ class NewsPost(Component):
|
|||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=0.8
|
font_size=0.8
|
||||||
),
|
),
|
||||||
wrap="ellipsize"
|
overflow="ellipsize"
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
self.text,
|
self.text,
|
||||||
@ -52,7 +52,7 @@ class NewsPost(Component):
|
|||||||
style=TextStyle(
|
style=TextStyle(
|
||||||
fill=self.session.theme.background_color
|
fill=self.session.theme.background_color
|
||||||
),
|
),
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
f"Geschrieben von {self.author}",
|
f"Geschrieben von {self.author}",
|
||||||
@ -66,7 +66,7 @@ class NewsPost(Component):
|
|||||||
font_size=0.5,
|
font_size=0.5,
|
||||||
italic=True
|
italic=True
|
||||||
),
|
),
|
||||||
wrap=False
|
overflow="nowrap"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
fill=self.session.theme.primary_color,
|
fill=self.session.theme.primary_color,
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class SeatingPlanLegend(Component):
|
|||||||
content=Column(
|
content=Column(
|
||||||
Text(f"Freier Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
Text(f"Freier Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
||||||
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
||||||
selectable=False, wrap=True)
|
selectable=False, overflow="wrap")
|
||||||
),
|
),
|
||||||
min_width=1,
|
min_width=1,
|
||||||
min_height=1,
|
min_height=1,
|
||||||
@ -36,7 +36,7 @@ class SeatingPlanLegend(Component):
|
|||||||
content=Column(
|
content=Column(
|
||||||
Text(f"Belegter Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
Text(f"Belegter Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
||||||
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
||||||
selectable=False, wrap=True)
|
selectable=False, overflow="wrap")
|
||||||
),
|
),
|
||||||
min_width=1,
|
min_width=1,
|
||||||
min_height=1,
|
min_height=1,
|
||||||
@ -51,7 +51,7 @@ class SeatingPlanLegend(Component):
|
|||||||
content=Column(
|
content=Column(
|
||||||
Text(f"Eigener Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
Text(f"Eigener Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
||||||
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
||||||
selectable=False, wrap=True)
|
selectable=False, overflow="wrap")
|
||||||
),
|
),
|
||||||
min_width=1,
|
min_width=1,
|
||||||
min_height=1,
|
min_height=1,
|
||||||
|
|||||||
@ -17,21 +17,21 @@ class SeatingPlanInfoBox(Component):
|
|||||||
if not self.show:
|
if not self.show:
|
||||||
return Spacer()
|
return Spacer()
|
||||||
if self.is_blocked:
|
if self.is_blocked:
|
||||||
return Column(Text(f"Sitzplatz gesperrt", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), wrap=True, justify="center"), min_height=10)
|
return Column(Text(f"Sitzplatz gesperrt", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), overflow="wrap", justify="center"), min_height=10)
|
||||||
if self.seat_id is None and self.seat_occupant is None:
|
if self.seat_id is None and self.seat_occupant is None:
|
||||||
return Column(Text(f"Sitzplatz auswählen...", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), wrap=True, justify="center"), min_height=10)
|
return Column(Text(f"Sitzplatz auswählen...", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), overflow="wrap", justify="center"), min_height=10)
|
||||||
return Column(
|
return Column(
|
||||||
Text(f"Dieser Sitzplatz ({self.seat_id}) ist gebucht von:", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), wrap=True, justify="center"),
|
Text(f"Dieser Sitzplatz ({self.seat_id}) ist gebucht von:", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), overflow="wrap", justify="center"),
|
||||||
Text(f"{self.seat_occupant}", margin_bottom=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), wrap=True, justify="center"),
|
Text(f"{self.seat_occupant}", margin_bottom=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), overflow="wrap", justify="center"),
|
||||||
min_height=10
|
min_height=10
|
||||||
) if self.seat_id and self.seat_occupant else Column(
|
) if self.seat_id and self.seat_occupant else Column(
|
||||||
Text(f"Dieser Sitzplatz ({self.seat_id}) ist frei", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), wrap=True, justify="center"),
|
Text(f"Dieser Sitzplatz ({self.seat_id}) ist frei", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), overflow="wrap", justify="center"),
|
||||||
Button(
|
Button(
|
||||||
Text(
|
Text(
|
||||||
f"Buchen",
|
f"Buchen",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from rio import Component, Text, Icon, TextStyle, Rectangle, Spacer, Color, MouseEventListener, Column
|
from rio import Component, Text, Icon, TextStyle, Rectangle, Spacer, Color, PointerEventListener, Column
|
||||||
from typing import Optional, Callable
|
from typing import Optional, Callable
|
||||||
|
|
||||||
from src.ez_lan_manager.types.Seat import Seat
|
from src.ez_lan_manager.types.Seat import Seat
|
||||||
@ -20,11 +20,11 @@ class SeatPixel(Component):
|
|||||||
return self.session.theme.success_color
|
return self.session.theme.success_color
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return MouseEventListener(
|
return PointerEventListener(
|
||||||
content=Rectangle(
|
content=Rectangle(
|
||||||
content=Column(
|
content=Column(
|
||||||
Text(f"{self.seat_id}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
Text(f"{self.seat_id}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
||||||
Text(f"{self.seat.category[0]}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5, selectable=False, wrap=True)
|
Text(f"{self.seat.category[0]}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5, selectable=False, overflow="wrap")
|
||||||
),
|
),
|
||||||
min_width=1,
|
min_width=1,
|
||||||
min_height=1,
|
min_height=1,
|
||||||
|
|||||||
@ -29,17 +29,17 @@ class SeatingPurchaseBox(Component):
|
|||||||
if self.success_msg:
|
if self.success_msg:
|
||||||
return Column(
|
return Column(
|
||||||
Text(f"{self.success_msg}", margin=1, style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
Text(f"{self.success_msg}", margin=1, style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
||||||
wrap=True, justify="center"),
|
overflow="wrap", justify="center"),
|
||||||
Row(
|
Row(
|
||||||
Button(
|
Button(
|
||||||
Text("Zurück",
|
Text("Zurück",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
style="plain",
|
style="plain-text",
|
||||||
on_press=self.cancel_cb
|
on_press=self.cancel_cb
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -49,17 +49,17 @@ class SeatingPurchaseBox(Component):
|
|||||||
if self.error_msg:
|
if self.error_msg:
|
||||||
return Column(
|
return Column(
|
||||||
Text(f"{self.error_msg}", margin=1, style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
Text(f"{self.error_msg}", margin=1, style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
||||||
wrap=True, justify="center"),
|
overflow="wrap", justify="center"),
|
||||||
Row(
|
Row(
|
||||||
Button(
|
Button(
|
||||||
Text("Zurück",
|
Text("Zurück",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
style="plain",
|
style="plain-text",
|
||||||
on_press=self.cancel_cb
|
on_press=self.cancel_cb
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -67,24 +67,24 @@ class SeatingPurchaseBox(Component):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
Text(f"Sitzplatz {self.seat_id} verbindlich buchen?", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), wrap=True, justify="center"),
|
Text(f"Sitzplatz {self.seat_id} verbindlich buchen?", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), overflow="wrap", justify="center"),
|
||||||
Row(
|
Row(
|
||||||
Button(
|
Button(
|
||||||
Text("Nein",
|
Text("Nein",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
style="plain",
|
style="plain-text",
|
||||||
on_press=self.cancel_cb
|
on_press=self.cancel_cb
|
||||||
),
|
),
|
||||||
Button(
|
Button(
|
||||||
Text("Ja",
|
Text("Ja",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from asyncio import sleep, create_task
|
from asyncio import sleep, create_task
|
||||||
|
|
||||||
import rio
|
import rio
|
||||||
from rio import Component, Column, Text, TextStyle, Button, Row, ScrollContainer, Spacer, Popup, PopupOpenOrCloseEvent
|
from rio import Component, Column, Text, TextStyle, Button, Row, ScrollContainer, Spacer, Popup
|
||||||
|
|
||||||
from src.ez_lan_manager.components.CateringCartItem import CateringCartItem
|
from src.ez_lan_manager.components.CateringCartItem import CateringCartItem
|
||||||
from src.ez_lan_manager.components.CateringOrderItem import CateringOrderItem
|
from src.ez_lan_manager.components.CateringOrderItem import CateringOrderItem
|
||||||
@ -111,7 +111,7 @@ class ShoppingCartAndOrders(Component):
|
|||||||
cart_container,
|
cart_container,
|
||||||
Popup(
|
Popup(
|
||||||
anchor=cart_container,
|
anchor=cart_container,
|
||||||
content=Text(self.popup_message, style=TextStyle(fill=self.session.theme.danger_color if self.popup_is_error else self.session.theme.success_color), wrap=True, margin=2, justify="center", min_width=20),
|
content=Text(self.popup_message, style=TextStyle(fill=self.session.theme.danger_color if self.popup_is_error else self.session.theme.success_color), overflow="wrap", margin=2, justify="center", min_width=20),
|
||||||
is_open=self.popup_is_shown,
|
is_open=self.popup_is_shown,
|
||||||
position="center",
|
position="center",
|
||||||
color=self.session.theme.primary_color
|
color=self.session.theme.primary_color
|
||||||
|
|||||||
@ -58,7 +58,7 @@ class TicketBuyCard(Component):
|
|||||||
Column(
|
Column(
|
||||||
Text(self.description, margin_left=1, margin_top=1, style=ticket_description_style),
|
Text(self.description, margin_left=1, margin_top=1, style=ticket_description_style),
|
||||||
Text("Du besitzt dieses Ticket!", margin_left=1, margin_top=1, style=ticket_owned_style) if self.user_ticket is not None and self.user_ticket.category == self.category else Spacer(),
|
Text("Du besitzt dieses Ticket!", margin_left=1, margin_top=1, style=ticket_owned_style) if self.user_ticket is not None and self.user_ticket.category == self.category else Spacer(),
|
||||||
Text(self.additional_info, margin_left=1, margin_top=1, style=ticket_additional_info_style, wrap=True),
|
Text(self.additional_info, margin_left=1, margin_top=1, style=ticket_additional_info_style, overflow="wrap"),
|
||||||
Row(
|
Row(
|
||||||
progress_bar,
|
progress_bar,
|
||||||
tickets_side_text,
|
tickets_side_text,
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
from asyncio import sleep
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from rio import Column, Component, event, Text, TextStyle, Button, Color, Spacer, Revealer, Row, ProgressCircle
|
from rio import Column, Component, event, Text, TextStyle, Button, Color, Spacer, Revealer, Row, ProgressCircle
|
||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, UserService, AccountingService
|
from src.ez_lan_manager import ConfigurationService, UserService, AccountingService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
from src.ez_lan_manager.types.Transaction import Transaction
|
from src.ez_lan_manager.types.Transaction import Transaction
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
@ -28,18 +26,16 @@ class AccountPage(Component):
|
|||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
if not self.user and not self.balance:
|
if not self.user and not self.balance:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
ProgressCircle(
|
||||||
ProgressCircle(
|
color="secondary",
|
||||||
color="secondary",
|
align_x=0.5,
|
||||||
align_x=0.5,
|
margin_top=2,
|
||||||
margin_top=2,
|
margin_bottom=2
|
||||||
margin_bottom=2
|
)
|
||||||
)
|
),
|
||||||
),
|
align_y=0,
|
||||||
align_y = 0,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self.banking_info_revealer = Revealer(
|
self.banking_info_revealer = Revealer(
|
||||||
@ -79,9 +75,9 @@ class AccountPage(Component):
|
|||||||
align_x=0.5
|
align_x=0.5
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
margin = 2,
|
margin=2,
|
||||||
margin_top = 0,
|
margin_top=0,
|
||||||
margin_bottom = 1,
|
margin_bottom=1,
|
||||||
grow_x=True
|
grow_x=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -127,57 +123,55 @@ class AccountPage(Component):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
content=Text(
|
||||||
content=Text(
|
f"Kontostand: {AccountingService.make_euro_string_from_int(self.balance)}",
|
||||||
f"Kontostand: {AccountingService.make_euro_string_from_int(self.balance)}",
|
style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=2,
|
||||||
|
align_x=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
content=Column(
|
||||||
|
Text(
|
||||||
|
"LAN-Konto aufladen",
|
||||||
style=TextStyle(
|
style=TextStyle(
|
||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=1.2
|
font_size=1.2
|
||||||
),
|
),
|
||||||
margin=2,
|
margin=2,
|
||||||
align_x=0.5
|
align_x=0.5
|
||||||
|
),
|
||||||
|
Button(
|
||||||
|
content=Text("BANKÜBERWEISUNG", style=TextStyle(fill=Color.from_hex("121212"), font_size=0.8), justify="center"),
|
||||||
|
shape="rectangle",
|
||||||
|
style="major",
|
||||||
|
color="secondary",
|
||||||
|
grow_x=True,
|
||||||
|
margin=2,
|
||||||
|
margin_top=0,
|
||||||
|
margin_bottom=1,
|
||||||
|
on_press=self._on_banking_info_press
|
||||||
|
),
|
||||||
|
self.banking_info_revealer,
|
||||||
|
Button(
|
||||||
|
content=Text("PAYPAL", style=TextStyle(fill=Color.from_hex("121212"), font_size=0.8), justify="center"),
|
||||||
|
shape="rectangle",
|
||||||
|
style="major",
|
||||||
|
color="secondary",
|
||||||
|
grow_x=True,
|
||||||
|
margin=2,
|
||||||
|
margin_top=0,
|
||||||
|
is_sensitive=False
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
MainViewContentBox(
|
),
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
Text(
|
content=transaction_history
|
||||||
"LAN-Konto aufladen",
|
),
|
||||||
style=TextStyle(
|
align_y=0,
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=2,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
|
||||||
Button(
|
|
||||||
content=Text("BANKÜBERWEISUNG", style=TextStyle(fill=Color.from_hex("121212"), font_size=0.8), justify="center"),
|
|
||||||
shape="rectangle",
|
|
||||||
style="major",
|
|
||||||
color="secondary",
|
|
||||||
grow_x=True,
|
|
||||||
margin=2,
|
|
||||||
margin_top=0,
|
|
||||||
margin_bottom=1,
|
|
||||||
on_press=self._on_banking_info_press
|
|
||||||
),
|
|
||||||
self.banking_info_revealer,
|
|
||||||
Button(
|
|
||||||
content=Text("PAYPAL", style=TextStyle(fill=Color.from_hex("121212"), font_size=0.8), justify="center"),
|
|
||||||
shape="rectangle",
|
|
||||||
style="major",
|
|
||||||
color="secondary",
|
|
||||||
grow_x=True,
|
|
||||||
margin=2,
|
|
||||||
margin_top=0,
|
|
||||||
is_sensitive=False
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
content=transaction_history
|
|
||||||
),
|
|
||||||
align_y=0,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,14 +2,14 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import * # type: ignore
|
from typing import * # type: ignore
|
||||||
|
|
||||||
from rio import Component, event, Spacer, Card, Container, Column, Row, TextStyle, Color, Text
|
from rio import Component, event, Spacer, Card, Container, Column, Row, TextStyle, Color, Text, PageView
|
||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, DatabaseService
|
from src.ez_lan_manager import ConfigurationService, DatabaseService
|
||||||
from src.ez_lan_manager.components.DesktopNavigation import DesktopNavigation
|
from src.ez_lan_manager.components.DesktopNavigation import DesktopNavigation
|
||||||
|
|
||||||
class BasePage(Component):
|
class BasePage(Component):
|
||||||
content: Component
|
color = "secondary"
|
||||||
|
corner_radius = (0, 0.5, 0, 0)
|
||||||
@event.periodic(60)
|
@event.periodic(60)
|
||||||
async def check_db_conn(self) -> None:
|
async def check_db_conn(self) -> None:
|
||||||
is_healthy = await self.session[DatabaseService].is_healthy()
|
is_healthy = await self.session[DatabaseService].is_healthy()
|
||||||
@ -21,15 +21,12 @@ class BasePage(Component):
|
|||||||
await self.force_refresh()
|
await self.force_refresh()
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
if self.content is None:
|
content = Card(
|
||||||
content = Spacer()
|
PageView(),
|
||||||
else:
|
color="secondary",
|
||||||
content = Card(
|
min_width=38,
|
||||||
self.content,
|
corner_radius=(0, 0.5, 0, 0)
|
||||||
color="secondary",
|
)
|
||||||
min_width=38,
|
|
||||||
corner_radius=(0, 0.5, 0, 0)
|
|
||||||
)
|
|
||||||
if self.session.window_width > 28:
|
if self.session.window_width > 28:
|
||||||
return Container(
|
return Container(
|
||||||
content=Column(
|
content=Column(
|
||||||
|
|||||||
@ -1,14 +1,10 @@
|
|||||||
from asyncio import sleep
|
|
||||||
from functools import partial
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from rio import Text, Column, TextStyle, Component, event, TextInput, MultiLineTextInput, Row, Button, Card, Popup
|
from rio import Text, Column, TextStyle, Component, event, Button, Popup
|
||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, UserService, MailingService, AccountingService, TicketingService
|
from src.ez_lan_manager import ConfigurationService, UserService, TicketingService
|
||||||
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.components.TicketBuyCard import TicketBuyCard
|
from src.ez_lan_manager.components.TicketBuyCard import TicketBuyCard
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.services.AccountingService import InsufficientFundsError
|
from src.ez_lan_manager.services.AccountingService import InsufficientFundsError
|
||||||
from src.ez_lan_manager.services.TicketingService import TicketNotAvailableError, UserAlreadyHasTicketError
|
from src.ez_lan_manager.services.TicketingService import TicketNotAvailableError, UserAlreadyHasTicketError
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
@ -57,7 +53,7 @@ class BuyTicketPage(Component):
|
|||||||
self.is_popup_success = False
|
self.is_popup_success = False
|
||||||
except UserAlreadyHasTicketError:
|
except UserAlreadyHasTicketError:
|
||||||
self.popup_message = (f"Du besitzt bereits ein Ticket. Um dein aktuelles Ticket zu stornieren, kontaktiere bitte den Support unter "
|
self.popup_message = (f"Du besitzt bereits ein Ticket. Um dein aktuelles Ticket zu stornieren, kontaktiere bitte den Support unter "
|
||||||
f"{self.session[ConfigurationService].get_lan_info().organizer_mail}.")
|
f"{self.session[ConfigurationService].get_lan_info().organizer_mail}.")
|
||||||
self.is_popup_success = False
|
self.is_popup_success = False
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
self.popup_message = "Ein unbekannter Fehler ist aufgetreten."
|
self.popup_message = "Ein unbekannter Fehler ist aufgetreten."
|
||||||
@ -65,12 +61,10 @@ class BuyTicketPage(Component):
|
|||||||
self.is_popup_open = True
|
self.is_popup_open = True
|
||||||
await self.on_populate()
|
await self.on_populate()
|
||||||
|
|
||||||
|
|
||||||
async def on_popup_close_pressed(self) -> None:
|
async def on_popup_close_pressed(self) -> None:
|
||||||
self.is_popup_open = False
|
self.is_popup_open = False
|
||||||
self.popup_message = ""
|
self.popup_message = ""
|
||||||
|
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
ticket_infos = self.session[ConfigurationService].get_ticket_info()
|
ticket_infos = self.session[ConfigurationService].get_ticket_info()
|
||||||
header = Text(
|
header = Text(
|
||||||
@ -84,44 +78,41 @@ class BuyTicketPage(Component):
|
|||||||
align_x=0.5
|
align_x=0.5
|
||||||
)
|
)
|
||||||
|
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
Column(
|
||||||
Column(
|
header,
|
||||||
header,
|
Popup(
|
||||||
Popup(
|
anchor=header,
|
||||||
anchor=header,
|
content=Column(
|
||||||
content=Column(
|
Text(
|
||||||
Text(
|
self.popup_message,
|
||||||
self.popup_message,
|
style=TextStyle(font_size=1.1, fill=self.session.theme.success_color if self.is_popup_success else self.session.theme.danger_color),
|
||||||
style=TextStyle(font_size=1.1, fill=self.session.theme.success_color if self.is_popup_success else self.session.theme.danger_color),
|
overflow="wrap",
|
||||||
wrap=True,
|
grow_y=True,
|
||||||
grow_y=True,
|
margin=1
|
||||||
margin=1
|
|
||||||
),
|
|
||||||
Button("Bestätigen", shape="rounded", grow_y=False, on_press=self.on_popup_close_pressed),
|
|
||||||
min_width=34,
|
|
||||||
min_height=10
|
|
||||||
),
|
),
|
||||||
is_open=self.is_popup_open,
|
Button("Bestätigen", shape="rounded", grow_y=False, on_press=self.on_popup_close_pressed),
|
||||||
position="bottom",
|
min_width=34,
|
||||||
margin=1,
|
min_height=10
|
||||||
corner_radius=0.2,
|
|
||||||
color=self.session.theme.primary_color
|
|
||||||
),
|
),
|
||||||
*[TicketBuyCard(
|
is_open=self.is_popup_open,
|
||||||
description=t.description,
|
position="bottom",
|
||||||
additional_info=t.additional_info,
|
margin=1,
|
||||||
price=t.price,
|
corner_radius=0.2,
|
||||||
category=t.category,
|
color=self.session.theme.primary_color
|
||||||
pressed_cb=self.on_buy_pressed,
|
|
||||||
is_enabled=self.is_buying_enabled,
|
|
||||||
total_tickets=t.total_tickets,
|
|
||||||
user_ticket=self.user_ticket
|
|
||||||
) for t in ticket_infos]
|
|
||||||
),
|
),
|
||||||
|
*[TicketBuyCard(
|
||||||
|
description=t.description,
|
||||||
|
additional_info=t.additional_info,
|
||||||
|
price=t.price,
|
||||||
|
category=t.category,
|
||||||
|
pressed_cb=self.on_buy_pressed,
|
||||||
|
is_enabled=self.is_buying_enabled,
|
||||||
|
total_tickets=t.total_tickets,
|
||||||
|
user_ticket=self.user_ticket
|
||||||
|
) for t in ticket_infos]
|
||||||
),
|
),
|
||||||
align_y=0
|
|
||||||
),
|
),
|
||||||
grow_x=True
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,7 +6,6 @@ from src.ez_lan_manager import ConfigurationService, CateringService
|
|||||||
from src.ez_lan_manager.components.CateringSelectionItem import CateringSelectionItem
|
from src.ez_lan_manager.components.CateringSelectionItem import CateringSelectionItem
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.components.ShoppingCartAndOrders import ShoppingCartAndOrders
|
from src.ez_lan_manager.components.ShoppingCartAndOrders import ShoppingCartAndOrders
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.CateringMenuItem import CateringMenuItemCategory, CateringMenuItem
|
from src.ez_lan_manager.types.CateringMenuItem import CateringMenuItemCategory, CateringMenuItem
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
|
|
||||||
@ -24,7 +23,6 @@ class CateringPage(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Catering")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Catering")
|
||||||
self.all_menu_items = await self.session[CateringService].get_menu()
|
self.all_menu_items = await self.session[CateringService].get_menu()
|
||||||
|
|
||||||
|
|
||||||
async def on_user_logged_in_status_changed(self) -> None:
|
async def on_user_logged_in_status_changed(self) -> None:
|
||||||
await self.force_refresh()
|
await self.force_refresh()
|
||||||
|
|
||||||
@ -35,7 +33,6 @@ class CateringPage(Component):
|
|||||||
def get_menu_items_by_category(all_menu_items: list[CateringMenuItem], category: Optional[CateringMenuItemCategory]) -> list[CateringMenuItem]:
|
def get_menu_items_by_category(all_menu_items: list[CateringMenuItem], category: Optional[CateringMenuItemCategory]) -> list[CateringMenuItem]:
|
||||||
return list(filter(lambda item: item.category == category, all_menu_items))
|
return list(filter(lambda item: item.category == category, all_menu_items))
|
||||||
|
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
user_id = self.session[SessionStorage].user_id
|
user_id = self.session[SessionStorage].user_id
|
||||||
if len(self.shopping_cart_and_orders) == 0:
|
if len(self.shopping_cart_and_orders) == 0:
|
||||||
@ -73,217 +70,215 @@ class CateringPage(Component):
|
|||||||
) if user_id else Spacer()
|
) if user_id else Spacer()
|
||||||
|
|
||||||
menu = [MainViewContentBox(
|
menu = [MainViewContentBox(
|
||||||
ProgressCircle(
|
ProgressCircle(
|
||||||
color="secondary",
|
color="secondary",
|
||||||
align_x=0.5,
|
align_x=0.5,
|
||||||
margin_top=2,
|
margin_top=2,
|
||||||
margin_bottom=2
|
margin_bottom=2
|
||||||
)
|
|
||||||
)] if not self.all_menu_items else [MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Snacks",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.SNACK))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Frühstück",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BREAKFAST))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Hauptspeisen",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.MAIN_COURSE))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Desserts",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.DESSERT))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Wasser & Softdrinks",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BEVERAGE_NON_ALCOHOLIC))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Alkoholische Getränke",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BEVERAGE_ALCOHOLIC))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Cocktails & Longdrinks",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BEVERAGE_COCKTAIL))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Shots",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BEVERAGE_SHOT))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Revealer(
|
|
||||||
header="Sonstiges",
|
|
||||||
content=Column(
|
|
||||||
*[CateringSelectionItem(
|
|
||||||
article_name=catering_menu_item.name,
|
|
||||||
article_price=catering_menu_item.price,
|
|
||||||
article_id=catering_menu_item.item_id,
|
|
||||||
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
|
||||||
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
|
||||||
additional_info=catering_menu_item.additional_info,
|
|
||||||
is_grey=idx % 2 == 0
|
|
||||||
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.NON_FOOD))],
|
|
||||||
),
|
|
||||||
header_style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
align_y=0.5
|
|
||||||
)
|
|
||||||
)]
|
|
||||||
|
|
||||||
return BasePage(
|
|
||||||
content=Column(
|
|
||||||
# SHOPPING CART
|
|
||||||
shopping_cart_and_orders_container,
|
|
||||||
# ITEM SELECTION
|
|
||||||
*menu,
|
|
||||||
align_y=0
|
|
||||||
)
|
)
|
||||||
|
)] if not self.all_menu_items else [MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Snacks",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.SNACK))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Frühstück",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BREAKFAST))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Hauptspeisen",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.MAIN_COURSE))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Desserts",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.DESSERT))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Wasser & Softdrinks",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BEVERAGE_NON_ALCOHOLIC))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Alkoholische Getränke",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BEVERAGE_ALCOHOLIC))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Cocktails & Longdrinks",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BEVERAGE_COCKTAIL))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Shots",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.BEVERAGE_SHOT))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
Revealer(
|
||||||
|
header="Sonstiges",
|
||||||
|
content=Column(
|
||||||
|
*[CateringSelectionItem(
|
||||||
|
article_name=catering_menu_item.name,
|
||||||
|
article_price=catering_menu_item.price,
|
||||||
|
article_id=catering_menu_item.item_id,
|
||||||
|
on_add_callback=self.shopping_cart_and_orders[0].on_add_item,
|
||||||
|
is_sensitive=(user_id is not None) and not catering_menu_item.is_disabled,
|
||||||
|
additional_info=catering_menu_item.additional_info,
|
||||||
|
is_grey=idx % 2 == 0
|
||||||
|
) for idx, catering_menu_item in enumerate(self.get_menu_items_by_category(self.all_menu_items, CateringMenuItemCategory.NON_FOOD))],
|
||||||
|
),
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
align_y=0.5
|
||||||
|
)
|
||||||
|
)]
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
# SHOPPING CART
|
||||||
|
shopping_cart_and_orders_container,
|
||||||
|
# ITEM SELECTION
|
||||||
|
*menu,
|
||||||
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,7 +6,6 @@ from rio import Text, Column, TextStyle, Component, event, TextInput, MultiLineT
|
|||||||
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
||||||
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
|
|
||||||
@ -59,9 +58,9 @@ class ContactPage(Component):
|
|||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
self.animated_text = AnimatedText(
|
self.animated_text = AnimatedText(
|
||||||
margin_top = 2,
|
margin_top=2,
|
||||||
margin_bottom = 1,
|
margin_bottom=1,
|
||||||
align_x = 0.1
|
align_x=0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
self.email_input = TextInput(
|
self.email_input = TextInput(
|
||||||
@ -105,30 +104,27 @@ class ContactPage(Component):
|
|||||||
color="primary",
|
color="primary",
|
||||||
on_press=self.on_send_pressed
|
on_press=self.on_send_pressed
|
||||||
)
|
)
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
Column(
|
||||||
Column(
|
Text(
|
||||||
Text(
|
text="Kontakt",
|
||||||
text="Kontakt",
|
style=TextStyle(
|
||||||
style=TextStyle(
|
fill=self.session.theme.background_color,
|
||||||
fill=self.session.theme.background_color,
|
font_size=1.2
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=1,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
self.email_input,
|
margin_top=2,
|
||||||
self.subject_input,
|
margin_bottom=1,
|
||||||
self.message_input,
|
align_x=0.5
|
||||||
Row(
|
),
|
||||||
self.animated_text,
|
self.email_input,
|
||||||
self.submit_button,
|
self.subject_input,
|
||||||
)
|
self.message_input,
|
||||||
|
Row(
|
||||||
|
self.animated_text,
|
||||||
|
self.submit_button,
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
align_y=0
|
|
||||||
),
|
),
|
||||||
grow_x=True
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class DbErrorPage(Component):
|
|||||||
fill=self.session.theme.danger_color,
|
fill=self.session.theme.danger_color,
|
||||||
font_size=1.3
|
font_size=1.3
|
||||||
),
|
),
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
color="secondary",
|
color="secondary",
|
||||||
|
|||||||
@ -10,7 +10,6 @@ from email_validator import validate_email, EmailNotValidError
|
|||||||
from src.ez_lan_manager import ConfigurationService, UserService
|
from src.ez_lan_manager import ConfigurationService, UserService
|
||||||
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
|
|
||||||
@ -18,6 +17,7 @@ from src.ez_lan_manager.types.User import User
|
|||||||
class EditProfilePage(Component):
|
class EditProfilePage(Component):
|
||||||
user: Optional[User] = None
|
user: Optional[User] = None
|
||||||
pfp: Optional[bytes] = None
|
pfp: Optional[bytes] = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def optional_date_to_str(d: Optional[date]) -> str:
|
def optional_date_to_str(d: Optional[date]) -> str:
|
||||||
if not d:
|
if not d:
|
||||||
@ -96,18 +96,16 @@ class EditProfilePage(Component):
|
|||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
if not self.user:
|
if not self.user:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
ProgressCircle(
|
||||||
ProgressCircle(
|
color="secondary",
|
||||||
color="secondary",
|
align_x=0.5,
|
||||||
align_x=0.5,
|
margin_top=2,
|
||||||
margin_top=2,
|
margin_bottom=2
|
||||||
margin_bottom=2
|
)
|
||||||
)
|
),
|
||||||
),
|
align_y=0
|
||||||
align_y = 0
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self.animated_text = AnimatedText(
|
self.animated_text = AnimatedText(
|
||||||
@ -175,57 +173,55 @@ class EditProfilePage(Component):
|
|||||||
margin_bottom=1
|
margin_bottom=1
|
||||||
)
|
)
|
||||||
|
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
content=Column(
|
||||||
content=Column(
|
self.pfp_image_container,
|
||||||
self.pfp_image_container,
|
Button(
|
||||||
|
content=Text(
|
||||||
|
"Neues Bild hochladen",
|
||||||
|
style=TextStyle(fill=Color.from_hex("02dac5"), font_size=0.9)
|
||||||
|
),
|
||||||
|
align_x=0.5,
|
||||||
|
margin_bottom=1,
|
||||||
|
shape="rectangle",
|
||||||
|
style="major",
|
||||||
|
color="primary",
|
||||||
|
on_press=self.upload_new_pfp
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
TextInput(label="Deine User-ID", text=self.user.user_id, is_sensitive=False, margin_left=1, grow_x=False),
|
||||||
|
TextInput(label="Dein Nickname", text=self.user.user_name, is_sensitive=False, margin_left=1, margin_right=1, grow_x=True),
|
||||||
|
margin_bottom=1
|
||||||
|
),
|
||||||
|
self.email_input,
|
||||||
|
Row(
|
||||||
|
self.first_name_input,
|
||||||
|
self.last_name_input,
|
||||||
|
margin_bottom=1
|
||||||
|
),
|
||||||
|
self.birthday_input,
|
||||||
|
self.new_pw_1_input,
|
||||||
|
self.new_pw_2_input,
|
||||||
|
|
||||||
|
Row(
|
||||||
|
self.animated_text,
|
||||||
Button(
|
Button(
|
||||||
content=Text(
|
content=Text(
|
||||||
"Neues Bild hochladen",
|
"Speichern",
|
||||||
style=TextStyle(fill=Color.from_hex("02dac5"), font_size=0.9)
|
style=TextStyle(fill=self.session.theme.success_color, font_size=0.9),
|
||||||
|
align_x=0.2
|
||||||
),
|
),
|
||||||
align_x=0.5,
|
align_x=0.9,
|
||||||
|
margin_top=2,
|
||||||
margin_bottom=1,
|
margin_bottom=1,
|
||||||
shape="rectangle",
|
shape="rectangle",
|
||||||
style="major",
|
style="major",
|
||||||
color="primary",
|
color="primary",
|
||||||
on_press=self.upload_new_pfp
|
on_press=self.on_save_pressed
|
||||||
),
|
),
|
||||||
Row(
|
)
|
||||||
TextInput(label="Deine User-ID", text=self.user.user_id, is_sensitive=False, margin_left=1, grow_x=False),
|
)
|
||||||
TextInput(label="Dein Nickname", text=self.user.user_name, is_sensitive=False, margin_left=1, margin_right=1, grow_x=True),
|
),
|
||||||
margin_bottom=1
|
align_y=0,
|
||||||
),
|
|
||||||
self.email_input,
|
|
||||||
Row(
|
|
||||||
self.first_name_input,
|
|
||||||
self.last_name_input,
|
|
||||||
margin_bottom=1
|
|
||||||
),
|
|
||||||
self.birthday_input,
|
|
||||||
self.new_pw_1_input,
|
|
||||||
self.new_pw_2_input,
|
|
||||||
|
|
||||||
Row(
|
|
||||||
self.animated_text,
|
|
||||||
Button(
|
|
||||||
content=Text(
|
|
||||||
"Speichern",
|
|
||||||
style=TextStyle(fill=self.session.theme.success_color, font_size=0.9),
|
|
||||||
align_x=0.2
|
|
||||||
),
|
|
||||||
align_x=0.9,
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=1,
|
|
||||||
shape="rectangle",
|
|
||||||
style="major",
|
|
||||||
color="primary",
|
|
||||||
on_press=self.on_save_pressed
|
|
||||||
),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
align_y=0,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,63 +2,69 @@ from rio import Column, Component, event, TextStyle, Text, Revealer
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
FAQ: list[list[str]] = [
|
FAQ: list[list[str]] = [
|
||||||
["Wie melde ich mich für die LAN an?", "Registriere dich auf dieser Seite, lade dein Guthabenkonto auf und kaufe ein Ticket. Danach such dir einen freien Sitzplatz auf dem Sitzplan aus."],
|
["Wie melde ich mich für die LAN an?",
|
||||||
["Wie lade ich mein Guthabenkonto auf?", "Logge dich in deinen Account ein und klicke auf die Schaltfläche 'Guthaben' in der Navigationsleiste. Dort findest du alle weiteren Informationen."],
|
"Registriere dich auf dieser Seite, lade dein Guthabenkonto auf und kaufe ein Ticket. Danach such dir einen freien Sitzplatz auf dem Sitzplan aus."],
|
||||||
|
["Wie lade ich mein Guthabenkonto auf?",
|
||||||
|
"Logge dich in deinen Account ein und klicke auf die Schaltfläche 'Guthaben' in der Navigationsleiste. Dort findest du alle weiteren Informationen."],
|
||||||
["Wie kann ich mein Ticket stornieren?", "Schreibe uns eine Mail an tech@ezgg-ev.de, wir kümmern uns dann Zeitnah um die Stornierung."],
|
["Wie kann ich mein Ticket stornieren?", "Schreibe uns eine Mail an tech@ezgg-ev.de, wir kümmern uns dann Zeitnah um die Stornierung."],
|
||||||
["Was soll ich zur LAN mitbringen?", "Deinen PC inklusive aller zugehörigen Geräte (Maus, Tastatur, Monitor, Headset), sowie aller Anschlusskabel. Wir empfehlen ein LAN Kabel von mindestens 5 Metern Länge mitzubringen. Des weiteren benötigste du eine Mehrfachsteckdose, da dir an deinem Platz nur ein einzelner Steckplatz zugewiesen wird."],
|
["Was soll ich zur LAN mitbringen?",
|
||||||
|
"Deinen PC inklusive aller zugehörigen Geräte (Maus, Tastatur, Monitor, Headset), sowie aller Anschlusskabel. Wir empfehlen ein LAN Kabel von mindestens 5 Metern Länge mitzubringen. Des weiteren benötigste du eine Mehrfachsteckdose, da dir an deinem Platz nur ein einzelner Steckplatz zugewiesen wird."],
|
||||||
["Wohin mit technischen Problemen?", "Melde dich einfach am Einlass bzw in der Orga-Ecke, wir helfen gerne weiter."],
|
["Wohin mit technischen Problemen?", "Melde dich einfach am Einlass bzw in der Orga-Ecke, wir helfen gerne weiter."],
|
||||||
["Wo entsorge ich meinen Müll?", "Im gesamten Veranstaltungsgebäude findest du Mülltüten/Mülleimer."],
|
["Wo entsorge ich meinen Müll?", "Im gesamten Veranstaltungsgebäude findest du Mülltüten/Mülleimer."],
|
||||||
["Darf ich Cannabis konsumieren?", "Generell verbieten wir den Konsum von Cannabis nicht. Beachte aber die allgemeine Gesetzeslage und ziehe ggf. die Bubatzkarte zu Rat."],
|
["Darf ich Cannabis konsumieren?", "Generell verbieten wir den Konsum von Cannabis nicht. Beachte aber die allgemeine Gesetzeslage und ziehe ggf. die Bubatzkarte zu Rat."],
|
||||||
["Gibt es einen Discord oder TeamSpeak?", "Du kannst gerne unseren Vereins-TeamSpeak3-Server unter ts3.ezgg-ev.de nutzen. Den Link zum offiziellen Discord findest du in der Navigationsleiste."],
|
["Gibt es einen Discord oder TeamSpeak?",
|
||||||
["Wo bleibt mein Essen?", "Vermutlich ist es auf dem Weg. Du kannst auf der Catering-Seite den Status deiner Bestellung überprüfen. Hast du Bedenken das sie verloren gegangen sein könnte, sprich ein Team-Mitglied an der Theke darauf an."],
|
"Du kannst gerne unseren Vereins-TeamSpeak3-Server unter ts3.ezgg-ev.de nutzen. Den Link zum offiziellen Discord findest du in der Navigationsleiste."],
|
||||||
["Wie lange dauert eine Aufladung per Überweißung?", "In der Regel wird das Guthaben deinem Konto innerhalb von 2 bis 3 Werktagen gutgeschrieben. In Ausnahmefällen kann es bis zu 7 Tagen dauern."],
|
["Wo bleibt mein Essen?",
|
||||||
["Wie melde ich meinen Clan an?", "Wenn in deiner Gruppe mehr als 3 Personen sind, dann schreib uns bitte eine Mail mit dem Betreff 'Gruppenticket' an tech@ezgg-ev.de. Schreibe uns dort die Nutzer-ID's sowie die Sitzplätze deiner Gruppe auf. Gehe sicher das jede Person in deiner Gruppe entweder bereits ein passendes Ticket besitzt oder über genug Guthaben verfügt um ein Ticket zu kaufen."],
|
"Vermutlich ist es auf dem Weg. Du kannst auf der Catering-Seite den Status deiner Bestellung überprüfen. Hast du Bedenken das sie verloren gegangen sein könnte, sprich ein Team-Mitglied an der Theke darauf an."],
|
||||||
["Wo kann ich schlafen?", "Im Veranstaltungsgebäude sind offizielle Schlafbereiche ausgewiesen. Solange du keine Zugangs-, Durchgangs-, oder Rettungswege blockierst, darfst du überall schlafen."]
|
["Wie lange dauert eine Aufladung per Überweißung?",
|
||||||
|
"In der Regel wird das Guthaben deinem Konto innerhalb von 2 bis 3 Werktagen gutgeschrieben. In Ausnahmefällen kann es bis zu 7 Tagen dauern."],
|
||||||
|
["Wie melde ich meinen Clan an?",
|
||||||
|
"Wenn in deiner Gruppe mehr als 3 Personen sind, dann schreib uns bitte eine Mail mit dem Betreff 'Gruppenticket' an tech@ezgg-ev.de. Schreibe uns dort die Nutzer-ID's sowie die Sitzplätze deiner Gruppe auf. Gehe sicher das jede Person in deiner Gruppe entweder bereits ein passendes Ticket besitzt oder über genug Guthaben verfügt um ein Ticket zu kaufen."],
|
||||||
|
["Wo kann ich schlafen?",
|
||||||
|
"Im Veranstaltungsgebäude sind offizielle Schlafbereiche ausgewiesen. Solange du keine Zugangs-, Durchgangs-, oder Rettungswege blockierst, darfst du überall schlafen."]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class FaqPage(Component):
|
class FaqPage(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
async def on_populate(self) -> None:
|
async def on_populate(self) -> None:
|
||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - FAQ")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - FAQ")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
Column(
|
||||||
Column(
|
Text(
|
||||||
Text(
|
text="FAQ",
|
||||||
text="FAQ",
|
style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin_top=2,
|
||||||
|
margin_bottom=0,
|
||||||
|
align_x=0.5
|
||||||
|
),
|
||||||
|
*[Revealer(
|
||||||
|
header=question,
|
||||||
|
content=Text(
|
||||||
|
text=answer,
|
||||||
style=TextStyle(
|
style=TextStyle(
|
||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=1.2
|
font_size=0.9
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=0,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
|
||||||
*[Revealer(
|
|
||||||
header=question,
|
|
||||||
content=Text(
|
|
||||||
text=answer,
|
|
||||||
style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=0.9
|
|
||||||
),
|
|
||||||
margin=1,
|
|
||||||
wrap=True
|
|
||||||
),
|
),
|
||||||
margin=1,
|
margin=1,
|
||||||
grow_x=True,
|
overflow="wrap"
|
||||||
header_style=TextStyle(
|
),
|
||||||
fill=self.session.theme.background_color,
|
margin=1,
|
||||||
font_size=0.8
|
grow_x=True,
|
||||||
)
|
header_style=TextStyle(
|
||||||
) for question, answer in FAQ]
|
fill=self.session.theme.background_color,
|
||||||
)
|
font_size=0.8
|
||||||
),
|
)
|
||||||
align_y=0
|
) for question, answer in FAQ]
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,7 +6,7 @@ from rio import Column, Component, event, Text, TextStyle, TextInput, TextInputC
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class ForgotPasswordPage(Component):
|
class ForgotPasswordPage(Component):
|
||||||
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
|
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
|
||||||
@ -85,27 +85,25 @@ class ForgotPasswordPage(Component):
|
|||||||
margin_left=1,
|
margin_left=1,
|
||||||
margin_right=1,
|
margin_right=1,
|
||||||
margin_bottom=2,
|
margin_bottom=2,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
content=Column(
|
||||||
content=Column(
|
Text(
|
||||||
Text(
|
"Passwort vergessen",
|
||||||
"Passwort vergessen",
|
style=TextStyle(
|
||||||
style=TextStyle(
|
fill=self.session.theme.background_color,
|
||||||
fill=self.session.theme.background_color,
|
font_size=1.2
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=2,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
self.email_input,
|
margin_top=2,
|
||||||
self.submit_button,
|
margin_bottom=2,
|
||||||
self.info_text
|
align_x=0.5
|
||||||
)
|
),
|
||||||
),
|
self.email_input,
|
||||||
align_y=0,
|
self.submit_button,
|
||||||
)
|
self.info_text
|
||||||
|
)
|
||||||
|
),
|
||||||
|
align_y=0,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -4,7 +4,6 @@ from rio import Column, Component, event, TextStyle, Text, Button, Row, TextInpu
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, UserService, TicketingService, SeatingService
|
from src.ez_lan_manager import ConfigurationService, UserService, TicketingService, SeatingService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.Seat import Seat
|
from src.ez_lan_manager.types.Seat import Seat
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
|
|
||||||
@ -51,46 +50,45 @@ class GuestsPage(Component):
|
|||||||
seat = None
|
seat = None
|
||||||
self.table_elements.append(
|
self.table_elements.append(
|
||||||
Button(
|
Button(
|
||||||
content=Row(Text(text=f"{user.user_id:0>4}", align_x=0, margin_right=1), Text(text=user.user_name, grow_x=True, wrap="ellipsize"), Text(text="-" if seat is None else seat.seat_id, align_x=1)),
|
content=Row(Text(text=f"{user.user_id:0>4}", align_x=0, margin_right=1), Text(text=user.user_name, grow_x=True, overflow="ellipsize"),
|
||||||
|
Text(text="-" if seat is None else seat.seat_id, align_x=1)),
|
||||||
shape="rectangle",
|
shape="rectangle",
|
||||||
grow_x=True,
|
grow_x=True,
|
||||||
color=self.session.theme.hud_color if idx % 2 == 0 else self.session.theme.primary_color
|
color=self.session.theme.hud_color if idx % 2 == 0 else self.session.theme.primary_color
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
Column(
|
||||||
Column(
|
Text(
|
||||||
Text(
|
text="Teilnehmer",
|
||||||
text="Teilnehmer",
|
style=TextStyle(
|
||||||
style=TextStyle(
|
fill=self.session.theme.background_color,
|
||||||
fill=self.session.theme.background_color,
|
font_size=1.2
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=2,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
TextInput(
|
margin_top=2,
|
||||||
label="Suche nach Name oder ID",
|
margin_bottom=2,
|
||||||
margin=1,
|
align_x=0.5
|
||||||
margin_left=3,
|
),
|
||||||
margin_right=3,
|
TextInput(
|
||||||
on_change=self.on_searchbar_content_change
|
label="Suche nach Name oder ID",
|
||||||
),
|
margin=1,
|
||||||
Button(
|
margin_left=3,
|
||||||
content=Row(Text(text="ID ", align_x=0, margin_right=1), Text(text="Benutzername", grow_x=True), Text(text="Sitzplatz", align_x=1)),
|
margin_right=3,
|
||||||
shape="rectangle",
|
on_change=self.on_searchbar_content_change
|
||||||
grow_x=True,
|
),
|
||||||
color=self.session.theme.primary_color,
|
Button(
|
||||||
style="plain",
|
content=Row(Text(text="ID ", align_x=0, margin_right=1), Text(text="Benutzername", grow_x=True), Text(text="Sitzplatz", align_x=1)),
|
||||||
is_sensitive=False
|
shape="rectangle",
|
||||||
),
|
grow_x=True,
|
||||||
*self.table_elements,
|
color=self.session.theme.primary_color,
|
||||||
Spacer(min_height=1)
|
style="plain-text",
|
||||||
)
|
is_sensitive=False
|
||||||
),
|
),
|
||||||
align_y=0
|
*self.table_elements,
|
||||||
)
|
Spacer(min_height=1)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from rio import Text, Column, TextStyle, Component, event, Link, Color
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class ImprintPage(Component):
|
class ImprintPage(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
@ -10,98 +10,95 @@ class ImprintPage(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Impressum & DSGVO")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Impressum & DSGVO")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
Column(
|
||||||
Column(
|
Text(
|
||||||
Text(
|
text="Impressum",
|
||||||
text="Impressum",
|
style=TextStyle(
|
||||||
style=TextStyle(
|
fill=self.session.theme.background_color,
|
||||||
fill=self.session.theme.background_color,
|
font_size=1.2
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
Text(
|
margin_top=2,
|
||||||
text="Angaben gemäß § 5 TMG:\n\n"
|
align_x=0.5
|
||||||
"Einfach Zockem Gaming Gesellschaft e.V.\n"
|
),
|
||||||
"Im Elchgrund 18\n"
|
Text(
|
||||||
"35080 Bad Endbach - Bottenhorn\n\n"
|
text="Angaben gemäß § 5 TMG:\n\n"
|
||||||
|
"Einfach Zockem Gaming Gesellschaft e.V.\n"
|
||||||
"Vertreten durch:\n\n"
|
"Im Elchgrund 18\n"
|
||||||
|
"35080 Bad Endbach - Bottenhorn\n\n"
|
||||||
"1. Vorsitzender: David Rodenkirchen\n"
|
|
||||||
"2. Vorsitzender: Julia Albring\n"
|
"Vertreten durch:\n\n"
|
||||||
"Schatzmeisterin: Jessica Rodenkirchen\n\n"
|
|
||||||
|
"1. Vorsitzender: David Rodenkirchen\n"
|
||||||
"Kontakt:\n\n"
|
"2. Vorsitzender: Julia Albring\n"
|
||||||
|
"Schatzmeisterin: Jessica Rodenkirchen\n\n"
|
||||||
"E-Mail: vorstand (at) ezgg-ev.de\n\n"
|
|
||||||
|
"Kontakt:\n\n"
|
||||||
"Registereintrag:\n\n"
|
|
||||||
|
"E-Mail: vorstand (at) ezgg-ev.de\n\n"
|
||||||
"Eingetragen im Vereinsregister.\n"
|
|
||||||
"Registergericht: Amtsgericht Marburg\n"
|
"Registereintrag:\n\n"
|
||||||
"Registernummer: VR 5837\n\n"
|
|
||||||
|
"Eingetragen im Vereinsregister.\n"
|
||||||
"Verantwortlich für den Inhalt nach § 55 Abs. 2 RStV:\n\n"
|
"Registergericht: Amtsgericht Marburg\n"
|
||||||
|
"Registernummer: VR 5837\n\n"
|
||||||
"David Rodenkirchen\n"
|
|
||||||
"Im Elchgrund 18\n"
|
"Verantwortlich für den Inhalt nach § 55 Abs. 2 RStV:\n\n"
|
||||||
"35080 Bad Endbach - Bottenhorn\n",
|
|
||||||
style=TextStyle(
|
"David Rodenkirchen\n"
|
||||||
fill=self.session.theme.background_color,
|
"Im Elchgrund 18\n"
|
||||||
font_size=0.9
|
"35080 Bad Endbach - Bottenhorn\n",
|
||||||
),
|
style=TextStyle(
|
||||||
margin=2,
|
fill=self.session.theme.background_color,
|
||||||
wrap=True
|
font_size=0.9
|
||||||
)
|
),
|
||||||
|
margin=2,
|
||||||
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
MainViewContentBox(
|
),
|
||||||
Column(
|
MainViewContentBox(
|
||||||
Text(
|
Column(
|
||||||
|
Text(
|
||||||
|
text="Datenschutzerklärung",
|
||||||
|
style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1.2
|
||||||
|
),
|
||||||
|
margin_top=2,
|
||||||
|
align_x=0.5
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
text="Die Datenschutzerklärung kann über den untenstehenden Link eingesehen werden",
|
||||||
|
style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=0.9
|
||||||
|
),
|
||||||
|
margin_top=2,
|
||||||
|
margin_bottom=0,
|
||||||
|
overflow="wrap",
|
||||||
|
align_x=0.5,
|
||||||
|
grow_x=True,
|
||||||
|
min_width=30
|
||||||
|
),
|
||||||
|
Link(
|
||||||
|
content=Text(
|
||||||
text="Datenschutzerklärung",
|
text="Datenschutzerklärung",
|
||||||
style=TextStyle(
|
style=TextStyle(
|
||||||
fill=self.session.theme.background_color,
|
fill=Color.from_hex("000080"),
|
||||||
font_size=1.2
|
font_size=0.9,
|
||||||
|
underlined=True
|
||||||
),
|
),
|
||||||
margin_top=2,
|
margin_bottom=1,
|
||||||
|
margin_top=1,
|
||||||
|
overflow="wrap",
|
||||||
align_x=0.5
|
align_x=0.5
|
||||||
),
|
),
|
||||||
Text(
|
target_url="https://ezgg-ev.de/privacy",
|
||||||
text="Die Datenschutzerklärung kann über den untenstehenden Link eingesehen werden",
|
open_in_new_tab=True
|
||||||
style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=0.9
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=0,
|
|
||||||
wrap=True,
|
|
||||||
align_x=0.5,
|
|
||||||
grow_x=True,
|
|
||||||
min_width=30
|
|
||||||
),
|
|
||||||
Link(
|
|
||||||
content=Text(
|
|
||||||
text="Datenschutzerklärung",
|
|
||||||
style=TextStyle(
|
|
||||||
fill=Color.from_hex("000080"),
|
|
||||||
font_size=0.9,
|
|
||||||
underlined=True
|
|
||||||
),
|
|
||||||
margin_bottom=1,
|
|
||||||
margin_top=1,
|
|
||||||
wrap=True,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
|
||||||
target_url="https://ezgg-ev.de/privacy",
|
|
||||||
open_in_new_tab=True
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
align_y=0
|
|
||||||
),
|
),
|
||||||
grow_x=True
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,6 @@ from rio import Column, Component, event
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, NewsService
|
from src.ez_lan_manager import ConfigurationService, NewsService
|
||||||
from src.ez_lan_manager.components.NewsPost import NewsPost
|
from src.ez_lan_manager.components.NewsPost import NewsPost
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.News import News
|
from src.ez_lan_manager.types.News import News
|
||||||
|
|
||||||
|
|
||||||
@ -22,9 +21,7 @@ class NewsPage(Component):
|
|||||||
date=news.news_date.strftime("%d.%m.%Y"),
|
date=news.news_date.strftime("%d.%m.%Y"),
|
||||||
author=news.author.user_name
|
author=news.author.user_name
|
||||||
) for news in self.news_posts]
|
) for news in self.news_posts]
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
*posts,
|
*posts,
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from rio import Column, Component, event
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.NewsPost import NewsPost
|
from src.ez_lan_manager.components.NewsPost import NewsPost
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class PlaceholderPage(Component):
|
class PlaceholderPage(Component):
|
||||||
placeholder_name: str
|
placeholder_name: str
|
||||||
@ -12,13 +12,11 @@ class PlaceholderPage(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - {self.placeholder_name}")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - {self.placeholder_name}")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
NewsPost(
|
||||||
NewsPost(
|
title="Platzhalter",
|
||||||
title="Platzhalter",
|
text=f"Dies ist die Platzhalterseite für {self.placeholder_name}.",
|
||||||
text=f"Dies ist die Platzhalterseite für {self.placeholder_name}.",
|
date="99.99.9999"
|
||||||
date="99.99.9999"
|
),
|
||||||
),
|
align_y=0,
|
||||||
align_y=0,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,12 +6,12 @@ from rio import Column, Component, event, Text, TextStyle, TextInput, TextInputC
|
|||||||
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
||||||
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
MINIMUM_PASSWORD_LENGTH = 6
|
MINIMUM_PASSWORD_LENGTH = 6
|
||||||
|
|
||||||
logger = logging.getLogger(__name__.split(".")[-1])
|
logger = logging.getLogger(__name__.split(".")[-1])
|
||||||
|
|
||||||
|
|
||||||
class RegisterPage(Component):
|
class RegisterPage(Component):
|
||||||
def on_pw_change(self, _: TextInputChangeEvent) -> None:
|
def on_pw_change(self, _: TextInputChangeEvent) -> None:
|
||||||
if not (self.pw_1.text == self.pw_2.text) or len(self.pw_1.text) < MINIMUM_PASSWORD_LENGTH:
|
if not (self.pw_1.text == self.pw_2.text) or len(self.pw_1.text) < MINIMUM_PASSWORD_LENGTH:
|
||||||
@ -21,7 +21,6 @@ class RegisterPage(Component):
|
|||||||
self.pw_1.is_valid = True
|
self.pw_1.is_valid = True
|
||||||
self.pw_2.is_valid = True
|
self.pw_2.is_valid = True
|
||||||
|
|
||||||
|
|
||||||
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
|
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
|
||||||
try:
|
try:
|
||||||
validate_email(change_event.text, check_deliverability=False)
|
validate_email(change_event.text, check_deliverability=False)
|
||||||
@ -154,28 +153,26 @@ class RegisterPage(Component):
|
|||||||
margin_right=1,
|
margin_right=1,
|
||||||
margin_bottom=2
|
margin_bottom=2
|
||||||
)
|
)
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
content=Column(
|
||||||
content=Column(
|
Text(
|
||||||
Text(
|
"Neues Konto anlegen",
|
||||||
"Neues Konto anlegen",
|
style=TextStyle(
|
||||||
style=TextStyle(
|
fill=self.session.theme.background_color,
|
||||||
fill=self.session.theme.background_color,
|
font_size=1.2
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=2,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
self.user_name_input,
|
margin_top=2,
|
||||||
self.email_input,
|
margin_bottom=2,
|
||||||
self.pw_1,
|
align_x=0.5
|
||||||
self.pw_2,
|
),
|
||||||
self.submit_button,
|
self.user_name_input,
|
||||||
self.animated_text
|
self.email_input,
|
||||||
)
|
self.pw_1,
|
||||||
),
|
self.pw_2,
|
||||||
align_y=0,
|
self.submit_button,
|
||||||
)
|
self.animated_text
|
||||||
|
)
|
||||||
|
),
|
||||||
|
align_y=0,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,6 @@ from rio import Column, Component, event, TextStyle, Text, Revealer
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
RULES: list[str] = [
|
RULES: list[str] = [
|
||||||
"Respektvolles Verhalten: Sei höflich und respektvoll gegenüber anderen Gästen und dem Team.",
|
"Respektvolles Verhalten: Sei höflich und respektvoll gegenüber anderen Gästen und dem Team.",
|
||||||
@ -44,151 +43,150 @@ AGB: dict[str, list[str]] = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class RulesPage(Component):
|
class RulesPage(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
async def on_populate(self) -> None:
|
async def on_populate(self) -> None:
|
||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Regeln & AGB")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Regeln & AGB")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
Column(
|
||||||
Column(
|
Text(
|
||||||
Text(
|
text="Regeln",
|
||||||
text="Regeln",
|
style=TextStyle(
|
||||||
style=TextStyle(
|
fill=self.session.theme.background_color,
|
||||||
fill=self.session.theme.background_color,
|
font_size=1.2
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=0,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
Text(
|
margin_top=2,
|
||||||
text="(AGB's in verständlichem deutsch)",
|
margin_bottom=0,
|
||||||
style=TextStyle(
|
align_x=0.5
|
||||||
fill=self.session.theme.background_color,
|
),
|
||||||
font_size=0.5
|
Text(
|
||||||
),
|
text="(AGB's in verständlichem deutsch)",
|
||||||
margin_top=0.5,
|
style=TextStyle(
|
||||||
margin_bottom=2,
|
fill=self.session.theme.background_color,
|
||||||
align_x=0.5
|
font_size=0.5
|
||||||
),
|
),
|
||||||
*[Text(
|
margin_top=0.5,
|
||||||
f"{idx + 1}. {rule}",
|
margin_bottom=2,
|
||||||
style=TextStyle(
|
align_x=0.5
|
||||||
fill=self.session.theme.background_color,
|
),
|
||||||
font_size=0.9
|
*[Text(
|
||||||
),
|
f"{idx + 1}. {rule}",
|
||||||
margin_bottom=0.8,
|
style=TextStyle(
|
||||||
margin_left=1,
|
fill=self.session.theme.background_color,
|
||||||
margin_right=1,
|
font_size=0.9
|
||||||
wrap=True
|
|
||||||
) for idx, rule in enumerate(RULES)],
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
Column(
|
|
||||||
Text(
|
|
||||||
text="AGB",
|
|
||||||
style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=1,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
Revealer(
|
margin_bottom=0.8,
|
||||||
header="§ 1 Allgemeine Bestimmungen",
|
margin_left=1,
|
||||||
header_style=TextStyle(
|
margin_right=1,
|
||||||
fill=self.session.theme.background_color,
|
overflow="wrap"
|
||||||
font_size=1
|
) for idx, rule in enumerate(RULES)],
|
||||||
),
|
)
|
||||||
margin=1,
|
),
|
||||||
margin_top=2,
|
MainViewContentBox(
|
||||||
content=Column(
|
Column(
|
||||||
*[Text(
|
Text(
|
||||||
f"{idx + 1}. {rule}",
|
text="AGB",
|
||||||
style=TextStyle(
|
style=TextStyle(
|
||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=0.8
|
font_size=1.2
|
||||||
),
|
|
||||||
margin_bottom=0.8,
|
|
||||||
margin_left=1,
|
|
||||||
margin_right=1,
|
|
||||||
wrap=True
|
|
||||||
) for idx, rule in enumerate(AGB["§1"])]
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
Revealer(
|
margin_top=2,
|
||||||
header="§ 2 Teilnahmevoraussetzungen",
|
margin_bottom=1,
|
||||||
header_style=TextStyle(
|
align_x=0.5
|
||||||
fill=self.session.theme.background_color,
|
),
|
||||||
font_size=1
|
Revealer(
|
||||||
),
|
header="§ 1 Allgemeine Bestimmungen",
|
||||||
margin=1,
|
header_style=TextStyle(
|
||||||
margin_top=0,
|
fill=self.session.theme.background_color,
|
||||||
content=Column(
|
font_size=1
|
||||||
*[Text(
|
|
||||||
f"{idx + 1}. {rule}",
|
|
||||||
style=TextStyle(
|
|
||||||
fill=self.session.theme.background_color,
|
|
||||||
font_size=0.8
|
|
||||||
),
|
|
||||||
margin_bottom=0.8,
|
|
||||||
margin_left=1,
|
|
||||||
margin_right=1,
|
|
||||||
wrap=True
|
|
||||||
) for idx, rule in enumerate(AGB["§2"])]
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
Revealer(
|
margin=1,
|
||||||
header="§ 3 Verhaltensregeln",
|
margin_top=2,
|
||||||
header_style=TextStyle(
|
content=Column(
|
||||||
fill=self.session.theme.background_color,
|
*[Text(
|
||||||
font_size=1
|
f"{idx + 1}. {rule}",
|
||||||
),
|
style=TextStyle(
|
||||||
margin=1,
|
fill=self.session.theme.background_color,
|
||||||
margin_top=0,
|
font_size=0.8
|
||||||
content=Column(
|
),
|
||||||
*[Text(
|
margin_bottom=0.8,
|
||||||
f"{idx + 1}. {rule}",
|
margin_left=1,
|
||||||
style=TextStyle(
|
margin_right=1,
|
||||||
fill=self.session.theme.background_color,
|
overflow="wrap"
|
||||||
font_size=0.8
|
) for idx, rule in enumerate(AGB["§1"])]
|
||||||
),
|
)
|
||||||
margin_bottom=0.8,
|
),
|
||||||
margin_left=1,
|
Revealer(
|
||||||
margin_right=1,
|
header="§ 2 Teilnahmevoraussetzungen",
|
||||||
wrap=True
|
header_style=TextStyle(
|
||||||
) for idx, rule in enumerate(AGB["§3"])]
|
fill=self.session.theme.background_color,
|
||||||
)
|
font_size=1
|
||||||
),
|
),
|
||||||
Revealer(
|
margin=1,
|
||||||
header="§ 4 Internetzugang",
|
margin_top=0,
|
||||||
header_style=TextStyle(
|
content=Column(
|
||||||
fill=self.session.theme.background_color,
|
*[Text(
|
||||||
font_size=1
|
f"{idx + 1}. {rule}",
|
||||||
),
|
style=TextStyle(
|
||||||
margin=1,
|
fill=self.session.theme.background_color,
|
||||||
margin_top=0,
|
font_size=0.8
|
||||||
content=Column(
|
),
|
||||||
*[Text(
|
margin_bottom=0.8,
|
||||||
f"{idx + 1}. {rule}",
|
margin_left=1,
|
||||||
style=TextStyle(
|
margin_right=1,
|
||||||
fill=self.session.theme.background_color,
|
overflow="wrap"
|
||||||
font_size=0.8
|
) for idx, rule in enumerate(AGB["§2"])]
|
||||||
),
|
)
|
||||||
margin_bottom=0.8,
|
),
|
||||||
margin_left=1,
|
Revealer(
|
||||||
margin_right=1,
|
header="§ 3 Verhaltensregeln",
|
||||||
wrap=True
|
header_style=TextStyle(
|
||||||
) for idx, rule in enumerate(AGB["§4"])]
|
fill=self.session.theme.background_color,
|
||||||
)
|
font_size=1
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
margin_top=0,
|
||||||
|
content=Column(
|
||||||
|
*[Text(
|
||||||
|
f"{idx + 1}. {rule}",
|
||||||
|
style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=0.8
|
||||||
|
),
|
||||||
|
margin_bottom=0.8,
|
||||||
|
margin_left=1,
|
||||||
|
margin_right=1,
|
||||||
|
overflow="wrap"
|
||||||
|
) for idx, rule in enumerate(AGB["§3"])]
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Revealer(
|
||||||
|
header="§ 4 Internetzugang",
|
||||||
|
header_style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=1
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
margin_top=0,
|
||||||
|
content=Column(
|
||||||
|
*[Text(
|
||||||
|
f"{idx + 1}. {rule}",
|
||||||
|
style=TextStyle(
|
||||||
|
fill=self.session.theme.background_color,
|
||||||
|
font_size=0.8
|
||||||
|
),
|
||||||
|
margin_bottom=0.8,
|
||||||
|
margin_left=1,
|
||||||
|
margin_right=1,
|
||||||
|
overflow="wrap"
|
||||||
|
) for idx, rule in enumerate(AGB["§4"])]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
align_y=0
|
),
|
||||||
)
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,22 +2,21 @@ import logging
|
|||||||
from asyncio import sleep
|
from asyncio import sleep
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from rio import Text, Column, TextStyle, Component, event, PressEvent, ProgressCircle, Row, Image, Button, Spacer
|
from rio import Text, Column, TextStyle, Component, event, PressEvent, ProgressCircle
|
||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, SeatingService, TicketingService, UserService
|
from src.ez_lan_manager import ConfigurationService, SeatingService, TicketingService, UserService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.components.SeatingPlan import SeatingPlan, SeatingPlanLegend
|
from src.ez_lan_manager.components.SeatingPlan import SeatingPlan, SeatingPlanLegend
|
||||||
from src.ez_lan_manager.components.SeatingPlanInfoBox import SeatingPlanInfoBox
|
from src.ez_lan_manager.components.SeatingPlanInfoBox import SeatingPlanInfoBox
|
||||||
from src.ez_lan_manager.components.SeatingPurchaseBox import SeatingPurchaseBox
|
from src.ez_lan_manager.components.SeatingPurchaseBox import SeatingPurchaseBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.services.SeatingService import NoTicketError, SeatNotFoundError, WrongCategoryError, SeatAlreadyTakenError
|
from src.ez_lan_manager.services.SeatingService import NoTicketError, SeatNotFoundError, WrongCategoryError, SeatAlreadyTakenError
|
||||||
from src.ez_lan_manager.types.Seat import Seat
|
from src.ez_lan_manager.types.Seat import Seat
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__.split(".")[-1])
|
logger = logging.getLogger(__name__.split(".")[-1])
|
||||||
|
|
||||||
|
|
||||||
class SeatingPlanPage(Component):
|
class SeatingPlanPage(Component):
|
||||||
seating_info: Optional[list[Seat]] = None
|
seating_info: Optional[list[Seat]] = None
|
||||||
current_seat_id: Optional[str] = None
|
current_seat_id: Optional[str] = None
|
||||||
@ -94,7 +93,6 @@ class SeatingPlanPage(Component):
|
|||||||
self.purchase_box_loading = False
|
self.purchase_box_loading = False
|
||||||
await self.on_populate()
|
await self.on_populate()
|
||||||
|
|
||||||
|
|
||||||
async def on_purchase_cancelled(self) -> None:
|
async def on_purchase_cancelled(self) -> None:
|
||||||
self.purchase_box_loading = False
|
self.purchase_box_loading = False
|
||||||
self.show_info_box = True
|
self.show_info_box = True
|
||||||
@ -102,47 +100,43 @@ class SeatingPlanPage(Component):
|
|||||||
self.purchase_box_error_msg = None
|
self.purchase_box_error_msg = None
|
||||||
self.purchase_box_success_msg = None
|
self.purchase_box_success_msg = None
|
||||||
|
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
if not self.seating_info:
|
if not self.seating_info:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
|
||||||
ProgressCircle(
|
|
||||||
color="secondary",
|
|
||||||
align_x=0.5,
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=2
|
|
||||||
)
|
|
||||||
),
|
|
||||||
align_y=0
|
|
||||||
)
|
|
||||||
)
|
|
||||||
return BasePage(
|
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
ProgressCircle(
|
||||||
SeatingPlanInfoBox(seat_id=self.current_seat_id, seat_occupant=self.current_seat_occupant, seat_price=self.current_seat_price,
|
color="secondary",
|
||||||
is_blocked=self.current_seat_is_blocked, is_booking_blocked=self.is_booking_blocked, show=self.show_info_box, purchase_cb=self.on_purchase_clicked),
|
align_x=0.5,
|
||||||
SeatingPurchaseBox(
|
margin_top=2,
|
||||||
show=self.show_purchase_box,
|
margin_bottom=2
|
||||||
seat_id=self.current_seat_id,
|
|
||||||
is_loading=self.purchase_box_loading,
|
|
||||||
confirm_cb=self.on_purchase_confirmed,
|
|
||||||
cancel_cb=self.on_purchase_cancelled,
|
|
||||||
error_msg=self.purchase_box_error_msg,
|
|
||||||
success_msg=self.purchase_box_success_msg
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
MainViewContentBox(
|
|
||||||
SeatingPlan(seat_clicked_cb=self.on_seat_clicked, seating_info=self.seating_info) if self.seating_info else
|
|
||||||
Column(ProgressCircle(color=self.session.theme.secondary_color, margin=3), Text("Sitzplan wird geladen", style=TextStyle(fill=self.session.theme.neutral_color), align_x=0.5, margin=1))
|
|
||||||
),
|
|
||||||
MainViewContentBox(
|
|
||||||
SeatingPlanLegend(),
|
|
||||||
),
|
|
||||||
align_y=0
|
align_y=0
|
||||||
|
)
|
||||||
|
return Column(
|
||||||
|
MainViewContentBox(
|
||||||
|
Column(
|
||||||
|
SeatingPlanInfoBox(seat_id=self.current_seat_id, seat_occupant=self.current_seat_occupant, seat_price=self.current_seat_price,
|
||||||
|
is_blocked=self.current_seat_is_blocked, is_booking_blocked=self.is_booking_blocked, show=self.show_info_box,
|
||||||
|
purchase_cb=self.on_purchase_clicked),
|
||||||
|
SeatingPurchaseBox(
|
||||||
|
show=self.show_purchase_box,
|
||||||
|
seat_id=self.current_seat_id,
|
||||||
|
is_loading=self.purchase_box_loading,
|
||||||
|
confirm_cb=self.on_purchase_confirmed,
|
||||||
|
cancel_cb=self.on_purchase_cancelled,
|
||||||
|
error_msg=self.purchase_box_error_msg,
|
||||||
|
success_msg=self.purchase_box_success_msg
|
||||||
|
)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
grow_x=True
|
MainViewContentBox(
|
||||||
|
SeatingPlan(seat_clicked_cb=self.on_seat_clicked, seating_info=self.seating_info) if self.seating_info else
|
||||||
|
Column(ProgressCircle(color=self.session.theme.secondary_color, margin=3),
|
||||||
|
Text("Sitzplan wird geladen", style=TextStyle(fill=self.session.theme.neutral_color), align_x=0.5, margin=1))
|
||||||
|
),
|
||||||
|
MainViewContentBox(
|
||||||
|
SeatingPlanLegend(),
|
||||||
|
),
|
||||||
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from rio import Column, Component, event, TextStyle, Text
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class PAGENAME(Component):
|
class PAGENAME(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
@ -10,31 +10,29 @@ class PAGENAME(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - PAGENAME")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - PAGENAME")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
Column(
|
||||||
Column(
|
Text(
|
||||||
Text(
|
text="HEADER",
|
||||||
text="HEADER",
|
style=TextStyle(
|
||||||
style=TextStyle(
|
fill=self.session.theme.background_color,
|
||||||
fill=self.session.theme.background_color,
|
font_size=1.2
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=0,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
Text(
|
margin_top=2,
|
||||||
text="BASIC TEXT",
|
margin_bottom=0,
|
||||||
style=TextStyle(
|
align_x=0.5
|
||||||
fill=self.session.theme.background_color,
|
),
|
||||||
font_size=0.9
|
Text(
|
||||||
),
|
text="BASIC TEXT",
|
||||||
margin=1,
|
style=TextStyle(
|
||||||
wrap=True
|
fill=self.session.theme.background_color,
|
||||||
)
|
font_size=0.9
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
align_y=0
|
),
|
||||||
)
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from rio import Column, Component, event, TextStyle, Text
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class TournamentsPage(Component):
|
class TournamentsPage(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
@ -10,31 +10,29 @@ class TournamentsPage(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Turniere")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Turniere")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
MainViewContentBox(
|
||||||
MainViewContentBox(
|
Column(
|
||||||
Column(
|
Text(
|
||||||
Text(
|
text="Turniere",
|
||||||
text="Turniere",
|
style=TextStyle(
|
||||||
style=TextStyle(
|
fill=self.session.theme.background_color,
|
||||||
fill=self.session.theme.background_color,
|
font_size=1.2
|
||||||
font_size=1.2
|
|
||||||
),
|
|
||||||
margin_top=2,
|
|
||||||
margin_bottom=0,
|
|
||||||
align_x=0.5
|
|
||||||
),
|
),
|
||||||
Text(
|
margin_top=2,
|
||||||
text="Aktuell ist noch kein Turnierplan hinterlegt.",
|
margin_bottom=0,
|
||||||
style=TextStyle(
|
align_x=0.5
|
||||||
fill=self.session.theme.background_color,
|
),
|
||||||
font_size=0.9
|
Text(
|
||||||
),
|
text="Aktuell ist noch kein Turnierplan hinterlegt.",
|
||||||
margin=1,
|
style=TextStyle(
|
||||||
wrap=True
|
fill=self.session.theme.background_color,
|
||||||
)
|
font_size=0.9
|
||||||
|
),
|
||||||
|
margin=1,
|
||||||
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
align_y=0
|
),
|
||||||
)
|
align_y=0
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user