2024-10-07 13:31:17 -04:00
|
|
|
import theme
|
|
|
|
|
from nicegui import ui
|
2024-10-07 15:17:24 -04:00
|
|
|
import data
|
2024-10-07 18:14:27 -04:00
|
|
|
from utils import Utils
|
2024-10-07 15:17:24 -04:00
|
|
|
|
2024-10-07 18:14:27 -04:00
|
|
|
color = {'tnt': theme.tnt, 'cubbies': theme.cubbies, 'sparks': theme.sparks}
|
2024-10-07 13:31:17 -04:00
|
|
|
|
|
|
|
|
@ui.page('/dashboard')
|
|
|
|
|
def dashboard():
|
|
|
|
|
with theme.frame('Dashboard'):
|
|
|
|
|
pass
|
|
|
|
|
|
2024-10-07 18:14:27 -04:00
|
|
|
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')
|
2024-10-07 15:17:24 -04:00
|
|
|
|