Monatsumstellungen Admin Übersucht
Erste Funktionen zur Monatsauswahl
This commit is contained in:
parent
a1b15e98ea
commit
348c8e2f7f
28
users/testuser1/2024-11.txt
Normal file
28
users/testuser1/2024-11.txt
Normal file
@ -0,0 +1,28 @@
|
||||
1743965819
|
||||
1743965909
|
||||
1743966022
|
||||
1743966045
|
||||
1743966047
|
||||
1743966049
|
||||
1743967346
|
||||
1744889948
|
||||
1744889966
|
||||
1744989797
|
||||
1744989827
|
||||
1744989830
|
||||
1744989883
|
||||
1744989909
|
||||
1744989914
|
||||
1744989916
|
||||
1744991169
|
||||
1744991171
|
||||
1744991288
|
||||
1744991291
|
||||
1744991473
|
||||
1744991477
|
||||
1744991770
|
||||
1744991777
|
||||
1745181046
|
||||
1745181050
|
||||
1745240760
|
||||
1745240762
|
28
users/testuser1/2024-12.txt
Normal file
28
users/testuser1/2024-12.txt
Normal file
@ -0,0 +1,28 @@
|
||||
1743965819
|
||||
1743965909
|
||||
1743966022
|
||||
1743966045
|
||||
1743966047
|
||||
1743966049
|
||||
1743967346
|
||||
1744889948
|
||||
1744889966
|
||||
1744989797
|
||||
1744989827
|
||||
1744989830
|
||||
1744989883
|
||||
1744989909
|
||||
1744989914
|
||||
1744989916
|
||||
1744991169
|
||||
1744991171
|
||||
1744991288
|
||||
1744991291
|
||||
1744991473
|
||||
1744991477
|
||||
1744991770
|
||||
1744991777
|
||||
1745181046
|
||||
1745181050
|
||||
1745240760
|
||||
1745240762
|
28
users/testuser1/2025-2.txt
Normal file
28
users/testuser1/2025-2.txt
Normal file
@ -0,0 +1,28 @@
|
||||
1743965819
|
||||
1743965909
|
||||
1743966022
|
||||
1743966045
|
||||
1743966047
|
||||
1743966049
|
||||
1743967346
|
||||
1744889948
|
||||
1744889966
|
||||
1744989797
|
||||
1744989827
|
||||
1744989830
|
||||
1744989883
|
||||
1744989909
|
||||
1744989914
|
||||
1744989916
|
||||
1744991169
|
||||
1744991171
|
||||
1744991288
|
||||
1744991291
|
||||
1744991473
|
||||
1744991477
|
||||
1744991770
|
||||
1744991777
|
||||
1745181046
|
||||
1745181050
|
||||
1745240760
|
||||
1745240762
|
28
users/testuser1/2025-3.txt
Normal file
28
users/testuser1/2025-3.txt
Normal file
@ -0,0 +1,28 @@
|
||||
1743965819
|
||||
1743965909
|
||||
1743966022
|
||||
1743966045
|
||||
1743966047
|
||||
1743966049
|
||||
1743967346
|
||||
1744889948
|
||||
1744889966
|
||||
1744989797
|
||||
1744989827
|
||||
1744989830
|
||||
1744989883
|
||||
1744989909
|
||||
1744989914
|
||||
1744989916
|
||||
1744991169
|
||||
1744991171
|
||||
1744991288
|
||||
1744991291
|
||||
1744991473
|
||||
1744991477
|
||||
1744991770
|
||||
1744991777
|
||||
1745181046
|
||||
1745181050
|
||||
1745240760
|
||||
1745240762
|
69
web_ui.py
69
web_ui.py
@ -110,33 +110,11 @@ def page_admin():
|
||||
with ui.card():
|
||||
|
||||
with ui.row():
|
||||
current_year = datetime.datetime.now().year
|
||||
current_month = datetime.datetime.now().month
|
||||
|
||||
current_user = user(time_user.value)
|
||||
available_years = current_user.get_years()
|
||||
available_months = current_user.get_months(current_year)
|
||||
|
||||
available_months_dict = { }
|
||||
for element in available_months:
|
||||
available_months_dict[element] = calendar.month_name[int(element)]
|
||||
|
||||
select_month = ui.select(options=available_months_dict)
|
||||
def update_month_and_year():
|
||||
try:
|
||||
select_month.value = str(current_month)
|
||||
calendar_card.clear()
|
||||
except:
|
||||
pass
|
||||
|
||||
select_year = ui.select(options=available_years)
|
||||
try:
|
||||
select_year.value = str(current_year)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
ui.markdown(f"###Buchungen für {calendar.month_name[current_month]} {current_year}")
|
||||
|
||||
# Tabelle aufbauen
|
||||
with ui.card() as calendar_card:
|
||||
with ui.grid(columns=6):
|
||||
ui.markdown("Datum")
|
||||
@ -155,6 +133,49 @@ def page_admin():
|
||||
ui.markdown("+/-")
|
||||
ui.button("Bearbeiten")
|
||||
|
||||
def update_months():
|
||||
|
||||
current_user = user(time_user.value)
|
||||
available_months = current_user.get_months(select_year.value)
|
||||
|
||||
available_months_dict = {}
|
||||
for element in available_months:
|
||||
available_months_dict[element] = calendar.month_name[int(element)]
|
||||
select_month.clear()
|
||||
select_month.set_options(available_months_dict)
|
||||
select_month.value = list(available_months)[0]
|
||||
|
||||
current_year = datetime.datetime.now().year
|
||||
current_month = datetime.datetime.now().month
|
||||
|
||||
current_user = user(time_user.value)
|
||||
available_years = current_user.get_years()
|
||||
available_months = current_user.get_months(current_year)
|
||||
|
||||
available_months_dict = { }
|
||||
for element in available_months:
|
||||
available_months_dict[element] = calendar.month_name[int(element)]
|
||||
|
||||
select_month = ui.select(options=available_months_dict)
|
||||
|
||||
try:
|
||||
select_month.value = str(current_month)
|
||||
except:
|
||||
pass
|
||||
|
||||
select_year = ui.select(options=available_years, on_change=update_months)
|
||||
try:
|
||||
select_year.value = str(current_year)
|
||||
except:
|
||||
pass
|
||||
|
||||
ui.button("Aktualisieren", on_click=update_month_and_year)
|
||||
|
||||
ui.markdown(f"###Buchungen für {calendar.month_name[current_month]} {current_year}")
|
||||
|
||||
# Tabelle aufbauen
|
||||
update_month_and_year()
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user