Added more info
This commit is contained in:
parent
7512ed6257
commit
dd575259b6
2 changed files with 11 additions and 7 deletions
|
|
@ -20,7 +20,7 @@ async function create_game_block(requested_game){
|
||||||
|
|
||||||
$('#boardgame_description').text(requested_game.description)
|
$('#boardgame_description').text(requested_game.description)
|
||||||
|
|
||||||
$('#boardgame_link').attr('href', 'https://boardgamegeek.com/boardgame/' + boardgame_id)
|
$('#boardgame_link').attr('href', 'https://boardgamegeek.com/boardgame/' + requested_game.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadGame() {
|
async function loadGame() {
|
||||||
|
|
@ -40,6 +40,16 @@ async function loadGame() {
|
||||||
|
|
||||||
create_info_block(requested_game.artists.length > 1 ? 'Artiesten' : 'Artiest', requested_game.artists.map(artist => artist.name).join(' - '))
|
create_info_block(requested_game.artists.length > 1 ? 'Artiesten' : 'Artiest', requested_game.artists.map(artist => artist.name).join(' - '))
|
||||||
|
|
||||||
|
if (requested_game.owned_info != null){
|
||||||
|
let acquisition_date = new Date(requested_game.owned_info.acquisition_date)
|
||||||
|
|
||||||
|
const date_formatter = new Intl.DateTimeFormat('nl-BE', { dateStyle: 'short' });
|
||||||
|
acquisition_date = date_formatter.format(acquisition_date)
|
||||||
|
|
||||||
|
create_info_block('Datum gekocht', acquisition_date)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(requested_game)
|
console.log(requested_game)
|
||||||
|
|
||||||
const playercount_votes_chart = $('#playercount_votes_chart')
|
const playercount_votes_chart = $('#playercount_votes_chart')
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3" id="info_block">
|
<div class="col-sm-3" id="info_block">
|
||||||
<h1>Info</h1>
|
<h1>Info</h1>
|
||||||
{# <h2>Spelers</h2>
|
|
||||||
<p><span id="player_min_amount"></span> - <span id="player_max_amount"></span></p>
|
|
||||||
|
|
||||||
<h2>Moeilijkheid</h2>
|
|
||||||
<p><span id="boardgame_weight"></span></p> #}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<canvas id="playercount_votes_chart"></canvas>
|
<canvas id="playercount_votes_chart"></canvas>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue