85 lines
2.8 KiB
Python
85 lines
2.8 KiB
Python
# Zeiterfassung
|
|
# Quasi-Konstanten
|
|
|
|
import os
|
|
from pathlib import Path
|
|
from lib.web_ui import is_docker
|
|
import hashlib
|
|
|
|
app_title = "Zeiterfassung"
|
|
app_version = "0.0.0"
|
|
|
|
# Standardpfade
|
|
|
|
if is_docker():
|
|
scriptpath = "/settings"
|
|
backupfolder = "/backup"
|
|
else:
|
|
scriptpath = str(Path(os.path.dirname(os.path.abspath(__file__))).parent.absolute())
|
|
backupfolder = str(os.path.join(scriptpath, "backup"))
|
|
userfolder = "users"
|
|
|
|
# Dateinamen
|
|
|
|
usersettingsfilename = "settings.json"
|
|
photofilename = "photo.jpg"
|
|
va_file = "vacation_application.json"
|
|
|
|
# Status
|
|
|
|
status_in = "eingestempelt"
|
|
status_out = "ausgestempelt"
|
|
|
|
# Standardadmin Settings:
|
|
|
|
standard_adminsettings = { "admin_user": "admin",
|
|
"admin_password": "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
|
|
"port": "8090",
|
|
"secret": "ftgzuhjikg,mt5jn46uzer8sfi9okrmtzjhndfierko5zltjhdgise",
|
|
"times_on_touchscreen": True,
|
|
"photos_on_touchscreen": True,
|
|
"touchscreen": True,
|
|
"picture_height": 200,
|
|
"button_height": 300,
|
|
"user_notes": True,
|
|
"vacation_application": True,
|
|
"backup_folder": backupfolder,
|
|
"backup_api_key": hashlib.shake_256(bytes(backupfolder, 'utf-8')).hexdigest(20),
|
|
"holidays": { }
|
|
}
|
|
|
|
# Standard User Settings:
|
|
|
|
standard_usersettings = {
|
|
"username": "default",
|
|
"fullname": "Standardbenutzer",
|
|
"password": "37a8eec1ce19687d132fe29051dca629d164e2c4958ba141d5f4133a33f0688f",
|
|
"api_key": "1234567890",
|
|
"workhours": { }
|
|
}
|
|
|
|
# Abesenheiten
|
|
|
|
absence_entries = {"U": { "name": "Urlaub",
|
|
"color": "green",
|
|
"text-color": "black"},
|
|
"K": { "name": "Krankheit",
|
|
"color": "red",
|
|
"text-color": "white"},
|
|
"KK": { "name": "Krankheit Kind",
|
|
"color": "orange",
|
|
"text-color": "black"},
|
|
"UU": { "name": "Urlaub aus Überstunden",
|
|
"color": "green",
|
|
"text-color": "black"},
|
|
"F": { "name": "Fortbildung",
|
|
"color": "black",
|
|
"text-color": "white"},
|
|
"EZ": { "name": "Elternzeit",
|
|
"color": "purple",
|
|
"text-color": "white"},
|
|
"SO": { "name": "Sonstiges",
|
|
"color": "pink",
|
|
"text-color": "white"}
|
|
}
|