filter's fix
This commit is contained in:
parent
ff50ea6784
commit
4b4acdcb1b
6 changed files with 144 additions and 171 deletions
|
|
@ -5,20 +5,18 @@ from views.catalog_view import CatalogView
|
|||
class CatalogController:
|
||||
def __init__(self, database, full_name, role, auth):
|
||||
self.database = database
|
||||
self.model = ToyModel(database)
|
||||
self.view = CatalogView(full_name, role)
|
||||
self.auth = auth
|
||||
self.role = role
|
||||
self.model = ToyModel(database)
|
||||
|
||||
self.view.refresh_button.clicked.connect(
|
||||
self.load_data
|
||||
)
|
||||
self.view.sort_button.clicked.connect(
|
||||
self.sort_by_price
|
||||
)
|
||||
self.view.logout_button.clicked.connect(
|
||||
self.logout
|
||||
)
|
||||
age_groups = self.model.get_age_groups()
|
||||
suppliers = self.model.get_suppliers()
|
||||
|
||||
self.view = CatalogView(full_name, role, age_groups, suppliers)
|
||||
|
||||
self.view.refresh_button.clicked.connect(self.load_data)
|
||||
self.view.sort_button.clicked.connect(self.sort_by_price)
|
||||
self.view.logout_button.clicked.connect(self.logout)
|
||||
|
||||
self.load_data()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue