extend paypal payment info (#7)
Co-authored-by: David Rodenkirchen <drodenkirchen@linetco.com> Reviewed-on: Vereins-IT/ez-lan-manager#7
This commit is contained in:
parent
5ad3af3515
commit
198a449a55
@ -15,6 +15,7 @@ class AccountPage(Component):
|
|||||||
balance: Optional[int] = None
|
balance: Optional[int] = None
|
||||||
transaction_history: list[Transaction] = list()
|
transaction_history: list[Transaction] = list()
|
||||||
banking_info_revealer_open: bool = False
|
banking_info_revealer_open: bool = False
|
||||||
|
paypal_info_revealer_open: bool = False
|
||||||
|
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
async def on_populate(self) -> None:
|
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.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)
|
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
|
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:
|
def build(self) -> Component:
|
||||||
if not self.user and not self.balance:
|
if not self.user and not self.balance:
|
||||||
return Column(
|
return Column(
|
||||||
@ -55,10 +59,52 @@ class AccountPage(Component):
|
|||||||
align_x=0.5
|
align_x=0.5
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Kontoinhaber: Einfach Zocken Gaming Gesellschaft\n"
|
"Kontoinhaber: Einfach Zocken Gaming Gesellschaft\n"
|
||||||
"IBAN: DE47 5176 2434 0019 8566 07\n"
|
"IBAN: DE47 5176 2434 0019 8566 07\n"
|
||||||
"BLZ: 51762434\n"
|
"BLZ: 51762434\n"
|
||||||
"BIC: GENODE51BIK\n\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:",
|
"Verwendungszweck:",
|
||||||
style=TextStyle(
|
style=TextStyle(
|
||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
@ -161,9 +207,20 @@ class AccountPage(Component):
|
|||||||
on_press=self._on_banking_info_press
|
on_press=self._on_banking_info_press
|
||||||
),
|
),
|
||||||
banking_info_revealer,
|
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(
|
Link(
|
||||||
content=Button(
|
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",
|
shape="rectangle",
|
||||||
style="major",
|
style="major",
|
||||||
color="secondary",
|
color="secondary",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user