#!/usr/bin/env python # encoding: utf-8 import dash_html_components as html import dash_core_components as dcc from .models import get_tribes, get_exams from .callbacks import * layout = html.Div( children=[ html.Header( children=[ html.H1("Analyse des notes"), html.P("Dernière sauvegarde", id="lastsave"), ], ), html.Main( children=[ html.Section( children=[ html.Div( children=[ "Classe: ", dcc.Dropdown( id="tribe", options=[ {"label": t["name"], "value": t["name"]} for t in get_tribes().values() ], value=next(iter(get_tribes().values()))["name"], ), ], ), html.Div( children=[ "Evaluation: ", dcc.Dropdown(id="exam_select"), ], ), ], id="selects", ), html.Section( children=[ html.Div( children=[ dash_table.DataTable( id="final_score_table", columns=[ {"name": "Étudiant", "id": "student_name"}, {"name": "Note", "id": "mark"}, {"name": "Barème", "id": "score_rate"}, ], ) ], id="final_score_table_container", ), ], id="analysis", ), html.Section( children=[ dash_table.DataTable( id="scores_table", columns=[], style_data_conditional=[], fixed_columns={}, editable=True, ) ], id="edit", ), ], ), dcc.Store(id="scores"), ], )