Add functionality to list teams on manage page
parent
90ef696b71
commit
6fdbaedc79
|
@ -125,6 +125,45 @@ CATEGORIES.push(new Category(
|
|||
}
|
||||
));
|
||||
|
||||
CATEGORIES.push(new Category(
|
||||
"teams",
|
||||
async function getTeams() {
|
||||
return await Data.getTeams();
|
||||
},
|
||||
async function listTeamHeaders() {
|
||||
const headerRow = document.createElement('tr');
|
||||
|
||||
const nameHeader = document.createElement('th');
|
||||
nameHeader.textContent = "Name";
|
||||
headerRow.appendChild(nameHeader);
|
||||
|
||||
const sportHeader = document.createElement('th');
|
||||
sportHeader.textContent = "Sport";
|
||||
headerRow.appendChild(sportHeader);
|
||||
|
||||
itemsListTable.appendChild(headerRow);
|
||||
},
|
||||
function listTeam(team, row) {
|
||||
const nameCell = document.createElement('td');
|
||||
nameCell.textContent = team.name;
|
||||
row.appendChild(nameCell);
|
||||
|
||||
const sportCell = document.createElement('td');
|
||||
Data.getSportName(team.sportID)
|
||||
.then(data => sportCell.textContent = data);
|
||||
row.appendChild(sportCell);
|
||||
},
|
||||
async function addSeason() {
|
||||
//
|
||||
},
|
||||
async function submitSeason() {
|
||||
//
|
||||
},
|
||||
async function editSeason() {
|
||||
|
||||
}
|
||||
));
|
||||
|
||||
|
||||
|
||||
async function listItems(category) {
|
||||
|
|
Reference in New Issue