add seating plan legend, improve ui
This commit is contained in:
@@ -10,6 +10,7 @@ class SeatingPlanInfoBox(Component):
|
||||
seat_occupant: Optional[str] = None
|
||||
seat_price: int = 0
|
||||
is_blocked: bool = False
|
||||
user_has_seat: bool = False
|
||||
|
||||
def build(self) -> Component:
|
||||
if self.is_blocked:
|
||||
@@ -22,5 +23,20 @@ class SeatingPlanInfoBox(Component):
|
||||
min_height=10
|
||||
) 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"),
|
||||
Button(Text(f"Buchen ({AccountingService.make_euro_string_from_int(self.seat_price)})", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.1), wrap=True, justify="center"), shape="rounded", style="major", color="secondary", margin=1, grow_y=False), min_height=10
|
||||
Button(
|
||||
Text(
|
||||
f"Buchen ({AccountingService.make_euro_string_from_int(self.seat_price)})",
|
||||
margin=1,
|
||||
style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.1),
|
||||
wrap=True,
|
||||
justify="center"
|
||||
),
|
||||
shape="rounded",
|
||||
style="major",
|
||||
color="secondary",
|
||||
margin=1,
|
||||
grow_y=False,
|
||||
is_sensitive=not self.user_has_seat
|
||||
),
|
||||
min_height=10
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user