idac: added TA eval ranks to the frontend
This commit is contained in:
@@ -19,16 +19,15 @@ function loadRanking(courseId, pageNumber = 1) {
|
||||
var total_pages = data.total_pages;
|
||||
|
||||
// Generate the HTML table
|
||||
var tableHtml = '<div class="table-responsive"><table class="table table-hover"><thead><tr><th scope="col">#</th><th scope="col">Name</th><th scope="col">Car</th><th scope="col">Time</th><th scope="col" class="d-none d-lg-table-cell">Store</th><th scope="col" class="d-none d-lg-table-cell">Date</th></tr></thead><tbody>';
|
||||
var tableHtml = '<div class="table-responsive"><table class="table table-hover"><thead><tr><th scope="col">#</th><th scope="col">Name/Car</th><th scope="col">Time</th><th scope="col">Eval</th><th scope="col" class="d-none d-lg-table-cell">Store/Date</th></tr></thead><tbody>';
|
||||
$.each(data.ranking, function (i, ranking) {
|
||||
tableHtml += '<tr class="align-middle">';
|
||||
tableHtml += '<td>' + ranking.rank + '</td>';
|
||||
tableHtml += '<td>' + ranking.name + '</td>';
|
||||
tableHtml += '<td>' + getCarName(ranking.style_car_id) + '</td>';
|
||||
tableHtml += '<td>' + ranking.name + '<br/>' + getCarName(ranking.style_car_id) + '</td>';
|
||||
tableHtml += '<td>' + formatGoalTime(ranking.record) + '</td>';
|
||||
tableHtml += '<td>' + evaluateRank(ranking.eval_id) + '</td>';
|
||||
// Ignore the Store and Date columns on small screens
|
||||
tableHtml += '<td class="d-none d-lg-table-cell">' + ranking.store + '</td>';
|
||||
tableHtml += '<td class="d-none d-lg-table-cell">' + ranking.update_date + '</td>';
|
||||
tableHtml += '<td class="d-none d-lg-table-cell">' + ranking.store + '<br/>' + ranking.update_date + '</td>';
|
||||
tableHtml += '</tr>';
|
||||
});
|
||||
tableHtml += '</tbody></table></div>';
|
||||
|
||||
Reference in New Issue
Block a user