Rapport-Laravel/resources/views/competition/result.blade.php

100 lines
4.0 KiB
PHP

@extends('layouts.vertical', ["page_title"=> "Add & Edit Products"])
@section('css')
<!-- third party css -->
<!-- third party css end -->
@endsection
@section('content')
<!-- Start Content-->
<div class="container-fluid">
<!-- end page title -->
@if(session()->has('message'))
<div class="alert alert-success mt-3">
{{ session()->get('message') }}
</div>
@endif
<div class="row mt-3">
<div class="col-xl-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-6 mb-3">
<h4 class="page-title">Competition Live Score</h4>
</div>
<div class="col-md-6 mb-3">
<div class="float-end">
<a href="/competitions" class="btn btn-dark waves-effect waves-light">Back</a>
</div>
</div>
</div>
<h4>{{$competition->title}}</h4>
<div class="row">
<div class="col-md-4">
<!-- start due date -->
<p class="mt-2 mb-1 text-muted">Start Date & Time</p>
<div class="d-flex align-items-start">
<i class="mdi mdi-calendar-month-outline font-18 text-success me-1"></i>
<div class="w-100">
<h5 class="mt-1 font-size-14">
{{date("d M Y h:iA", strtotime($competition->validity_start))}}
</h5>
</div>
</div>
<!-- end due date -->
</div>
<div class="col-md-4">
<!-- assignee -->
<p class="mt-2 mb-1 text-muted">End Date & Time</p>
<div class="d-flex align-items-start">
<i class="mdi mdi-calendar-month-outline font-18 text-success me-1"></i>
<div class="w-100">
<h5 class="mt-1 font-size-14">
{{date("d M Y h:iA", strtotime($competition->validity_end))}}
</h5>
</div>
</div>
<!-- end assignee -->
</div>
<!-- end col -->
</div>
<!-- end row -->
<h5 class="mt-3">Team Scores:</h5>
<div class="table-responsive">
<table class="table table-borderless table-nowrap table-hover table-centered m-0">
<thead class="table-light">
<tr>
<th colspan="2">Team Name</th>
<th>Score</th>
</tr>
</thead>
<tbody>
@foreach($competition->participants as $participant)
@if($participant->type == 'Team')
<tr>
<td style="width: 36px;">
<img src="{{$participant->team->image}}" alt="contact-img" title="contact-img" class="avatar-md" />
</td>
<td><h5 class="m-0 fw-normal">{{$participant->team->name}}</h5></td>
<td>{{$participant->score}}</td>
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
</div>
</div> <!-- end card-->
</div> <!-- end col -->
</div>
</div>
@endsection