added users administration tool
This commit is contained in:
19
app/ui/selectboxes.py
Normal file
19
app/ui/selectboxes.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from app_db.app_db import get_list
|
||||
|
||||
def get_roles():
|
||||
|
||||
sql = """
|
||||
select
|
||||
role_id || ' | ' || role_text as text
|
||||
from
|
||||
roles
|
||||
"""
|
||||
df = get_list(sql)
|
||||
|
||||
return df
|
||||
|
||||
def get_id(id_text: str):
|
||||
id = int(id_text.split("|")[0])
|
||||
if not id:
|
||||
id = ""
|
||||
return id
|
||||
Reference in New Issue
Block a user