Ansichtsfeld für User
This commit is contained in:
parent
7225cbe89c
commit
363b30b0a8
27
homepage.py
27
homepage.py
@ -92,6 +92,33 @@ def homepage():
|
|||||||
month_month_select.set_options(month_dict)
|
month_month_select.set_options(month_dict)
|
||||||
month_month_select.enable()
|
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()
|
ui.separator()
|
||||||
|
|
||||||
with ui.grid(columns='1fr auto 1fr').classes('w-full justify-center'):
|
with ui.grid(columns='1fr auto 1fr').classes('w-full justify-center'):
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
"admin": "Testeintrag"
|
"admin": "Testeintrag"
|
||||||
},
|
},
|
||||||
"2": {},
|
"2": {},
|
||||||
"1": {}
|
"1": {},
|
||||||
|
"9": {
|
||||||
|
"testuser1": "Dieses ist ein Testeintrag.",
|
||||||
|
"admin": "Das sollte der Testuser nicht sehen"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"username": "testuser1",
|
"username": "testuser1",
|
||||||
"fullname": "Pia Paulina",
|
"fullname": "Pia Paulina",
|
||||||
"password": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
"password": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
|
||||||
"workhours": {
|
"workhours": {
|
||||||
"2025-05-13": {
|
"2025-05-13": {
|
||||||
"1": "4",
|
"1": "4",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user