Add suit count to tables
This commit is contained in:
parent
869598a886
commit
316ee30be1
2 changed files with 5 additions and 3 deletions
|
@ -112,6 +112,7 @@ class GameRow:
|
|||
user_ratings_after: List[float]
|
||||
variant_id: int
|
||||
variant_name: str
|
||||
num_suits: id
|
||||
rating_type: int
|
||||
seed: str
|
||||
score: int
|
||||
|
@ -176,6 +177,7 @@ def get_games() -> List[GameRow]:
|
|||
" user_ratings_after,"
|
||||
" game_data.variant_id,"
|
||||
" variants.name AS variant_name,"
|
||||
" variants.num_suits,"
|
||||
" rating_type,"
|
||||
" seed,"
|
||||
" score,"
|
||||
|
@ -226,7 +228,7 @@ def get_games() -> List[GameRow]:
|
|||
" ON variant_ratings.league_id = game_data.league_id AND variant_ratings.primary_change = true "
|
||||
"GROUP BY ("
|
||||
" game_data.game_id, game_data.num_players, users, user_ids, game_data.variant_id, variants.name, seed, score, num_turns,"
|
||||
" game_data.league_id, num_bottom_deck_risks, num_crits_lost, change, value_after, rating_type, user_rating_changes, user_ratings_after, datetime_finished"
|
||||
" game_data.league_id, num_bottom_deck_risks, num_crits_lost, change, value_after, rating_type, user_rating_changes, user_ratings_after, datetime_finished, num_suits"
|
||||
" ) "
|
||||
"ORDER BY league_id DESC",
|
||||
(True,)
|
||||
|
@ -843,5 +845,4 @@ def render_all():
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
render_all()
|
||||
|
||||
render_all()
|
|
@ -82,6 +82,7 @@ var table_{{div_id}} = new Tabulator("#table-{{div_id}}", {
|
|||
}},
|
||||
{% if show_player_num %}
|
||||
{title: "#P", field: "num_players"},
|
||||
{title: "#S", field: "num_suits"},
|
||||
{% endif %}
|
||||
{% if show_var_rating %}
|
||||
{title: "+/-", field: "variant_rating_change"},
|
||||
|
|
Loading…
Reference in a new issue