Ich Ich, gros commit
This commit is contained in:
62
resources/views/admin/create.blade.php
Normal file
62
resources/views/admin/create.blade.php
Normal file
@ -0,0 +1,62 @@
|
||||
@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,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Date de début'),
|
||||
'type' => 'date',
|
||||
'name' => 'start_date',
|
||||
'required' => true,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Date de fin'),
|
||||
'type' => 'date',
|
||||
'name' => 'end_date',
|
||||
'required' => true,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Durée'),
|
||||
'type' => 'integer',
|
||||
'name' => 'duration',
|
||||
'required' => true,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Autonomie du karting (Sec)'),
|
||||
'type' => 'integer',
|
||||
'name' => 'autonomie_kart_sec',
|
||||
'required' => true,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Autonomie du karting (Humide)'),
|
||||
'type' => 'integer',
|
||||
'name' => 'autonomie_kart_humide',
|
||||
'required' => true,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Durée des relais par défaut (Minutes)'),
|
||||
'type' => 'integer',
|
||||
'name' => 'relay_default_duration',
|
||||
'required' => true,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Duree dans les stands minimum (Minutes)'),
|
||||
'type' => 'integer',
|
||||
'name' => 'stand_duration',
|
||||
'required' => true,
|
||||
])
|
||||
@component('components.button')
|
||||
@lang('Envoyer')
|
||||
@endcomponent
|
||||
</form>
|
||||
@endcomponent
|
||||
@endsection
|
29
resources/views/admin/index.blade.php
Executable file
29
resources/views/admin/index.blade.php
Executable file
@ -0,0 +1,29 @@
|
||||
@extends('layouts.loggedform')
|
||||
@section('card')
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="widget-thumb widget-thumb-blue" onclick="location.href ='/race'">
|
||||
<div class="widget-thumb-wrap">
|
||||
<div class="widget-thumb-body">
|
||||
<h4 class="widget-thumb-heading-white">Gérer les courses</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="widget-thumb widget-thumb-red" onclick="location.href ='/race'">
|
||||
<h4 class="widget-thumb-heading-white">Gérer le championnat</h4>
|
||||
<div class="widget-thumb-wrap">
|
||||
<div class="widget-thumb-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(() => {
|
||||
console.log('Admin');
|
||||
})
|
||||
</script>
|
||||
@endsection
|
9
resources/views/admin/show.blade.php
Normal file
9
resources/views/admin/show.blade.php
Normal file
@ -0,0 +1,9 @@
|
||||
@extends('layouts.form')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('Ajouter une team')
|
||||
@endslot
|
||||
|
||||
@endcomponent
|
||||
@endsection
|
10
resources/views/components/kartChoice.blade.php
Executable file
10
resources/views/components/kartChoice.blade.php
Executable file
@ -0,0 +1,10 @@
|
||||
<div id="{{$idContainer}}" class="btn-group show">
|
||||
<button id="{{$btnId}}" type="button" class="btn dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
{{$btnText}}
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div id="{{$divId}}" class="dropdown-menu dropdown-menu-right" x-placement="bottom-end" style="position: absolute; transform: translate3d(-32px, 38px, 0px); top: 0px; left: 0px; will-change: transform;">
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" onclick="{{$onclickAction}}">{{$onclickText}}</a>
|
||||
</div>
|
||||
</div>
|
@ -3,7 +3,7 @@
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Dashboard</div>
|
||||
|
||||
@ -15,6 +15,8 @@
|
||||
@endif
|
||||
|
||||
You are logged in!
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,7 +4,7 @@
|
||||
@slot('title')
|
||||
@lang('Ajouter un karting')
|
||||
@endslot
|
||||
<form method="POST" action="{{ route('kart.store') }}">
|
||||
<form method="POST" action="{{ url('kart') }}">
|
||||
{{ csrf_field() }}
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Nom'),
|
||||
|
60
resources/views/kart/index.blade.php
Executable file
60
resources/views/kart/index.blade.php
Executable file
@ -0,0 +1,60 @@
|
||||
@extends('layouts.loggedform')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('Liste des kartings - ') <a href="{{route("kart.create")}}"><i class="far fa-plus-square"></i></a>
|
||||
@endslot
|
||||
|
||||
<table class="table table-bordered" id="pilots-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Nom du karting</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
var tableKarts = '';
|
||||
|
||||
|
||||
window.deletePilot = function (id) {
|
||||
$.ajax({
|
||||
url: '/kart/'+id,
|
||||
type: 'DELETE', // user.destroy
|
||||
success: function(result) {
|
||||
console.log('OK');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.reloadData = function (id, name) {
|
||||
|
||||
|
||||
document.cookie = "active_kartid=" + id;
|
||||
document.cookie = "active_kartname=" + name;
|
||||
|
||||
if (name != null)
|
||||
$('#btnChoiceKartTitle').html(name);
|
||||
}
|
||||
|
||||
$(() => {
|
||||
|
||||
tableKarts = $('#pilots-table').DataTable({
|
||||
processing: true,
|
||||
ajax: '/getkartsalldata',
|
||||
columns: [
|
||||
{
|
||||
data: 'id',
|
||||
searchable: false,
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return '<a onclick="deleteKart(' + data + ');tableKarts.row( $(this).parents(\'tr\') ).remove().draw();"><i class="far fa-trash-alt"></i></a>';
|
||||
}
|
||||
},
|
||||
{data: 'name'}
|
||||
]
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endcomponent
|
||||
@endsection
|
@ -7,32 +7,13 @@
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>{{ config('app.name', 'Album') }}</title>
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/metronic.css') }}" rel="stylesheet">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
||||
@yield('css')
|
||||
</head>
|
||||
<body>
|
||||
<div id="mySidenav" class="sidenav closed">
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()"><i class="fas fa-times"></i></a>
|
||||
<img src="{{ url('img/timelaps-logo.png') }}" >
|
||||
<a href="javascript:void(0)" class="openbtn" onclick="openNav()"><i class="fas fa-bars"></i></a>
|
||||
<br>
|
||||
<a href="#"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
<a href="#"><i class="fas fa-car-crash"></i> <span>Karts</span></a>
|
||||
<a href="#"><i class="fab fa-accessible-icon"></i> <span>Pilotes</span></a>
|
||||
<a href="#"><i class="fas fa-cogs"></i> <span>Paramètres</span></a>
|
||||
<a href="#"><i class="fas fa-flag-checkered"></i> <span>Démarrer</span></a>
|
||||
<a id="logout" class="nav-link" href="{{ route('logout') }}"><i class="fas fa-sign-out-alt"></i> <span>@lang('Déconnexion')</span></a>
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="hide">
|
||||
{{ csrf_field() }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
<!--<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="{{ route('home') }}">{{ config('app.name', 'Album') }}</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<nav id="mainNav" class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
@guest
|
||||
@ -43,6 +24,26 @@
|
||||
href="{{ route('register') }}">@lang('Inscription')</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="nav-item">
|
||||
@component('components.kartChoice')
|
||||
@slot('idContainer') btnChoiceRaceContainer @endslot
|
||||
@slot('btnId') btnChoiceRaceTitle @endslot
|
||||
@slot('btnText') Choix de la course @endslot
|
||||
@slot('divId') btnChoiceRace @endslot
|
||||
@slot('onclickAction') reloadRaceData(null, 'Choix de la course') @endslot
|
||||
@slot('onclickText') Choix de la course @endslot
|
||||
@endcomponent
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
@component('components.kartChoice')
|
||||
@slot('idContainer') btnChoiceKartContainer @endslot
|
||||
@slot('btnId') btnChoiceKartTitle @endslot
|
||||
@slot('btnText') Choix du kart @endslot
|
||||
@slot('divId') btnChoiceKart @endslot
|
||||
@slot('onclickAction') reloadData(null, 'Choix du kart') @endslot
|
||||
@slot('onclickText') Choix du kart @endslot
|
||||
@endcomponent
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a id="logout" class="nav-link" href="{{ route('logout') }}">@lang('Déconnexion')</a>
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="hide">
|
||||
@ -52,8 +53,58 @@
|
||||
@endguest
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="mySidenav" class="sidenav closed">
|
||||
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()"><i class="fas fa-times"></i></a>
|
||||
<img class="closebtn" src="{{ url('img/timelaps-logo3.png') }}">
|
||||
<a href="javascript:void(0)" class="openbtn" onclick="openNav()"><i class="fas fa-bars"></i></a>
|
||||
<br>
|
||||
@admin
|
||||
<a class="{{ currentRoute(route('admin.index')) }}" href="{{ route('admin.index') }}"><i class="fas fa-road"></i> <span>Admin dash</span></a>
|
||||
@endadmin
|
||||
<a class="{{ currentRoute(route('relay.index')) }}" href="{{ route('relay.index') }}"><i class="fas fa-tachometer-alt"></i> <span>Vue course</span></a>
|
||||
<a class="{{ currentRoute(route('kart.index')) }}" href="{{ route('kart.index') }}"><i class="fas fa-car-crash"></i> <span>Karts</span></a>
|
||||
<a class="{{ currentRoute(route('pilot.index')) }}" href="{{ route('pilot.index') }}"><i class="fab fa-accessible-icon"></i> <span>Pilotes</span></a>
|
||||
<a class="{{ currentRoute(route('race')) }}" href="{{ route('race') }}"><i class="fas fa-cogs"></i> <span>Paramètres</span></a>
|
||||
<a class="{{ currentRoute(route('home')) }}" href="{{ route('home') }}"><i class="fas fa-flag-checkered"></i> <span>Démarrer</span></a>
|
||||
<a id="logout" class="nav-link" href="{{ route('logout') }}"><i
|
||||
class="fas fa-sign-out-alt"></i> <span>@lang('Déconnexion')</span></a>
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="hide">
|
||||
{{ csrf_field() }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<imput id='kartid' type="hidden" value=""></imput>
|
||||
<imput id='raceid' type="hidden" value=""></imput>
|
||||
|
||||
<div id="main">
|
||||
<!--<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="{{ route('home') }}">{{ config('app.name', 'Album') }}</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
@guest
|
||||
<li class="nav-item{{ currentRoute(route('login')) }}"><a class="nav-link"
|
||||
href="{{ route('login') }}">@lang('Connexion')</a>
|
||||
</li>
|
||||
<li class="nav-item{{ currentRoute(route('register')) }}"><a class="nav-link"
|
||||
href="{{ route('register') }}">@lang('Inscription')</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="nav-item">
|
||||
<a id="logout" class="nav-link" href="{{ route('logout') }}">@lang('Déconnexion')</a>
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="hide">
|
||||
{{ csrf_field() }}
|
||||
</form>
|
||||
</li>
|
||||
@endguest
|
||||
</ul>
|
||||
</div>
|
||||
</nav>-->
|
||||
@yield('content')
|
||||
@yield('content')
|
||||
|
||||
</div>
|
||||
<script src="{{ asset('js/app.js') }}"></script>
|
||||
|
10
resources/views/layouts/loggedform.blade.php
Executable file
10
resources/views/layouts/loggedform.blade.php
Executable file
@ -0,0 +1,10 @@
|
||||
@extends('layouts.logged')
|
||||
@section('content')
|
||||
<div class="container ">
|
||||
<div class="row">
|
||||
<div class="col-md-10 offset-md-1">
|
||||
@yield('card')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
73
resources/views/pilot/create.blade.php
Executable file
73
resources/views/pilot/create.blade.php
Executable file
@ -0,0 +1,73 @@
|
||||
@extends('layouts.loggedform')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('Ajouter un pilote')
|
||||
@endslot
|
||||
<form method="POST" action="{{url('pilot')}}">
|
||||
{{ csrf_field() }}
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Prénom du pilote'),
|
||||
'type' => 'text',
|
||||
'name' => 'name',
|
||||
'required' => true,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Nom du pilote'),
|
||||
'type' => 'text',
|
||||
'name' => 'first_name',
|
||||
'required' => true,
|
||||
])
|
||||
@include('partials.form-group', [
|
||||
'title' => __('Temp de référence'),
|
||||
'type' => 'text',
|
||||
'name' => 'ref_time',
|
||||
'required' => true,
|
||||
])
|
||||
<div class="form-group">
|
||||
<label for="first_name">Nom du pilote</label>
|
||||
<select id="kart_id" class="form-control" name="kart_id" >
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@component('components.button')
|
||||
@lang('Envoyer')
|
||||
@endcomponent
|
||||
</form>
|
||||
@endcomponent
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(() => {
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/getkartsalldata',
|
||||
data: {},
|
||||
success: function (data) {
|
||||
$( "#kart_id" ).html("");
|
||||
$.each(data.data, function(k, v) {
|
||||
|
||||
if( $( "#kart_id" ).val() == v.id){
|
||||
$('#kart_id').append($('<option>', {
|
||||
value: v.id,
|
||||
selected:true,
|
||||
text: v.name
|
||||
}));
|
||||
}else{
|
||||
$('#kart_id').append($('<option>', {
|
||||
value: v.id,
|
||||
text: v.name
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endsection
|
93
resources/views/pilot/index.blade.php
Executable file
93
resources/views/pilot/index.blade.php
Executable file
@ -0,0 +1,93 @@
|
||||
@extends('layouts.loggedform')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('Liste des pilotes - ') <a href="{{route("pilot.create")}}"><i class="far fa-plus-square"></i></a>
|
||||
@endslot
|
||||
|
||||
<table class="table table-bordered" id="pilots-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>kart_name</th>
|
||||
<th>Name</th>
|
||||
<th>first_name</th>
|
||||
<th>ref_time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
var tablePilots = '';
|
||||
|
||||
|
||||
window.deletePilot = function (id) {
|
||||
$.ajax({
|
||||
url: '/pilot/' + id,
|
||||
type: 'DELETE', // user.destroy
|
||||
success: function (result) {
|
||||
console.log('OK');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.reloadData = function (id, name) {
|
||||
|
||||
|
||||
document.cookie = "active_kartid=" + id;
|
||||
document.cookie = "active_kartname=" + name;
|
||||
|
||||
if (name != null)
|
||||
$('#btnChoiceKartTitle').html(name);
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: '/getpilotsBykart',
|
||||
data: {id: id},
|
||||
success: function (data) {
|
||||
|
||||
$("#kartid").val(id);
|
||||
if (tablePilots != '')
|
||||
tablePilots.destroy();
|
||||
tablePilots = $('#pilots-table').DataTable({
|
||||
data: data.data,
|
||||
columns: [
|
||||
{
|
||||
data: 'id',
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return '<a onclick="deletePilot(' + data + ');tablePilots.row( $(this).parents(\'tr\') ).remove().draw();"><i class="far fa-trash-alt"></i></a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'kart_name'
|
||||
}
|
||||
,
|
||||
{
|
||||
data: 'name'
|
||||
}
|
||||
,
|
||||
{
|
||||
data: 'first_name'
|
||||
}
|
||||
,
|
||||
{
|
||||
data: 'ref_time',
|
||||
render:
|
||||
function (data, type, row, meta) {
|
||||
return moment.utc(data*1000).format('mm:ss');
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
})
|
||||
;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(() => {
|
||||
reloadData(getCookie('active_kartid'), getCookie('active_kartname'));
|
||||
})
|
||||
</script>
|
||||
@endcomponent
|
||||
@endsection
|
9
resources/views/pilot/show.blade.php
Executable file
9
resources/views/pilot/show.blade.php
Executable file
@ -0,0 +1,9 @@
|
||||
@extends('layouts.form')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('Ajouter une team')
|
||||
@endslot
|
||||
|
||||
@endcomponent
|
||||
@endsection
|
87
resources/views/race/create.blade.php
Executable file
87
resources/views/race/create.blade.php
Executable 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
|
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
|
9
resources/views/race/show.blade.php
Executable file
9
resources/views/race/show.blade.php
Executable file
@ -0,0 +1,9 @@
|
||||
@extends('layouts.form')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('Ajouter une team')
|
||||
@endslot
|
||||
|
||||
@endcomponent
|
||||
@endsection
|
42
resources/views/relay/index.blade.php
Executable file
42
resources/views/relay/index.blade.php
Executable file
@ -0,0 +1,42 @@
|
||||
@extends('layouts.loggedform')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
@lang('YO les ptits loups - ') <a href="{{route("pilot.create")}}"><i class="far fa-plus-square"></i></a>
|
||||
@endslot
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var tableRelays = '';
|
||||
var pilots = '';
|
||||
var raceParams = '';
|
||||
|
||||
window.reloadData = function (id, name) {
|
||||
|
||||
document.cookie = "active_kartid=" + id;
|
||||
document.cookie = "active_kartname=" + name;
|
||||
|
||||
if (name != null)
|
||||
$('#btnChoiceKartTitle').html(name);
|
||||
|
||||
$.ajax({
|
||||
url: '/getpilotsBykart',
|
||||
data: {id: id},
|
||||
success: function (data) {
|
||||
pilots = data.data;
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '/getRaceParams',
|
||||
success: function (data) {
|
||||
raceParams = data.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(() => {
|
||||
reloadData(getCookie('active_kartid'), getCookie('active_kartname'));
|
||||
})
|
||||
</script>
|
||||
@endsection
|
@ -1,4 +1,4 @@
|
||||
@extends('layouts.form')
|
||||
@extends('layouts.loggedform')
|
||||
@section('card')
|
||||
@component('components.card')
|
||||
@slot('title')
|
||||
|
Reference in New Issue
Block a user