Small fix

This commit is contained in:
2024-11-07 12:43:52 +01:00
parent e78f31108d
commit eeca5f6336

View File

@@ -352,9 +352,12 @@ if (window.location.href.includes("arbitrage.html")) {
const PromoList = await pb.collection('promo').getFullList({});
const promoSelect = document.getElementById('Teampromo');
promoSelect.innerHTML = PromoList.map(promo => `<option id="${promo.id}" value="${promo.id}">${promo.name}</option>`).join('');
const PlayerList = await pb.collection('joueurs').getFullList({});
const PlayerList = await pb.collection('joueurs').getFullList({
expand: 'promo'
});
const playerSelect = document.getElementById('TeamPlayers');
playerSelect.innerHTML = PlayerList.map(player => `<option id="${player.id}" value="${player.id}">${player.name} ${player.prenom} ${promo.name}</option>`).join('');
// display the list of players with her name, firstname and promo
playerSelect.innerHTML = PlayerList.map(player => `<option id="${player.id}" value="${player.id}">${player.name} ${player.prenom} ${player.expand.promo.name}</option>`).join('');
const captaineSelect = document.getElementById('Teamcaptain');
captaineSelect.innerHTML = PlayerList.map(player => `<option id="${player.id}" value="${player.id}">${player.name} ${player.prenom} ${promo.name}</option>`).join('');
const SportList = await pb.collection('sport').getFullList({});