mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
3.2.1
This commit is contained in:
120
resources/views/admin/booking/create.blade.php
Normal file
120
resources/views/admin/booking/create.blade.php
Normal file
@@ -0,0 +1,120 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-primary">
|
||||
<h4 class="card-title">Réserver un item
|
||||
<a href="#"><i class="fa fa-question-circle float-right" aria-hidden="true"></i></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="log-data" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nom</th>
|
||||
<th>Categorie</th>
|
||||
<th>Description</th>
|
||||
<th>Quantité Disponible</th>
|
||||
<th width="15%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($items as $item)
|
||||
<tr>
|
||||
<td>{{$item->id}}</td>
|
||||
<td>{{$item->name}}</td>
|
||||
<td>{{$item->category()->name}}</td>
|
||||
<td>{!! $item->desc !!}</td>
|
||||
<td>{{$item->available()}}</td>
|
||||
<td>
|
||||
<button class="btn btn-primary btn-block" onclick='openModal("{{$item->id}}")'>Réserver</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="/admin/booking/{{$event_type}}/{{$event_id}}" class="btn btn-secondary">Retour</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="https://cdn.datatables.net/rowgroup/1.1.0/js/dataTables.rowGroup.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#log-data').DataTable({
|
||||
"order": [[ 2, "asc" ]],
|
||||
"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
|
||||
"rowGroup": {
|
||||
dataSrc: 2
|
||||
}
|
||||
});
|
||||
} );
|
||||
})(jQuery);
|
||||
|
||||
function openModal(id)
|
||||
{
|
||||
$.get("/api/booking/modal/item/" + id + "?api_token="+api_token, function (data) {
|
||||
$("#modal-content").html(data);
|
||||
});
|
||||
$('#createModal').modal('toggle')
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="createModal" tabindex="-1" role="dialog" aria-labelledby="schedulemodal" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="card card-signup card-plain">
|
||||
<div class="modal-header">
|
||||
<div class="card-header card-header-primary text-center">
|
||||
<h4 class="card-title">Confirmer la réservation</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post" action="">
|
||||
@csrf
|
||||
<div class="card-body" id="modal-content">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label>#</label>
|
||||
<input class="form-control" type="text" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Nom de l'item</label>
|
||||
<input class="form-control" type="text" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<input class="form-control" type="text" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Quantité</label>
|
||||
<input class="form-control" type="number" min="1" required disabled>
|
||||
<small class="form-text text-muted">Quantité d'item a réserver</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="submit" class="btn btn-primary" disabled>Confimer</button>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-label="Close">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
178
resources/views/admin/booking/index.blade.php
Normal file
178
resources/views/admin/booking/index.blade.php
Normal file
@@ -0,0 +1,178 @@
|
||||
@extends('layouts.admin.main')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-primary">
|
||||
<h4 class="card-title">Réservation
|
||||
<a href="#"><i class="fa fa-question-circle float-right" aria-hidden="true"></i></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h6>Information sur l'évènement</h6>
|
||||
<hr class="my-1">
|
||||
</div>
|
||||
<div class="col-md-6 mb-2">
|
||||
{{$event->name}}
|
||||
</div>
|
||||
<div class="col-md-6 mb-2 text-right">
|
||||
{{$event->fulltime}}
|
||||
</div>
|
||||
<div class="col-md-6 mb-2">
|
||||
{{$event->fulldesc}}
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
{{$event->user->fullname()}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="log-data" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nom</th>
|
||||
<th>Categorie</th>
|
||||
<th>Description</th>
|
||||
<th>Quantité</th>
|
||||
<th width="15%">
|
||||
<a name="add" id="add" class="btn btn-outline-primary" href="/admin/booking/{{$event_type}}/{{$event_id}}/add" role="button">Réserver un item</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($event->bookings as $booking)
|
||||
<tr>
|
||||
<td>{{$booking->item->id}}</td>
|
||||
<td>{{$booking->item->name}}</td>
|
||||
<td>{{$booking->item->category()->name}}</td>
|
||||
<td>{!! $booking->item->desc !!}</td>
|
||||
<td>{{$booking->amount}}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-just-icon" onclick="deleteBooking('{{$booking->id}}')"><i class="fas fa-times-circle"></i></button>
|
||||
<button class="btn btn-primary" onclick="openModal('{{$booking->id}}')"><i class="fas fa-edit"></i> Modifier</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('custom_scripts')
|
||||
<script src="https://cdn.datatables.net/rowgroup/1.1.0/js/dataTables.rowGroup.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#log-data').DataTable({
|
||||
"order": [[ 2, "asc" ]],
|
||||
"lengthMenu": [[25, 50, -1], [25, 50, "All"]],
|
||||
"rowGroup": {
|
||||
dataSrc: 2
|
||||
}
|
||||
});
|
||||
} );
|
||||
})(jQuery);
|
||||
|
||||
function deleteBooking(pid){
|
||||
swal({
|
||||
title: 'Êtes vous certain ?',
|
||||
text: "Vous ne pourrez annuler cette action",
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Oui',
|
||||
cancelButtonText: 'Non'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
|
||||
(function($) {
|
||||
$.post('/api/booking/delete?api_token='+api_token, { id: pid } , function(data) {
|
||||
console.log('Delete');
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
swal(
|
||||
'Supprimé!',
|
||||
"L'item a été supprimé",
|
||||
'success'
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function openModal(id)
|
||||
{
|
||||
$.get("/api/booking/modal/edit/item/" + id + "?api_token="+api_token, function (data) {
|
||||
$("#modal-content").html(data);
|
||||
});
|
||||
$('#editModal').modal('toggle')
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="schedulemodal" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="card card-signup card-plain">
|
||||
<div class="modal-header">
|
||||
<div class="card-header card-header-primary text-center">
|
||||
<h4 class="card-title">Modifier la réservation</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post" action="/admin/booking/edit">
|
||||
@csrf
|
||||
<div class="card-body" id="modal-content">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label>#</label>
|
||||
<input class="form-control" type="text" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Nom de l'item</label>
|
||||
<input class="form-control" type="text" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<input class="form-control" type="text" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Quantité</label>
|
||||
<input class="form-control" type="number" min="1" required disabled>
|
||||
<small class="form-text text-muted">Quantité d'item a réserver</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="submit" class="btn btn-primary" disabled>Confimer</button>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-label="Close">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
47
resources/views/admin/booking/modal/create.blade.php
Normal file
47
resources/views/admin/booking/modal/create.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label>#</label>
|
||||
<input class="form-control" type="text" disabled value="{{$item->id}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 d-none">
|
||||
<div class="form-group">
|
||||
<label>#</label>
|
||||
<input class="form-control" name="item_id" readonly type="text" value="{{$item->id}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Nom de l'item</label>
|
||||
<input class="form-control" type="text" disabled value="{{$item->name}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<textarea class="form-control" disabled>{!! $item->desc !!}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Quantité</label>
|
||||
<input class="form-control" name="amount" type="number" min="1" required value="1" max="{{$item->available()}}">
|
||||
<small class="form-text text-muted">Quantité d'item a réserver</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Commentaire</label>
|
||||
<textarea class="form-control" name="comment"></textarea>
|
||||
<small class="form-text text-muted">Commantaire pour l'officier d'appro</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="submit" class="btn btn-primary">Confimer</button>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-label="Close">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
49
resources/views/admin/booking/modal/edit.blade.php
Normal file
49
resources/views/admin/booking/modal/edit.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label>#</label>
|
||||
<input class="form-control" type="text" disabled value="{{$booking->item->id}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 d-none">
|
||||
<div class="form-group">
|
||||
<label>#</label>
|
||||
<input class="form-control" name="booking_id" readonly type="text" value="{{$booking->id}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Nom de l'item</label>
|
||||
<input class="form-control" type="text" disabled value="{{$booking->item->name}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<textarea class="form-control" disabled>{!! $booking->item->desc !!}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Quantité</label>
|
||||
<input class="form-control" name="amount" type="number" min="1" required value="{{$booking->amount}}" max="{{$booking->item->available()}}">
|
||||
<small class="form-text text-muted">Quantité d'item a réserver</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Commentaire</label>
|
||||
<textarea class="form-control" name="comment">
|
||||
{{$booking->comment}}
|
||||
</textarea>
|
||||
<small class="form-text text-muted">Commantaire pour l'officier d'appro</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="submit" class="btn btn-primary">Confimer</button>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-label="Close">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,6 +65,18 @@
|
||||
<div class="modal fade" id="schedulemodal" tabindex="-1" role="dialog" aria-labelledby="schedulemodal" aria-hidden="true">
|
||||
<div class="modal-dialog w-100 modal-lg mx-2 mx-lg-auto" role="document">
|
||||
<div class="modal-content" id="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Chargement</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body h-75">
|
||||
<div class="spinner-border text-muted"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<div class="form-group">
|
||||
<label for="location">Emplacement par défaut</label>
|
||||
<input type="text"
|
||||
class="form-control" name="location" id="location" aria-describedby="helpName" placeholder="Soirée d'instruction réguliere" required>
|
||||
class="form-control" name="location" id="location" aria-describedby="helpName" placeholder="Escadron" required>
|
||||
<small id="helpName" class="form-text text-muted">Emplacement par défaut de l'activité</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<div class="card-body">
|
||||
<div class="btn-group btn-block">
|
||||
<a name="add" id="add" class="btn btn-primary btn-block" href="/admin/item/add" role="button">Ajouter un item</a>
|
||||
<button name="add" id="add" disabled class="btn btn-outline-primary btn-block" href="/admin/booking/add" role="button">Réserver un item</button>
|
||||
</div>
|
||||
<hr>
|
||||
<table id="log-data" class="table table-striped table-bordered">
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
<table id="log-data" class="table table-striped table-no-bordered table-hover dataTable dtr-inline">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Horodatage </th>
|
||||
<th>Horodatage</th>
|
||||
<th>Type</th>
|
||||
<th>Résultat</th>
|
||||
<th>Utilisateur</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
@@ -22,9 +24,11 @@
|
||||
<tbody>
|
||||
@foreach ($log as $item)
|
||||
<tr>
|
||||
<td>{{$item->created_at}}</td>
|
||||
<td>{{$item->created_at}}</td>
|
||||
<th><span class="badge badge-pill badge-{{$item->typeColor()}}">{{$item->type}}</span></th>
|
||||
<th><span class="badge badge-pill badge-{{$item->result}}">Success</span></th>
|
||||
<td>{{\App\User::find($item->user_id)->fullname()}}</td>
|
||||
<td>{{$item->action}}</td>
|
||||
<td><a href="">{{$item->event}}</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<div class="col-sm-6 my-2">
|
||||
<div class="form-group">
|
||||
<label for="name">Nom du cours</label>
|
||||
<input type="text" name="name_n{{$i}}_p{{$p}}" id="name_n{{$i}}_p{{$p}}" class="form-control" aria-describedby="nameHelp" required value="{{$activity->course($p,$i)->name}}">
|
||||
<input type="text" name="name_n{{$i}}_p{{$p}}" id="name_n{{$i}}_p{{$p}}" class="form-control" aria-describedby="nameHelp" required @if($activity->course($p,$i) != null) value="{{$activity->course($p,$i)->name}}" @endif>
|
||||
<small id="nameHelp" class="text-muted">Veuillez entrer le nom du cours</small>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,7 +104,7 @@
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="name">Instructeur</label>
|
||||
<input type="text" name="instruc_n{{$i}}_p{{$p}}" id="instruc_n{{$i}}_p{{$p}}" class="form-control basicAutoComplete" aria-describedby="nameHelp" required value="{{\App\User::find($activity->course($p,$i)->user_id)->fullname()}}">
|
||||
<input type="text" name="instruc_n{{$i}}_p{{$p}}" id="instruc_n{{$i}}_p{{$p}}" class="form-control basicAutoComplete" aria-describedby="nameHelp" required @if($activity->course($p,$i) != null) value="{{\App\User::find($activity->course($p,$i)->user_id)->fullname()}}" @endif>
|
||||
<small id="nameHelp" class="text-muted">Veuillez entrer le nom de l'instructeur</small>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,14 +112,14 @@
|
||||
<div class="col-sm-6 my-2">
|
||||
<div class="form-group">
|
||||
<label for="name">OCOM</label>
|
||||
<input type="text" name="ocom_n{{$i}}_p{{$p}}" id="ocom_n{{$i}}_p{{$p}}" class="form-control" aria-describedby="nameHelp" required value="{{$activity->course($p,$i)->ocom}}">
|
||||
<input type="text" name="ocom_n{{$i}}_p{{$p}}" id="ocom_n{{$i}}_p{{$p}}" class="form-control" aria-describedby="nameHelp" required @if($activity->course($p,$i) != null) value="{{$activity->course($p,$i)->ocom}}" @endif>
|
||||
<small id="nameHelp" class="text-muted">Veuillez entrer l'OCOM</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 my-2">
|
||||
<div class="form-group">
|
||||
<label for="name">Lieux</label>
|
||||
<input type="text" name="loc_n{{$i}}_p{{$p}}" id="loc_n{{$i}}_p{{$p}}" class="form-control" placeholder="" aria-describedby="nameHelp" required value="{{$activity->course($p,$i)->location}}">
|
||||
<input type="text" name="loc_n{{$i}}_p{{$p}}" id="loc_n{{$i}}_p{{$p}}" class="form-control" placeholder="" aria-describedby="nameHelp" required @if($activity->course($p,$i) != null) value="{{$activity->course($p,$i)->location}}" @endif>
|
||||
<small id="nameHelp" class="text-muted">Veuillez entrer le lieux</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
86
resources/views/admin/schedule/print/event.blade.php
Normal file
86
resources/views/admin/schedule/print/event.blade.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
Du <strong>{{$event->date_begin}}</strong> au <strong>{{$event->date_end}}</strong><br>
|
||||
<small>{{$event->location}} </small>
|
||||
@if ($event->is_mandatory)
|
||||
Obligatoire -
|
||||
@else
|
||||
Optionnel -
|
||||
@endif
|
||||
@if (is_int($event->type))
|
||||
{{$event->type}}
|
||||
@else
|
||||
{{\App\ComplementaryActivity::find($event->type)->name}}
|
||||
@endif
|
||||
{!!$event->desc!!}
|
||||
@if (!$event->courses->isEmpty())
|
||||
<h4 class="title text-center">Horaire</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<th>Niveau</th>
|
||||
@for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++)
|
||||
<th>
|
||||
Période {{$p}} <small>{{\App\Config::all()->where('name','admin_periode_begin')->first()->data[$p]}} à {{\App\Config::all()->where('name','admin_periode_end')->first()->data[$p]}} </small>
|
||||
</th>
|
||||
@endfor
|
||||
</thead>
|
||||
<tbody>
|
||||
@for ($l = 1; $l <= \App\Config::getData('admin_level_in_schedule_nb'); $l++)
|
||||
<tr>
|
||||
<td class="col-md-2 m-3">
|
||||
Niveau {{$l}}
|
||||
</td>
|
||||
@for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++)
|
||||
<td>
|
||||
@foreach ($event->courses as $course)
|
||||
@if ($course->periode == $p && $course->level == $l)
|
||||
{{$course->name}}
|
||||
|
||||
@if(\App\User::find($course->user_id))
|
||||
{{\App\User::find($course->user_id)->fullname()}}
|
||||
@else
|
||||
Utilisateur Inconnu
|
||||
@endif
|
||||
{{$course->ocom}}
|
||||
{{$course->location}}
|
||||
<a>Réservation de materiel</a>
|
||||
<table>
|
||||
@if (!$course->bookings->isEmpty())
|
||||
<thead class="row">
|
||||
<th class="col-sm-8 p-2">
|
||||
<strong>Item</strong>
|
||||
</th>
|
||||
<th class="col-sm-4 text-right p-2">
|
||||
<strong>Quantité</strong>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($course->bookings as $booking)
|
||||
<tr>
|
||||
<td class="col-sm-8 p-2">
|
||||
<a href="/admin/item/{{$booking->item->id}}">{{$booking->item->name}}</a>
|
||||
</td>
|
||||
<td class="col-sm-4 text-right p-2">
|
||||
{{$booking->amount}}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@else
|
||||
<p class="text-center">
|
||||
<strong>Aucune réservation</strong>
|
||||
</p>
|
||||
@endif
|
||||
</table>
|
||||
@endif
|
||||
@endforeach
|
||||
@endfor
|
||||
@endfor
|
||||
</table>
|
||||
@endif
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">{{$activity->name}}</h4>
|
||||
<div style="height: 4rem;overflow: hidden;">{!! $activity->public_body !!}</div>
|
||||
<a name="activity" id="activity" class="btn btn-primary" href="/activity/{{$activity->id}}" role="button">Plus d'information</a>
|
||||
<a name="activity" id="activity" class="btn btn-primary mt-2" href="/activity/{{$activity->id}}" role="button">Plus d'information</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user