Ich Ich, gros commit

This commit is contained in:
bglacial
2018-10-08 22:31:58 +02:00
parent ecded0947f
commit b11b2befd7
49 changed files with 37276 additions and 11977 deletions

View File

@ -0,0 +1,87 @@
@extends('layouts.loggedform')
@section('card')
@component('components.card')
@slot('title')
@lang('Paramétrer la course')
@endslot
<form method="POST" action="{{ route('race.store') }}">
{{ csrf_field() }}
@include('partials.form-group', [
'title' => __('Nom'),
'type' => 'text',
'name' => 'name',
'required' => true,
])
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="start_date">Date de début</label>
<div class="input-group date" id="datetimepicker2" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" name="start_date"
required="true"
data-target="#datetimepicker2" data-toggle="datetimepicker"/>
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
@include('partials.form-group', [
'title' => __('Autonomie du karting (Sec)'),
'type' => 'integer',
'name' => 'autonomie_kart_sec',
'required' => true,
])
@include('partials.form-group', [
'title' => __('Durée des relais par défaut (Minutes)'),
'type' => 'integer',
'name' => 'relay_default_duration',
'required' => true,
])
</div>
<div class="col-md-6">
@include('partials.form-group', [
'title' => __('Durée'),
'type' => 'integer',
'name' => 'duration',
'required' => true,
])
@include('partials.form-group', [
'title' => __('Autonomie du karting (Humide)'),
'type' => 'integer',
'name' => 'autonomie_kart_humide',
'required' => true,
])
@include('partials.form-group', [
'title' => __('Duree dans les stands minimum (Minutes)'),
'type' => 'integer',
'name' => 'stand_duration',
'required' => true,
])
</div>
</div>
<div class="form-group">
<label for="comment">Commentaire</label><br />
<textarea class="textarea-form" name="comment" rows="5" cols="50">
</textarea>
</div>
@component('components.button')
@lang('Envoyer')
@endcomponent
</form>
<script>
$(() => {
$('#datetimepicker2').datetimepicker({
locale: 'fr',
format:'YYYY-MM-DD HH:mm:ss'
});
})
</script>
@endcomponent
@endsection

View 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

View File

@ -0,0 +1,9 @@
@extends('layouts.form')
@section('card')
@component('components.card')
@slot('title')
@lang('Ajouter une team')
@endslot
@endcomponent
@endsection