Compare commits

..

No commits in common. "51b07baa36dc1d6568e3ea8ba99aebd21fd695b8" and "49d89feda3766c0073cd44ecd47bff15eee4f267" have entirely different histories.

6 changed files with 93 additions and 213 deletions

View File

@ -1 +1 @@
0.1.0 0.0.1

View File

@ -1,63 +0,0 @@
INSERT INTO `catering_menu_items` VALUES
(7,'Schnitzel Wiener Art','mit Pommes',10.50,'MAIN_COURSE',0),
(8,'Jäger Schnitzel mit Champignonrahm Sauce','mit Pommes',11.50,'MAIN_COURSE',0),
(9,'Tortellini in Käsesauce mit Fleischfüllung','',10.50,'MAIN_COURSE',0),
(10,'Tortellini in Käsesauce ohne Fleischfüllung','Vegetarisch',10.50,'MAIN_COURSE',0),
(11,'Käse Schinken Wrap','',5.00,'SNACK',1),
(12,'Puten Paprika Wrap','',7.00,'SNACK',0),
(13,'Tomate Mozzarella Wrap','',6.00,'SNACK',0),
(14,'Portion Pommes','',4.00,'SNACK',0),
(15,'Rinds-Currywurst','',4.50,'SNACK',0),
(16,'Rinds-Currywurst mit Pommes','',6.50,'SNACK',0),
(17,'Nudelsalat','',4.50,'SNACK',0),
(18,'Nudelsalat mit Bockwurst','',6.00,'SNACK',0),
(19,'Kartoffelsalat','',4.50,'SNACK',0),
(20,'Kartoffelsalat mit Bockwurst','',6.00,'SNACK',0),
(21,'Sandwichtoast - Schinken','',1.80,'SNACK',0),
(22,'Sandwichtoast - Käse','',1.80,'SNACK',0),
(23,'Sandwichtoast - Schinken/Käse','',2.10,'SNACK',0),
(24,'Sandwichtoast - Salami','',1.80,'SNACK',0),
(25,'Sandwichtoast - Salami/Käse','',2.10,'SNACK',0),
(26,'Chips - Western Style','',1.30,'SNACK',0),
(27,'Nachos - Salted','',1.30,'SNACK',0),
(28,'Panna Cotta mit Erdbeersauce','',7.00,'DESSERT',0),
(29,'Panna Cotta mit Blaubeersauce','',7.00,'DESSERT',0),
(30,'Mousse au Chocolat','',7.00,'DESSERT',0),
(31,'Fruit Loops','',1.50,'BREAKFAST',0),
(32,'Smacks','',1.50,'BREAKFAST',0),
(33,'Knuspermüsli','Schoko',2.00,'BREAKFAST',0),
(34,'Cini Minis','',1.50,'BREAKFAST',0),
(35,'Brötchen - Schinken','mit Margarine',1.20,'BREAKFAST',0),
(36,'Brötchen - Käse','mit Margarine',1.20,'BREAKFAST',0),
(37,'Brötchen - Schinken/Käse','mit Margarine',1.40,'BREAKFAST',0),
(38,'Brötchen - Salami','mit Margarine',1.20,'BREAKFAST',0),
(39,'Brötchen - Salami/Käse','mit Margarine',1.40,'BREAKFAST',0),
(40,'Brötchen - Nutella','mit Margarine',1.20,'BREAKFAST',0),
(41,'Wasser - Still','1L Flasche',2.00,'BEVERAGE_NON_ALCOHOLIC',0),
(42,'Wasser - Medium','1L Flasche',2.00,'BEVERAGE_NON_ALCOHOLIC',0),
(43,'Wasser - Spritzig','1L Flasche',2.00,'BEVERAGE_NON_ALCOHOLIC',0),
(44,'Coca-Cola','1L Flasche',2.00,'BEVERAGE_NON_ALCOHOLIC',0),
(45,'Coca-Cola Zero','1L Flasche',2.00,'BEVERAGE_NON_ALCOHOLIC',0),
(46,'Fanta','1L Flasche',2.00,'BEVERAGE_NON_ALCOHOLIC',0),
(47,'Sprite','1L Flasche',2.00,'BEVERAGE_NON_ALCOHOLIC',0),
(48,'Spezi','von Paulaner, 0,5L Flasche',1.50,'BEVERAGE_NON_ALCOHOLIC',0),
(49,'Red Bull','',2.00,'BEVERAGE_NON_ALCOHOLIC',0),
(50,'Energy','Hausmarke',1.50,'BEVERAGE_NON_ALCOHOLIC',0),
(51,'Pils','0,33L Flasche',1.90,'BEVERAGE_ALCOHOLIC',0),
(52,'Radler','0,33L Flasche',1.90,'BEVERAGE_ALCOHOLIC',0),
(53,'Diesel','0,33L Flasche',1.90,'BEVERAGE_ALCOHOLIC',0),
(54,'Apfelwein Pur','0,33L Flasche',1.90,'BEVERAGE_ALCOHOLIC',0),
(55,'Apfelwein Sauer','0,33L Flasche',1.90,'BEVERAGE_ALCOHOLIC',0),
(56,'Apfelwein Cola','0,33L Flasche',1.90,'BEVERAGE_ALCOHOLIC',0),
(57,'Vodka Energy','',4.00,'BEVERAGE_COCKTAIL',0),
(58,'Vodka O-Saft','',4.00,'BEVERAGE_COCKTAIL',0),
(59,'Whiskey Cola','mit Bourbon',4.00,'BEVERAGE_COCKTAIL',0),
(60,'Jägermeister Energy','',4.00,'BEVERAGE_COCKTAIL',0),
(61,'Sex on the Beach','',5.50,'BEVERAGE_COCKTAIL',0),
(62,'Long Island Ice Tea','',5.50,'BEVERAGE_COCKTAIL',0),
(63,'Caipirinha','',5.50,'BEVERAGE_COCKTAIL',0),
(64,'Jägermeister','',2.00,'BEVERAGE_SHOT',0),
(65,'Tequila','',2.00,'BEVERAGE_SHOT',0),
(66,'PfEZzi','Getunter Pfefferminz-Schnaps',1.99,'BEVERAGE_SHOT',0),
(67,'Zigaretten','Elixyr',8.00,'NON_FOOD',0),
(68,'Mentholfilter','passend für Elixyr',1.20,'NON_FOOD',0);

View File

@ -54,7 +54,7 @@ class DesktopNavigation(Component):
DesktopNavigationButton("FAQ", "./faq"), DesktopNavigationButton("FAQ", "./faq"),
DesktopNavigationButton("Regeln & AGB", "./rules-gtc"), DesktopNavigationButton("Regeln & AGB", "./rules-gtc"),
Spacer(min_height=1), Spacer(min_height=1),
DesktopNavigationButton("Discord", "https://discord.gg/8gTjg34yyH", open_new_tab=True), DesktopNavigationButton("Discord", "#", open_new_tab=True), # Temporarily disabled: https://discord.gg/8gTjg34yyH
DesktopNavigationButton("Die EZ GG e.V.", "https://ezgg-ev.de/about", open_new_tab=True), DesktopNavigationButton("Die EZ GG e.V.", "https://ezgg-ev.de/about", open_new_tab=True),
DesktopNavigationButton("Kontakt", "./contact"), DesktopNavigationButton("Kontakt", "./contact"),
DesktopNavigationButton("Impressum & DSGVO", "./imprint"), DesktopNavigationButton("Impressum & DSGVO", "./imprint"),

View File

@ -5,17 +5,17 @@ from rio import Component, Rectangle, Grid, Column, Row, Text, TextStyle, Color
from src.ez_lan_manager.components.SeatingPlanPixels import SeatPixel, WallPixel, InvisiblePixel, TextPixel from src.ez_lan_manager.components.SeatingPlanPixels import SeatPixel, WallPixel, InvisiblePixel, TextPixel
from src.ez_lan_manager.types.Seat import Seat from src.ez_lan_manager.types.Seat import Seat
MAX_GRID_WIDTH_PIXELS = 60 MAX_GRID_WIDTH_PIXELS = 34
MAX_GRID_HEIGHT_PIXELS = 60 MAX_GRID_HEIGHT_PIXELS = 45
class SeatingPlanLegend(Component): class SeatingPlanLegend(Component):
def build(self) -> Component: def build(self) -> Component:
return Column( return Column(
Text("Legende", style=TextStyle(fill=self.session.theme.neutral_color), justify="center", margin=1), Text("Legende", style=TextStyle(fill=self.session.theme.neutral_color), justify="center", margin=1),
# Row( # Disabled for upcoming LAN Row(
# Text("L = Luxus Platz", justify="center", style=TextStyle(fill=self.session.theme.neutral_color)), Text("L = Luxus Platz", justify="center", style=TextStyle(fill=self.session.theme.neutral_color)),
# Text("N = Normaler Platz", justify="center", style=TextStyle(fill=self.session.theme.neutral_color)), Text("N = Normaler Platz", justify="center", style=TextStyle(fill=self.session.theme.neutral_color)),
# ), ),
Row( Row(
Rectangle( Rectangle(
content=Column( content=Column(
@ -73,8 +73,7 @@ class SeatingPlan(Component):
seating_info: list[Seat] seating_info: list[Seat]
def get_seat(self, seat_id: str) -> Seat: def get_seat(self, seat_id: str) -> Seat:
seat = next(filter(lambda seat_: seat_.seat_id == seat_id, self.seating_info), None) return next(filter(lambda seat: seat.seat_id == seat_id, self.seating_info))
return seat if seat else Seat(seat_id="Z99", is_blocked=True, category="LUXUS", user=None)
""" """
This seating plan is for the community center "Bottenhorn" This seating plan is for the community center "Bottenhorn"
@ -82,150 +81,106 @@ class SeatingPlan(Component):
def build(self) -> Component: def build(self) -> Component:
grid = Grid() grid = Grid()
# Outlines # Outlines
for x in range(0, MAX_GRID_WIDTH_PIXELS): for column_id in range(0, MAX_GRID_WIDTH_PIXELS):
grid.add(WallPixel(), row=0, column=x) grid.add(InvisiblePixel(), row=0, column=column_id)
for y in range(0, 13):
for y in range(0, MAX_GRID_HEIGHT_PIXELS): grid.add(WallPixel(), row=y, column=0)
for y in range(13, 19):
grid.add(InvisiblePixel(), row=y, column=0)
for y in range(19, MAX_GRID_HEIGHT_PIXELS):
grid.add(WallPixel(), row=y, column=0) grid.add(WallPixel(), row=y, column=0)
for x in range(0, MAX_GRID_WIDTH_PIXELS):
grid.add(WallPixel(), row=MAX_GRID_HEIGHT_PIXELS, column=x)
for x in range(0, 31):
grid.add(WallPixel(), row=15, column=x)
for x in range(41, MAX_GRID_WIDTH_PIXELS):
grid.add(WallPixel(), row=32, column=x)
for x in range(31, 34):
grid.add(WallPixel(), row=32, column=x)
grid.add(WallPixel(), row=19, column=x)
for x in range(42, MAX_GRID_WIDTH_PIXELS):
grid.add(WallPixel(), row=11, column=x)
grid.add(WallPixel(), row=22, column=x)
for x in range(22, 30):
grid.add(WallPixel(), row=5, column=x)
grid.add(WallPixel(), row=10, column=x)
for y in range(5, 11):
grid.add(WallPixel(), row=y, column=21)
grid.add(WallPixel(), row=y, column=30)
for y in range(40, MAX_GRID_HEIGHT_PIXELS):
grid.add(WallPixel(), row=y, column=30)
for y in range(32, 36):
grid.add(WallPixel(), row=y, column=30)
for y in range(19, 33):
grid.add(WallPixel(), row=y, column=34)
for y in range(16, 20):
grid.add(WallPixel(), row=y, column=30)
for y in range(0, 5):
grid.add(WallPixel(), row=y, column=41)
for y in range(9, 15):
grid.add(WallPixel(), row=y, column=41)
for y in range(19, 33):
grid.add(WallPixel(), row=y, column=41)
# Block A # Block A
grid.add(SeatPixel("A01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A01")), row=57, column=2, width=3, height=2) block_a_margin_left = 12
grid.add(SeatPixel("A02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A02")), row=57, column=5, width=3, height=2) block_a_margin_top = 1
grid.add(SeatPixel("A03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A03")), row=57, column=8, width=3, height=2) (grid
grid.add(SeatPixel("A04", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A04")), row=57, column=11, width=3, height=2) .add(SeatPixel("A01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A01")), row=block_a_margin_top, column=block_a_margin_left, width=2, height=3)
grid.add(SeatPixel("A05", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A05")), row=57, column=14, width=3, height=2) .add(SeatPixel("A02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A02")), row=block_a_margin_top + 4, column=block_a_margin_left, width=2, height=3)
grid.add(SeatPixel("A06", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A06")), row=57, column=17, width=3, height=2) .add(SeatPixel("A03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A03")), row=block_a_margin_top + 8, column=block_a_margin_left, width=2, height=3)
.add(SeatPixel("A10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A10")), row=block_a_margin_top, column=block_a_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("A10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A10")), row=55, column=2, width=3, height=2) .add(SeatPixel("A11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A11")), row=block_a_margin_top + 4, column=block_a_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("A11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A11")), row=55, column=5, width=3, height=2) .add(SeatPixel("A12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A12")), row=block_a_margin_top + 8, column=block_a_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("A12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A12")), row=55, column=8, width=3, height=2) )
grid.add(SeatPixel("A13", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A13")), row=55, column=11, width=3, height=2)
grid.add(SeatPixel("A14", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A14")), row=55, column=14, width=3, height=2)
grid.add(SeatPixel("A15", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("A15")), row=55, column=17, width=3, height=2)
# Block B # Block B
grid.add(SeatPixel("B01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B01")), row=50, column=2, width=3, height=2) block_b_margin_left = 20
grid.add(SeatPixel("B02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B02")), row=50, column=5, width=3, height=2) block_b_margin_top = 1
grid.add(SeatPixel("B03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B03")), row=50, column=8, width=3, height=2) (grid
grid.add(SeatPixel("B04", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B04")), row=50, column=11, width=3, height=2) .add(SeatPixel("B01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B01")), row=block_b_margin_top, column=block_b_margin_left, width=2, height=3)
grid.add(SeatPixel("B05", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B05")), row=50, column=14, width=3, height=2) .add(SeatPixel("B02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B02")), row=block_b_margin_top + 4, column=block_b_margin_left, width=2, height=3)
.add(SeatPixel("B03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B03")), row=block_b_margin_top + 8, column=block_b_margin_left, width=2, height=3)
grid.add(SeatPixel("B10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B10")), row=48, column=2, width=3, height=2) .add(SeatPixel("B10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B10")), row=block_b_margin_top, column=block_b_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("B11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B11")), row=48, column=5, width=3, height=2) .add(SeatPixel("B11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B11")), row=block_b_margin_top + 4, column=block_b_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("B12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B12")), row=48, column=8, width=3, height=2) .add(SeatPixel("B12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B12")), row=block_b_margin_top + 8, column=block_b_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("B13", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B13")), row=48, column=11, width=3, height=2) )
grid.add(SeatPixel("B14", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("B14")), row=48, column=14, width=3, height=2)
# Block C # Block C
grid.add(SeatPixel("C01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C01")), row=43, column=2, width=3, height=2) block_c_margin_left = 28
grid.add(SeatPixel("C02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C02")), row=43, column=5, width=3, height=2) block_c_margin_top = 1
grid.add(SeatPixel("C03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C03")), row=43, column=8, width=3, height=2) (grid
grid.add(SeatPixel("C04", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C04")), row=43, column=11, width=3, height=2) .add(SeatPixel("C01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C01")), row=block_c_margin_top, column=block_c_margin_left, width=2, height=3)
grid.add(SeatPixel("C05", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C05")), row=43, column=14, width=3, height=2) .add(SeatPixel("C02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C02")), row=block_c_margin_top + 4, column=block_c_margin_left, width=2, height=3)
.add(SeatPixel("C03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C03")), row=block_c_margin_top + 8, column=block_c_margin_left, width=2, height=3)
grid.add(SeatPixel("C10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C10")), row=41, column=2, width=3, height=2) .add(SeatPixel("C10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C10")), row=block_c_margin_top, column=block_c_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("C11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C11")), row=41, column=5, width=3, height=2) .add(SeatPixel("C11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C11")), row=block_c_margin_top + 4, column=block_c_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("C12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C12")), row=41, column=8, width=3, height=2) .add(SeatPixel("C12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C12")), row=block_c_margin_top + 8, column=block_c_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("C13", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C13")), row=41, column=11, width=3, height=2) )
grid.add(SeatPixel("C14", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("C14")), row=41, column=14, width=3, height=2)
# Block D # Block D
grid.add(SeatPixel("D01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D01")), row=34, column=2, width=3, height=2) block_d_margin_left = 20
grid.add(SeatPixel("D02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D02")), row=34, column=5, width=3, height=2) block_d_margin_top = 20
grid.add(SeatPixel("D03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D03")), row=34, column=8, width=3, height=2) (grid
grid.add(SeatPixel("D04", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D04")), row=34, column=11, width=3, height=2) .add(SeatPixel("D01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D01")), row=block_d_margin_top, column=block_d_margin_left, width=2, height=3)
grid.add(SeatPixel("D05", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D05")), row=34, column=14, width=3, height=2) .add(SeatPixel("D02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D02")), row=block_d_margin_top + 4, column=block_d_margin_left, width=2, height=3)
grid.add(SeatPixel("D06", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D06")), row=34, column=17, width=3, height=2) .add(SeatPixel("D03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D03")), row=block_d_margin_top + 8, column=block_d_margin_left, width=2, height=3)
.add(SeatPixel("D10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D10")), row=block_d_margin_top, column=block_d_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("D10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D10")), row=32, column=2, width=3, height=2) .add(SeatPixel("D11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D11")), row=block_d_margin_top + 4, column=block_d_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("D11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D11")), row=32, column=5, width=3, height=2) .add(SeatPixel("D12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D12")), row=block_d_margin_top + 8, column=block_d_margin_left + 3, width=2, height=3)
grid.add(SeatPixel("D12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D12")), row=32, column=8, width=3, height=2) )
grid.add(SeatPixel("D13", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D13")), row=32, column=11, width=3, height=2)
grid.add(SeatPixel("D14", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D14")), row=32, column=14, width=3, height=2)
grid.add(SeatPixel("D15", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("D15")), row=32, column=17, width=3, height=2)
# Block E # Block E
grid.add(SeatPixel("E01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E01")), row=27, column=2, width=3, height=2) block_e_margin_left = 28
grid.add(SeatPixel("E02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E02")), row=27, column=5, width=3, height=2) block_e_margin_top = 20
grid.add(SeatPixel("E03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E03")), row=27, column=8, width=3, height=2) (grid
grid.add(SeatPixel("E04", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E04")), row=27, column=11, width=3, height=2) .add(SeatPixel("E01", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E01")), row=block_e_margin_top, column=block_e_margin_left, width=2, height=3)
grid.add(SeatPixel("E05", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E05")), row=27, column=14, width=3, height=2) .add(SeatPixel("E02", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E02")), row=block_e_margin_top + 4, column=block_e_margin_left, width=2, height=3)
grid.add(SeatPixel("E06", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E06")), row=27, column=17, width=3, height=2) .add(SeatPixel("E03", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E03")), row=block_e_margin_top + 8, column=block_e_margin_left, width=2, height=3)
.add(SeatPixel("E10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E10")), row=block_e_margin_top, column=block_e_margin_left + 3, width=2, height=3)
.add(SeatPixel("E11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E11")), row=block_e_margin_top + 4, column=block_e_margin_left + 3, width=2, height=3)
.add(SeatPixel("E12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E12")), row=block_e_margin_top + 8, column=block_e_margin_left + 3, width=2, height=3)
)
grid.add(SeatPixel("E10", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E10")), row=25, column=2, width=3, height=2) # Middle Wall
grid.add(SeatPixel("E11", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E11")), row=25, column=5, width=3, height=2) for y in range(0, 13):
grid.add(SeatPixel("E12", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E12")), row=25, column=8, width=3, height=2) grid.add(WallPixel(), row=y, column=10)
grid.add(SeatPixel("E13", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E13")), row=25, column=11, width=3, height=2) for y in range(19, MAX_GRID_HEIGHT_PIXELS):
grid.add(SeatPixel("E14", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E14")), row=25, column=14, width=3, height=2) grid.add(WallPixel(), row=y, column=10)
grid.add(SeatPixel("E15", on_press_cb=self.seat_clicked_cb, seat=self.get_seat("E15")), row=25, column=17, width=3, height=2)
# Stage # Stage
grid.add(TextPixel(text="Bühne"), row=16, column=1, width=29, height=4) for x in range(11, MAX_GRID_WIDTH_PIXELS):
# grid.add(WallPixel(), row=35, column=x)
# Drinks grid.add(TextPixel(text="Bühne"), row=36, column=11, width=24, height=9)
grid.add(TextPixel(text="G\ne\nt\nr\nä\nn\nk\ne"), row=20, column=30, width=4, height=12)
# Drinks
grid.add(TextPixel(text="G\ne\nt\nr\nä\nn\nk\ne"), row=21, column=11, width=3, height=11)
# Main Entrance
grid.add(TextPixel(text="H\na\nl\nl\ne\nn\n\ne\ni\nn\ng\na\nn\ng"), row=33, column=56, width=4, height=27)
#
# Sleeping # Sleeping
grid.add(TextPixel(icon_name="material/bed"), row=1, column=1, width=20, height=14) grid.add(TextPixel(icon_name="material/bed"), row=1, column=1, width=4, height=11)
# Toilet # Toilet
grid.add(TextPixel(icon_name="material/wc"), row=1, column=42, width=19, height=10) grid.add(TextPixel(icon_name="material/floor", no_outline=True), row=1, column=7, width=3, height=2)
grid.add(TextPixel(icon_name="material/wc"), row=12, column=42, width=19, height=10) grid.add(TextPixel(icon_name="material/north", no_outline=True), row=3, column=7, width=3, height=2)
grid.add(TextPixel(icon_name="material/wc"), row=5, column=7, width=3, height=2)
# Entry/Helpdesk # Entry/Helpdesk
grid.add(TextPixel(text="Einlass\n &Orga"), row=40, column=22, width=8, height=12) grid.add(TextPixel(text="Einlass\n &Orga"), row=19, column=3, width=7, height=5)
# Wall below Entry/Helpdesk
for y in range(24, MAX_GRID_HEIGHT_PIXELS):
grid.add(WallPixel(), row=y, column=3)
# Entry Arrow
grid.add(TextPixel(icon_name="material/east", no_outline=True), row=15, column=1, width=2, height=2)
return Rectangle( return Rectangle(
content=grid, content=grid,

View File

@ -1,6 +1,6 @@
from functools import partial from functools import partial
from rio import Component, Text, Icon, TextStyle, Rectangle, Spacer, Color, PointerEventListener, Column, Row 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
@ -22,13 +22,13 @@ class SeatPixel(Component):
def build(self) -> Component: def build(self) -> Component:
return PointerEventListener( return PointerEventListener(
content=Rectangle( content=Rectangle(
content=Row( content=Column(
Text(f"{self.seat_id}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), 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, overflow="wrap")
), ),
min_width=1, min_width=1,
min_height=1, min_height=1,
fill=self.determine_color(), fill=self.determine_color(),
stroke_width = 0.1,
hover_stroke_width = 0.1, hover_stroke_width = 0.1,
grow_x=True, grow_x=True,
grow_y=True, grow_y=True,

View File

@ -10,8 +10,6 @@ from src.ez_lan_manager.components.DesktopNavigation import DesktopNavigation
class BasePage(Component): class BasePage(Component):
color = "secondary" color = "secondary"
corner_radius = (0, 0.5, 0, 0) corner_radius = (0, 0.5, 0, 0)
footer_size = 53.1
@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()
@ -22,16 +20,6 @@ class BasePage(Component):
async def on_window_size_change(self): async def on_window_size_change(self):
self.force_refresh() self.force_refresh()
@event.on_page_change
def check_needed_size(self):
# ToDo: Low-Prio: Change layout, so the footer is always as wide as needed.
# This is a workaround, bc the seating page needs more width
if "/seating" in self.session.active_page_url.__str__():
self.footer_size = 78.2
else:
self.footer_size = 53.1
self.force_refresh()
def build(self) -> Component: def build(self) -> Component:
content = Card( content = Card(
PageView(), PageView(),
@ -59,7 +47,7 @@ class BasePage(Component):
grow_x=False, grow_x=False,
grow_y=False, grow_y=False,
min_height=1.2, min_height=1.2,
min_width=self.footer_size, min_width=53.1,
margin_bottom=3 margin_bottom=3
), ),
Spacer(grow_x=True, grow_y=False), Spacer(grow_x=True, grow_y=False),