Ansichtsfeld für User

This commit is contained in:
Alexander Malzkuhn 2025-05-09 14:06:58 +02:00
parent 7225cbe89c
commit 363b30b0a8
3 changed files with 33 additions and 2 deletions

View File

@ -92,6 +92,33 @@ def homepage():
month_month_select.set_options(month_dict)
month_month_select.enable()
with ui.grid(columns='1fr auto 1fr').classes('w-full justify-center'):
ui.space()
with ui.expansion("Tagesnotiz", icon='o_description'):
with ui.grid(columns=2):
def button_enabler():
if daynote.value == "":
save_button.disable()
delete_button.disable()
else:
save_button.enable()
delete_button.enable()
daynote = ui.textarea(on_change=button_enabler).classes('col-span-2')
save_button = ui.button("Speichern")
save_button.disable()
def del_text():
daynote.value = ""
delete_button = ui.button("Löschen", on_click=del_text)
delete_button.disable()
notes = current_user.get_day_notes(today.year, today.month, today.day)
try:
daynote.value = notes[current_user.username]
except:
pass
ui.separator()
with ui.grid(columns='1fr auto 1fr').classes('w-full justify-center'):

View File

@ -14,6 +14,10 @@
"admin": "Testeintrag"
},
"2": {},
"1": {}
"1": {},
"9": {
"testuser1": "Dieses ist ein Testeintrag.",
"admin": "Das sollte der Testuser nicht sehen"
}
}
}

View File

@ -1,7 +1,7 @@
{
"username": "testuser1",
"fullname": "Pia Paulina",
"password": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"password": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"workhours": {
"2025-05-13": {
"1": "4",