Ich Ich, gros commit
This commit is contained in:
85
resources/views/race/index.blade.php
Executable file
85
resources/views/race/index.blade.php
Executable file
@ -0,0 +1,85 @@
|
||||
@extends('layouts.loggedform')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('Liste des courses - ') <a href="{{route("race.create")}}"><i class="far fa-plus-square"></i></a>
|
||||
@endslot
|
||||
|
||||
|
||||
<table class="table table-bordered" id="race-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Nom</th>
|
||||
<th>Date de début</th>
|
||||
<th>Durée de la course</th>
|
||||
<th>Durée relai</th>
|
||||
<th>Durée stand</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var tableRaces = '';
|
||||
|
||||
$(() => {
|
||||
$.ajax({
|
||||
url: '/getraces',
|
||||
success: function (data) {
|
||||
|
||||
tableRaces = $('#race-table').DataTable({
|
||||
data: data.data,
|
||||
columns: [
|
||||
{
|
||||
data: 'id',
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return '<a href="/race/' + data + '" "><i class="far fa-edit"></i></a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'name'
|
||||
}
|
||||
,
|
||||
{
|
||||
data: 'start_date',
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return moment.utc(data).format('DD/MM/YYYY hh:mm:ss');
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
data: 'duration',
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return moment.utc(data * 1000 * 60).format('mm:ss');
|
||||
}
|
||||
}
|
||||
,
|
||||
{
|
||||
data: 'relay_default_duration',
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return moment.utc(data * 1000).format('mm:ss');
|
||||
}
|
||||
|
||||
}
|
||||
,
|
||||
{
|
||||
data: 'stand_duration',
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return moment.utc(data * 1000).format('mm:ss');
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endcomponent
|
||||
@endsection
|
Reference in New Issue
Block a user