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]
|
user_ratings_after: List[float]
|
||||||
variant_id: int
|
variant_id: int
|
||||||
variant_name: str
|
variant_name: str
|
||||||
|
num_suits: id
|
||||||
rating_type: int
|
rating_type: int
|
||||||
seed: str
|
seed: str
|
||||||
score: int
|
score: int
|
||||||
|
@ -176,6 +177,7 @@ def get_games() -> List[GameRow]:
|
||||||
" user_ratings_after,"
|
" user_ratings_after,"
|
||||||
" game_data.variant_id,"
|
" game_data.variant_id,"
|
||||||
" variants.name AS variant_name,"
|
" variants.name AS variant_name,"
|
||||||
|
" variants.num_suits,"
|
||||||
" rating_type,"
|
" rating_type,"
|
||||||
" seed,"
|
" seed,"
|
||||||
" score,"
|
" 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 "
|
" ON variant_ratings.league_id = game_data.league_id AND variant_ratings.primary_change = true "
|
||||||
"GROUP BY ("
|
"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.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",
|
"ORDER BY league_id DESC",
|
||||||
(True,)
|
(True,)
|
||||||
|
@ -844,4 +846,3 @@ def render_all():
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
render_all()
|
render_all()
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ var table_{{div_id}} = new Tabulator("#table-{{div_id}}", {
|
||||||
}},
|
}},
|
||||||
{% if show_player_num %}
|
{% if show_player_num %}
|
||||||
{title: "#P", field: "num_players"},
|
{title: "#P", field: "num_players"},
|
||||||
|
{title: "#S", field: "num_suits"},
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if show_var_rating %}
|
{% if show_var_rating %}
|
||||||
{title: "+/-", field: "variant_rating_change"},
|
{title: "+/-", field: "variant_rating_change"},
|
||||||
|
|
Loading…
Reference in a new issue