28 lines
1.0 KiB
Python
28 lines
1.0 KiB
Python
import theme
|
|
from nicegui import ui
|
|
from main import checked_data
|
|
import data
|
|
from utils import Utils
|
|
|
|
color = {'tnt': theme.tnt, 'cubbies': theme.cubbies, 'sparks': theme.sparks}
|
|
|
|
@ui.page('/dashboard')
|
|
def dashboard():
|
|
with theme.frame('Dashboard'):
|
|
pass
|
|
|
|
with ui.grid().style('grid-template-columns: repeat(2, minmax(1px, 1fr));'):
|
|
peoples = Utils.get_unique_people()
|
|
for ppl in peoples:
|
|
pl = ''.join(ppl)
|
|
card_info = Utils.get_persons_incomplete(pl)
|
|
for item in card_info:
|
|
vcard = ui.label(item[1]).classes('hidden')
|
|
pcard = ui.label(item[2]).classes('hidden')
|
|
club = ui.label(item[3]).classes('hidden')
|
|
with ui.card().classes('grid justify-items-center').style(f'border: 2px solid {color[club.text.lower()]}'):
|
|
ui.label(pl).classes('absolute top-0 left-0 font-thin text-sm')
|
|
ui.label(vcard.text).classes('text-center')
|
|
ui.label(pcard.text).classes('font-bold')
|
|
|