intrgrating suggestions after betta 1
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import flet as ft
|
||||
from pages.orders_in_page import OrdersInPage
|
||||
from pages.orders_out_page import OrdersOutPage
|
||||
from pages.archive_in_page import ArchiveInPage
|
||||
from pages.archive_page import ArchivePage
|
||||
|
||||
class OrdersPage:
|
||||
def __init__(self, page: ft.Page, dashboard):
|
||||
@@ -17,6 +19,16 @@ class OrdersPage:
|
||||
self.dashboard.placeholder.content = orders_out_page.build()
|
||||
self.dashboard.placeholder.update()
|
||||
|
||||
def on_archive_order_out_btn_click(self, e):
|
||||
archive = ArchivePage(self.page, self.dashboard, self)
|
||||
self.dashboard.placeholder.content = archive.build()
|
||||
self.dashboard.placeholder.update()
|
||||
|
||||
def on_archive_order_in_btn_click(self, e):
|
||||
archive = ArchiveInPage(self.page, self.dashboard, self)
|
||||
self.dashboard.placeholder.content = archive.build()
|
||||
self.dashboard.placeholder.update()
|
||||
|
||||
def build(self):
|
||||
return ft.Container(
|
||||
content=ft.Column(
|
||||
@@ -31,7 +43,7 @@ class OrdersPage:
|
||||
ft.Container(
|
||||
ft.Row(
|
||||
[
|
||||
ft.Text("Incoming orders", size=20)
|
||||
ft.Text("Orders In", size=20)
|
||||
],
|
||||
alignment=ft.MainAxisAlignment.CENTER
|
||||
),
|
||||
@@ -39,11 +51,22 @@ class OrdersPage:
|
||||
width=250,
|
||||
height=80
|
||||
),
|
||||
ft.FilledButton(
|
||||
"Orders In",
|
||||
on_click=self.on_orders_in_btn_click,
|
||||
width=150
|
||||
ft.Row(
|
||||
[
|
||||
ft.FilledButton(
|
||||
"Create",
|
||||
on_click=self.on_orders_in_btn_click,
|
||||
width=100
|
||||
),
|
||||
ft.FilledButton(
|
||||
"Archive",
|
||||
on_click=self.on_archive_order_in_btn_click,
|
||||
width=100
|
||||
)
|
||||
],
|
||||
alignment=ft.MainAxisAlignment.SPACE_EVENLY
|
||||
)
|
||||
|
||||
],
|
||||
alignment=ft.MainAxisAlignment.CENTER,
|
||||
horizontal_alignment=ft.CrossAxisAlignment.CENTER
|
||||
@@ -62,7 +85,7 @@ class OrdersPage:
|
||||
ft.Container(
|
||||
ft.Row(
|
||||
[
|
||||
ft.Text("Outcoming orders", size=20)
|
||||
ft.Text("Orders Out", size=20)
|
||||
],
|
||||
alignment=ft.MainAxisAlignment.CENTER
|
||||
),
|
||||
@@ -70,10 +93,20 @@ class OrdersPage:
|
||||
width=250,
|
||||
height=80
|
||||
),
|
||||
ft.FilledButton(
|
||||
"Orders Out",
|
||||
on_click=self.on_orders_out_btn_click,
|
||||
width=150
|
||||
ft.Row(
|
||||
[
|
||||
ft.FilledButton(
|
||||
"Create",
|
||||
on_click=self.on_orders_out_btn_click,
|
||||
width=100
|
||||
),
|
||||
ft.FilledButton(
|
||||
"Archive",
|
||||
on_click=self.on_archive_order_out_btn_click,
|
||||
width=100
|
||||
)
|
||||
],
|
||||
alignment=ft.MainAxisAlignment.SPACE_EVENLY
|
||||
)
|
||||
],
|
||||
alignment=ft.MainAxisAlignment.CENTER,
|
||||
|
||||
Reference in New Issue
Block a user