Datumshervorhebung im Adminbereich für heutigen Tag
This commit is contained in:
parent
3e3537c8b8
commit
085b0f1129
6
admin.py
6
admin.py
@ -120,6 +120,7 @@ def page_admin():
|
||||
ui.markdown("**Saldo**")
|
||||
ui.space()
|
||||
|
||||
|
||||
current_user = user(time_user.value)
|
||||
timestamps = current_user.get_timestamps(year=select_year.value, month=select_month.value)
|
||||
user_absent = current_user.get_absence(year=select_year.value, month=select_month.value)
|
||||
@ -140,7 +141,10 @@ def page_admin():
|
||||
for day in list(timestamps_dict):
|
||||
# Datum für Tabelle konstruieren
|
||||
day_in_list = datetime.datetime(int(select_year.value), int(select_month.value), day)
|
||||
ui.markdown(f"{day_in_list.strftime('%a')}., {day}. {calendar.month_name[int(select_month.value)]}")
|
||||
class_content = ""
|
||||
if day_in_list.date() == datetime.datetime.now().date():
|
||||
class_content = 'font-bold text-red-700 uppercase'
|
||||
ui.markdown(f"{day_in_list.strftime('%a')}., {day}. {calendar.month_name[int(select_month.value)]}").classes(class_content)
|
||||
|
||||
# Buchungen
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user