add article and pubications
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import flet as ft
|
||||
from pages.documents.home import DocumentsHome
|
||||
from pages.publications.articles import Articles as ClientArticlesPage
|
||||
|
||||
class NavigationUser:
|
||||
def __init__(self, page: ft.Page, home):
|
||||
@@ -12,8 +13,8 @@ class NavigationUser:
|
||||
label="Documente Juridice",
|
||||
)
|
||||
self.articole_si_publicatii = ft.NavigationRailDestination(
|
||||
icon=ft.Icons.ARTICLE_OUTLINED,
|
||||
selected_icon=ft.Icons.ARTICLE,
|
||||
icon=ft.Icons.MENU_BOOK_OUTLINED, # Icon mai potrivit pentru articole/blog
|
||||
selected_icon=ft.Icons.MENU_BOOK,
|
||||
label="Articole si Publicatii",
|
||||
)
|
||||
self.comunicare = ft.NavigationRailDestination(
|
||||
@@ -75,19 +76,23 @@ class NavigationUser:
|
||||
self.docs = DocumentsHome(self.page, self.home)
|
||||
return self.docs.build()
|
||||
|
||||
def build_articole_si_publicatii_client(self):
|
||||
self.articles_page = ClientArticlesPage(self.page, self.home)
|
||||
return self.articles_page.build()
|
||||
|
||||
async def on_nav_change(self, e):
|
||||
print( "Selected destination:", e.control.selected_index)
|
||||
if e.control.selected_index == 0:
|
||||
self.home.placeholder.content = self.build_documente_juridice()
|
||||
self.page.update()
|
||||
|
||||
if e.control.selected_index == 1:
|
||||
pass
|
||||
elif e.control.selected_index == 1: # Index for Articole si Publicatii
|
||||
self.home.placeholder.content = self.build_articole_si_publicatii_client()
|
||||
self.page.update()
|
||||
|
||||
if e.control.selected_index == 2:
|
||||
pass
|
||||
|
||||
if e.control.selected_index == 3:
|
||||
if e.control.selected_index == 9:
|
||||
await ft.SharedPreferences().clear()
|
||||
self.page.session.store.clear()
|
||||
self.page.go('/auth')
|
||||
Reference in New Issue
Block a user