clea up code and layout
This commit is contained in:
@@ -7,8 +7,8 @@ from app_db.app_db import get_conn, get_list
|
||||
|
||||
def build_sidebar():
|
||||
|
||||
if st.session_state.get("authentication_status") != True:
|
||||
return
|
||||
# if st.session_state.get("authentication_status") != True:
|
||||
# return
|
||||
|
||||
authenticator = st.session_state.get("authenticator")
|
||||
username = st.session_state.get("name")
|
||||
@@ -21,19 +21,18 @@ def build_sidebar():
|
||||
df = st.session_state.get("df_sidebar")
|
||||
|
||||
with st.sidebar:
|
||||
|
||||
st.logo("app/images/GMN_Logo_neu_rgb.png", size="small")
|
||||
st.markdown(f"**{fullname}** ({role_text})")
|
||||
col1, col2, col3 = st.columns([2,2,1])
|
||||
|
||||
col1, col2 = st.columns(2)
|
||||
with col1:
|
||||
if st.button("Logout", use_container_width=True):
|
||||
authenticator.logout("Logout", "unrendered")
|
||||
st.rerun()
|
||||
|
||||
authenticator.logout("Logout")
|
||||
|
||||
with col2:
|
||||
if st.button("Home", use_container_width=True):
|
||||
st.switch_page("pages/home.py")
|
||||
st.divider()
|
||||
st.markdown("## Menü")
|
||||
|
||||
# --- Suchfeld ---
|
||||
query = st.text_input("Menü-Suche", "", placeholder="z.B. Umsatz, Kosten, User ...")
|
||||
@@ -42,6 +41,9 @@ def build_sidebar():
|
||||
# Aktive Seite ermitteln (für Expander-Status / Highlight)
|
||||
current_page = st.session_state.get("_page_path")
|
||||
|
||||
|
||||
|
||||
|
||||
# --- DF filtern, falls Suchbegriff gesetzt ---
|
||||
if query:
|
||||
mask = (
|
||||
@@ -55,6 +57,7 @@ def build_sidebar():
|
||||
if df_view.empty:
|
||||
st.info("Keine Einträge zum Suchbegriff gefunden.")
|
||||
return
|
||||
|
||||
|
||||
# --- Gruppiert durchlaufen ---
|
||||
for group_text, df_group in df_view.groupby("group_text"):
|
||||
|
||||
Reference in New Issue
Block a user