50 lines
2.9 KiB
PHP
50 lines
2.9 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
@include('layouts.shared/title-meta', ['title' => "Team Dashboard"])
|
|
@include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
|
|
</head>
|
|
<body>
|
|
<div class="account-pages">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card border-primary border mb-3" id="compatition_team_dashboard_{{$competition->id}}">
|
|
<div class="card-header"><i class="mdi mdi-calendar-month-outline font-18 text-success me-1"></i> {{date("d M Y h:iA", strtotime($competition->validity_start))}} - {{date("d M Y h:iA", strtotime($competition->validity_end)-1 )}}</div>
|
|
<div class="card-body">
|
|
<h4 class="card-title text-primary">{{$competition->title}}</h4>
|
|
<!-- <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> -->
|
|
<div class="table-responsive">
|
|
<table class="table table-borderless table-nowrap table-hover table-centered m-0">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>Rank</th>
|
|
<th>User Name</th>
|
|
<th>Total Runs</th>
|
|
@foreach($competition->metrics as $metric)
|
|
<th>{{$metric->name}}</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($competition->userscore as $participant)
|
|
<tr>
|
|
<td><h2>{{$participant->rank}}</h2></td>
|
|
<td><h5 class="m-0 fw-normal">{{$participant->name}}</h5></td>
|
|
<td>{{ is_object($participant->score) ? '-' : $participant->score }}</td>
|
|
@foreach($competition->metrics as $metric)
|
|
<td>{{ isset($participant->{$metric->id}) ? $participant->{$metric->id} : 0 }}</td>
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |