extend paypal payment info

This commit is contained in:
David Rodenkirchen 2025-02-03 08:29:36 +01:00
parent 5ad3af3515
commit e45eaa57e6

View File

@ -15,6 +15,7 @@ class AccountPage(Component):
balance: Optional[int] = None
transaction_history: list[Transaction] = list()
banking_info_revealer_open: bool = False
paypal_info_revealer_open: bool = False
@event.on_populate
async def on_populate(self) -> None:
@ -23,9 +24,12 @@ class AccountPage(Component):
self.balance = await self.session[AccountingService].get_balance(self.user.user_id)
self.transaction_history = await self.session[AccountingService].get_transaction_history(self.user.user_id)
async def _on_banking_info_press(self):
async def _on_banking_info_press(self) -> None:
self.banking_info_revealer_open = not self.banking_info_revealer_open
async def _on_paypal_info_press(self) -> None:
self.paypal_info_revealer_open = not self.paypal_info_revealer_open
def build(self) -> Component:
if not self.user and not self.balance:
return Column(
@ -55,10 +59,52 @@ class AccountPage(Component):
align_x=0.5
),
Text(
"Kontoinhaber: Einfach Zocken Gaming Gesellschaft\n"
"IBAN: DE47 5176 2434 0019 8566 07\n"
"BLZ: 51762434\n"
"BIC: GENODE51BIK\n\n"
"Kontoinhaber: Einfach Zocken Gaming Gesellschaft\n"
"IBAN: DE47 5176 2434 0019 8566 07\n"
"BLZ: 51762434\n"
"BIC: GENODE51BIK\n\n"
"Verwendungszweck:",
style=TextStyle(
fill=self.session.theme.background_color,
font_size=0.7
),
margin=0,
margin_bottom=1,
align_x=0.2
),
Text(
f"AUFLADUNG - {self.user.user_id} - {self.user.user_name}",
style=TextStyle(
fill=self.session.theme.neutral_color
),
margin=0,
margin_bottom=1,
align_x=0.5
)
),
margin=2,
margin_top=0,
margin_bottom=1,
grow_x=True
)
paypal_info_revealer = Revealer(
is_open=self.bind().paypal_info_revealer_open,
header=None,
content=Column(
Text(
"PayPal Verbindung:",
style=TextStyle(
fill=self.session.theme.background_color
),
margin=0,
margin_top=0,
margin_bottom=1,
align_x=0.5
),
Text(
"Empfänger: tech@ezgg-ev.de\n"
"Zahlungsart: Freunde und Familie\n"
"Verwendungszweck:",
style=TextStyle(
fill=self.session.theme.background_color,
@ -161,9 +207,20 @@ class AccountPage(Component):
on_press=self._on_banking_info_press
),
banking_info_revealer,
Button(
content=Text("PAYPAL (ohne Gebühr - Freunde&Familie)", 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,
on_press=self._on_paypal_info_press
),
paypal_info_revealer,
Link(
content=Button(
content=Text("PAYPAL (3% Gebühr)", style=TextStyle(fill=Color.from_hex("121212"), font_size=0.8), justify="center"),
content=Text("PAYPAL (3% Gebühr - Gewerblich)", style=TextStyle(fill=Color.from_hex("121212"), font_size=0.8), justify="center"),
shape="rectangle",
style="major",
color="secondary",