set payment ramburs only

This commit is contained in:
2025-11-17 06:29:02 +02:00
parent 1281c157d7
commit 4eb465d994
2 changed files with 17 additions and 7 deletions

View File

@@ -144,6 +144,16 @@ class ProductPage:
) )
] ]
) )
self.add_co_card_placeholder = ft.Column()
if self.product['aviability'] == 'in_stock':
self.add_co_card_placeholder.controls.append(
ft.FilledButton(
"Adauga in cos",
icon=ft.Icons.SHOPPING_CART,
width=150,
on_click= lambda e, i=self.product: self.on_add_to_cart_btn_click(i)
)
)
self.product_content_details = ft.Column( self.product_content_details = ft.Column(
[ [
@@ -173,12 +183,7 @@ class ProductPage:
ft.Row( ft.Row(
[ [
self.quantify_group, self.quantify_group,
ft.FilledButton( self.add_co_card_placeholder
"Adauga in cos",
icon=ft.Icons.SHOPPING_CART,
width=150,
on_click= lambda e, i=self.product: self.on_add_to_cart_btn_click(i)
)
] ]
) )
], ],

View File

@@ -52,11 +52,12 @@ class Cart:
content=ft.Row( content=ft.Row(
[ [
ft.Radio(value="ramburs", label="Ramburs la curier"), ft.Radio(value="ramburs", label="Ramburs la curier"),
ft.Radio(value="plata_online_cu_cardul", label="Plata online cu cardul"), ft.Radio(value="plata_online_cu_cardul", label="Plata online cu cardul", disabled=True),
] ]
), ),
on_change=self.on_payment_value_change on_change=self.on_payment_value_change
) )
self.payment.value = 'ramburs'
self.payment_message = ft.Text("") self.payment_message = ft.Text("")
self.error_message = ft.Text( self.error_message = ft.Text(
color=ft.Colors.RED color=ft.Colors.RED
@@ -200,6 +201,10 @@ class Cart:
weight=ft.FontWeight.BOLD weight=ft.FontWeight.BOLD
), ),
self.payment, self.payment,
ft.Text(
"Cost transport 17 lei.",
weight=ft.FontWeight.BOLD
),
self.payment_message, self.payment_message,
ft.Row([self.error_message],alignment=ft.MainAxisAlignment.CENTER), ft.Row([self.error_message],alignment=ft.MainAxisAlignment.CENTER),
ft.Row( ft.Row(