2 Commits
+15 -6
View File
@@ -75,6 +75,13 @@ with col1:
if not input_files:
st.warning("Keine .xlsx-Dateien im input/-Ordner gefunden.")
selected_input = None
else:
# Bei nur einer Datei: automatisch selektieren (keine Leerauswahl)
if len(input_files) == 1:
selected_input = st.selectbox(
"Input-Datei wählen:",
options=input_files,
)
else:
selected_input = st.selectbox(
"Input-Datei wählen:",
@@ -157,6 +164,13 @@ with col2:
real_templates = [t for t in template_files if not t.startswith("~")]
if not real_templates:
real_templates = template_files
# Bei nur einem Template: automatisch selektieren (keine Leerauswahl)
if len(real_templates) == 1:
selected_template = st.selectbox(
"Template wählen:",
options=real_templates,
)
else:
selected_template = st.selectbox(
"Template wählen:",
options=[""] + real_templates,
@@ -219,11 +233,7 @@ if st.session_state.input_validated and st.session_state.parsed_records:
st.session_state[f"sel_{emp}"] = False
# Mitarbeiter-Liste mit Rahmen
st.markdown(
'<div style="border:1px solid #d5d5d5; border-radius:6px; padding:8px 12px; '
'background:#fafafa; max-height:300px; overflow-y:auto">',
unsafe_allow_html=True,
)
with st.container(border=True):
selected_employees = []
for emp in employees:
key = f"sel_{emp}"
@@ -231,7 +241,6 @@ if st.session_state.input_validated and st.session_state.parsed_records:
st.session_state[key] = True
if st.checkbox(emp, value=st.session_state[key], key=key):
selected_employees.append(emp)
st.markdown("</div>", unsafe_allow_html=True)
st.caption(f"{len(selected_employees)} von {len(employees)} Mitarbeitern ausgewählt")
else: